[Sugar-devel] [record] Fixes to the UI

Anish Mangal anishmangal2002 at gmail.com
Mon Jun 7 03:42:38 EDT 2010


> Why don't you just fix hideAllWindows()?

Because it has a specific purpose. The ui works by first moving ALL
widgets off-screen (or dumping it in the corner as in this case) by
calling hideAllWindows() and then resizing and moving the widgets to
be displayed appropriately. If instead of moving them off-screen, I
actually hide the widgets, I won't be able to resize or move them.
That said, I could probably give better names to the methods in
question.

> great variable name that you inherited, there...might as well rename
> it to something more standard like "buttonBox" while you're at it.

Agreed :-)

On Mon, Jun 7, 2010 at 7:32 AM, Martin Dengler <martin at martindengler.com> wrote:
> On Mon, Jun 07, 2010 at 12:04:18AM +0530, anishmangal2002 at gmail.com wrote:
> [...]
>> @@ -884,6 +939,10 @@ class UI:
>>                      kids[i].setButtClickedId(BUTT_CLICKED_ID)
>>
>>
>> +    def actuallyHideAllWindows( self ):
>> +        for i in range (0, len(self.windowStack)):
>> +            self.windowStack[i].hide_all()
>> +
>>      def hideAllWindows( self ):
>>          for i in range (0, len(self.windowStack)):
>>              self.moveWinOffscreen( self.windowStack[i] )
>
> Why don't you just fix hideAllWindows()?
>
>> @@ -1913,22 +2036,22 @@ class ScrubberWindow(gtk.Window):
>>          self.add( self.hbox )
>>
>>          self.button = gtk.Button()
>> -        buttBox = gtk.EventBox()
>> -        buttBox.add(self.button)
>> -        buttBox.modify_bg( gtk.STATE_NORMAL, Constants.colorBlack.gColor )
>> +        self.buttBox = gtk.EventBox()
>> +        self.buttBox.add(self.button)
>> +        self.buttBox.modify_bg( gtk.STATE_NORMAL, Constants.colorBlack.gColor )
>
> great variable name that you inherited, there...might as well rename
> it to something more standard like "buttonBox" while you're at it.
>


More information about the Sugar-devel mailing list