Re: [Deskbar] Cuemiac CVS updates comming up



Mikkel Kamstrup Erlandsen wrote:
> Commited! I need help testing the entriac (both applet and window mode).
> I know that history navigation/focus is broken, but besides that please
> b0rk it and report it to me :-D
>
Prefect.

I tried to integrate window-mode into deskbar.
The patch is against the latest CVS version including the desbar-window
archive I provided.

The following files should be obsolote:
deskbar-applet-alt.py
DesbarWindow.py
DesbarWindowPreferences.py


- --
Greetings,
Sebastian
diff -ubr deskbar-applet/deskbar/deskbar-applet.py eclipse/workspace/deskbar-applet/deskbar/deskbar-applet.py
--- deskbar-applet/deskbar/deskbar-applet.py	2006-04-10 20:40:17.000000000 +0200
+++ eclipse/workspace/deskbar-applet/deskbar/deskbar-applet.py	2006-06-17 17:13:48.000000000 +0200
@@ -59,7 +59,7 @@
 	app = gtk.Window(gtk.WINDOW_TOPLEVEL)
 	app.set_title("Deskbar Applet")
 	app.connect("destroy", gtk.main_quit)
-	app.set_property('resizable', False)
+	#app.set_property('resizable', False)
 	
 	applet = gnomeapplet.Applet()
 	applet.get_orient = lambda: gnomeapplet.ORIENT_DOWN
@@ -70,7 +70,6 @@
 	
 	return app
 		
-		
 def usage():
 	print """=== Deskbar applet: Usage
 $ deskbar-applet [OPTIONS]
@@ -85,9 +84,10 @@
 if __name__ == "__main__":	
 	standalone = False
 	cuemiac = False
+	window_mode = False
 	
 	try:
-		opts, args = getopt.getopt(sys.argv[1:], "hwc", ["help", "window", "cuemiac"])
+		opts, args = getopt.getopt(sys.argv[1:], "hwc", ["help", "window", "cuemiac","window-mode"])
 	except getopt.GetoptError:
 		# Unknown args were passed, we fallback to bahave as if
 		# no options were passed
@@ -101,6 +101,9 @@
 			standalone = True
 		elif o in ("-c", "--cuemiac"):
 			cuemiac = True
+		elif o == "--window-mode":
+			window_mode = True
+
 	
 	if standalone:
 		if cuemiac:
@@ -112,6 +115,14 @@
 		gnome.init(deskbar.defs.PACKAGE, deskbar.defs.VERSION)
 		build_window()
 		gtk.main()
+	elif window_mode:
+		deskbar.UI_OVERRIDE = deskbar.WINDOW_UI_NAME
+
+		import gnome
+		gnome.init(deskbar.defs.PACKAGE, deskbar.defs.VERSION)
+		build_window()
+		gtk.main()
+		
 	else:
 		gnomeapplet.bonobo_factory(
 			"OAFIID:Deskbar_Applet_Factory",
diff -ubr deskbar-applet/deskbar/DeskbarApplet.py eclipse/workspace/deskbar-applet/deskbar/DeskbarApplet.py
--- deskbar-applet/deskbar/DeskbarApplet.py	2006-05-31 13:39:43.000000000 +0200
+++ eclipse/workspace/deskbar-applet/deskbar/DeskbarApplet.py	2006-06-19 17:05:54.000000000 +0200
@@ -13,6 +13,7 @@
 from deskbar.Keybinder import get_deskbar_keybinder
 from deskbar.ui.cuemiac.CuemiacButtonUI import CuemiacButtonUI
 from deskbar.ui.entriac.CuemiacEntryUI import CuemiacEntryUI
+from deskbar.ui.window.CuemiacWindowUI import CuemiacWindowUI
 
 
 class DeskbarApplet:
@@ -60,6 +61,11 @@
 			self.ui = CuemiacButtonUI (applet, self.prefs)
 		elif ui_name == deskbar.ENTRIAC_UI_NAME:
 			self.ui = CuemiacEntryUI(applet, self.prefs)
+		elif ui_name == deskbar.WINDOW_UI_NAME:
+			self.ui = CuemiacWindowUI(applet, self.prefs)
+			self.ui.connect('show-preferences', self.on_preferences, None)
+			self.ui.connect('show-about', self.on_about, None)
+			self.ui.connect('clear-history', self.on_clear_history, None)
 			
 		# Set up the chosen UI
 		self.set_up_ui_signals ()
diff -ubr deskbar-applet/deskbar/__init__.py eclipse/workspace/deskbar-applet/deskbar/__init__.py
--- deskbar-applet/deskbar/__init__.py	2006-05-31 13:39:43.000000000 +0200
+++ eclipse/workspace/deskbar-applet/deskbar/__init__.py	2006-06-17 16:39:46.000000000 +0200
@@ -92,6 +92,7 @@
 
 ENTRIAC_UI_NAME = "Entriac"
 CUEMIAC_UI_NAME = "Cuemiac"
+WINDOW_UI_NAME = "Window"
 
 # GConf key for list of enabled handlers, when uninstalled, use a debug key to not conflict
 # with development version
diff -ubr deskbar-applet/deskbar/ui/window/CuemiacWindowUI.py eclipse/workspace/deskbar-applet/deskbar/ui/window/CuemiacWindowUI.py
--- deskbar-applet/deskbar/ui/window/CuemiacWindowUI.py	2006-06-12 22:49:22.000000000 +0200
+++ eclipse/workspace/deskbar-applet/deskbar/ui/window/CuemiacWindowUI.py	2006-06-19 16:57:50.000000000 +0200
@@ -34,8 +34,8 @@
         </menubar>
     </ui>'''
     
-    def __init__(self):
-        DeskbarUI.__init__ (self, None, None)
+    def __init__(self, applet, prefs):
+        DeskbarUI.__init__ (self, applet, prefs)
         CuemiacLayoutProvider.__init__ (self)
         
         self.cuemiac = CuemiacUIManager ()
@@ -45,7 +45,7 @@
         self.window.set_title(_('Deskbar'))
         
         self.vbox = gtk.VBox()
-        self.window.add(self.vbox)
+        #self.window.add(self.vbox)
         
         # Menubar
         self.ui_manager = gtk.UIManager()
@@ -140,7 +140,7 @@
         self.menubar.show()
         self.statusbar.show()
         self.vbox.show()
-        self.window.show()
+        #self.window.show()
         
     def __on_quit_activate(self, widget):
         self.close_view()
@@ -173,6 +173,7 @@
         Called when the UI should be in/active because modules are loading
         """
         self.vbox_main.set_sensitive(active)
+        self.history_frame.hide()
         if active:
             self.entry.grab_focus()
         
@@ -183,7 +184,7 @@
         """
         Return the widget to be displayed for this UI.
         """
-        return self.window
+        return self.vbox
     
     def close_view(self, *args):
         """


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]