diff options
author | Xavier Claessens <xclaesse@src.gnome.org> | 2009-02-03 04:09:58 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2009-02-03 04:09:58 +0800 |
commit | 9a0f63b69d97a45838650ab06607d1b64d8d3954 (patch) | |
tree | 81f2313de50d78c10bfd3d80cc27ecfbf0fce306 | |
parent | 27099a1727f351619113802024a9c349767af862 (diff) | |
download | gsoc2013-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
-rw-r--r-- | src/empathy.c | 15 |
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 } }; |