diff src/audacious/main.c @ 2412:f0d65a33bf64 trunk

[svn] - handle unknown options
author nenolod
date Fri, 26 Jan 2007 07:37:53 -0800
parents ffbac11b3a77
children 86777d94dc7a
line wrap: on
line diff
--- a/src/audacious/main.c	Fri Jan 26 07:32:55 2007 -0800
+++ b/src/audacious/main.c	Fri Jan 26 07:37:53 2007 -0800
@@ -1032,12 +1032,18 @@
     g_option_context_add_group(context, gtk_get_option_group(TRUE));
     g_option_context_parse(context, &argc, &argv, &error);
 
+    if (error != NULL)
+    {
+        g_printerr(_("%s: %s\nTry `%s --help' for more information.\n"), argv[0], error->message, argv[0]);
+        exit(EXIT_FAILURE);
+    }
+
     if (!gtk_init_check_ok) {
         if (argc < 2) {
             /* GTK check failed, and no arguments passed to indicate
                that user is intending to only remote control a running
                session */
-            g_printerr(_("audacious: Unable to open display, exiting.\n"));
+            g_printerr(_("%s: Unable to open display, exiting.\n"), argv[0]);
             exit(EXIT_FAILURE);
         }