# HG changeset patch # User Mark Doliner # Date 1249859519 0 # Node ID ea3e672e356b4948b746fbcd2e4efd1409b14426 # Parent 2987756bc600d34d90ff773db2cf49e95075c968 Split the descriptions of our --help text up into multiple smaller strings. This also doesn't allow translators to translate the parameters, since that would break them. It seems like it would be good if those strings were translatable, too, but that's a bigger change than I'm willing to make right now. This also eliminates the two almost identical blocks of text we had in order to not show the --display option in Windows. diff -r 2987756bc600 -r ea3e672e356b pidgin/gtkmain.c --- a/pidgin/gtkmain.c Sun Aug 09 20:56:59 2009 +0000 +++ b/pidgin/gtkmain.c Sun Aug 09 23:11:59 2009 +0000 @@ -406,34 +406,34 @@ if (terse) { text = g_strdup_printf(_("%s %s. Try `%s -h' for more information.\n"), PIDGIN_NAME, DISPLAY_VERSION, name); } else { + GString *str = g_string_new(NULL); + g_string_append_printf(str, "%s %s\n", PIDGIN_NAME, DISPLAY_VERSION); + g_string_append_printf(str, _("Usage: %s [OPTION]...\n\n"), name); + g_string_append_printf(str, " -c, --config=DIR %s\n", + _("use DIR for config files")); + g_string_append_printf(str, " -d, --debug %s\n", + _("print debugging messages to stdout")); + g_string_append_printf(str, " -f, --force-online %s\n", + _("force online, regardless of network status")); + g_string_append_printf(str, " -h, --help %s\n", + _("display this help and exit")); + g_string_append_printf(str, " -m, --multiple %s\n", + _("allow multiple instances")); + g_string_append_printf(str, " -n, --nologin %s\n", + _("don't automatically login")); + g_string_append_printf(str, " -l, --login[=NAME] %s\n", + _("enable specified account(s) (optional argument NAME\n" + " " + "specifies account(s) to use, separated by commas.")); + g_string_append_printf(str, " %s\n", + _("Without this only the first account will be enabled).")); #ifndef WIN32 - text = g_strdup_printf(_("%s %s\n" - "Usage: %s [OPTION]...\n\n" - " -c, --config=DIR use DIR for config files\n" - " -d, --debug print debugging messages to stdout\n" - " -f, --force-online force online, regardless of network status\n" - " -h, --help display this help and exit\n" - " -m, --multiple do not ensure single instance\n" - " -n, --nologin don't automatically login\n" - " -l, --login[=NAME] enable specified account(s) (optional argument NAME\n" - " specifies account(s) to use, separated by commas.\n" - " Without this only the first account will be enabled).\n" - " --display=DISPLAY X display to use\n" - " -v, --version display the current version and exit\n"), PIDGIN_NAME, DISPLAY_VERSION, name); -#else - text = g_strdup_printf(_("%s %s\n" - "Usage: %s [OPTION]...\n\n" - " -c, --config=DIR use DIR for config files\n" - " -d, --debug print debugging messages to stdout\n" - " -f, --force-online force online, regardless of network status\n" - " -h, --help display this help and exit\n" - " -m, --multiple do not ensure single instance\n" - " -n, --nologin don't automatically login\n" - " -l, --login[=NAME] enable specified account(s) (optional argument NAME\n" - " specifies account(s) to use, separated by commas.\n" - " Without this only the first account will be enabled).\n" - " -v, --version display the current version and exit\n"), PIDGIN_NAME, DISPLAY_VERSION, name); -#endif + g_string_append_printf(str, " --display=DISPLAY %s\n", + _("X display to use")); +#endif /* !WIN32 */ + g_string_append_printf(str, " -v, --version %s\n", + _("display the current version and exit")); + text = g_string_free(str, FALSE); } purple_print_utf8_to_console(stdout, text);