GNOME Bugzilla – Bug 586537
Get rid of libsexy, use new GtkLabel link support
Last modified: 2010-06-21 20:30:15 UTC
See http://live.gnome.org/GnomeGoals/DropLibsexy Now that GtkLabel link support has been added to GTK+ (9dbb304), it would be nice for vino to switch to it. Trivial patch attached, but untested as I don't have gtk 2.17.1 installed here
Created attachment 137118 [details] [review] Get rid of libsexy, use new GtkLabel link support I've used GTK_CHECK_VERSION(2,17,1) so it's only replaced if GTK+ >= 2.17.1
Please, take a look at sexu-url-label.c:sexy_url_label_init() I've changed it to create the popup menu. Could you fix this as well?
Hello John! Well, sexy-url-label.c is only used when gtk+ < 2.17.1 so is not affected for this patch (and can be removed when you have a hard dependency with gtk+ 2.17.1)
Hi, Javier. What I'm talking is that I patched sexu-url-label.c:sexy_url_label_init() so that it fits my needs. It's that function that creates the popup-menu. If I apply your patch, I'll loose that popup menu. Could you update your patch so that the menu is still there?
Created attachment 137209 [details] [review] Get rid of libsexy, use new GtkLabel link support v2 Hello, Sorry, my fault: The problem was in vino-message-box.c:vino_message_box_init(), not in sexy-url-label.c:sexy_url_label_init() Hope all is correct now.
Created attachment 137210 [details] [review] Get rid of libsexy, use new GtkLabel link support v3 Argh, sorry, this is the correct patch
Please, test your patch: Open vino-preferences and right-click on the link. You'll see what I'm talking about.
Seems there's no equivalent in GtkLabel to the "url-activated" signal of SexyUrlLabel. So we can't intercept the the click on a link automagically.
Ooops, sorry, yes there is since 2.17.1, it's "activate-current-link" (or "activate-link", I'm sorting out the difference between the two).
Ok, seems the comportment with respect to the popup menu didn't make it to GtkLabel. SexyUrlLabel implements the "Send address by email" as the first entry of the popup menu, which is replaced by an simple open in GtkLabel. So we need to override the populate-popup signal in order to fix that.
"SexyUrlLabel implements the "Send address by email" as the first entry of the popup menu, which is replaced by an simple open in GtkLabel" SexyUrlLabel does not implement this. I *have patched* it to have this behavior. You're right, we need to simulate this behavior in our label.
Heja, is this somehow on the list for 2.30? vino is the only module left... :-/
Hello John, with my patch, you only lost the "Send address by email" text in the pop-up; It shows "Open link" instead
fredp just said "vino has an internal copy of SexyUrlLabel, so it's not technically a dependency on libsexy". Hence removing GNOME Target.
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.