[Geany-devel] About disabling GTK+/GLib deprecated symbols

Nick Treleaven nick.treleaven at xxxxx
Wed Oct 15 16:45:28 UTC 2008

On Wed, 15 Oct 2008 18:30:42 +0200
Enrico Tröger <enrico.troeger at uvena.de> wrote:

> On Wed, 15 Oct 2008 17:07:08 +0100, Nick Treleaven
> <nick.treleaven at btinternet.com> wrote:
> >On Wed, 15 Oct 2008 15:32:24 +0200
> >Enrico Tröger <enrico.troeger at uvena.de> wrote:
> >
> >> >gtk_widget_set_tooltip_text() was only added in GTK+ 2.12, we
> >> >still support 2.6 (see HACKING). Maybe that function could be
> >> >mimiced for GTK < 2.12 with something like
> >> >ui_widget_set_tooltip_text().
> >> 
> >> Why? GTK 2.12+ also supports the old, deprecated tooltips API. What
> >> is the advantage in adding more code, more #ifdefs just to get the
> >> same behaviour?
> >
> >So that users with GTK >= 2.12 don't build with the deprecated
> >tooltip function we currently use.
> >
> >I don't see any harm in switching the non-Glade code to use
> >ui_widget_set_tooltip_text(), as this is actually neater as the
> >caller doesn't need to get the GtkTooltips object.
> But it doesn't hurt to build the old API and AFAIK there is no
> noticeable (dis)advantage. The only change is more code, ok and a
> little nicer code for the existing non-Glade tooltips.

Well, at some point we'll need to change the code, whether we raise the
required GTK version or not.

(It would actually be less code because of all the calls to get the
GtkTooltips object.)

> About the g_strcasecmp() problem:
> I don't think the right solution is to copy the old, broken code from
> GLib into Geany. As the docs mention, there is a reason why this
> function is deprecated and should not used.
> IMO we should rewrite the code which uses this function with the
> alternative functions mentioned in the docs.

I agree.


More information about the Devel mailing list