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 575129 - GNOME Goal: Remove deprecated GTK+ symbols
GNOME Goal: Remove deprecated GTK+ symbols
Status: RESOLVED FIXED
Product: planner
Classification: Other
Component: General
unspecified
Other All
: Normal normal
: 0.15
Assigned To: Alexandre Franke
planner-maint
cleanup
Depends on: 589045 604169 652244
Blocks: 585692 613592 695210
 
 
Reported: 2009-03-12 19:11 UTC by André Klapper
Modified: 2021-06-02 08:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Removes the last two deprecated symbols listed in this bug report from planner-window.c (417 bytes, patch)
2011-04-06 07:43 UTC, Read Sprabery
rejected Details | Review
Removes deprecated symbols from eel-canvas-rect.c. (9.77 KB, patch)
2011-07-10 15:40 UTC, Maximilian Hofmann
none Details | Review
Remove GTK deprecated symbols (gtk_about_dialog_*) (2.70 KB, patch)
2013-03-02 00:51 UTC, Luis Menina
none Details | Review
deprecated symbols as of GTK 2.24 (18.54 KB, text/plain)
2013-03-02 01:02 UTC, Luis Menina
  Details
Remove deprecated GTK symbols: (7.38 KB, patch)
2013-03-02 11:49 UTC, Luis Menina
none Details | Review
Remove deprecated GTK symbols: (2.52 KB, patch)
2013-03-02 12:28 UTC, Luis Menina
none Details | Review
Remove deprecated gtk_signal_connect and GTK_SIGNAL. (7.38 KB, patch)
2013-03-02 15:39 UTC, Luis Menina
none Details | Review
Remove deprecated GTK_WIDGET_SET_FLAGS. (2.51 KB, patch)
2013-03-02 15:40 UTC, Luis Menina
committed Details | Review
Remove deprecated GTK_WIDGET_REALIZED. (4.34 KB, patch)
2013-03-02 15:40 UTC, Luis Menina
committed Details | Review
Remove deprecated GTK_WIDGET_HAS_FOCUS. (4.78 KB, patch)
2013-03-02 15:40 UTC, Luis Menina
committed Details | Review
Remove deprecated GTK_WIDGET_DRAWABLE. (3.18 KB, patch)
2013-03-02 15:40 UTC, Luis Menina
needs-work Details | Review
Remove deprecated GTK_WIDGET_MAPPED. (2.28 KB, patch)
2013-03-02 15:41 UTC, Luis Menina
committed Details | Review
Remove deprecated GTK_WIDGET_STATE. (3.55 KB, patch)
2013-03-02 15:41 UTC, Luis Menina
committed Details | Review
Remove deprecated GTK_WIDGET_NO_WINDOW and GTK_WIDGET_HAS_GRAB. (1.20 KB, patch)
2013-03-02 15:41 UTC, Luis Menina
committed Details | Review
Remove deprecated GTK_CHECK_CAST. (15.28 KB, patch)
2013-03-02 15:41 UTC, Luis Menina
committed Details | Review
Remove deprecated GTK_CHECK_CLASS_CAST. (16.89 KB, patch)
2013-03-02 15:42 UTC, Luis Menina
committed Details | Review
Remove deprecated GTK_CHECK_CLASS_TYPE. (15.41 KB, patch)
2013-03-02 15:42 UTC, Luis Menina
committed Details | Review
Remove deprecated GTK_CHECK_TYPE. (16.67 KB, patch)
2013-03-02 15:42 UTC, Luis Menina
committed Details | Review
Remove deprecated GTK_CHECK_GET_CLASS. (13.36 KB, patch)
2013-03-02 15:42 UTC, Luis Menina
committed Details | Review
Remove deprecated gtk_about_dialog_set_email_hook and gtk_about_dialog_set_url_hook. (2.67 KB, patch)
2013-03-02 15:45 UTC, Luis Menina
committed Details | Review
Remove deprecated gtk_timeout_add. (1.39 KB, patch)
2013-03-04 09:25 UTC, Luis Menina
committed Details | Review
Remove deprecated GtkSignalFunc. (1.28 KB, patch)
2013-03-04 09:26 UTC, Luis Menina
none Details | Review
Remove deprecated gtk_style_unref. (1.30 KB, patch)
2013-03-04 09:26 UTC, Luis Menina
committed Details | Review
Remove deprecated gtk_tree_path_new_root. (2.19 KB, patch)
2013-03-04 09:27 UTC, Luis Menina
committed Details | Review
Remove deprecated gtk_menu_append. (7.02 KB, patch)
2013-03-04 10:10 UTC, Luis Menina
committed Details | Review
Remove deprecated gtk_signal_connect, GTK_SIGNAL, GtkSignalFunc. (8.13 KB, patch)
2013-03-04 14:08 UTC, Luis Menina
committed Details | Review
Remove deprecated GTK_WIDGET_DRAWABLE. (3.17 KB, patch)
2013-03-05 16:50 UTC, Luis Menina
committed Details | Review
Switch from GtkComboBoxEntry to GtkComboBox (2.39 KB, patch)
2013-05-17 13:45 UTC, Alexandre Franke
none Details | Review

