[Deskbar] [PATCH] Fix a few focus issues with Cuemiac



See ChangeLog in patch.

Cheers
Mikkel
? description-pak
? deskbar-applet_0.9cvs-20050125-1_i386.deb
? deskbar/evolution/.deps
? deskbar/evolution/.libs
? deskbar/evolution/_evolution.la
? deskbar/gnomedesktop/.deps
? deskbar/gnomedesktop/.libs
? deskbar/gnomedesktop/_gnomedesktop.la
? deskbar/gnomedesktop/_gnomedesktop.lo
? deskbar/gnomedesktop/_gnomedesktopmodule.lo
? deskbar/iconentry/.deps
? deskbar/iconentry/.libs
? deskbar/iconentry/_iconentry.la
? deskbar/iconentry/_iconentry.lo
? deskbar/iconentry/_iconentrymodule.lo
? deskbar/iconentry/ephy-icon-entry.lo
? deskbar/keybinder/.deps
? deskbar/keybinder/.libs
? deskbar/keybinder/_keybinder.la
? po/.intltool-merge-cache
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/deskbar-applet/ChangeLog,v
retrieving revision 1.229
diff -u -r1.229 ChangeLog
--- ChangeLog	25 Jan 2006 02:08:53 -0000	1.229
+++ ChangeLog	25 Jan 2006 15:48:35 -0000
@@ -1,3 +1,12 @@
+2006-01-25  Mikkel Kamstrup Erlandsen  <kamstrup daimi au dk>
+
+	* deskbar/ui/cuemiac/Cuemiac.py:
+	* deskbar/ui/cuemiac/CuemiacHistory.py:
+	Hide hisory on Esc
+	Toggle show of Cuemiac on keyboard shortcut, instead of always try to show
+	Correct handling of selected historic matches
+	
+
 2006-01-25  Raphael Slinckx  <rslinckx cvs gnome org>
 
 	* deskbar/DeskbarHistory.py:
Index: deskbar/ui/cuemiac/Cuemiac.py
===================================================================
RCS file: /cvs/gnome/deskbar-applet/deskbar/ui/cuemiac/Cuemiac.py,v
retrieving revision 1.19
diff -u -r1.19 Cuemiac.py
--- deskbar/ui/cuemiac/Cuemiac.py	25 Jan 2006 02:09:04 -0000	1.19
+++ deskbar/ui/cuemiac/Cuemiac.py	25 Jan 2006 15:48:35 -0000
@@ -576,7 +576,8 @@
 		self.cview.connect ("key-press-event", self.on_cview_key_press)
 		self.cview.get_selection().connect ("changed", self.scroll_cview_to_selection)
 		self.cview.connect ("match-selected", self.on_match_selected)
-		self.history_popup.connect ("match-selected", self.on_match_selected)
+		self.history_popup.connect ("match-selected", self.on_match_selected, True)
+		self.history_popup.connect ("key-press-event", self.on_history_key_press)
 		#self.cview.set_vadjustment (self.scroll_win.get_vadjustment())
 		
 		
@@ -598,11 +599,14 @@
 		self.invalid = True
 		self.applet.set_applet_flags(gnomeapplet.EXPAND_MINOR)
 		
-	def on_match_selected (self, cview, match):
+	def on_match_selected (self, cview, match, is_historic=False):
 		if match.__class__ == Nest or match.__class__ == CuemiacCategory:
 			return
 		self.emit ("match-selected", match[0], match[1])
-		self.deskbar_button.button_main.set_active (False)
+		if is_historic :
+			self.deskbar_button.button_arrow.set_active (False)
+		else:
+			self.deskbar_button.button_main.set_active (False)
 	
 	def show_entry (self):
 		if self.deskbar_button.get_active_main ():
@@ -648,9 +652,8 @@
 		self.popup.show_all ()
 		
 	def recieve_focus (self):
-		self.deskbar_button.set_active_main (True)
-		self.popup.show_all ()
-		self.entry.grab_focus ()
+		# Toggle expandedness of the popup
+		self.deskbar_button.button_main.set_active (not self.deskbar_button.button_main.get_active())
 	
 	def scroll_cview_to_selection (self, tree_sel):
 		model, iter = tree_sel.get_selected ()
@@ -745,6 +748,10 @@
 
 		return False
 		
+	def on_history_key_press (self, history, event):
+		if event.keyval == gtk.keysyms.Escape:
+			self.deskbar_button.button_arrow.set_active (False)
+			
 	def on_entry_activate(self, widget):
 		# if we have an active history item, use it
 		if self.history_entry_manager.current_history != None:
Index: deskbar/ui/cuemiac/CuemiacHistory.py
===================================================================
RCS file: /cvs/gnome/deskbar-applet/deskbar/ui/cuemiac/CuemiacHistory.py,v
retrieving revision 1.1
diff -u -r1.1 CuemiacHistory.py
--- deskbar/ui/cuemiac/CuemiacHistory.py	25 Jan 2006 01:31:26 -0000	1.1
+++ deskbar/ui/cuemiac/CuemiacHistory.py	25 Jan 2006 15:48:35 -0000
@@ -52,17 +52,16 @@
 		model, iter = self.get_selection().get_selected()
 		match = model[iter][0]
 		self.emit ("match-selected", match)
-		print "click"
 				
 	def __on_key_press (self, widget, event):
-		print "press"
 		model, iter = self.get_selection().get_selected()
 		if iter is None:
 			return False
 		match = model[iter][0]
-		# If this is a category or nest, toggle expansion state
 		if event.keyval == 65293: # enter
 			self.emit ("match-selected", match)
+			return True
+		
 
 class CuemiacHistoryPopup (CuemiacAlignedWindow) :
 
@@ -76,6 +75,7 @@
 		self.add (view)
 		
 		view.connect ("match-selected", self.on_match_selected)
+		view.connect ("key-press-event", self.on_view_key_press)
 	
 	def show (self):
 		self.update_position ()
@@ -86,10 +86,11 @@
 		CuemiacAlignedWindow.show_all (self)
 		
 	def on_match_selected (self, sender, match):
-		print sender, match
-		self.hide()
 		self.emit ("match-selected", match)
+
+	def on_view_key_press (self, view, event):
+		self.emit ("key-press-event", event)
 		
 if gtk.pygtk_version < (2,8,0):	
 	gobject.type_register (CuemiacHistoryView)
-	gobject.type_register (CuemiacHistoryPopup)
\ No newline at end of file
+	gobject.type_register (CuemiacHistoryPopup)


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