[caribou] daemon: Make "Run" D-Bus method no-op



commit f255365b287104f202d8a6d3eb0419cf28579fa8
Author: Daiki Ueno <dueno src gnome org>
Date:   Fri Sep 5 11:04:46 2014 +0900

    daemon: Make "Run" D-Bus method no-op
    
    Add a separate method for D-Bus activation, instead of checking
    multiple invocation in Daemon.run().
    
    https://bugzilla.gnome.org/show_bug.cgi?id=683712

 daemon/daemon.vala |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/daemon/daemon.vala b/daemon/daemon.vala
index 82b2c3f..ca80799 100644
--- a/daemon/daemon.vala
+++ b/daemon/daemon.vala
@@ -162,14 +162,13 @@ namespace Caribou {
                 on_text_caret_moved_ignore_error, "object:text-caret-moved");
         }
 
-        public void run () {
-            if (keyboard != null)
-            {
-                // This method is available over D-Bus, so ignore the request
-                // to run if the daemon is already running.
-                return;
-            }
+        [DBus (name = "Run")]
+        public void ping () {
+            // This method is called over D-Bus, upon activation.
+        }
 
+        [DBus (visible = false)]
+        public void run () {
             Bus.get_proxy.begin<_Keyboard> (BusType.SESSION,
                                             "org.gnome.Caribou.Keyboard",
                                             "/org/gnome/Caribou/Keyboard",


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