GNOME Bugzilla – Bug 629955
Deprecate / remove gtk_main and gtk_init_add / remove* API
Last modified: 2011-02-04 16:12:22 UTC
We can use GtkApplication if we need them at all or as havoc said: <hp> jjardon surely gtk_main() and everything to do with it should die in favor of using glib directly ... g_main_loop_quit_add() perhaps
Isn't this sort of needless churn? I mean every single GTK application out there has gtk_init() or gtk.init() Gtk.init() or whatever in it. Kinda late in GTK 2.x to announcing they'll be gone, isn't it? Or are you proposing this as the defining "if you don't change this, your app isn't GTK 3" break? AfC
not gtk_init, gtk_init_add
Right, sorry, s/init/main/ is what I meant. My observation was that gtk_main() is sorta in every app... it's going to be gone in GTK 3? AfC
I'm really only concerned about gtk_init_add / gtk_quit_add etc here. I don't see us removing gtk_main
Created attachment 172229 [details] [review] Remove gtk_init_add() function
Created attachment 172230 [details] [review] Remove deprecated gtk_quit_* API
Created attachment 172231 [details] [review] Remove GtkArg, GtkCallbackMarshal and GtkFunction
Ad discussed in the meeting, there is no reasonable use cases in a modern use of gtk and should just go away.
These patches look good to me and should be committed. We should also deprecate these functions in 2.24. And, after these patches, it is probably time to kill gtktypeutils.h. gtk_identifier_get_type should move to the bindings where it is used, and GtkTranslateFunc could move to stock. While you are at it, the GtkTranslateFunc docs still refer to GtkItemFactory...
$ find . -name *.c -exec grep -l "gtk_quit_" \{\} \; ./libgnomeui/libgnomeui/gnome-app-helper.c ./libcanberra-0.25/src/canberra-gtk-module.c ./vte-3/src/vtedraw.c ./libcanberra-0.26/src/canberra-gtk-module.c ./gtk+-3/gtk/gtkmain.c ./vte/src/vtedraw.c ./nautilus/src/nautilus-window.c ./seahorse-plugins/agent/seahorse-agent-main.c ./gtk+/gtk/gtkmain.c ./gtk+/gtk/gtkaliasdef.c Is the what I find in my gnome tree. So, we have to figure out what to do instead in these cases. For 2.91.1, I'm just going to deprecate gtk_init/quit_add/remove.
Created attachment 172692 [details] [review] Deprecate GtkArg, GtkCallbackMarshal and GtkFunction
Created attachment 172693 [details] [review] Remove gtk_init_add() function Updated patch against master
Created attachment 172694 [details] [review] Remove deprecated gtk_quit_* API Updated patch against current master
Created attachment 172695 [details] [review] Remove GtkArg, GtkCallbackMarshal and GtkFunction Updated patch
Created attachment 172696 [details] [review] Move gtk_identifier_get_type() to gtkbindings
Created attachment 172697 [details] [review] Move GtkTranslateFunc to GtkStock
Created attachment 172709 [details] [review] Remove gtktypeutils completely
Comment on attachment 172692 [details] [review] Deprecate GtkArg, GtkCallbackMarshal and GtkFunction commit 77d6bd12b95abfd33d1fca4195ea1f367283c305
Comment on attachment 172693 [details] [review] Remove gtk_init_add() function commit 70d95f04e7e3d7e7738d69aabd1000e75d7fed0d