summaryrefslogtreecommitdiff
path: root/gtk/gtkmain.c
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2022-01-07 17:21:12 +0100
committerTimm Bäder <mail@baedert.org>2022-01-07 17:21:37 +0100
commit262f2a1453f49a57e8fc1785247d48ea8bb8cf7b (patch)
treec11ee7bb05230fd2ec6bc56223514f4de2a1dc44 /gtk/gtkmain.c
parentb4089672780abd40719ae172fdd02eec229be81a (diff)
downloadgtk+-262f2a1453f49a57e8fc1785247d48ea8bb8cf7b.tar.gz
Make some code samples compile
Diffstat (limited to 'gtk/gtkmain.c')
-rw-r--r--gtk/gtkmain.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index 352e32fdcd..c96bfb3c81 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -753,9 +753,15 @@ gtk_is_initialized (void)
* you can use it to update the default text direction as follows:
*
* |[<!-- language="C" -->
- * setlocale (LC_ALL, new_locale);
- * direction = gtk_get_locale_direction ();
- * gtk_widget_set_default_direction (direction);
+ * #include <locale.h>
+ *
+ * static void
+ * update_locale (const char *new_locale)
+ * {
+ * setlocale (LC_ALL, new_locale);
+ * GtkTextDirection direction = gtk_get_locale_direction ();
+ * gtk_widget_set_default_direction (direction);
+ * }
* ]|
*
* Returns: the `GtkTextDirection` of the current locale