Mercurial > geeqie
diff src/main.c @ 3:c0e337a01cb7
0.8.0
author | gqview |
---|---|
date | Thu, 13 Apr 2000 12:55:19 +0000 |
parents | b3e0e515fabf |
children | d907d608745f |
line wrap: on
line diff
--- a/src/main.c Thu Apr 13 12:53:03 2000 +0000 +++ b/src/main.c Thu Apr 13 12:55:19 2000 +0000 @@ -1,6 +1,6 @@ /* * GQview image viewer - * (C)1999 John Ellis + * (C)2000 John Ellis * * Author: John Ellis * @@ -258,10 +258,13 @@ /* *----------------------------------------------------------------------------- - * command line parser (private) + * command line parser (private) hehe, who needs popt anyway? *----------------------------------------------------------------------------- */ +static gint startup_full_screen = FALSE; +static gint startup_in_slideshow = FALSE; + static void parse_command_line(int argc, char *argv[], gchar **path, gchar **file) { if (argc > 1) @@ -294,31 +297,44 @@ *path = remove_level_from_path(cmd_all); *file = g_strdup(cmd_all); } - else if (strcmp(cmd_line, "-debug") == 0) + else if (strcmp(cmd_line, "--debug") == 0) { debug = TRUE; printf("debugging output enabled\n"); } else if (strcmp(cmd_line, "+t") == 0 || - strcmp(cmd_line, "+tools") == 0) + strcmp(cmd_line, "--with-tools") == 0) { tools_float = FALSE; tools_hidden = FALSE; } else if (strcmp(cmd_line, "-t") == 0 || - strcmp(cmd_line, "-tools") == 0) + strcmp(cmd_line, "--without-tools") == 0) { tools_hidden = TRUE; } - else if (strcmp(cmd_line, "-help") == 0) + else if (strcmp(cmd_line, "-f") == 0 || + strcmp(cmd_line, "--fullscreen") == 0) + { + startup_full_screen = TRUE; + } + else if (strcmp(cmd_line, "-s") == 0 || + strcmp(cmd_line, "--slideshow") == 0) + { + startup_in_slideshow = TRUE; + } + else if (strcmp(cmd_line, "-h") == 0 || + strcmp(cmd_line, "--help") == 0) { printf("GQview version %s\n", VERSION); printf(_("Usage: gqview [options] [path]\n\n")); printf(_("valid options are:\n")); - printf(_(" +t, +tools force show of tools\n")); - printf(_(" -t, -tools force hide of tools\n")); - printf(_(" -debug turn on debug output\n")); - printf(_(" -help this message\n\n")); + printf(_(" +t, --with-tools force show of tools\n")); + printf(_(" -t, --without-tools force hide of tools\n")); + printf(_(" -f, --fullscreen start in full screen mode\n")); + printf(_(" -s, --slideshow start in slideshow mode\n")); + printf(_(" --debug turn on debug output\n")); + printf(_(" -h, --help show this message\n\n")); exit (0); } else @@ -429,6 +445,9 @@ g_free(cmd_path); g_free(cmd_file); + if (startup_full_screen) full_screen_toggle(); + if (startup_in_slideshow) slideshow_start(); + gtk_main (); return 0; }