diff options
author | Daiki Ueno <dueno@src.gnome.org> | 2014-09-05 11:04:46 +0900 |
---|---|---|
committer | Daiki Ueno <dueno@src.gnome.org> | 2014-09-05 16:42:23 +0900 |
commit | f255365b287104f202d8a6d3eb0419cf28579fa8 (patch) | |
tree | 6d7730c40f837bc161e7b6183df79fa0991ddadd /daemon | |
parent | eec37cc6aa3b3c1aa254d6e7c9253e62c40f7d61 (diff) | |
download | caribou-f255365b287104f202d8a6d3eb0419cf28579fa8.tar.gz |
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
Diffstat (limited to 'daemon')
-rw-r--r-- | 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", |