[caribou] daemon: Remove unnecessary deps on gtk+-3.0 and libxklavier



commit e704a554deab9060887a8ed54fa44f7478b54b72
Author: Daiki Ueno <dueno src gnome org>
Date:   Tue Oct 21 11:34:27 2014 +0900

    daemon: Remove unnecessary deps on gtk+-3.0 and libxklavier

 daemon/Makefile.am |    3 ---
 daemon/daemon.vala |    9 +++++----
 2 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/daemon/Makefile.am b/daemon/Makefile.am
index e6432ec..5c92be9 100644
--- a/daemon/Makefile.am
+++ b/daemon/Makefile.am
@@ -3,12 +3,9 @@ libexec_PROGRAMS = caribou
 caribou_VALAFLAGS = \
        --vapidir=$(top_srcdir)/vapi \
        --pkg config \
-       --pkg gtk+-3.0 \
        --pkg gdk-x11-3.0 \
        --pkg atspi-2 \
-       --pkg x11 \
        --pkg posix \
-       --pkg libxklavier \
        $(VALAFLAGS)
 
 caribou_CFLAGS = \
diff --git a/daemon/daemon.vala b/daemon/daemon.vala
index af6e895..6aa65a6 100644
--- a/daemon/daemon.vala
+++ b/daemon/daemon.vala
@@ -17,6 +17,7 @@ namespace Caribou {
         Atspi.Accessible current_acc;
         unowned Gdk.Display display;
         uint name_id;
+               GLib.MainLoop main_loop;
 
         public Daemon () {
             display = Gdk.Display.get_default ();
@@ -25,6 +26,7 @@ namespace Caribou {
                                     BusNameOwnerFlags.ALLOW_REPLACEMENT
                                     | BusNameOwnerFlags.REPLACE,
                                     on_bus_acquired, null, quit);
+                       main_loop = new GLib.MainLoop ();
         }
 
         ~Daemon () {
@@ -172,7 +174,7 @@ namespace Caribou {
                                             0,
                                             null,
                                             on_get_proxy_ready);
-            Gtk.main ();
+            main_loop.run ();
         }
 
         public void quit () {
@@ -191,8 +193,7 @@ namespace Caribou {
                 keyboard = null;
             }
 
-            if (Gtk.main_level () > 0)
-                Gtk.main_quit ();
+            main_loop.quit ();
         }
     }
 }
@@ -202,7 +203,7 @@ static const OptionEntry[] options = {
 };
 
 static int main (string[] args) {
-    Gtk.init (ref args);
+    Gdk.init (ref args);
 
     Intl.setlocale (LocaleCategory.ALL, "");
     Intl.bindtextdomain (Config.GETTEXT_PACKAGE, Config.LOCALEDIR);


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