Re: Command-line options - help wanted!



Hey Bruno,

I have been added these command line options in shell/main.c :

{ "fullscreen", 'f', 0, G_OPTION_ARG_NONE, &fullscreen, N_("Open in
fullscreen mode"), NULL  },
{ "disable-image-collection", 'd', 0, G_OPTION_ARG_NONE,
&img_collection, N_("Disable image collection "), NULL  },
{ "slide-show", 's', 0, G_OPTION_ARG_NONE, &slide_show, N_("Open in
slide show mode"), NULL  },

And...  I need a help of you.

1. My choice was "fullscreen"/'f', "disable-image-collection"/'d' and
"slide-show"/'s'. Best suggestions?

I would only replace "d" with "c" for "disable-image-collection".

2. How to get the values of GOptions?

If you mean how to use GOption, have a look at:

 http://developer.gnome.org/doc/API/2.0/glib/glib-Commandline-option-parser.html

If you want code examples, have a look at zenity source code.

3. How to make the window fullscreen? I tried to use eog-window.c
functions in eog-application.c (in window creation), but all fullscreen
functions are static, and the window mode (priv->mode) is not accessible
because its private :)

The best aproach would to add EOG_STARTUP_FLAGS that would be passed
to eog_application_open_* (...) and consequently to eog_window_open_*
(...). A combination of flags could be passed like:
EOG_STARTUP_FULLSCREEN | EOG_STARTUP_DISABLE_COLLECTION (Of course
this example doesn't make sense).

Then, based on this flags you could internally decide what to do with EogWindow.

Go! Go! Go!

--lucasr



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