After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 770749 - Fix launching through mission-control
Fix launching through mission-control
Status: RESOLVED FIXED
Product: polari
Classification: Applications
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Polari maintainers
Polari maintainers
: 773226 (view as bug list)
Depends on:
Blocks: 770750
 
 
Reported: 2016-09-02 12:39 UTC by Florian Müllner
Modified: 2016-10-19 17:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
app: Stop using a private property to track the main window (4.06 KB, patch)
2016-09-02 12:39 UTC, Florian Müllner
committed Details | Review
telepathyClient: Hold application while running (1.18 KB, patch)
2016-09-02 12:39 UTC, Florian Müllner
committed Details | Review
app: Factor out 'start-client' action (2.45 KB, patch)
2016-09-02 12:39 UTC, Florian Müllner
committed Details | Review
data: Fix telepathy client service (2.20 KB, patch)
2016-09-02 12:39 UTC, Florian Müllner
committed Details | Review

Description Florian Müllner 2016-09-02 12:39:07 UTC
We have been registering Polari as a (potential) channel handler for some time,
but in the unlikely case that mission-control wants to handle us a channel while
we're not running, we don't start the actual telepathy client and the request
times out.
Fixing this isn't terribly important - after all, nobody has noticed the issue
so far - but it gets us one step closer to running polari in the background, which
is a feature we want to offer.
Comment 1 Florian Müllner 2016-09-02 12:39:11 UTC
Created attachment 334637 [details] [review]
app: Stop using a private property to track the main window

We will eventually allow running without open windows, and possibly
with multiple windows as well, at which point using a private property
to track the main window gets in the way more than it helps, so adapt
the code to either use the :active-window or iterate over all windows
as appropriate.
Comment 2 Florian Müllner 2016-09-02 12:39:17 UTC
Created attachment 334638 [details] [review]
telepathyClient: Hold application while running

The application runtime is currently tied to having a window, however it
can be useful to have only the telepathy client running in the background.
In order to support this, hold the application while the client is running.
Comment 3 Florian Müllner 2016-09-02 12:39:23 UTC
Created attachment 334639 [details] [review]
app: Factor out 'start-client' action

The telepathy client is currently started if necessary when the
application is activated. However as there are cases for running
the client without activating the application (read: creating a
window), it makes sense to split out the code. While for now a
separate function would do just fine, we'll eventually want the
functionality available even when Polari is not running, so add
a corresponding action.
Comment 4 Florian Müllner 2016-09-02 12:39:28 UTC
Created attachment 334640 [details] [review]
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.
Comment 5 Rares Visalom 2016-09-10 23:21:06 UTC
Review of attachment 334637 [details] [review]:

looks good to me.
Comment 6 Rares Visalom 2016-09-10 23:23:56 UTC
Review of attachment 334638 [details] [review]:

looks good to me.
Comment 7 Rares Visalom 2016-09-10 23:26:47 UTC
Review of attachment 334639 [details] [review]:

looks good to me.
Comment 8 Rares Visalom 2016-09-10 23:43:56 UTC
Review of attachment 334640 [details] [review]:

looks good to me.
Comment 9 Florian Müllner 2016-09-10 23:56:38 UTC
Review of attachment 334640 [details] [review]:

::: src/application.js
@@ +35,3 @@
+        this.add_main_option('start-client', 0,
+                             GLib.OptionFlags.NONE, GLib.OptionArg.NONE,
+                             _("Start Telephathy client"), null);

Note that this breaks the string freeze, unless we (temporarily) remove the gettext call. Not a big deal considering that this would only affect the --help output on the command line, but as this patch set mainly prepares for the background feature in bug 770750 (which is clearly 3.24 material), I'm not sure it's worth landing now anyway ...
Comment 10 Florian Müllner 2016-10-10 22:11:50 UTC
Attachment 334637 [details] pushed as 40dd975 - app: Stop using a private property to track the main window
Attachment 334638 [details] pushed as fbef7a7 - telepathyClient: Hold application while running
Attachment 334639 [details] pushed as 80d8fd0 - app: Factor out 'start-client' action
Attachment 334640 [details] pushed as a513364 - data: Fix telepathy client service
Comment 11 Florian Müllner 2016-10-19 17:00:48 UTC
*** Bug 773226 has been marked as a duplicate of this bug. ***