[gtk+] gtk-reftest: Clarify --direction argument parameters
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gtk-reftest: Clarify --direction argument parameters
- Date: Sat, 31 May 2014 03:20:55 +0000 (UTC)
commit 690fb31fb4b526c27c5ef4dd144b8802e3dc37c8
Author: Benjamin Otte <otte redhat com>
Date: Sat May 31 04:52:53 2014 +0200
gtk-reftest: Clarify --direction argument parameters
... and print a proper error message when the parameter is not
recognized.
testsuite/reftests/gtk-reftest.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/testsuite/reftests/gtk-reftest.c b/testsuite/reftests/gtk-reftest.c
index 70808f1..0e30d7c 100644
--- a/testsuite/reftests/gtk-reftest.c
+++ b/testsuite/reftests/gtk-reftest.c
@@ -44,7 +44,7 @@ static const GOptionEntry test_args[] = {
{ "directory", 'd', 0, G_OPTION_ARG_FILENAME, &arg_base_dir,
"Directory to run tests from", "DIR" },
{ "direction", 0, 0, G_OPTION_ARG_STRING, &arg_direction,
- "Set text direction", "DIRECTION" },
+ "Set text direction", "ltr|rtl" },
{ NULL }
};
@@ -70,6 +70,8 @@ parse_command_line (int *argc, char ***argv)
gtk_widget_set_default_direction (GTK_TEXT_DIR_RTL);
else if (g_strcmp0 (arg_direction, "ltr") == 0)
gtk_widget_set_default_direction (GTK_TEXT_DIR_LTR);
+ else
+ g_printerr ("Invalid argument passed to --direction argument. Valid arguments are 'ltr' and 'rtl'\n");
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]