diff options
author | Christian Persch <chpe@src.gnome.org> | 2009-01-29 18:27:31 (GMT) |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2009-01-29 18:27:31 (GMT) |
commit | 1f9a1db557a629d68bba06d7b4b4379127c34f4d (patch) | |
tree | e9ca99468a31ed88039a1e83b7087638443df8af | |
parent | ee7293d5708b0602c0b9feee69649b6d1315f5c0 (diff) |
Add --version which was lost in the libgnome removal. Bug #562869.
* shell/main.c: (option_version_cb): Add --version which was lost in
the libgnome removal. Bug #562869.
svn path=/trunk/; revision=3390
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | shell/main.c | 13 |
2 files changed, 18 insertions, 0 deletions
@@ -1,3 +1,8 @@ +2009-01-29 Christian Persch <chpe@gnome.org> + + * shell/main.c: (option_version_cb): Add --version which was lost in + the libgnome removal. Bug #562869. + 2009-01-26 Christian Persch <chpe@gnome.org> * shell/ev-application.c: (ev_application_register_service), diff --git a/shell/main.c b/shell/main.c index 0ddf56f..c10ac85 100644 --- a/shell/main.c +++ b/shell/main.c @@ -47,6 +47,18 @@ static gboolean unlink_temp_file = FALSE; static gchar *print_settings; static const char **file_arguments = NULL; +static gboolean +option_version_cb (const gchar *option_name, + const gchar *value, + gpointer data, + GError **error) +{ + g_print ("%s %s\n", _("GNOME Document Viewer"), VERSION); + + exit (0); + return FALSE; +} + static const GOptionEntry goption_options[] = { { "page-label", 'p', 0, G_OPTION_ARG_STRING, &ev_page_label, N_("The page of the document to display."), N_("PAGE")}, @@ -56,6 +68,7 @@ static const GOptionEntry goption_options[] = { "find", 'l', 0, G_OPTION_ARG_STRING, &ev_find_string, N_("The word or phrase to find in the document"), N_("STRING")}, { "unlink-tempfile", 'u', G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_NONE, &unlink_temp_file, NULL, NULL }, { "print-settings", 't', G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_FILENAME, &print_settings, NULL, NULL }, + { "version", 0, G_OPTION_FLAG_NO_ARG | G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_CALLBACK, option_version_cb, NULL, NULL }, { G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &file_arguments, NULL, N_("[FILE...]") }, { NULL } }; |