Description André Klapper 2009-03-12 19:11:16 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
Comment 1 Alexandre Franke 2010-03-22 13:33:44 UTC
I'm working on it.
Comment 2 Milan Bouchet-Valat 2010-06-13 13:33:14 UTC
No news on this? :-)
Comment 3 Alexandre Franke 2010-06-13 20:34:18 UTC
Still working on it :-)
Comment 4 Read Sprabery 2011-04-06 07:43:45 UTC
Created attachment 185265 [details] [review]
Removes the last two deprecated symbols listed in this bug report from planner-window.c
Comment 5 Read Sprabery 2011-04-06 07:45:15 UTC
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?
Comment 6 Javier Jardón (IRC: jjardon) 2011-04-06 15:41:52 UTC
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
Comment 7 Alexandre Franke 2011-04-06 16:58:19 UTC
(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.
Comment 8 Read Sprabery 2011-04-07 00:13:52 UTC
(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.
Comment 9 Alexandre Franke 2011-04-10 11:54:19 UTC
(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. :-)
Comment 10 Maximilian Hofmann 2011-07-10 15:40:49 UTC
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.
Comment 11 André Klapper 2011-09-01 14:15:38 UTC
Alexandre: Can the patch in comment 10 please get a review?
Comment 12 André Klapper 2012-01-12 15:11:28 UTC
Alexandre: Can the patch in comment 10 please get a review?
Comment 13 Luis Menina 2013-03-02 00:51:20 UTC
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.
Comment 14 Luis Menina 2013-03-02 01:02:54 UTC
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
Comment 15 Luis Menina 2013-03-02 11:49:28 UTC
Created attachment 237782 [details] [review]
Remove deprecated GTK symbols:

gtk_signal_connect
GTK_SIGNAL
Comment 16 Luis Menina 2013-03-02 12:28:58 UTC
Created attachment 237783 [details] [review]
Remove deprecated GTK symbols:

GTK_WIDGET_SET_FLAGS
Comment 17 Luis Menina 2013-03-02 15:39:30 UTC
Created attachment 237800 [details] [review]
Remove deprecated gtk_signal_connect and GTK_SIGNAL.
Comment 18 Luis Menina 2013-03-02 15:40:15 UTC
Created attachment 237801 [details] [review]
Remove deprecated GTK_WIDGET_SET_FLAGS.
Comment 19 Luis Menina 2013-03-02 15:40:34 UTC
Created attachment 237802 [details] [review]
Remove deprecated GTK_WIDGET_REALIZED.
Comment 20 Luis Menina 2013-03-02 15:40:45 UTC
Created attachment 237803 [details] [review]
Remove deprecated GTK_WIDGET_HAS_FOCUS.
Comment 21 Luis Menina 2013-03-02 15:40:59 UTC
Created attachment 237804 [details] [review]
Remove deprecated GTK_WIDGET_DRAWABLE.
Comment 22 Luis Menina 2013-03-02 15:41:06 UTC
Created attachment 237805 [details] [review]
Remove deprecated GTK_WIDGET_MAPPED.
Comment 23 Luis Menina 2013-03-02 15:41:29 UTC
Created attachment 237806 [details] [review]
Remove deprecated GTK_WIDGET_STATE.
Comment 24 Luis Menina 2013-03-02 15:41:36 UTC
Created attachment 237807 [details] [review]
Remove deprecated GTK_WIDGET_NO_WINDOW and GTK_WIDGET_HAS_GRAB.
Comment 25 Luis Menina 2013-03-02 15:41:50 UTC
Created attachment 237808 [details] [review]
Remove deprecated GTK_CHECK_CAST.
Comment 26 Luis Menina 2013-03-02 15:42:06 UTC
Created attachment 237809 [details] [review]
Remove deprecated GTK_CHECK_CLASS_CAST.
Comment 27 Luis Menina 2013-03-02 15:42:15 UTC
Created attachment 237810 [details] [review]
Remove deprecated GTK_CHECK_CLASS_TYPE.
Comment 28 Luis Menina 2013-03-02 15:42:22 UTC
Created attachment 237811 [details] [review]
Remove deprecated GTK_CHECK_TYPE.
Comment 29 Luis Menina 2013-03-02 15:42:29 UTC
Created attachment 237812 [details] [review]
Remove deprecated GTK_CHECK_GET_CLASS.
Comment 30 Luis Menina 2013-03-02 15:45:01 UTC
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.
Comment 31 Luis Menina 2013-03-02 15:46:22 UTC
Sorry for the noise, I'm still a bit new with git-bz...
Comment 32 Luis Menina 2013-03-04 09:25:50 UTC
Created attachment 237938 [details] [review]
Remove deprecated gtk_timeout_add.
Comment 33 Luis Menina 2013-03-04 09:26:28 UTC
Created attachment 237939 [details] [review]
Remove deprecated GtkSignalFunc.
Comment 34 Luis Menina 2013-03-04 09:26:56 UTC
Created attachment 237940 [details] [review]
Remove deprecated gtk_style_unref.
Comment 35 Luis Menina 2013-03-04 09:27:37 UTC
Created attachment 237941 [details] [review]
Remove deprecated gtk_tree_path_new_root.
Comment 36 Luis Menina 2013-03-04 10:10:25 UTC
Created attachment 237943 [details] [review]
Remove deprecated gtk_menu_append.
Comment 37 Luis Menina 2013-03-04 12:04:40 UTC
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).
Comment 38 Alexandre Franke 2013-03-04 13:23:37 UTC
(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. :-)
Comment 39 Luis Menina 2013-03-04 14:08:43 UTC
Created attachment 237989 [details] [review]
Remove deprecated gtk_signal_connect, GTK_SIGNAL, GtkSignalFunc.
Comment 40 Alexandre Franke 2013-03-05 15:02:54 UTC
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.
Comment 41 Luis Menina 2013-03-05 16:50:31 UTC
Created attachment 238143 [details] [review]
Remove deprecated GTK_WIDGET_DRAWABLE.
Comment 42 Luis Menina 2013-03-05 17:20:47 UTC
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
Comment 43 Alexandre Franke 2013-05-17 13:45:13 UTC
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.
Comment 44 Mart Raudsepp 2021-06-02 08:49:52 UTC
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.