Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=yaxmenu.git;a=commitdiff;h=ded3f1cbeabb049982adb212708876961b06f645

commit ded3f1cbeabb049982adb212708876961b06f645
Author: James Buren <r...@frugalware.org>
Date:   Mon Dec 7 00:25:25 2009 -0600

options.c
* add options for setting theme and menu

diff --git a/src/options.c b/src/options.c
index d57c115..6ff27f9 100644
--- a/src/options.c
+++ b/src/options.c
@@ -5,7 +5,7 @@

static const char version[] = "git";
static const char date[] = __DATE__;
-static const char options[] = ":vih";
+static const char options[] = ":t:m:vih";
static const char info_format[] = "%s version %s\n"
"\n"
"Built on %s.\n";
@@ -13,6 +13,8 @@ static const char help_format[] = "Usage: %s\n"
"\n"
"Valid options:\n"
"\n"
+                                  "-t -> Set the theme to use\n"
+                                  "-m -> Set the menu to use\n"
"-v -> Toggle verbose output\n"
"-i -> Print miscellaneous information\n"
"-h -> Print help information\n";
@@ -34,6 +36,14 @@ bool options_parse(int argc,char **argv) {

switch(opt) {

+      case 't':
+        xsetstr(&G->theme,optarg);
+        break;
+
+      case 'm':
+        xsetstr(&G->menu,optarg);
+        break;
+
case 'v':
G->flags ^= FLAG_VERBOSE;
break;
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to