#12 Make bookmarks available on GTK+ >= 2.12.0...

open
nobody
None
5
2009-06-14
2009-06-14
No

The bookmarks don't work in TIEmu 3.03 if it is linked against GTK+ >= 2.12.0.

The attached patch changes the bookmark code so that it behaves the following way:
* push the tooltips' content (mostly URLs) to the menu item labels, so which can be retrieved on GTK+ >= 2.16.0;
* GTK+ >= 2.16.0: retrieve the GtkMenuItem's label, parse it to extract the URL;
* GTK+ < 2.16.0: retrieve the GtkMenuItem's tooltip, parse it to extract the URL.

Discussion

  • Kevin Kofler

    Kevin Kofler - 2009-06-14

    I just checked: when setting tooltips, libglade calls gtk_tooltips_set_tip which calls gtk_widget_set_tooltip_text, so calling gtk_widget_get_tooltip_text should work with no changes to the Glade files. Just be aware that it's new in 2.12, so this needs to be under #ifdef.

     
  • Lionel Debroux

    Lionel Debroux - 2009-06-14

    Updated the patch to use gtk_widget_get_tooltip_text() on GTK >= 2.12.0. Works for me (TM) on Debian Lenny (GTK 2.12.x).

     
  • Kevin Kofler

    Kevin Kofler - 2009-06-14

    (Of course, I didn't add the GCC4TI link, I had to apply it manually on top of my earlier patch and I changed the formatting of the 2 pointers to use "type *ptr" spacing consistently.)

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks