Since I don't have commit access it is a bit tricky providing these changes in a sane way, but here goes. I've taken the classes from Cuemiac.py and separated them out into different files. Now there no longer is a Cuemiac.py at all. The file with the UI is called CuemiacButtonUI.py. I've also attached a patch to make the rest of deskbar comply with this new layout. Howto use the attachments: - Apply patch - delete deskbar/ui/cuemiac - Unpack the attached tarball in deskbar/ui (it contains the new cuemiac dir) This is only the first step for a proper refactoring. There has been some discussion lately as to what, and what not, the DeskbarApplet class should take care of. Right now it actually does a few UI related things. Also there is some code duplication going on between the entry UI and the button ui. This should be more readily fixable now that we don't have one big file with everything cuemiac in it. Cheers, Mikkel
? evolution/.deps ? evolution/.libs ? evolution/_evolution.la ? gnomedesktop/.deps ? gnomedesktop/.libs ? gnomedesktop/_gnomedesktop.la ? gnomedesktop/_gnomedesktop.lo ? gnomedesktop/_gnomedesktopmodule.lo ? handlers/tracker.py ? handlers/tracker2.py ? iconentry/.deps ? iconentry/.libs ? iconentry/_iconentry.la ? iconentry/_iconentry.lo ? iconentry/_iconentrymodule.lo ? iconentry/ephy-icon-entry.lo ? keybinder/.deps ? keybinder/.libs ? keybinder/_keybinder.la ? ui/flatlist ? ui/flatlist-0.0.0.0.0.1.tgz ? ui/cuemiac/CuemiacAppletButton.py ? ui/cuemiac/CuemiacButtonUI.py ? ui/cuemiac/CuemiacItems.py ? ui/cuemiac/CuemiacModel.py ? ui/cuemiac/CuemiacTreeView.py Index: DeskbarApplet.py =================================================================== RCS file: /cvs/gnome/deskbar-applet/deskbar/DeskbarApplet.py,v retrieving revision 1.43 diff -u -r1.43 DeskbarApplet.py --- DeskbarApplet.py 10 Apr 2006 18:40:17 -0000 1.43 +++ DeskbarApplet.py 11 Apr 2006 19:55:25 -0000 @@ -11,7 +11,7 @@ from deskbar.ui.DeskbarPreferencesUI import show_preferences from deskbar.DeskbarAppletPreferences import DeskbarAppletPreferences from deskbar.Keybinder import get_deskbar_keybinder -from deskbar.ui.cuemiac.Cuemiac import CuemiacUI +from deskbar.ui.cuemiac.CuemiacButtonUI import CuemiacButtonUI from deskbar.ui.entriac.CuemiacEntryUI import CuemiacEntryUI @@ -51,7 +51,7 @@ ui_name = deskbar.UI_OVERRIDE if ui_name == deskbar.CUEMIAC_UI_NAME: - self.ui = CuemiacUI (applet, self.prefs) + self.ui = CuemiacButtonUI (applet, self.prefs) elif ui_name == deskbar.ENTRIAC_UI_NAME: self.ui = CuemiacEntryUI(applet, self.prefs) @@ -293,7 +293,7 @@ ui_name = value.get_string() if ui_name == deskbar.CUEMIAC_UI_NAME: - self.ui = CuemiacUI (self.applet, self.prefs) + self.ui = CuemiacButtonUI (self.applet, self.prefs) elif ui_name == deskbar.ENTRIAC_UI_NAME: self.ui = CuemiacEntryUI(self.applet, self.prefs) Index: ui/entriac/CuemiacEntryUI.py =================================================================== RCS file: /cvs/gnome/deskbar-applet/deskbar/ui/entriac/CuemiacEntryUI.py,v retrieving revision 1.15 diff -u -r1.15 CuemiacEntryUI.py --- ui/entriac/CuemiacEntryUI.py 7 Apr 2006 18:53:50 -0000 1.15 +++ ui/entriac/CuemiacEntryUI.py 11 Apr 2006 19:55:25 -0000 @@ -4,10 +4,9 @@ import deskbar from deskbar.ui.DeskbarUI import DeskbarUI from deskbar.ui.cuemiac.CuemiacAlignedWindow import CuemiacAlignedWindow -from deskbar.ui.cuemiac.Cuemiac import CuemiacModel -from deskbar.ui.cuemiac.Cuemiac import CuemiacTreeView -from deskbar.ui.cuemiac.Cuemiac import Nest -from deskbar.ui.cuemiac.Cuemiac import CuemiacCategory +from deskbar.ui.cuemiac.CuemiacModel import CuemiacModel +from deskbar.ui.cuemiac.CuemiacTreeView import CuemiacTreeView +from deskbar.ui.cuemiac.CuemiacItems import CuemiacCategory, Nest from deskbar.ui.cuemiac.CuemiacHistory import CuemiacHistoryPopup from deskbar.DeskbarHistory import get_deskbar_history from deskbar.ui.EntryHistoryManager import EntryHistoryManager
Attachment:
cuemiac-refact.tgz
Description: application/compressed-tar