After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 564800 - GnomeGoals: Remove deprecated GTK+ symbols
GnomeGoals: Remove deprecated GTK+ symbols
Status: RESOLVED FIXED
Product: rhythmbox
Classification: Other
Component: general
HEAD
Other All
: Normal trivial
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
Depends on:
Blocks: 585692
 
 
Reported: 2008-12-16 23:48 UTC by John Daiker
Modified: 2009-11-21 00:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gtk_label_set to gtk_label_set_text (2.78 KB, patch)
2008-12-17 00:07 UTC, John Daiker
committed Details | Review
Remove gdk_pixbuf_render_to_drawable_alpha() and gdk_pixbuf_unref() (1.94 KB, patch)
2008-12-17 12:47 UTC, John Daiker
committed Details | Review
Remove gtk_box_pack_start_defaults() and gtk_box_pack_end_defaults() (10.06 KB, patch)
2008-12-17 12:49 UTC, John Daiker
committed Details | Review
Remove gtk_tooltips_set_tip (3.36 KB, patch)
2008-12-17 12:51 UTC, John Daiker
needs-work Details | Review
Remove GtkTooltips usage (4.36 KB, patch)
2008-12-19 13:24 UTC, John Daiker
committed Details | Review
Remove gtk_tree_view_widget_to_tree_coords (2.77 KB, patch)
2008-12-19 13:25 UTC, John Daiker
none Details | Review
Remove GtkDestroyNotify (1.22 KB, patch)
2008-12-19 13:27 UTC, John Daiker
none Details | Review
Remove gtk_type_new (916 bytes, patch)
2008-12-19 13:27 UTC, John Daiker
none Details | Review
Substitute gtk_tree_view_column_get_cell_renderers() (871 bytes, patch)
2009-11-15 18:55 UTC, Javier Jardón (IRC: jjardon)
committed Details | Review

Description John Daiker 2008-12-16 23:48:28 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:
Comment 1 John Daiker 2008-12-17 00:07:07 UTC
Created attachment 124835 [details] [review]
gtk_label_set to gtk_label_set_text

Some simple one-liners to remove usages of gtk_label_set
Comment 2 Jonathan Matthew 2008-12-17 10:46:22 UTC
Committed, thanks.  What else needs to be done here?
Comment 3 John Daiker 2008-12-17 12:45:43 UTC
(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
Comment 4 John Daiker 2008-12-17 12:47:42 UTC
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
Comment 5 John Daiker 2008-12-17 12:49:26 UTC
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
Comment 6 John Daiker 2008-12-17 12:51:51 UTC
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)
Comment 7 Jonathan Matthew 2008-12-18 09:05:38 UTC
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.
Comment 8 John Daiker 2008-12-19 13:24:35 UTC
Created attachment 124996 [details] [review]
Remove GtkTooltips usage

Patch 1-2 commited
Patch 3 of 6
Comment 9 John Daiker 2008-12-19 13:25:49 UTC
Created attachment 124997 [details] [review]
Remove gtk_tree_view_widget_to_tree_coords

Patch 1-2 commited
Patch 4 of 6
Comment 10 John Daiker 2008-12-19 13:27:05 UTC
Created attachment 124998 [details] [review]
Remove GtkDestroyNotify

Patch 1-2 commited
Patch 5 of 6
Comment 11 John Daiker 2008-12-19 13:27:28 UTC
Created attachment 124999 [details] [review]
Remove gtk_type_new

Patch 1-2 commited
Patch 6 of 6
Comment 12 Jonathan Matthew 2008-12-20 11:22:35 UTC
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?
Comment 13 Jonathan Matthew 2008-12-21 10:57:27 UTC
I've committed the tooltip patch.  The cover art plugin still uses the old GtkTooltips API, though.
Comment 14 Jonathan Matthew 2008-12-26 23:48:49 UTC
OK, now the cover art plugin uses the new API.
Comment 15 Jonathan Matthew 2009-02-23 12:24:00 UTC
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.
Comment 16 Javier Jardón (IRC: jjardon) 2009-11-15 18:54:14 UTC
I've reopen this because there is still a deprecated GTK+ symbol: gtk_tree_view_column_get_cell_renderers()

Little patch attached
Comment 17 Javier Jardón (IRC: jjardon) 2009-11-15 18:55:09 UTC
Created attachment 147811 [details] [review]
Substitute gtk_tree_view_column_get_cell_renderers()
Comment 18 Jonathan Matthew 2009-11-21 00:18:59 UTC
committed, thanks. I also fixed a tiny leak there that you didn't introduce.