[seahorse] Bug 577235 – Seahorse doesn't know about a --version parameter
- From: Adam Schreiber <sadam src gnome org>
- To: svn-commits-list gnome org
- Subject: [seahorse] Bug 577235 – Seahorse doesn't know about a --version parameter
- Date: Sun, 3 May 2009 16:10:02 -0400 (EDT)
commit ce471134a70ce79ffaba5b017af3ceb128429233
Author: Alexander Faithfull <alec snapdragon demon co uk>
Date: Sun May 3 16:08:08 2009 -0400
Bug 577235 â?? Seahorse doesn't know about a --version parameter
Patch from Alexander Faithfull. I added a short option to it.
Signed-off-by: Adam Schreiber <sadam gnome org>
---
src/seahorse-main.c | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/src/seahorse-main.c b/src/seahorse-main.c
index b84fb90..d3041ae 100644
--- a/src/seahorse-main.c
+++ b/src/seahorse-main.c
@@ -52,10 +52,16 @@
#include <glib/gi18n.h>
+static gboolean show_version = FALSE;
+
/* Initializes context and preferences, then loads key manager */
int
main (int argc, char **argv)
{
+ static GOptionEntry options[] = {
+ { "version", 'v', 0, G_OPTION_ARG_NONE, &show_version, N_("Version of this application"), NULL },
+ { NULL, 0, 0, 0, NULL, NULL, NULL }
+ };
GError *error = NULL;
int ret = 0;
@@ -69,12 +75,17 @@ main (int argc, char **argv)
textdomain (GETTEXT_PACKAGE);
#endif
- if (!gtk_init_with_args (&argc, &argv, _("Encryption Key Manager"), NULL, GETTEXT_PACKAGE, &error)) {
+ if (!gtk_init_with_args (&argc, &argv, _("Encryption Key Manager"), options, GETTEXT_PACKAGE, &error)) {
g_printerr ("seahorse: %s\n", error->message);
g_error_free (error);
exit (1);
}
+ if (show_version) {
+ g_print ("%s %s\n", argv [0], VERSION);
+ exit (1);
+ }
+
/* Insert Icons into Stock */
seahorse_gtkstock_init ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]