[gthumb/ext: 50/79] Added the --version command line option
- From: Paolo Bacchilega <paobac src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gthumb/ext: 50/79] Added the --version command line option
- Date: Sun, 2 Aug 2009 20:30:18 +0000 (UTC)
commit 47419b77b849d3e73763df3d6815050da386f9c6
Author: Paolo Bacchilega <paobac src gnome org>
Date: Wed Jul 15 20:00:08 2009 +0200
Added the --version command line option
gthumb/main.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/gthumb/main.c b/gthumb/main.c
index f9aea63..d6eb9bc 100644
--- a/gthumb/main.c
+++ b/gthumb/main.c
@@ -22,6 +22,7 @@
#include <config.h>
#include <glib/gi18n.h>
+#include <glib/gprintf.h>
#include <gtk/gtk.h>
#include <unique/unique.h>
#include "eggsmclient.h"
@@ -49,6 +50,7 @@ static UniqueApp *gthumb_app;
static char **remaining_args;
static const char *program_argv0; /* argv[0] from main(); used as the command to restart the program */
static gboolean restart = FALSE;
+static gboolean version = FALSE;
static const GOptionEntry options[] = {
@@ -68,6 +70,9 @@ static const GOptionEntry options[] = {
N_("Automatically import digital camera photos"),
0 },
+ { "version", 'v', 0, G_OPTION_ARG_NONE, &version,
+ N_("Show version"), NULL },
+
{ G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_STRING_ARRAY, &remaining_args,
NULL,
NULL },
@@ -312,6 +317,11 @@ main (int argc, char *argv[])
}
g_option_context_free (context);
+ if (version) {
+ g_printf ("%s %s, Copyright (C) 2001-2009 Free Software Foundation, Inc.\n", PACKAGE_NAME, PACKAGE_VERSION);
+ return 0;
+ }
+
/* other initializations */
gth_session_manager_init ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]