#7476 NORM 8.2.0 (: Order control panel modules logically

Zarro Boogs per Child bugtracker at laptop.org
Thu Jul 10 16:46:01 EDT 2008


#7476: Order control panel modules logically
----------------------+-----------------------------------------------------
   Reporter:  Eben    |       Owner:  Eben                             
       Type:  defect  |      Status:  new                              
   Priority:  normal  |   Milestone:  8.2.0 (was Update.2)             
  Component:  sugar   |     Version:  Development build as of this date
 Resolution:          |    Keywords:  8.2.0:+ r?                       
Next_action:  code    |    Verified:  0                                
  Blockedby:          |    Blocking:                                   
----------------------+-----------------------------------------------------
Changes (by Eben):

  * keywords:  8.2.0:+ => 8.2.0:+ r?


Comment:

 Here's a patch which accomplishes the above specification:

 {{{
 diff --git a/src/controlpanel/gui.py b/src/controlpanel/gui.py
 index b07687f..79fa3b3 100644
 --- a/src/controlpanel/gui.py
 +++ b/src/controlpanel/gui.py
 @@ -115,8 +115,11 @@ class ControlPanel(gtk.Window):

      def _setup_options(self):
          row = 0
 -        column = 0
 -        for option in self._options:
 +        column = 2
 +        options = self._options.keys()
 +        options.sort()
 +
 +        for option in options:
              sectionicon =
 _SectionIcon(icon_name=self._options[option]['icon'],
 title=self._options[option]['title'],
 xo_color=self._options[option]['color'],
 @@ -125,13 +128,18 @@ class ControlPanel(gtk.Window):
                                 self.__select_option_cb, option)
              sectionicon.show()

 -            self._table.attach(sectionicon, column, column + 1, row, row
 + 1)
 -            self._options[option]['button'] = sectionicon
 +            if self._options[option]['title'].lower() == 'about me':
 +                self._table.attach(sectionicon, 0, 1, 0, 1)
 +            elif self._options[option]['title'].lower() == 'about my xo':
 +                self._table.attach(sectionicon, 1, 2, 0, 1)
 +            else:
 +                self._table.attach(sectionicon, column, column + 1, row,
 row + 1)
 +                column += 1
 +                if column == _MAX_COLUMNS:
 +                    column = 0
 +                    row += 1

 -            column += 1
 -            if column == _MAX_COLUMNS:
 -                column = 0
 -                row += 1
 +            self._options[option]['button'] = sectionicon

      def _show_main_view(self):
          self._set_toolbar(self._main_toolbar)

 }}}

-- 
Ticket URL: <http://dev.laptop.org/ticket/7476#comment:1>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system


More information about the Bugs mailing list