GNOME Bugzilla – Bug 572240
[Fixed by ifdef] Remove deprecated GTK+ symbols
Last modified: 2010-05-28 13:14:15 UTC
http://live.gnome.org/GnomeGoals/RemoveDeprecatedSymbols/GTK%2B http://library.gnome.org/devel/gtk/stable/gtk-Types.html#GTK-CHECK-GET-CLASS--CAPS ./src/widgets/gnumeric-cell-renderer-expr-entry.h: #define GNUMERIC_CELL_RENDERER_EXPR_ENTRY_GET_CLASS(o) (GTK_CHECK_GET_CLASS ((o), GNUMERIC_TYPE_CELL_RENDERER_EXPR_ENTRY, GnumericCellRendererExprEntryClass)) ./src/widgets/gnumeric-cell-renderer-text.h: #define GNUMERIC_CELL_RENDERER_TEXT_GET_CLASS(o) (GTK_CHECK_GET_CLASS ((o), GNUMERIC_TYPE_CELL_RENDERER_TEXT, GnumericCellRendererTextClass)) ./src/widgets/gnumeric-cell-renderer-toggle.h: #define GNUMERIC_CELL_RENDERER_TOGGLE_GET_CLASS(o)i (GTK_CHECK_GET_CLASS ((o), GNUMERIC_TYPE_CELL_RENDERER_TOGGLE, GnumericCellRendererToggleClass)) http://library.gnome.org/devel/gtk/stable/GtkCList.html#gtk-clist-moveto ./src/widgets/widget-font-selector.c: gtk_clist_moveto (clist, row, 0, 0.5, 0.0); http://library.gnome.org/devel/gtk/unstable/GtkObject.html#gtk-object-sink ./plugins/python-loader/py-interpreter-selector.c: gtk_object_sink (GTK_OBJECT (obj)); ./src/wbc-gtk.c: gtk_object_sink (GTK_OBJECT (arrow)); ./src/sheet-object-widget.c: gtk_object_sink (GTK_OBJECT (swa->adjustment)); ./src/gui-util.c: gtk_object_sink (GTK_OBJECT (menu));
...plus gtk_toolbar_set_orientation
Oh, another gift from the gtk+ people in the form of another pointless API change. http://library.gnome.org/devel/gtk/unstable/GtkToolbar.html#gtk-toolbar-set-orientation I note that the latest OpenSuSE has 2.12.9 and that gtk_toolbar_set_orientation was just fine until 2.16.x, so it might half a year before I can even start fixing that one. And then only in the #ifdef way.
Re gtk_clist_moveto in src/widgets/widget-font-selector.c: it occurs in a comment only! (A comment we can kill, it seems, but your grep is a bit aggressive.)
GTK_CHECK_GET_CLASS fixed. gtk_object_sink is #ifdef'd. gtk_clist_moveto removed. That leaves gtk_toolbar_set_orientation, see above.
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. Tentatively fixed using ifdef. I can't actually compile the new code, so quality control is minimal.
Reopening: $:andre\> grep -r GTK_WIDGET_TOPLEVEL . ./src/widgets/gnm-notebook.c: if (!GTK_WIDGET_TOPLEVEL (toplevel)) ./src/widgets/gnm-notebook.c: if (toplevel && GTK_WIDGET_TOPLEVEL (toplevel)) $:andre\> grep -r GTK_WIDGET_STATE . ./src/widgets/gnumeric-cell-renderer-text.c: if (GTK_WIDGET_STATE (widget) == GTK_STATE_INSENSITIVE) ./src/widgets/gnm-notebook.c: GTK_WIDGET_STATE (widget), NULL, widget, "tab", ./src/widgets/gnm-notebook.c: state_type = GTK_WIDGET_STATE (widget); $:andre\> grep -r GTK_WIDGET_FLAGS . ./src/widgets/gnumeric-expr-entry.c: if (toplevel != NULL && (GTK_WIDGET_FLAGS (toplevel) & GTK_TOPLEVEL)) {
src/widgets/gnm-notebook.c: Not a problem. This is a fixed copy of gtknotebook.c and it not used if you have 2.17.1 or later. That leaves: ./src/widgets/gnumeric-cell-renderer-text.c: if (GTK_WIDGET_STATE (widget) == GTK_STATE_INSENSITIVE) ./src/widgets/gnumeric-expr-entry.c: if (toplevel != NULL && (GTK_WIDGET_FLAGS (toplevel) & GTK_TOPLEVEL)) { I don't even know if we can solve this given the available API. (And that means gtk+ 2.12, btw.)
(In reply to comment #7) > I don't even know if we can solve this given the available API. > ./src/widgets/gnumeric-cell-renderer-text.c: if (GTK_WIDGET_STATE (widget) > == GTK_STATE_INSENSITIVE) #if GTK_CHECK_VERSION (2,18,0) if (gtk_widget_get_state (widget) == GTK_STATE_INSENSITIVE) #else if (GTK_WIDGET_STATE (widget) == GTK_STATE_INSENSITIVE) #endif > ./src/widgets/gnumeric-expr-entry.c: if (toplevel != NULL && > (GTK_WIDGET_FLAGS (toplevel) & GTK_TOPLEVEL)) { GTK_CHECK_VERSION and gtk_widget_is_toplevel (toplevel) ?
GTK_WIDGET_FLAGS is now only used when gtk_widget_get_state is not available.
gtk_widget_is_toplevel now used, if present. Now we can just sit and wait for the gtk+ people to discover that it should have been named _get_ and not _is_. Note: GTK_CHECK_VERSION is one of the last choices for this. The question is whether the library has a given function, not what version number it calls itself.
Thanks for quick fixing. Yeah, let's see what next thing will be broken by gtk+.