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 589224 - Only show the "Share my desktop" menu item if Vino is actually present and verified as a registered handler in MC5
Only show the "Share my desktop" menu item if Vino is actually present and ve...
Status: RESOLVED OBSOLETE
Product: empathy
Classification: Core
Component: Contact List
2.27.x
Other All
: Normal minor
: ---
Assigned To: empathy-maint
empathy-maint
Depends on: 621997
Blocks:
 
 
Reported: 2009-07-21 09:28 UTC by Arnaud Maillet
Modified: 2018-05-22 13:36 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26



Description Arnaud Maillet 2009-07-21 09:28:37 UTC
Whe should check if Vino is a registered handler in MC5 to display Share My Desktop feature in the contact menu.


Other information:
Comment 1 Danielle Madeley 2009-11-25 11:23:16 UTC
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?
Comment 2 Simon McVittie 2009-11-25 12:30:56 UTC
(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.
Comment 3 Danielle Madeley 2009-11-26 00:18:53 UTC
This is filed as https://bugs.freedesktop.org/show_bug.cgi?id=25288
Comment 4 Jean-François Fortin Tam 2012-08-26 03:05:20 UTC
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.
Comment 5 Danielle Madeley 2012-08-28 11:31:23 UTC
Yes. It's checking whether the handler is actually installed before showing the item.
Comment 6 GNOME Infrastructure Team 2018-05-22 13:36:44 UTC
-- 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.