GNOME Bugzilla – Bug 564800
GnomeGoals: Remove deprecated GTK+ symbols
Last modified: 2009-11-21 00:19:14 UTC
Please describe the problem: As per GnomeGoals, we need to remove any and all references to deprecated GTK+ symbols and functions. Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information:
Created attachment 124835 [details] [review] gtk_label_set to gtk_label_set_text Some simple one-liners to remove usages of gtk_label_set
Committed, thanks. What else needs to be done here?
(In reply to comment #2) > Committed, thanks. What else needs to be done here? > Lots more. Here are some patches that I have cooked up. I'm still actively working, and I'll let you know when I _think_ I'm done. JD
Created attachment 124857 [details] [review] Remove gdk_pixbuf_render_to_drawable_alpha() and gdk_pixbuf_unref() Patch 1 of 3 gdk_pixbuf_render_to_drawable_alpha to gdk_draw_pixbuf gdk_pixbuf_unref to g_object_unref
Created attachment 124858 [details] [review] Remove gtk_box_pack_start_defaults() and gtk_box_pack_end_defaults() Patch 2 of 3: gtk_box_pack_start_defaults to gtk_box_pack_start gtk_box_pack_end_defaults to gtk_box_pack_end
Created attachment 124859 [details] [review] Remove gtk_tooltips_set_tip Patch 3 of 3: Remove gtk_tooltips_set_tip(GTK_TOOLTIPS, GTK_WIDGET, tooltip_text) in favor of gtk_widget_set_tooltip_markup(GTK_WIDGET, tooltip_text)
We should only use gtk_widget_set_tooltip_markup if the string actually contains markup. None of these strings do, so gtk_widget_set_tooltip_text is more appropriate. Also, to use GtkTooltip (for which gtk_widget_set_tooltip_x is a shortcut), we need to increase the gtk+ version requirement to 2.12. The other patches look OK. I'll commit them later.
Created attachment 124996 [details] [review] Remove GtkTooltips usage Patch 1-2 commited Patch 3 of 6
Created attachment 124997 [details] [review] Remove gtk_tree_view_widget_to_tree_coords Patch 1-2 commited Patch 4 of 6
Created attachment 124998 [details] [review] Remove GtkDestroyNotify Patch 1-2 commited Patch 5 of 6
Created attachment 124999 [details] [review] Remove gtk_type_new Patch 1-2 commited Patch 6 of 6
The gtk_type_new patch is wrong. gtk_type_new should be replaced by g_object_new rather than nothing. It would almost certainly have crashed on startup.. GtkDestroyNotify should be replaced by GDestroyNotify rather than gpointer. I don't think the gtk_tree_view_widget_to_tree_coords patch is right either. Does rearranging playlist entries with drag and drop still work? Changing ratings using the rating column?
I've committed the tooltip patch. The cover art plugin still uses the old GtkTooltips API, though.
OK, now the cover art plugin uses the new API.
2009-02-23 Jonathan Matthew <jonathan@d14n.org> * data/glade/create-playlist.glade: * widgets/rb-query-creator-properties.c: (update_time_unit_limits), (create_time_unit_option_menu), (relativeTimeCriteriaCreateWidget), (relativeTimeCriteriaSetWidgetData), (relativeTimeCriteriaGetWidgetData): * widgets/rb-query-creator.c: (rb_query_creator_load_query), (rb_query_creator_set_sorting), (rb_query_creator_get_query), (rb_query_creator_get_limit), (rb_query_creator_get_sort_order), (append_row), (select_criteria_from_value), (property_option_menu_changed), (create_property_option_menu), (create_criteria_option_menu), (sort_option_menu_changed), (setup_sort_option_menu): Replace GtkOptionMenu with GtkComboBox in the query creator. * lib/rb-string-value-map.h: * plugins/visualizer/rb-vis-widget.h: * widgets/rb-cell-renderer-pixbuf.h: * widgets/rb-cell-renderer-rating.h: * widgets/rb-rating.h: Replace GTK_CHECK macros with G_TYPE_CHECK equivalents. * lib/rb-tree-dnd.c: (scroll_row_timeout): * widgets/gossip-cell-renderer-expander.c: (gossip_cell_renderer_expander_activate): * widgets/rb-cell-renderer-pixbuf.c: (rb_cell_renderer_pixbuf_new), (rb_cell_renderer_pixbuf_activate): * widgets/rb-cell-renderer-rating.c: (rb_cell_renderer_rating_new), (rb_cell_renderer_rating_activate): Replace gtk_tree_view_widget_to_tree_coords. * widgets/rb-property-view.c: (rb_property_view_set_search_func): * widgets/rb-property-view.h: Replace GtkDestroyNotify with GDestroyNotify. No more deprecated gtk+ stuff. Fixes #564800.
I've reopen this because there is still a deprecated GTK+ symbol: gtk_tree_view_column_get_cell_renderers() Little patch attached
Created attachment 147811 [details] [review] Substitute gtk_tree_view_column_get_cell_renderers()
committed, thanks. I also fixed a tiny leak there that you didn't introduce.