Changed the arguments for consistency
This commit is contained in:
parent
e3c37e6050
commit
6fa8ce445e
|
@ -49,8 +49,11 @@
|
|||
<refsynopsisdiv>
|
||||
<cmdsynopsis>
|
||||
<command>&name;</command>
|
||||
<arg choice="opt">-s</arg>
|
||||
<arg choice="opt">-x</arg>
|
||||
<group choice="opt">
|
||||
<arg choice="plain">-L</arg>
|
||||
<arg choice="plain">-S</arg>
|
||||
<arg choice="plain">-X</arg>
|
||||
</group>
|
||||
<arg choice="opt">-t <replaceable>timeout</replaceable></arg>
|
||||
<arg choice="plain" rep="repeat"><replaceable>applet</replaceable></arg>
|
||||
</cmdsynopsis>
|
||||
|
@ -74,13 +77,19 @@
|
|||
<para>The following options are available:</para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><option>-s</option></term>
|
||||
<term><option>-L</option></term>
|
||||
<listitem>
|
||||
<para>Use icons the size of a large toolbar.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-S</option></term>
|
||||
<listitem>
|
||||
<para>Use icons the size of a small toolbar.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-x</option></term>
|
||||
<term><option>-X</option></term>
|
||||
<listitem>
|
||||
<para>Use icons the size of menus.</para>
|
||||
</listitem>
|
||||
|
|
|
@ -49,11 +49,13 @@
|
|||
<refsynopsisdiv>
|
||||
<cmdsynopsis>
|
||||
<command>&name;</command>
|
||||
<group choice="opt">
|
||||
<arg choice="plain"><option>-L</option></arg>
|
||||
<arg choice="plain"><option>-S</option></arg>
|
||||
<arg choice="plain"><option>-X</option></arg>
|
||||
</group>
|
||||
<arg choice="opt"><option>-m</option>
|
||||
<replaceable>monitor</replaceable></arg>
|
||||
<arg choice="opt"><option>-l</option></arg>
|
||||
<arg choice="opt"><option>-s</option></arg>
|
||||
<arg choice="opt"><option>-x</option></arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
<refsect1 id="description">
|
||||
|
@ -66,29 +68,29 @@
|
|||
<para>The following options are available:</para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><option>-l</option></term>
|
||||
<term><option>-L</option></term>
|
||||
<listitem>
|
||||
<para>Use icons the size of a large toolbar.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-S</option></term>
|
||||
<listitem>
|
||||
<para>Use icons the size of a small toolbar.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-X</option></term>
|
||||
<listitem>
|
||||
<para>Use icons the size of menus.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-m</option></term>
|
||||
<listitem>
|
||||
<para>Monitor where to display the panel.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-s</option></term>
|
||||
<listitem>
|
||||
<para>Use icons the size of a small toolbar.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>-x</option></term>
|
||||
<listitem>
|
||||
<para>Use icons the size of menus.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 id="bugs">
|
||||
|
|
21
src/main.c
21
src/main.c
|
@ -1,5 +1,5 @@
|
|||
/* $Id$ */
|
||||
/* Copyright (c) 2011 Pierre Pronchery <khorben@defora.org> */
|
||||
/* Copyright (c) 2011-2012 Pierre Pronchery <khorben@defora.org> */
|
||||
/* 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:
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#include "../config.h"
|
||||
#define _(string) gettext(string)
|
||||
|
||||
|
||||
/* constants */
|
||||
#ifndef PREFIX
|
||||
# define PREFIX "/usr/local"
|
||||
|
|
|
@ -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[])
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user