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 611610 - interaction with empathy
interaction with empathy
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 617688 (view as bug list)
Depends on: 608999 615976
Blocks:
 
 
Reported: 2010-03-02 15:25 UTC by Dan Winship
Modified: 2010-05-05 21:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
telepathyClient: activate Empathy on source icon click (7.97 KB, patch)
2010-04-08 14:56 UTC, Dan Winship
reviewed Details | Review
Screenshot of what happens when I click on the icon in chat notification (423.07 KB, image/png)
2010-04-15 03:30 UTC, Marina Zhurakhinskaya
  Details
telepathyClient: improve Empathy interaction (7.66 KB, patch)
2010-04-16 18:10 UTC, Dan Winship
committed Details | Review

Description Dan Winship 2010-03-02 15:25:15 UTC
we need to clean up the interaction between gnome-shell and empathy:

    - shared chat logs (probably fixed by bug 518414)

    - we don't want the empathy notification icon
        - eventually this should be done by empathy not creating the icon
        - for now, we can hack around it:
            - hack the systray to not show empathy's icon
            - empathy doesn't flash the icon on new messages if there's an
              Approver present
        - need to relocate some bits of UI (contact list)

    - Need to be able to activate specific chat windows/tabs on demand
Comment 1 Guillaume Desmottes 2010-03-02 15:32:45 UTC
(In reply to comment #0)
>     - Need to be able to activate specific chat windows/tabs on demand

This should be done by calling EnsureChannel on the ChannelDispatcher. The channel will be re-dispatched and Empathy should present it.
Comment 2 Dan Winship 2010-04-08 14:55:20 UTC
(In reply to comment #0)
>     - shared chat logs (probably fixed by bug 518414)

I thought this was fixed in Fedora 13 at first, but it seems not to be. I think the problem is that telepathy-logger is its own package, and so we need to package and install that?
Comment 3 Dan Winship 2010-04-08 14:56:40 UTC
Created attachment 158208 [details] [review]
telepathyClient: activate Empathy on source icon click

Use the ChannelDispatcher to open a conversation in Empathy when the
user clicks on that conversation's icon in the message tray summary
area.
Comment 4 Dan Winship 2010-04-14 19:15:42 UTC
(In reply to comment #2)
> (In reply to comment #0)
> >     - shared chat logs (probably fixed by bug 518414)
> 
> I thought this was fixed in Fedora 13 at first, but it seems not to be. I think
> the problem is that telepathy-logger is its own package, and so we need to
> package and install that?

Ah, telepathy-logger was intended for 2.32 and is not yet stable. So this doesn't work right in GNOME 2.30 either :-/
Comment 5 Marina Zhurakhinskaya 2010-04-15 03:26:20 UTC
Review of attachment 158208 [details] [review]:

The code seems to make sense, but it doesn't always work as expected for me. While it sometimes brings the chat window up, other times it doesn't, but instead shows a notification saying '<The nick of the person chatting with me> is ready'. It brings the chat window up if I click on the icon in that notification. I'm going to attach a screenshot that shows this notification.

Also, as you can see in the screenshot, it has '-Disconnected' and '-Connected' text in the Empathy window each time I click on the notification icon. I think that happens because we call this._channel.CloseRemote() on our end in _gotChannelRequest().

Do all these problems need to be solved in the Empathy code? I wanted to see if passing true for 'org.freedesktop.Telepathy.Channel.Requested' as a channel property in ChannelDispatcher::EnsureChannel() to signal that the request was made locally made any difference, but it seemed to just make the clicking not work at all. Not sure if this was the right use-case for this property.
Comment 6 Marina Zhurakhinskaya 2010-04-15 03:30:58 UTC
Created attachment 158775 [details]
Screenshot of what happens when I click on the icon in chat notification

Sometimes I get the notification about the sender being ready to chat instead of the chat window being brought forward. It is brought forward if I click on the icon in that notification.

You can also see '-Disconnected' and '-Connected' text in the Empathy window that shows up when the chat notification icon is clicked.
Comment 7 Dan Winship 2010-04-15 14:11:39 UTC
(In reply to comment #5)
> While it sometimes brings the chat window up, other times it doesn't, but
> instead shows a notification saying '<The nick of the person chatting with me>
> is ready'.

Yeah, that's focus-stealing prevention, which shouldn't be happening, since we're passing a correct timestamp...

> Also, as you can see in the screenshot, it has '-Disconnected' and '-Connected'
> text in the Empathy window each time I click on the notification icon. I think
> that happens because we call this._channel.CloseRemote() on our end in
> _gotChannelRequest().

Yes. If we remove the Approver (or change it to dispatch channels to empathy rather than claiming them itself) then this problem and the empathy-doesn't-log-conversations problem both go away, but then you have the empathy-annoying-you-with-its-icon problem. But we're probably going to have to do this way and figure out some other way to deal with the icon.
Comment 8 Dan Winship 2010-04-16 17:38:16 UTC
filed bug 615976 about empathy not using the timestamp from the D-Bus call, and thus getting focus-stealing-prevented
Comment 9 Dan Winship 2010-04-16 18:10:15 UTC
Created attachment 158913 [details] [review]
telepathyClient: improve Empathy interaction

Activate empathy when clicking on a chat icon by asking the
ChannelDispatcher to open the conversation in the default handler.

Also, don't Claim channels in the Aprover for now, since until
telepathy-logger is stable, this means Empathy won't see (and log)
those conversations. This means that empathy's blinky status icon is
back; we'll have to do something else about that.
Comment 10 Marina Zhurakhinskaya 2010-04-16 23:31:20 UTC
Review of attachment 158913 [details] [review]:

The code looks good, except should all the handler related stuff be removed? There are several places:

1) The comment above the Client class.
2) Telepathy.CLIENT_HANDLER_NAME in Interfaces()
3) HandlerChannelFilter() and HandleChannels()
4) DBus.conformExport(Client.prototype, Telepathy.ClientHandlerIface);

The clicking doesn't work for me with this patch (even if I remove the handler code bits and add CHAT_APPLICATION_NAME for the Preferred_Handler in EnsureChannelRemote()). It gets into _gotChannelRequest(), but the chat window is not raised. Adding back ClaimRemote() and CloseRemote() along with CHAT_APPLICATION_NAME for the Preferred_Handler makes the clicking work again (so that's what the original patch had).

