From 6fa8ce445ed79d13080bdbdfdf7824a6016f07c1 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Sat, 15 Sep 2012 18:20:14 +0000 Subject: [PATCH] Changed the arguments for consistency --- doc/panel-notify.xml | 17 +++++++++++++---- doc/panel.xml | 34 ++++++++++++++++++---------------- src/main.c | 21 +++++++++++---------- src/panelctl.c | 1 - src/run.c | 6 ++++-- 5 files changed, 46 insertions(+), 33 deletions(-) diff --git a/doc/panel-notify.xml b/doc/panel-notify.xml index 5358c8a..b082216 100644 --- a/doc/panel-notify.xml +++ b/doc/panel-notify.xml @@ -49,8 +49,11 @@ &name; - -s - -x + + -L + -S + -X + -t timeout applet @@ -74,13 +77,19 @@ The following options are available: - + + + Use icons the size of a large toolbar. + + + + Use icons the size of a small toolbar. - + Use icons the size of menus. diff --git a/doc/panel.xml b/doc/panel.xml index 93c5dbb..cb7a043 100644 --- a/doc/panel.xml +++ b/doc/panel.xml @@ -49,11 +49,13 @@ &name; + + + + + monitor - - - @@ -66,29 +68,29 @@ The following options are available: - + Use icons the size of a large toolbar. + + + + Use icons the size of a small toolbar. + + + + + + Use icons the size of menus. + + Monitor where to display the panel. - - - - Use icons the size of a small toolbar. - - - - - - Use icons the size of menus. - - diff --git a/src/main.c b/src/main.c index 10bb7ce..90b456d 100644 --- a/src/main.c +++ b/src/main.c @@ -1,5 +1,5 @@ /* $Id$ */ -/* Copyright (c) 2011 Pierre Pronchery */ +/* Copyright (c) 2011-2012 Pierre Pronchery */ /* This file is part of DeforaOS Desktop Panel */ /* This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,7 +27,6 @@ #include "../config.h" #define _(string) gettext(string) - /* constants */ #ifndef PREFIX # define PREFIX "/usr/local" @@ -40,14 +39,16 @@ #endif +/* private */ +/* functions */ /* usage */ static int _usage(void) { - fputs(_("Usage: panel [-m monitor][-lsx]\n" -" -l Use icons the size of a large toolbar\n" + fputs(_("Usage: panel [-L | -S | -X][-m monitor]\n" +" -L Use icons the size of a large toolbar\n" " -m Monitor to use (default: 0)\n" -" -s Use icons the size of a small toolbar\n" -" -x Use icons the size of menus\n"), stderr); +" -S Use icons the size of a small toolbar\n" +" -X Use icons the size of menus\n"), stderr); return 1; } @@ -66,10 +67,10 @@ int main(int argc, char * argv[]) gtk_init(&argc, &argv); prefs.iconsize = PANEL_ICON_SIZE_UNSET; prefs.monitor = -1; - while((o = getopt(argc, argv, "lm:sx")) != -1) + while((o = getopt(argc, argv, "Lm:SX")) != -1) switch(o) { - case 'l': + case 'L': prefs.iconsize = PANEL_ICON_SIZE_LARGE; break; case 'm': @@ -77,10 +78,10 @@ int main(int argc, char * argv[]) if(optarg[0] == '\0' || *p != '\0') return _usage(); break; - case 's': + case 'S': prefs.iconsize = PANEL_ICON_SIZE_SMALL; break; - case 'x': + case 'X': prefs.iconsize = PANEL_ICON_SIZE_SMALLER; break; default: diff --git a/src/panelctl.c b/src/panelctl.c index 4749d33..ce4ddfe 100644 --- a/src/panelctl.c +++ b/src/panelctl.c @@ -26,7 +26,6 @@ #include "../config.h" #define _(string) gettext(string) - /* constants */ #ifndef PREFIX # define PREFIX "/usr/local" diff --git a/src/run.c b/src/run.c index 8894f63..cd6c998 100644 --- a/src/run.c +++ b/src/run.c @@ -27,7 +27,6 @@ #include "../config.h" #define _(string) gettext(string) - /* constants */ #ifndef PREFIX # define PREFIX "/usr/local" @@ -40,7 +39,8 @@ #endif -/* Run */ +/* run */ +/* private */ /* types */ typedef struct _Run { @@ -422,6 +422,8 @@ static int _usage(void) } +/* public */ +/* functions */ /* main */ int main(int argc, char * argv[]) {