gtk-reftest: Don't warn needlessly

Only warn about the --direction argument if the option was
actually specified.
This commit is contained in:
Matthias Clasen 2014-05-30 23:30:56 -04:00
parent e4ba5b6ab6
commit 5880c9e365

View File

@ -70,7 +70,7 @@ 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
else if (arg_direction != NULL)
g_printerr ("Invalid argument passed to --direction argument. Valid arguments are 'ltr' and 'rtl'\n");
return TRUE;