GNOME Bugzilla – Bug 589224
Only show the "Share my desktop" menu item if Vino is actually present and verified as a registered handler in MC5
Last modified: 2018-05-22 13:36:44 UTC
Whe should check if Vino is a registered handler in MC5 to display Share My Desktop feature in the contact menu. Other information:
So, assuming that Vino was an MC5 client (bug #602917) the quick and dirty solution would be to check for a matching activatable client name. More generally though, I think it would be really neat if the Channel Dispatcher had a way of telling you whether a candidate ChannelRequest is able to be handled. My currently thought is that ChannelRequest objects provide a HandlerAvailable() method, which you could call before, or instead of, Proceed(). The Channel Dispatcher would look at the requested properties for the channel and see if any of the available Handlers match that filter. It wouldn't be perfect, but for Tube channels it would at least let you match on channel type, handle type, service name and requested, which is usually enough to establish that a Tube client is available. To use it in this circumstance you'd call CreateChannel with the properties, then call HandlerAvailable, then call Cancel. Thoughts?
(In reply to comment #1) > So, assuming that Vino was an MC5 client (bug #602917) the quick and dirty > solution would be to check for a matching activatable client name. Yes. > More generally though, I think it would be really neat if the Channel > Dispatcher had a way of telling you whether a candidate ChannelRequest is able > to be handled. Perhaps. I think this is a lower priority but could be useful. > To use it in this > circumstance you'd call CreateChannel with the properties, then call > HandlerAvailable, then call Cancel. You were right on #telepathy: I hate this API :-P If you're adding API anyway, you might as well ask the question you actually want to ask, rather than starting a speculative request and then cancelling it. Something like this: ChannelDispatcher.CouldHandleChannel(a{sv}: Properties) -> b [or as?] Check whether a requested channel whose immutable properties were Properties could be handled. Return TRUE if so. [Or: return the expected ChannelDispatchOperation.PossibleHandlers property for such a channel.] | This is appropriate for UIs to check whether a suitable client for | a request is installed; for instance, Empathy could use it . The channel dispatcher SHOULD assume that { Requested => TRUE } is in the Properties, even if it's not specifically given. | This matters if you have a client that only handles outgoing | channels, like a Vino "share my desktop" request. Someone else will have to drive the process of getting this into the spec and MC, unless you can wait for me to be less busy with Call and Conference; feel free to file a spec bug.
This is filed as https://bugs.freedesktop.org/show_bug.cgi?id=25288
As there is already a "Share my desktop" menu item in the contact menu, is this bug report about only showing/enabling the menu item if the vino tube thingy is truly available? If so, this bug should be retitled for clarity.
Yes. It's checking whether the handler is actually installed before showing the item.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/empathy/issues/98.