GNOME Bugzilla – Bug 572348
Remove deprecated GTK+ symbols
Last modified: 2010-04-08 14:18:44 UTC
http://live.gnome.org/GnomeGoals/RemoveDeprecatedSymbols/GTK%2B For potential patch contributors: It might make sense to break this into several smaller patches. :-P Also make sure that the gtk and glib versions in configure.in are high enough and take a look since which version the new non-deprecated functions are available. http://library.gnome.org is your friend. http://library.gnome.org/devel/gtk/stable/GtkCList.html gtk_clist_freeze, gtk_clist_new, gtk_clist_prepend, gtk_clist_set_selection_mode, gtk_clist_thaw, http://library.gnome.org/devel/gtk/stable/GtkOptionMenu.html gtk_option_menu_get_history, gtk_option_menu_get_menu, gtk_option_menu_new, gtk_option_menu_remove_menu, gtk_option_menu_set_history, gtk_option_menu_set_menu, http://library.gnome.org/devel/gtk/stable/GtkCombo.html gtk_combo_new, gtk_combo_set_case_sensitive, gtk_combo_set_popdown_strings, http://library.gnome.org/devel/gtk/stable/GtkLabel.html#gtk-label-parse-uline gtk_label_parse_uline, http://library.gnome.org/devel/gtk/stable/GtkOptionMenu.html gtk_list_clear_items, gtk_list_item_new_with_label, gtk_list_new, gtk_list_select_child, gtk_list_select_item, gtk_list_set_selection_mode, gtk_list_unselect_all, http://library.gnome.org/devel/gtk/stable/GtkStyle.html#gtk-style-get-font gtk_style_get_font, http://library.gnome.org/devel/gtk/stable/GtkWidget.html gtk_widget_draw, gtk_widget_push_visual, gtk_widget_set_uposition, http://library.gnome.org/devel/gtk/unstable/GtkStatusIcon.html#gtk-status-icon-set-tooltip gtk_status_icon_set_tooltip
Thanks. I'll update http://www.go-evolution.org/GTK3 based on this.
Knocked off the easy ones. The wiki page is up-to-date.
So currently worth to fix are: * GtkCList * GtkCombo (migrate to GtkComboBoxEntry) * GtkOptionMenu (migrate to GtkComboBox) * GtkList / GtkListItem * gtk_label_parse_uline * gtk_widget_set_uposition
I found GtkCList used in shell/importer/intelligent.c, but I didn't find how is this part of code called. It doesn't seem to be used. The code there also uses gnome_config_* functions, which I suppose are obsolete as well, aren't they? Am I missing something?
yes. For gnome_config_* see bug 570730.
AFAICT, everything under shell/importer is dead code. I've already ripped it out of the kill-bonobo branch. Looks like a precursor to the EImport framework.
OK, so I take GtkCList as gone from evo (though not from my build). I removed GtkCombo locally, together with other dead files: addressbook/gui/contact-editor/e-contact-editor-address.[h|c] widgets/table/e-table-config-field.[h|c] I'll look on GtkOptionMenu on Monday or so and upload patch for these two together, maybe I'll wait until I have also those other from comment #3, I do not know yet. I just do not want to upload patch for each of them, as I hope those other will be easy. Matt, do you have bug for GTK_BIN (...)->child things? Can I do this together with these? It's mostly mechanic replace, but if you've special bug for that then I'm fine.
(In reply to comment #7) > Matt, do you have bug for GTK_BIN (...)->child things? Can I do this together > with these? It's mostly mechanic replace, but if you've special bug for that > then I'm fine. You mean GSEAL compliance? Think I already fixed what we can with GTK+ 2.14, unless I missed something. If you find any more, just fix them.
During GtkOptionMenu rewrites: Removed other files too: calendar/gui/dialogs/meeting-page.glade addressbook/printing/e-contact-print-style-editor.[h|c] addressbook/printing/e-contact-print.glade addressbook/gui/contact-editor/fulladdr.glade addressbook/gui/contact-editor/e-contact-editor-im.[h|c] addressbook/gui/contact-editor/im.glade skipped, as Matt said he has this done in de-bonobo: widgets/misc/e-charset-picker.c widgets/misc/e-search-bar.c shell/e-shell-importer.c mail/em-mailer-prefs.[h|c]: those with charset mail/em-composer-prefs.[h|c]: those with charset mail/em-folder-view.c Approximately 6 files left for gtk_option_menu, and some testing, of course. I'm afraid of some regressions, unfortunately, mainly for parts where we had object's user data set for menu items there, like in filter rules. I have it rewritten, just not tested yet.
Created attachment 131199 [details] proposed evo patch for evolution; With some ugly tweaks in the left files, and around too, I was able to compile (didn't try to run) Evolution with these options set: -DG_DISABLE_DEPRECATED -DPANGO_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DLIBSOUP_DISABLE_DEPRECATED -Wall -Wdeclaration-after-statement -Werror-implicit-function-declaration -Werror Preferably apply and fix regressions than a real review, because it isn't as that small (gzip has a very nice compression ratio here). Many GSEAL left (I do not have gtk+ new enough, and sub libraries are crazy with that), even EDS/camel deprecated stuff still there. I really do not know why to have convenient functions like camel_folder_set_message_flags deprecated.
Commit after branching, and let's see what we can break. :-P Thanks so much for working on this, Milan.
OK, consider master broken since either commit 8a072ffc7c0ddcde472877a51ace0bb14f86fb0a or f6792a6..8a072ff master -> master whatever those numbers mean. If you notice any regression, please CC me there and I will fix it as soon as I will be able to. Thanks.
eh, forgot to remove dead files from the source tree. Created commit cd26e8a in master.
Created commit c868ace in master. Message filter creating/editing didn't work, neither the filter-option selected item restored properly. Fixed now.
The remaining (--> REOPENED) deprecated functions that are still used in current master are: $:andre\> grep -r "GTK_CHECK_CAST" . ./addressbook/conduit/address-conduit.c:#define GTK_CHECK_CAST G_TYPE_CHECK_INSTANCE_CAST ./calendar/conduits/todo/todo-conduit.c:#define GTK_CHECK_CAST G_TYPE_CHECK_INSTANCE_CAST ./calendar/conduits/memo/memo-conduit.c:#define GTK_CHECK_CAST G_TYPE_CHECK_INSTANCE_CAST ./calendar/conduits/calendar/calendar-conduit.c:#define GTK_CHECK_CAST G_TYPE_CHECK_INSTANCE_CAST These all look like they are required for compatibility until gnome-pilot gets rid of deprecated stuff (bug 594214). As these are just defines I guess I should whitelist them to not be listed on http://www.gnome.org/~fpeters/299.html ? $:andre\> grep -r "gtk_combo_new" . ./widgets/table/e-table-config-field.c: etcf->combo = gtk_combo_new(); $:andre\> grep -r "gtk_combo_set_popdown_strings" . ./widgets/table/e-table-config-field.c: gtk_combo_set_popdown_strings(GTK_COMBO(etcf->combo), list); In that file the "GTK_COMBO" code confuses me. Where the hell is that defined?! ./widgets/table/e-table-config-field.c: text = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(etcf->combo)->entry)); gtk_combo_set_popdown_strings(GTK_COMBO(etcf->combo), list); gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(etcf->combo)->entry), chosen_column->title_); gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(etcf->combo)->entry), "None"); g_signal_connect(GTK_COMBO(etcf->combo)->entry, "changed",
(In reply to comment #15) > $:andre\> grep -r "GTK_CHECK_CAST" . > ./addressbook/conduit/address-conduit.c:#define GTK_CHECK_CAST > G_TYPE_CHECK_INSTANCE_CAST > ./calendar/conduits/todo/todo-conduit.c:#define GTK_CHECK_CAST > G_TYPE_CHECK_INSTANCE_CAST > ./calendar/conduits/memo/memo-conduit.c:#define GTK_CHECK_CAST > G_TYPE_CHECK_INSTANCE_CAST > ./calendar/conduits/calendar/calendar-conduit.c:#define GTK_CHECK_CAST > G_TYPE_CHECK_INSTANCE_CAST > > These all look like they are required for compatibility until gnome-pilot gets > rid of deprecated stuff (bug 594214). > As these are just defines I guess I should whitelist them to not be listed on > http://www.gnome.org/~fpeters/299.html ? That's a hack I added because gnome-pilot still uses GTK_CHECK_CAST macros in its header files. It's a conditional define: #ifdef GTK_DISABLE_DEPRECATED #define GTK_CHECK_CAST G_TYPE_CHECK_INSTANCE_CAST #endif There's nothing for us to do but wait for gnome-pilot to fix its headers. > In that file the "GTK_COMBO" code confuses me. > Where the hell is that defined?! /usr/include/gtk-2.0/gtk/gtkcombo.h So one last case to fix.
I can't build evo master: CC e-map.lo e-map.c: In function ‘scroll_to’: e-map.c:1255: error: implicit declaration of function ‘gdk_event_get_graphics_expose’ e-map.c:1255: warning: nested extern declaration of ‘gdk_event_get_graphics_expose’ e-map.c:1255: warning: assignment makes pointer from integer without a cast That was deprecated in GTK+ some days ago.
Diego: These are just warnings, why can't you build? Flags too strict?
It's because we build by default with -DGTK_DISABLE_DEPRECATED -Werror-implicit-function-declaration Not sure what to use in place gdk_event_get_graphics_expose(), or why we're using it in the first place. Commit message and API docs are not helpful. commit aa9bb7d8e4cf9ef9d47f6dad6aa9deb2f30723a1 Author: Matthias Clasen <mclasen@redhat.com> Date: Wed Sep 9 09:00:15 2009 -0400 Deprecate gdk_event_get_graphics exposes This function is only used in deprecated, broken widgets. Also, fix up some of its implmentation that clang was complaining about.
Seems to be just an optimization. I disabled the call and the map widget still seems to work fine, so we'll see if any problems crop up. http://git.gnome.org/cgit/evolution/commit/?id=0585b94eb27d02cf5cb0da87ee3bab85e2de6cbc
That last GtkCombo is a freebie. It was in an unused ETable source file which I blew away recently: http://git.gnome.org/cgit/evolution/commit/?id=8f3e43fb7d94f2b120b3e3e53e0af3dd7c5e248c So, closing this as FIXED.
Reopening. Current master has the following issues: ./widgets/misc/e-web-view.c: action = gtk_widget_get_action (widget); ./shell/e-shell-window-private.c: action = gtk_widget_get_action (widget); ./mail/e-mail-browser.c: action = gtk_widget_get_action (widget);
Fixed -- hopefully for good this time -- in: http://git.gnome.org/cgit/evolution/commit/?id=656178049b4d1b73d4997aa983b778d4eb4054ae
Reopening as capplet/settings/mail-view.c uses the recently deprecated gtk_notebook_set_tab_label_packing() in three places. See http://library.gnome.org/devel/gtk/unstable/GtkNotebook.html#gtk-notebook-set-tab-label-packing
Fixed in master and gnome-2-30: http://git.gnome.org/browse/evolution/commit/?id=f585bf4b61434414feef95711feb7d53213e1098 http://git.gnome.org/browse/evolution/commit/?h=gnome-2-30&id=74e6e7c71db8f30b1c140275d2fccf4f7bef0c04