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 745418 - Add telepathy service and data files
Add telepathy service and data files
Status: RESOLVED FIXED
Product: polari
Classification: Applications
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Polari maintainers
Polari maintainers
Depends on:
Blocks:
 
 
Reported: 2015-03-02 09:18 UTC by Giovanni Campagna
Modified: 2015-03-03 00:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add telepathy service and data files (3.04 KB, patch)
2015-03-02 09:18 UTC, Giovanni Campagna
committed Details | Review
Fix dbus activation (755 bytes, patch)
2015-03-02 09:18 UTC, Giovanni Campagna
committed Details | Review
ChatroomManager: activate the app when getting an handleChannels (1.68 KB, patch)
2015-03-02 09:50 UTC, Giovanni Campagna
committed Details | Review

Description Giovanni Campagna 2015-03-02 09:18:13 UTC
See patches.
This is motivated by two things (but mostly the first one)
1) Clicking on notifications from the shell that originate from 1-to-1
   channels should summon polari, not empathy-chat
   We can choose the preferred handler in the shell, but it must be
   something mission control knows about
2) I want to disable irc handling in empathy-chat when polari is around
   polari is a better experience than empathy for IRC, and we don't
   want both to be fighting over channels, especially if you happen to
   be on IRC just because you opened empathy and connected to other accounts
Comment 1 Giovanni Campagna 2015-03-02 09:18:15 UTC
Created attachment 298257 [details] [review]
Add telepathy service and data files

We need to claim the Telepathy name as activatable in order
to be started by mission control when there is a channel
request to handle.

We claim we support all channels of type text, with all
handle types, like empathy-chat does. If we see a channel
of type != irc, we'll return an error and mission control
will transparently move to the next handler.
Comment 2 Giovanni Campagna 2015-03-02 09:18:57 UTC
Created attachment 298258 [details] [review]
Fix dbus activation

Start in service mode, we don't want to show a window when
autocompleting gdbus commands...
Comment 3 Giovanni Campagna 2015-03-02 09:50:19 UTC
Created attachment 298261 [details] [review]
ChatroomManager: activate the app when getting an handleChannels

We need to create the first window manually if we're activated by
dbus from mission control.

This only partially works: polari comes up and the channel is
there, highlighted, but previous channels are not present...
Comment 4 Matthias Clasen 2015-03-02 18:00:49 UTC
Yes, please. having empathy pop up from chat notifications for irc is soooo annoying!
Comment 5 Florian Müllner 2015-03-02 20:21:18 UTC
Review of attachment 298257 [details] [review]:

OK
Comment 6 Florian Müllner 2015-03-02 20:21:30 UTC
Review of attachment 298258 [details] [review]:

Sure
Comment 7 Florian Müllner 2015-03-02 20:24:58 UTC
Review of attachment 298261 [details] [review]:

::: src/chatroomManager.js
@@ +238,3 @@
         this._processRequest(context, connection, channels, Lang.bind(this,
             function(channel) {
+                this._maybeActivateApp();

I can't think of a case where we'd want to open a window and not activate it, so OK.

I'd just move this inline as

  if (!this._app.get_active_window())
      this._app.activate();
Comment 8 Giovanni Campagna 2015-03-03 00:26:55 UTC
Pushed with the suggested fix.

Attachment 298257 [details] pushed as 21df75d - Add telepathy service and data files
Attachment 298258 [details] pushed as 3c08ea6 - Fix dbus activation
Attachment 298261 [details] pushed as cb3a42c - ChatroomManager: activate the app when getting an handleChannels