GNOME Bugzilla – Bug 575129
GNOME Goal: Remove deprecated GTK+ symbols
Last modified: 2021-06-02 08:49:52 UTC
See http://live.gnome.org/GnomeGoals/RemoveDeprecatedSymbols/GTK%2B Potential patch contributors: See http://library.gnome.org for API documentation. Also note that a version bump in configure.ac/.in might be required. If working on this, split this up in several patches that are easier to review. Deprecated GTK+ symbols to be replaced: GTK_CHECK_CAST, GTK_CHECK_CLASS_CAST, GTK_CHECK_CLASS_TYPE, GTK_CHECK_GET_CLASS, GTK_CHECK_TYPE, GtkItemFactoryCallback, GtkItemFactoryEntry, GtkSignalFunc, GtkType, gdk_color_white, gdk_gc_unref, gdk_pixbuf_render_to_drawable_alpha, gdk_pixbuf_unref, gtk_combo_set_popdown_strings, gtk_item_factory_create_items, gtk_item_factory_get_widget_by_action, gtk_item_factory_new, gtk_item_factory_popup, gtk_item_factory_set_translate_func, gtk_menu_append, gtk_object_ref, gtk_object_sink, gtk_object_unref, gtk_option_menu_get_menu, gtk_option_menu_new, gtk_option_menu_set_history, gtk_option_menu_set_menu, gtk_signal_connect, gtk_style_unref, gtk_timeout_add, gtk_tooltips_new, gtk_tree_path_new_root, gtk_type_new
I'm working on it.
No news on this? :-)
Still working on it :-)
Created attachment 185265 [details] [review] Removes the last two deprecated symbols listed in this bug report from planner-window.c
Comment on attachment 185265 [details] [review] Removes the last two deprecated symbols listed in this bug report from planner-window.c Hey, I came across this in a list of good first bugs. I have removed the last two deprecated symbols from planner-window.c. The patch is attached. Is this the preferred way of submitting patches?
Review of attachment 185265 [details] [review]: Hi Read Sprabery, thanks for the patch! I'm not the maintainer, but the patch looks good. Also, git format-patch is the prefered format to send patches, so you will get your name in the commit ;) Take a look here: http://live.gnome.org/GnomeLove/SubmittingPatches
(In reply to comment #5) > Hey, I came across this in a list of good first bugs. I have removed the last > two deprecated symbols from planner-window.c. I'm not sure it's enough to mark this bug as resolved. Compiling with the options given on http://live.gnome.org/GnomeGoals/RemoveDeprecatedSymbols/GTK+ complains about something in eel-canvas-rect.c. I'm not sure what to do with that code though. > The patch is attached. Is this > the preferred way of submitting patches? Appropriate methods are attaching a patch as you did it or providing a link to a git branch. I prefer the patch method since it allows for reviews with Splinter. As Javier already said, git format-patch is the best method for patch creation.
(In reply to comment #6) > Review of attachment 185265 [details] [review]: > > Hi Read Sprabery, thanks for the patch! > > I'm not the maintainer, but the patch looks good. > Also, git format-patch is the prefered format to send patches, so you will get > your name in the commit ;) > > Take a look here: http://live.gnome.org/GnomeLove/SubmittingPatches Thanks! Don't know how I missed that first time around, but it sure does make git about 100 times more cool! (In reply to comment #7) > (In reply to comment #5) > > Hey, I came across this in a list of good first bugs. I have removed the last > > two deprecated symbols from planner-window.c. > > I'm not sure it's enough to mark this bug as resolved. Compiling with the > options given on http://live.gnome.org/GnomeGoals/RemoveDeprecatedSymbols/GTK+ > complains about something in eel-canvas-rect.c. I'm not sure what to do with > that code though. If no one else is working on it, I'll try and look into it. It seems that the last offender in that file is gdk_pixbuf_render_to_drawable_alpha () that has been replaced by gdk_draw_pixbuf () which has in turn been replaced by a series of cairo functions. I'll see what I can figure out.
(In reply to comment #8) > If no one else is working on it, I'll try and look into it. I had started to have a look (hence this bug being assigned to me), but actually got interrupted by this eel-canvas-rect.c question, and then I forgot about it. I'm reassigning it to you. > It seems that the last offender in that file is > gdk_pixbuf_render_to_drawable_alpha () that has been replaced by > gdk_draw_pixbuf () which has in turn been replaced by a series of cairo > functions. I'll see what I can figure out. Great. I'm eagerly waiting for your (git generated) patch. :-)
Created attachment 191632 [details] [review] Removes deprecated symbols from eel-canvas-rect.c. This is my first patch. I replaced all deprecated GDK drawing functions by cairo functions. Unfortunately I had to remove support for XRender, but as far as I know it was not used in planner.
Alexandre: Can the patch in comment 10 please get a review?
Created attachment 237768 [details] [review] Remove GTK deprecated symbols (gtk_about_dialog_*) gtk_about_dialog_set_email_hook gtk_about_dialog_set_url_hook Those symbols that are deprecated in GTK 2.24. Removing them to use the default comportment (calling gtk_show_uri) requires a GTK version bump to 2.18.
Created attachment 237769 [details] deprecated symbols as of GTK 2.24 To get the list of deprecated symbols as of GTK 2.24, just run (using the attached file): git grep --word-regexp -f deprecated-gtk-2.24-symbols.txt
Created attachment 237782 [details] [review] Remove deprecated GTK symbols: gtk_signal_connect GTK_SIGNAL
Created attachment 237783 [details] [review] Remove deprecated GTK symbols: GTK_WIDGET_SET_FLAGS
Created attachment 237800 [details] [review] Remove deprecated gtk_signal_connect and GTK_SIGNAL.
Created attachment 237801 [details] [review] Remove deprecated GTK_WIDGET_SET_FLAGS.
Created attachment 237802 [details] [review] Remove deprecated GTK_WIDGET_REALIZED.
Created attachment 237803 [details] [review] Remove deprecated GTK_WIDGET_HAS_FOCUS.
Created attachment 237804 [details] [review] Remove deprecated GTK_WIDGET_DRAWABLE.
Created attachment 237805 [details] [review] Remove deprecated GTK_WIDGET_MAPPED.
Created attachment 237806 [details] [review] Remove deprecated GTK_WIDGET_STATE.
Created attachment 237807 [details] [review] Remove deprecated GTK_WIDGET_NO_WINDOW and GTK_WIDGET_HAS_GRAB.
Created attachment 237808 [details] [review] Remove deprecated GTK_CHECK_CAST.
Created attachment 237809 [details] [review] Remove deprecated GTK_CHECK_CLASS_CAST.
Created attachment 237810 [details] [review] Remove deprecated GTK_CHECK_CLASS_TYPE.
Created attachment 237811 [details] [review] Remove deprecated GTK_CHECK_TYPE.
Created attachment 237812 [details] [review] Remove deprecated GTK_CHECK_GET_CLASS.
Created attachment 237813 [details] [review] Remove deprecated gtk_about_dialog_set_email_hook and gtk_about_dialog_set_url_hook. Those symbols are deprecated as of GTK 2.24. Removing them to use the default comportment (calling gtk_show_uri) requires a GTK version bump to 2.18.
Sorry for the noise, I'm still a bit new with git-bz...
Created attachment 237938 [details] [review] Remove deprecated gtk_timeout_add.
Created attachment 237939 [details] [review] Remove deprecated GtkSignalFunc.
Created attachment 237940 [details] [review] Remove deprecated gtk_style_unref.
Created attachment 237941 [details] [review] Remove deprecated gtk_tree_path_new_root.
Created attachment 237943 [details] [review] Remove deprecated gtk_menu_append.
Comment on attachment 237769 [details] deprecated symbols as of GTK 2.24 This is not a patch, just a file listing GTK deprecated symbols, to use with 'git grep' to find this symbols. This allows to write fixes per symbol, instead of per file (which is the workflow that building with -DGTK_DISABLE_DEPRECATED produces).
(In reply to comment #37) > (From update of attachment 237769 [details]) > This is not a patch, just a file listing GTK deprecated symbols, to use with > 'git grep' to find this symbols. This allows to write fixes per symbol, instead > of per file (which is the workflow that building with -DGTK_DISABLE_DEPRECATED > produces). Oops. :-)
Created attachment 237989 [details] [review] Remove deprecated gtk_signal_connect, GTK_SIGNAL, GtkSignalFunc.
Review of attachment 237804 [details] [review]: Apart from that minor thing, this patch looks good. ::: src/planner-calendar.c @@ +1429,3 @@ private_data = PLANNER_CALENDAR_PRIVATE_DATA (widget); + if (gtk_widget_is_drawable (GTK_WIDGET (widget))) GTK_WIDGET () is not needed here.
Created attachment 238143 [details] [review] Remove deprecated GTK_WIDGET_DRAWABLE.
Committed. commit 88ae0a9be7aecc57637eaa4c6144359ecd91e440 Author: Luis Menina <liberforce@freeside.fr> Date: Mon Mar 4 11:07:09 2013 +0100 Remove deprecated gtk_menu_append. https://bugzilla.gnome.org/show_bug.cgi?id=575129 commit ec0409e7ef1994c66c7562f70e968d0ff0bee0b0 Author: Luis Menina <liberforce@freeside.fr> Date: Sat Mar 2 22:11:56 2013 +0100 Remove deprecated gtk_tree_path_new_root. https://bugzilla.gnome.org/show_bug.cgi?id=575129 commit b50c37ec28ae5b5460d079323ab671c8b63be6e4 Author: Luis Menina <liberforce@freeside.fr> Date: Sat Mar 2 21:10:49 2013 +0100 Remove deprecated gtk_style_unref. https://bugzilla.gnome.org/show_bug.cgi?id=575129 commit 6cb85e5c91daca754c63eb8a73793060cd68a400 Author: Luis Menina <liberforce@freeside.fr> Date: Sat Mar 2 20:13:05 2013 +0100 Remove deprecated gtk_timeout_add. https://bugzilla.gnome.org/show_bug.cgi?id=575129 commit 122e2f2660dc581c5101ab9662f18e70d0384b20 Author: Luis Menina <liberforce@freeside.fr> Date: Sat Mar 2 14:47:52 2013 +0100 Remove deprecated GTK_CHECK_*. Removed symbols: GTK_CHECK_CAST GTK_CHECK_CLASS_CAST GTK_CHECK_CLASS_TYPE GTK_CHECK_TYPE GTK_CHECK_GET_CLASS https://bugzilla.gnome.org/show_bug.cgi?id=575129 commit 6bad1c8764d27035e324c6f4f98f19887ac80908 Author: Luis Menina <liberforce@freeside.fr> Date: Sat Mar 2 13:27:01 2013 +0100 Remove deprecated GTK_WIDGET_*. Removed symbols: GTK_WIDGET_SET_FLAGS GTK_WIDGET_REALIZED GTK_WIDGET_HAS_FOCUS GTK_WIDGET_DRAWABLE GTK_WIDGET_MAPPED GTK_WIDGET_STATE GTK_WIDGET_NO_WINDOW GTK_WIDGET_HAS_GRAB https://bugzilla.gnome.org/show_bug.cgi?id=575129 commit 8f45e255248043feb7602f25d3815159c990a06a Author: Luis Menina <liberforce@freeside.fr> Date: Sat Mar 2 12:47:32 2013 +0100 Remove deprecated gtk_signal_connect, GTK_SIGNAL, GtkSignalFunc. https://bugzilla.gnome.org/show_bug.cgi?id=575129 commit e87c517923d5646f4a3c33b270915f88d92bf55e Author: Luis Menina <liberforce@freeside.fr> Date: Sat Mar 2 01:39:37 2013 +0100 Remove deprecated gtk_about_dialog_set_email_hook and gtk_about_dialog_set_url_hook. Those symbols are deprecated as of GTK 2.24. Removing them to use the default comportment (calling gtk_show_uri) requires a GTK version bump to 2.18. https://bugzilla.gnome.org/show_bug.cgi?id=575129
Created attachment 244534 [details] [review] Switch from GtkComboBoxEntry to GtkComboBox GtkComboBoxEntry has been disabled in 2.24. We don't lose any feature since our GtkComboBox has the has-entry property set to True.
Closing this ticket before any mass-closing of bugzilla tickets due to bugzilla shutdown for better extra information: All gtk2 deprecations are taken care of in https://gitlab.gnome.org/World/planner/-/merge_requests/22 I believe some of the patches here were cherry-picked from this bug here into it and anything else solved separately. Not using deprecated gtk3 symbols is a separate future matter.