diff options
| author | Victor Kareh <[email protected]> | 2026-03-20 20:55:49 -0400 |
|---|---|---|
| committer | Victor Kareh <[email protected]> | 2026-03-22 17:33:25 -0400 |
| commit | 1903a4a635302f2c0a2b299e33d1c835799ae4bf (patch) | |
| tree | 3e6fd97f3c7097d37276ca1f54ce0ce2f0038f8f /src/daemon/mnd-daemon.c | |
| parent | 3f72f66032c6f9b80fc22e15a2fb33804d000bc6 (diff) | |
| download | mate-notification-daemon-add-version-option.tar.bz2 mate-notification-daemon-add-version-option.tar.xz | |
Add version flag to daemon and properties dialogadd-version-option
The mate-notification-properties binary had no command-line option
parsing, making it hard to know the installed version.
This adds the version flag to both mate-notification-properties and
mate-notification-daemon.
Fixes #228
Diffstat (limited to 'src/daemon/mnd-daemon.c')
| -rw-r--r-- | src/daemon/mnd-daemon.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/daemon/mnd-daemon.c b/src/daemon/mnd-daemon.c index 59921c7..cfaedfd 100644 --- a/src/daemon/mnd-daemon.c +++ b/src/daemon/mnd-daemon.c @@ -32,6 +32,7 @@ static gboolean debug = FALSE; static gboolean replace = FALSE; static gboolean idle_exit = FALSE; +static gboolean show_version = FALSE; static GOptionEntry entries[] = { @@ -54,6 +55,12 @@ static GOptionEntry entries[] = NULL }, { + "version", 'v', G_OPTION_FLAG_NONE, + G_OPTION_ARG_NONE, &show_version, + "Version of this application", + NULL + }, + { NULL, 0, 0, G_OPTION_ARG_NONE, NULL, NULL, NULL } }; @@ -102,6 +109,12 @@ int main (int argc, char *argv[]) if (!parse_arguments (&argc, &argv)) return EXIT_FAILURE; + if (show_version) + { + g_print ("%s %s\n", PACKAGE, VERSION); + return EXIT_SUCCESS; + } + daemon = notify_daemon_new (replace, idle_exit); gtk_main(); |
