summaryrefslogtreecommitdiff
path: root/gtk/gtkmain.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-02-09 22:41:58 -0500
committerMatthias Clasen <mclasen@redhat.com>2020-02-09 23:12:32 -0500
commit4c22939dea509c48082d113697acf2509b3a6fe8 (patch)
treebb8707ae90b1c1d786c9c39088e9297305a86c8a /gtk/gtkmain.c
parenta6c54669007f3932d6e2813e618bb106579fd28f (diff)
downloadgtk+-4c22939dea509c48082d113697acf2509b3a6fe8.tar.gz
docs: Update an example
Don't use gtk_main() in the mainloop example. It is going away.
Diffstat (limited to 'gtk/gtkmain.c')
-rw-r--r--gtk/gtkmain.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index 06fdd28cf7..2869db4846 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -78,15 +78,16 @@
* gtk_widget_show (mainwin);
*
* // Enter the main event loop, and wait for user interaction
- * gtk_main ();
+ * while (!done)
+ * g_main_context_iteration (NULL, TRUE);
*
* // The user lost interest
* return 0;
* }
* ]|
*
- * It’s OK to use the GLib main loop directly instead of gtk_main(), though it
- * involves slightly more typing. See #GMainLoop in the GLib documentation.
+ * See #GMainLoop in the GLib documentation to learn more about
+ * main loops and their features.
*/
#include "config.h"