From ee89c605cf7933eca21411f635dc59ae767a21fe Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 4 Jan 2011 11:18:42 -0500 Subject: [PATCH] Some documentation improvements for gtk_init/gtk_parse_args https://bugzilla.gnome.org/show_bug.cgi?id=562182 --- gtk/gtkmain.c | 47 +++++++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c index a4f3deda7f..860adbb463 100644 --- a/gtk/gtkmain.c +++ b/gtk/gtkmain.c @@ -449,9 +449,9 @@ static gboolean do_setlocale = TRUE; * * Prevents gtk_init(), gtk_init_check(), gtk_init_with_args() and * gtk_parse_args() from automatically - * calling setlocale (LC_ALL, ""). You would - * want to use this function if you wanted to set the locale for - * your program to something other than the user's locale, or if + * calling setlocale (LC_ALL, ""). You would + * want to use this function if you wanted to set the locale for + * your program to something other than the user's locale, or if * you wanted to set different values for different locale categories. * * Most programs should not need to call this function. @@ -985,8 +985,8 @@ gtk_init_with_args (gint *argc, /** * gtk_parse_args: - * @argc: (inout): a pointer to the number of command line arguments. - * @argv: (array) (inout): a pointer to the array of command line arguments. + * @argc: (inout): a pointer to the number of command line arguments + * @argv: (array) (inout): a pointer to the array of command line arguments * * Parses command line arguments, and initializes global * attributes of GTK+, but does not actually open a connection @@ -995,7 +995,7 @@ gtk_init_with_args (gint *argc, * Any arguments used by GTK+ or GDK are removed from the array and * @argc and @argv are updated accordingly. * - * You shouldn't call this function explicitely if you are using + * There is no need to call this function explicitely if you are using * gtk_init(), or gtk_init_check(). * * Return value: %TRUE if initialization succeeded, otherwise %FALSE. @@ -1069,27 +1069,30 @@ gtk_init_check (int *argc, /** * gtk_init: - * @argc: (inout): Address of the argc parameter of your - * main() function. Changed if any arguments were handled. - * @argv: (array length=argc) (inout) (allow-none): Address of the argv parameter of main(). - * Any parameters understood by gtk_init() are stripped before return. + * @argc: (inout): Address of the argc parameter of + * your main() function. Changed if any arguments were handled + * @argv: (array length=argc) (inout) (allow-none): Address of the + * argv parameter of main(). Any options + * understood by GTK+ are stripped before return. * * Call this function before using any other GTK+ functions in your GUI * applications. It will initialize everything needed to operate the - * toolkit and parses some standard command line options. @argc and - * @argv are adjusted accordingly so your own code will - * never see those standard arguments. + * toolkit and parses some standard command line options. * - * Note that there are some alternative ways to initialize GTK+: - * if you are calling gtk_parse_args(), gtk_init_check(), - * gtk_init_with_args() or g_option_context_parse() with - * the option group returned by gtk_get_option_group(), you - * don't have to call gtk_init(). + * @argc and @argv are adjusted accordingly so your own code will + * never see those standard arguments. + * + * Note that there are some alternative ways to initialize GTK+: + * if you are calling gtk_parse_args(), gtk_init_check(), + * gtk_init_with_args() or g_option_context_parse() with + * the option group returned by gtk_get_option_group(), + * you don't have to call gtk_init(). * * - * This function will terminate your program if it was unable to initialize - * the GUI for some reason. If you want your program to fall back to a - * textual interface you want to call gtk_init_check() instead. + * This function will terminate your program if it was unable to + * initialize the windowing system for some reason. If you want + * your program to fall back to a textual interface you want to + * call gtk_init_check() instead. * * * @@ -1100,7 +1103,7 @@ gtk_init_check (int *argc, * but notice that other libraries (e.g. libdbus or gvfs) might do * similar things. * - **/ + */ void gtk_init (int *argc, char ***argv) {