From 3f6509b748c05717deba62ebe2967b131d9a7bdb Mon Sep 17 00:00:00 2001 From: Nohemi Fernandez Date: Thu, 4 Aug 2011 12:54:36 -0500 Subject: 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 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'caribou') 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): -- cgit v1.2.1