[gtk+] Set translation domain for parameter_string in gtk_init_with_args
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Set translation domain for parameter_string in gtk_init_with_args
- Date: Tue, 10 Aug 2010 04:13:22 +0000 (UTC)
commit e3bd926c1ef83027c756488ba19f4353930fc6db
Author: Gabor Kelemen <kelemeng gnome hu>
Date: Tue Aug 10 00:11:40 2010 -0400
Set translation domain for parameter_string in gtk_init_with_args
This was requested in bug 554926.
gtk/gtkmain.c | 23 ++++++++++++-----------
1 files changed, 12 insertions(+), 11 deletions(-)
---
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index cf3cd53..ea922a8 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -817,24 +817,24 @@ gtk_get_option_group (gboolean open_default_display)
* @argc: a pointer to the number of command line arguments.
* @argv: a pointer to the array of command line arguments.
* @parameter_string: a string which is displayed in
- * the first line of <option>--help</option> output, after
+ * the first line of <option>--help</option> output, after
* <literal><replaceable>programname</replaceable> [OPTION...]</literal>
* @entries: a %NULL-terminated array of #GOptionEntry<!-- -->s
* describing the options of your program
* @translation_domain: a translation domain to use for translating
* the <option>--help</option> output for the options in @entries
- * with gettext(), or %NULL
- * @error: a return location for errors
+ * and the @parameter_string with gettext(), or %NULL
+ * @error: a return location for errors
*
- * This function does the same work as gtk_init_check().
- * Additionally, it allows you to add your own commandline options,
- * and it automatically generates nicely formatted
+ * This function does the same work as gtk_init_check().
+ * Additionally, it allows you to add your own commandline options,
+ * and it automatically generates nicely formatted
* <option>--help</option> output. Note that your program will
* be terminated after writing out the help output.
*
- * Returns: %TRUE if the GUI has been successfully initialized,
+ * Returns: %TRUE if the GUI has been successfully initialized,
* %FALSE otherwise.
- *
+ *
* Since: 2.6
*/
gboolean
@@ -858,14 +858,15 @@ gtk_init_with_args (gint *argc,
return FALSE;
gtk_group = gtk_get_option_group (TRUE);
-
+
context = g_option_context_new (parameter_string);
g_option_context_add_group (context, gtk_group);
-
+ g_option_context_set_translation_domain (context, translation_domain);
+
if (entries)
g_option_context_add_main_entries (context, entries, translation_domain);
retval = g_option_context_parse (context, argc, argv, error);
-
+
g_option_context_free (context);
return retval;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]