The Empathy icon does in fact blink with the new patch.

I can upgrade to F13 next week and see if that changes the behavior of this patch.
Comment 11 marco bonomo 2010-05-03 20:49:19 UTC
I've got some problems with gnome-shell/empathy. When someone contacts me i can chat from gnome-shell, and this is right, but if I close the box and try to open a conversation in empathy with that very contact nothing happens. I can click and open a conversation with everybody else in the contact list but not if someone contacted me first, i'm stuck with gnome-shell bottom box (which, btw, lacks of a counter for unread messages)
Comment 12 Dan Winship 2010-05-05 18:54:29 UTC
Attachment 158913 [details] pushed as 2bd64b6 - telepathyClient: improve Empathy interaction
Comment 13 Dan Winship 2010-05-05 18:55:13 UTC
(In reply to comment #10)
> The code looks good, except should all the handler related stuff be removed?

yup, did that before pushing.
Comment 14 Dan Winship 2010-05-05 18:56:08 UTC
*** Bug 617688 has been marked as a duplicate of this bug. ***
Comment 15 Alessandro Crismani 2010-05-05 21:24:40 UTC
Hi everybody,

I checked out the last git changes and now Empathy shows notification for new messages, however in order to see them in the shell I have to give a shell restart in the run command (more details in the bug 617688, which is marked as a duplicate).

At least now I can see the new messages, however it would be better if they showed up in the message area. Note that this problem happens on Arch Liux, while the Ricotz PPA on Lucid seems to work fine.

Tell me if it's needed how can I provide more information.

Cheers,
Alessandro