[caribou: 5/23] Add GLib Timeout to know when new windows are created
- From: Eitan Isaacson <eitani src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [caribou: 5/23] Add GLib Timeout to know when new windows are created
- Date: Fri, 12 Aug 2011 07:47:35 +0000 (UTC)
commit ad3bcc39c5c17b5e186a0659975e3705af201943
Author: Nohemi Fernandez <nf68 cornell edu>
Date: Thu Aug 4 13:05:58 2011 -0500
Add GLib Timeout to know when new windows are created
Right now there is no way to know whether a new window has
been created without checking it repeatedly, as is done in this
patch.
https://bugzilla.gnome.org/show_bug.cgi?id=655828
modules/gtk3/caribou-gtk-module.vala | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/modules/gtk3/caribou-gtk-module.vala b/modules/gtk3/caribou-gtk-module.vala
index 8be149c..6a7f553 100644
--- a/modules/gtk3/caribou-gtk-module.vala
+++ b/modules/gtk3/caribou-gtk-module.vala
@@ -21,8 +21,11 @@ namespace Caribou {
"/org/gnome/Caribou/Keyboard");
add_tracker ();
- GLib.Timeout.add (60, () => { add_tracker ();
- return true; });
+ // Need to use a timeout because there is currently no other
+ // way to know whether a new window has been created
+ // https://bugzilla.gnome.org/show_bug.cgi?id=655828
+ GLib.Timeout.add_seconds (10, () => { add_tracker ();
+ return true; });
} catch (Error e) {
stderr.printf ("%s\n", e.message);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]