GNOME Bugzilla – Bug 686296
empathy is not PreferredHandler
Last modified: 2012-10-23 10:39:06 UTC
Created attachment 226640 [details] dbus-monitor log while receiving a message I run gnome-shell (3.4.2) on fedora 17, and decided to try and install KDE too. In the process, the ktp packages got installed, and now, when I receive an incoming message (at least text, over google protocol) ktp-text-ui is launched, instead of the usual empathy dialog ui. I couldn't find a way to set a preferred handler when receiving a new message, neither in dbus nor in empathy/telepathy, and a google search only gave me a cryptic "Setting a prerfferedHandler on ensure_channel will solve this." on an ubuntu bug, on launchpad from last year. So, is there a way to set a preferred handler ? Removing ktp-text-ui would work, but I would like to keep it, while getting to chat in empathy when in a Gnome session, and in KDE-telepathy in a KDE session. Steps to reproduce 1. Install KDE (and ktp) and Gnome-shell on the same computer 2. Connect to google talk using Empathy 3. Receive an incoming text message 4. ktp-text-ui is launched Attached is a log from dbus-monitor at the time a message is received. I also quote Xavier Claessens' comment on freedesktop's bugzilla, where I initially reported this bug (comment #4 : https://bugs.freedesktop.org/show_bug.cgi?id=56079#c4 ) So when you though those logs, you were in gnome-shell, right? which version? When you receive the message, gnome-shell first display a notification, and ktp-text-ui is launched only when you click that notification, right? From the logs, what I see: 1) AddDispatchOperation is called on gnome-shell 2) gnome-shell claims the channel 3) gnome-shell calls DelegateChannels with Preferred_Handler="" 4) MC decide ktp-text-ui will handle it, this is random choice since MC has no way to know empathy-chat would be preferred. Since empathy-chat is the GNOME chat handler, I think it would make sense for gnome-shell to give it in the Preferred_Handler, so I would consider this as a gnome-shell bug. Side note: from the log (did not check what code actually does) it also appear that gnome-shell calls DelegateChannels twice, this is probably armless, but worth fixing as well.
Created attachment 226642 [details] [review] Telepathy: Set empathy-chat as prefered handler when delegating channels
did not test the patch since I don't have KDE installed, but that should fix it.
Review of attachment 226642 [details] [review]: ::: js/ui/components/telepathyClient.js @@ +558,3 @@ + this._client.delegate_channels_async([this._channel], + global.get_current_time(), + 'org.gnome.Empathy.Chat', null); you should use the telepathy client bus name, not the GNOME one.
Created attachment 226644 [details] [review] Telepathy: Set empathy-chat as prefered handler when delegating channels
Review of attachment 226644 [details] [review]: ++
iwanshamir: can you test that patch please? Do you need instructions?
Hi, tested the patch, it's working well, thanks a lot.
Ok, pushed the commit to both master and 3.6 branch.