diff options
author | Eben Eliason <eben@sugar.(none)> | 2008-07-14 17:38:26 (GMT) |
---|---|---|
committer | Eben Eliason <eben@sugar.(none)> | 2008-07-14 17:38:26 (GMT) |
commit | 91c2ab6b302fcb87a3bf569c3f098bccdcda7116 (patch) | |
tree | cf9d262145b79c63c73e44211503cf105298e866 | |
parent | 8127e2680e101b36218b4576733a4d69537e5915 (diff) |
Order control panel modules logically
There are two related but independent parts to this:
1) always put "about me" and "about my XO" first
2) order the remiaining modules alphabetically
-rw-r--r-- | src/controlpanel/gui.py | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/src/controlpanel/gui.py b/src/controlpanel/gui.py index a1e8876..5693135 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,20 @@ 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 option == 'aboutme': + self._table.attach(sectionicon, 0, 1, 0, 1) + elif option == 'aboutxo': + 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) |