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 629955 - Deprecate / remove gtk_main and gtk_init_add / remove* API
Deprecate / remove gtk_main and gtk_init_add / remove* API
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
2.23.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
deprecations
Depends on:
Blocks: 597756 619671
 
 
Reported: 2010-09-17 19:06 UTC by Javier Jardón (IRC: jjardon)
Modified: 2011-02-04 16:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Remove gtk_init_add() function (4.32 KB, patch)
2010-10-13 01:50 UTC, Javier Jardón (IRC: jjardon)
none Details | Review
Remove deprecated gtk_quit_* API (10.68 KB, patch)
2010-10-13 02:01 UTC, Javier Jardón (IRC: jjardon)
none Details | Review
Remove GtkArg, GtkCallbackMarshal and GtkFunction (4.00 KB, patch)
2010-10-13 02:01 UTC, Javier Jardón (IRC: jjardon)
none Details | Review
Deprecate GtkArg, GtkCallbackMarshal and GtkFunction (2.19 KB, patch)
2010-10-19 11:19 UTC, Javier Jardón (IRC: jjardon)
committed Details | Review
Remove gtk_init_add() function (4.39 KB, patch)
2010-10-19 11:20 UTC, Javier Jardón (IRC: jjardon)
committed Details | Review
Remove deprecated gtk_quit_* API (11.17 KB, patch)
2010-10-19 11:20 UTC, Javier Jardón (IRC: jjardon)
none Details | Review
Remove GtkArg, GtkCallbackMarshal and GtkFunction (4.17 KB, patch)
2010-10-19 11:21 UTC, Javier Jardón (IRC: jjardon)
none Details | Review
Move gtk_identifier_get_type() to gtkbindings (4.50 KB, patch)
2010-10-19 11:22 UTC, Javier Jardón (IRC: jjardon)
none Details | Review
Move GtkTranslateFunc to GtkStock (2.28 KB, patch)
2010-10-19 11:22 UTC, Javier Jardón (IRC: jjardon)
none Details | Review
Remove gtktypeutils completely (29.08 KB, patch)
2010-10-19 12:42 UTC, Javier Jardón (IRC: jjardon)
none Details | Review

Description Javier Jardón (IRC: jjardon) 2010-09-17 19:06:01 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
Comment 1 Andrew Cowie 2010-09-18 05:46:42 UTC
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
Comment 2 Matthias Clasen 2010-09-19 03:07:26 UTC
not gtk_init, gtk_init_add
Comment 3 Andrew Cowie 2010-09-19 04:48:12 UTC
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
Comment 4 Matthias Clasen 2010-09-25 02:38:42 UTC
I'm really only concerned about gtk_init_add / gtk_quit_add etc here. I don't see us removing gtk_main
Comment 5 Javier Jardón (IRC: jjardon) 2010-10-13 01:50:38 UTC
Created attachment 172229 [details] [review]
Remove gtk_init_add() function
Comment 6 Javier Jardón (IRC: jjardon) 2010-10-13 02:01:25 UTC
Created attachment 172230 [details] [review]
Remove deprecated gtk_quit_* API
Comment 7 Javier Jardón (IRC: jjardon) 2010-10-13 02:01:51 UTC
Created attachment 172231 [details] [review]
Remove GtkArg, GtkCallbackMarshal and GtkFunction
Comment 8 Javier Jardón (IRC: jjardon) 2010-10-13 02:02:50 UTC
Ad discussed in the meeting, there is no reasonable use cases in a modern use of gtk and should just go away.
Comment 9 Matthias Clasen 2010-10-15 03:47:27 UTC
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...
Comment 10 Matthias Clasen 2010-10-15 18:06:39 UTC
$ 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.
Comment 11 Javier Jardón (IRC: jjardon) 2010-10-19 11:19:41 UTC
Created attachment 172692 [details] [review]
Deprecate GtkArg, GtkCallbackMarshal and GtkFunction
Comment 12 Javier Jardón (IRC: jjardon) 2010-10-19 11:20:13 UTC
Created attachment 172693 [details] [review]
Remove gtk_init_add() function

Updated patch against master
Comment 13 Javier Jardón (IRC: jjardon) 2010-10-19 11:20:49 UTC
Created attachment 172694 [details] [review]
Remove deprecated gtk_quit_* API

Updated patch against current master
Comment 14 Javier Jardón (IRC: jjardon) 2010-10-19 11:21:33 UTC
Created attachment 172695 [details] [review]
Remove GtkArg, GtkCallbackMarshal and GtkFunction

Updated patch
Comment 15 Javier Jardón (IRC: jjardon) 2010-10-19 11:22:10 UTC
Created attachment 172696 [details] [review]
Move gtk_identifier_get_type() to gtkbindings
Comment 16 Javier Jardón (IRC: jjardon) 2010-10-19 11:22:33 UTC
Created attachment 172697 [details] [review]
Move GtkTranslateFunc to GtkStock
Comment 17 Javier Jardón (IRC: jjardon) 2010-10-19 12:42:45 UTC
Created attachment 172709 [details] [review]
Remove gtktypeutils completely
Comment 18 Javier Jardón (IRC: jjardon) 2010-11-16 05:58:04 UTC
Comment on attachment 172692 [details] [review]
Deprecate GtkArg, GtkCallbackMarshal and GtkFunction

commit 77d6bd12b95abfd33d1fca4195ea1f367283c305
Comment 19 Javier Jardón (IRC: jjardon) 2010-11-16 05:58:25 UTC
Comment on attachment 172693 [details] [review]
Remove gtk_init_add() function

commit 70d95f04e7e3d7e7738d69aabd1000e75d7fed0d