aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2009-02-03 04:09:58 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2009-02-03 04:09:58 +0800
commit9a0f63b69d97a45838650ab06607d1b64d8d3954 (patch)
tree81f2313de50d78c10bfd3d80cc27ecfbf0fce306 /src/empathy.c
parent27099a1727f351619113802024a9c349767af862 (diff)
downloadgsoc2013-empathy-9a0f63b69d97a45838650ab06607d1b64d8d3954.tar
gsoc2013-empathy-9a0f63b69d97a45838650ab06607d1b64d8d3954.tar.gz
gsoc2013-empathy-9a0f63b69d97a45838650ab06607d1b64d8d3954.tar.bz2
gsoc2013-empathy-9a0f63b69d97a45838650ab06607d1b64d8d3954.tar.lz
gsoc2013-empathy-9a0f63b69d97a45838650ab06607d1b64d8d3954.tar.xz
gsoc2013-empathy-9a0f63b69d97a45838650ab06607d1b64d8d3954.tar.zst
gsoc2013-empathy-9a0f63b69d97a45838650ab06607d1b64d8d3954.zip
Re-add "--version" option from command line.
Thanks to Bruce Cowan, fix bug #569884. svn path=/trunk/; revision=2370
Diffstat (limited to 'src/empathy.c')
-rw-r--r--src/empathy.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/empathy.c b/src/empathy.c
index 5076f847d..8ff0de41d 100644
--- a/src/empathy.c
+++ b/src/empathy.c
@@ -382,6 +382,19 @@ get_startup_timestamp ()
return (retval > 0) ? retval : 0;
}
+static gboolean
+show_version_cb (const char *option_name,
+ const char *value,
+ gpointer data,
+ GError **error)
+{
+ g_print ("%s\n", PACKAGE_STRING);
+
+ exit (EXIT_SUCCESS);
+
+ return FALSE;
+}
+
int
main (int argc, char *argv[])
{
@@ -410,6 +423,8 @@ main (int argc, char *argv[])
0, G_OPTION_ARG_NONE, &accounts_dialog,
N_("Show the accounts dialog"),
NULL },
+ { "version", 'v',
+ G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK, show_version_cb, NULL, NULL },
{ NULL }
};