r7101 - in bigboard/trunk: . bigboard



Author: walters
Date: 2007-12-19 17:24:30 -0600 (Wed, 19 Dec 2007)
New Revision: 7101

Modified:
   bigboard/trunk/bigboard/slideout.py
   bigboard/trunk/main.py
Log:
Make slideouts not docks anymore since we grab focus.
(This triggers metacity-cm to draw drop shadows).

Pass correct timestamp to search box on focus keypress.



Modified: bigboard/trunk/bigboard/slideout.py
===================================================================
--- bigboard/trunk/bigboard/slideout.py	2007-12-19 20:10:54 UTC (rev 7100)
+++ bigboard/trunk/bigboard/slideout.py	2007-12-19 23:24:30 UTC (rev 7101)
@@ -18,7 +18,8 @@
         self.__widget = widget
         self.__modal = modal
 
-        self.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DOCK)
+        # We're not really a dock window anymore since we grab the pointer
+        #self.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DOCK)
         self.set_resizable(False)
         self.set_keep_above(1)
         self.set_focus_on_map(0)

Modified: bigboard/trunk/main.py
===================================================================
--- bigboard/trunk/main.py	2007-12-19 20:10:54 UTC (rev 7100)
+++ bigboard/trunk/main.py	2007-12-19 23:24:30 UTC (rev 7101)
@@ -520,7 +520,12 @@
     @log_except()
     def __on_focus(self):
         _logger.debug("got focus keypress")
-        self.toggle_popout(gtk.get_current_event_time())
+        vis = gconf.client_get_default().get_bool(GCONF_PREFIX + 'visible')
+        ts = bigboard.keybinder.tomboy_keybinder_get_current_event_time()
+        if vis:
+            self.__do_focus_search(ts)
+        else:
+            self.toggle_popout(ts)
 
     def __append_metainfo(self, metainfo, **kwargs):
         try:
@@ -697,8 +702,11 @@
         if not self.__popped_out:
             _logger.debug("popout requested")
             self.__enter_popped_out_state()
-
+        self.__do_focus_search(xtimestamp)
+            
+    def __do_focus_search(self, xtimestamp):
         ## focus even if we were already shown
+        _logger.debug("presenting with ts %s", xtimestamp)
         self._dw.present_with_time(xtimestamp)
         self.__search_stock.focus()
 



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