GNOME Bugzilla – Bug 572348
Remove deprecated GTK+ symbols
Last modified: 2010-04-08 14:18:44 UTC
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.
gtk_clist_freeze, gtk_clist_new, gtk_clist_prepend, gtk_clist_set_selection_mode, gtk_clist_thaw,
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,
gtk_combo_new, gtk_combo_set_case_sensitive, gtk_combo_set_popdown_strings,
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,
gtk_widget_draw, gtk_widget_push_visual, gtk_widget_set_uposition,
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:
* GtkCombo (migrate to GtkComboBoxEntry)
* GtkOptionMenu (migrate to GtkComboBox)
* GtkList / GtkListItem
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:
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:
skipped, as Matt said he has this done in de-bonobo:
mail/em-mailer-prefs.[h|c]: those with charset
mail/em-composer-prefs.[h|c]: those with charset
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
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
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?!
text = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(etcf->combo)->entry));
(In reply to comment #15)
> $:andre\> grep -r "GTK_CHECK_CAST" .
> ./addressbook/conduit/address-conduit.c:#define GTK_CHECK_CAST
> ./calendar/conduits/todo/todo-conduit.c:#define GTK_CHECK_CAST
> ./calendar/conduits/memo/memo-conduit.c:#define GTK_CHECK_CAST
> ./calendar/conduits/calendar/calendar-conduit.c:#define GTK_CHECK_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:
#define GTK_CHECK_CAST G_TYPE_CHECK_INSTANCE_CAST
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?!
So one last case to fix.
I can't build evo master:
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
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.
Author: Matthias Clasen <firstname.lastname@example.org>
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.
That last GtkCombo is a freebie. It was in an unused ETable source file which I blew away recently:
So, closing this as FIXED.
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:
Reopening as capplet/settings/mail-view.c uses the recently deprecated gtk_notebook_set_tab_label_packing() in three places. See
Fixed in master and gnome-2-30: