[gtk+] gtk-builder-tool: Accept --help



commit 836bd6540863d036981ae545ae37f99d3b71e088
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Jan 31 11:01:46 2016 -0500

    gtk-builder-tool: Accept --help
    
    Saying 'Failed to open file '--help' is not polite or smart.
    Catch this case and show usage information.

 gtk/gtk-builder-tool.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtk-builder-tool.c b/gtk/gtk-builder-tool.c
index 182577f..bc18b38 100644
--- a/gtk/gtk-builder-tool.c
+++ b/gtk/gtk-builder-tool.c
@@ -913,6 +913,9 @@ main (int argc, char *argv[])
   if (argc < 3)
     usage ();
 
+  if (strcmp (argv[2], "--help") == 0)
+    usage ();
+
   if (strcmp (argv[1], "validate") == 0)
     do_validate (argv[2]);
   else if (strcmp (argv[1], "simplify") == 0)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]