aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-main.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@src.gnome.org>2008-09-27 01:51:18 +0800
committerChristian Persch <chpe@src.gnome.org>2008-09-27 01:51:18 +0800
commit611afe354dd1e4c92a1985af31760c1cd5624e0b (patch)
tree5e1d91c7a32f6088684f2e3fe0cf2296b10dbe96 /src/ephy-main.c
parent90e98d936dd961b638045403e3502168c02749f4 (diff)
downloadgsoc2013-epiphany-611afe354dd1e4c92a1985af31760c1cd5624e0b.tar
gsoc2013-epiphany-611afe354dd1e4c92a1985af31760c1cd5624e0b.tar.gz
gsoc2013-epiphany-611afe354dd1e4c92a1985af31760c1cd5624e0b.tar.bz2
gsoc2013-epiphany-611afe354dd1e4c92a1985af31760c1cd5624e0b.tar.lz
gsoc2013-epiphany-611afe354dd1e4c92a1985af31760c1cd5624e0b.tar.xz
gsoc2013-epiphany-611afe354dd1e4c92a1985af31760c1cd5624e0b.tar.zst
gsoc2013-epiphany-611afe354dd1e4c92a1985af31760c1cd5624e0b.zip
Readd --version which was lost when removing libgnome usage.
svn path=/trunk/; revision=8546
Diffstat (limited to 'src/ephy-main.c')
-rw-r--r--src/ephy-main.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/ephy-main.c b/src/ephy-main.c
index d76744a9a..55e06beb4 100644
--- a/src/ephy-main.c
+++ b/src/ephy-main.c
@@ -68,6 +68,18 @@ static gboolean private_instance = FALSE;
static gboolean keep_temp_directory = FALSE;
static char *profile_directory = NULL;
+static gboolean
+option_version_cb (const gchar *option_name,
+ const gchar *value,
+ gpointer data,
+ GError **error)
+{
+ g_printerr ("%s %s\n", _("GNOME Web Browser"), VERSION);
+
+ exit (EXIT_SUCCESS);
+ return FALSE;
+}
+
static const GOptionEntry option_entries[] =
{
{ "new-tab", 'n', 0, G_OPTION_ARG_NONE, &open_in_new_tab,
@@ -88,6 +100,8 @@ static const GOptionEntry option_entries[] =
N_("Profile directory to use in the private instance"), N_("DIR") },
{ G_OPTION_REMAINING, '\0', 0, G_OPTION_ARG_FILENAME_ARRAY, &arguments,
"", N_("URL …")},
+ { "version", 0, G_OPTION_FLAG_NO_ARG | G_OPTION_FLAG_HIDDEN,
+ G_OPTION_ARG_CALLBACK, option_version_cb, NULL, NULL },
{ NULL }
};
@@ -99,7 +113,7 @@ static GOptionEntry debug_option_entries[] =
{ NULL }
};
#endif /* GNOME_ENABLE_DEBUG */
-
+
/* adapted from gtk+/gdk/x11/gdkdisplay-x11.c */
static guint32
get_startup_id (void)