[caribou: 3/23] Add timestamp to show/hide Gtk module methods



commit 3f6509b748c05717deba62ebe2967b131d9a7bdb
Author: Nohemi Fernandez <nf68 cornell edu>
Date:   Thu Aug 4 12:54:36 2011 -0500

    Add timestamp to show/hide Gtk module methods
    
    Several signals may be passed to the GNOME shell to show/hide
    the keyboard. Since, the signals may be received in a different
    order than they were sent, we ignore older messages and
    process the newer ones.

 caribou/antler/main.py           |    4 ++--
 caribou/antler/window.py         |    4 ++--
 libcaribou/keyboard-service.vala |    6 +++---
 3 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/caribou/antler/main.py b/caribou/antler/main.py
index 46c0453..6bd3932 100644
--- a/caribou/antler/main.py
+++ b/caribou/antler/main.py
@@ -14,10 +14,10 @@ class AntlerKeyboardService(Caribou.KeyboardService):
         loop = gobject.MainLoop()
         loop.run()
 
-    def do_show(self):
+    def do_show(self, timestamp):
         self.window.show_all()
 
-    def do_hide(self):
+    def do_hide(self, timestamp):
         self.window.hide()
 
     def do_set_cursor_location (self, x, y, w, h):
diff --git a/caribou/antler/window.py b/caribou/antler/window.py
index c567a93..a72203e 100644
--- a/caribou/antler/window.py
+++ b/caribou/antler/window.py
@@ -386,9 +386,9 @@ class AntlerWindowDocked(AntlerWindow):
         x, y = self.get_position()
         return self.animated_move(x + self.get_allocated_width(), y)
 
-    def hide(self, timestamp):
+    def hide(self):
         animation = self._roll_out()
-        animation.connect('completed', lambda x: AntlerWindow.hide(self, timestamp))
+        animation.connect('completed', lambda x: AntlerWindow.hide(self))
 
 class AntlerWindowEntry(AntlerWindow):
     def __init__(self, keyboard_view_factory):
diff --git a/libcaribou/keyboard-service.vala b/libcaribou/keyboard-service.vala
index 0a8c7c9..2e7351e 100644
--- a/libcaribou/keyboard-service.vala
+++ b/libcaribou/keyboard-service.vala
@@ -3,8 +3,8 @@ namespace Caribou {
     public abstract class KeyboardService : Object {
         public abstract void set_cursor_location(int x, int y, int w, int h);
         public abstract void set_entry_location(int x, int y, int w, int h);
-        public abstract void show();
-        public abstract void hide();
+        public abstract void show(uint32 timestamp);
+        public abstract void hide(uint32 timestamp);
 
         protected void register_keyboard (string name) {
             string dbus_name = @"org.gnome.Caribou.$name";
@@ -45,4 +45,4 @@ namespace Caribou {
         }
 
     }
-}
\ No newline at end of file
+}



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