[polari/gnome-3-22] data: Fix telepathy client service
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari/gnome-3-22] data: Fix telepathy client service
- Date: Wed, 19 Oct 2016 17:54:55 +0000 (UTC)
commit fa24518d846f2fd0b775f2459291d91b5ee91d70
Author: Florian Müllner <fmuellner gnome org>
Date: Sat Aug 6 05:04:29 2016 +0200
data: Fix telepathy client service
We register Polari as a Telepathy client so mission-control can launch us
to handle channel requests even when not running. However as the specified
command does not actually start the telepathy client, the request will fail
after a timeout in this case.
Fix this by exposing the newly-added 'start-client' action on the command
line and use it to launch the telepathy service.
https://bugzilla.gnome.org/show_bug.cgi?id=770749
....freedesktop.Telepathy.Client.Polari.service.in | 2 +-
src/application.js | 19 +++++++++++++++++++
2 files changed, 20 insertions(+), 1 deletions(-)
---
diff --git a/data/org.freedesktop.Telepathy.Client.Polari.service.in
b/data/org.freedesktop.Telepathy.Client.Polari.service.in
index 741036d..e5d9aee 100644
--- a/data/org.freedesktop.Telepathy.Client.Polari.service.in
+++ b/data/org.freedesktop.Telepathy.Client.Polari.service.in
@@ -1,3 +1,3 @@
[D-BUS Service]
Name=org.freedesktop.Telepathy.Client.Polari
-Exec=@bindir@/polari --gapplication-service
+Exec=@bindir@/polari --start-client
diff --git a/src/application.js b/src/application.js
index 9925d67..7f40e75 100644
--- a/src/application.js
+++ b/src/application.js
@@ -31,6 +31,25 @@ const Application = new Lang.Class({
GLib.set_application_name('Polari');
this._retryData = new Map();
+
+ this.add_main_option('start-client', 0,
+ GLib.OptionFlags.NONE, GLib.OptionArg.NONE,
+ 'Start Telephathy client', null);
+ this.connect('handle-local-options', (o, dict) => {
+ try {
+ this.register(null);
+ } catch(e) {
+ return 1;
+ }
+
+ let v = dict.lookup_value('start-client', null);
+ if (v && v.get_boolean()) {
+ this.activate_action('start-client', null);
+ return 0;
+ }
+
+ return -1;
+ });
},
isRoomFocused: function(room) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]