Re: Option parser



On fre, 2004-07-30 at 11:46 -0500, Albert Chin wrote:
> Why should a _user_ care whether or not the options are for the
> application or GTK+? They don't even know about GTK+. I say make one
> set of options, with the GTK+ options first, followed by the
> application options.
> 

Ok, 'user' here is actually 'user that runs programs from the command
line and are interested in options'.

What you get currently when running nautilus --help, this is what you
get:
Usage: nautilus [OPTION...]
  --load-modules=MODULE1,MODULE2,...     Dynamic modules to load

Help options
  -?, --help                             Show this help message
  --usage                                Display brief usage message

Application options
  -c, --check                            Perform a quick set of self-
check
                                         tests.
  -g, --geometry=GEOMETRY                Create the initial window with
the
                                         given geometry.
  -n, --no-default-window                Only create windows for
explicitly
                                         specified URIs.
  --no-desktop                           Do not manage the desktop
(ignore the
                                         preference set in the
preferences
                                         dialog).
  --browser                              open a browser window.
  -q, --quit                             Quit Nautilus.

GTK+
  --gdk-debug=FLAGS                      Gdk debugging flags to set
  --gdk-no-debug=FLAGS                   Gdk debugging flags to unset
  --display=DISPLAY                      X display to use
  --screen=SCREEN                        X screen to use
  --sync                                 Make X calls synchronous
  --name=NAME                            Program name as used by the
window
                                         manager
  --class=CLASS                          Program class as used by the
window
                                         manager
  --gtk-debug=FLAGS                      Gtk+ debugging flags to set
  --gtk-no-debug=FLAGS                   Gtk+ debugging flags to unset
  --g-fatal-warnings                     Make all warnings fatal
  --gtk-module=MODULE                    Load an additional Gtk module

Bonobo activation Support
  --oaf-ior-fd=FD                        File descriptor to print IOR on
  --oaf-activate-iid=IID                 IID to activate
  --oaf-private                          Prevent registering of server
with OAF

GNOME GConf Support

GNOME Library
  --disable-sound                        Disable sound server usage
  --enable-sound                         Enable sound server usage
  --espeaker=HOSTNAME:PORT               Host:port on which the sound
server
                                         to use is running
  --version                              2.7.1

Session management
  --sm-client-id=ID                      Specify session management ID
  --sm-config-prefix=PREFIX              Specify prefix of saved
configuration
  --sm-disable                           Disable connection to session
manager

GNOME GUI Library
  --disable-crash-dialog                 Disable Crash Dialog


Now that's not very nice, is it? Just looking at the gtk+ options, there
are a lot of things that you might not be interested in, and the ones
that are interesting can be merged into the main group.

(Note that most of the gnome options are pretty useless, and we've
agreed to not allow libraries to register options in the future;
environment variables are better for that. However, there are still some
options, like --display, that are good to have)

Anders




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