[Sugar-devel] [PATCH] Fix for Ticket #1927

Anish Mangal anishmangal2002 at gmail.com
Thu May 6 01:09:43 EDT 2010


Thanks again for your feedback,

> The clear button persists in not flashing when I test it on XO-1.5.
> I've dug deeper and found it is probably because self.save() is being
> called, which is slow on an XO-1.5 since it is using SD.
>
> The timer_cb() is being called before the screen is updated, and so the
> button does not become colour highlighted.
>
> A fix is to reorder the widget signals so that flash_cb() is called
> before clearbutton_cb().  See patch below.

Incorporated as suggested. I see no change at my end in
sugar-emulator, so please verify it.

>> > ... the availability of grab is not obvious.
>>
>> The correct way to address this would be to fix the sugar gtk theme.
>
> Agreed.  I mention it because it is a usability problem with Pippy once
> it is patched.  I don't mind how you solve it.  I don't think it blocks
> adoption of your patch.

I discussed this on #sugar and feel that modifying the sugar-theme
would be the best way forward.


I missed adding keyboard props accelerators in the previous patches,
which I've added now.
<alt>+r = run
<alt>+s = stop
<alt>+c = clear

Cheers,
Anish Mangal

Anish Mangal



On Thu, May 6, 2010 at 3:13 AM, James Cameron <quozl at laptop.org> wrote:
> On Wed, May 05, 2010 at 08:29:13PM +0530, Anish Mangal wrote:
>> It will flash for *atleast* 400 milliseconds. Since the "Run" process
>> actually takes some time to execute, it will be colored for that
>> duration.
>
> The clear button persists in not flashing when I test it on XO-1.5.
> I've dug deeper and found it is probably because self.save() is being
> called, which is slow on an XO-1.5 since it is using SD.
>
> The timer_cb() is being called before the screen is updated, and so the
> button does not become colour highlighted.
>
> A fix is to reorder the widget signals so that flash_cb() is called
> before clearbutton_cb().  See patch below.
>
>> > ... the availability of grab is not obvious.
>>
>> The correct way to address this would be to fix the sugar gtk theme.
>
> Agreed.  I mention it because it is a usability problem with Pippy once
> it is patched.  I don't mind how you solve it.  I don't think it blocks
> adoption of your patch.
>
>> > Breaks compatibility with Sugar 0.84. ??"from sugar.graphics.toolbarbox
>> > import ToolbarBox" reports "ImportError: No module named toolbarbox".
>>
>> Fixed. Can you please check again.
>
> Checked, works fine on Sugar 0.84 now.
>
>> > There's also a trivial trailing whitespace warning from git when the
>> > patch is applied ... caused by one of the vectors in an SVG.
>>
>> Can you indicate the line number in the patch where the warning
>> occurred.  [...]
>
> It no longer occurs, with your latest 863d691.
>
> Here's the change I made to fix the clear button highlight:
>
> --- a/pippy_app.py
> +++ b/pippy_app.py
> @@ -116,9 +116,9 @@ class PippyActivity(ViewSourceActivity):
>         clearicon_color.set_from_file("%s/icons/eraser_color.svg" % os.getcwd()
>         clearbutton = ToolButton(label=_("_Clear"))
>         clearbutton.set_icon_widget(clearicon_bw)
> +        clearbutton.connect('clicked', self.clearbutton_cb)
>         clearbutton.connect('clicked', self.flash_cb, dict({'bw':clearicon_bw,
>             'color':clearicon_color}))
> -        clearbutton.connect('clicked', self.clearbutton_cb)
>         clearbutton.set_tooltip("Clear")
>         activity_toolbar.insert(clearbutton, 4)
>
> --
> James Cameron
> http://quozl.linux.org.au/
>


More information about the Sugar-devel mailing list