[gnome-calendar: 1/2] application: Add --quit commandline argument
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar: 1/2] application: Add --quit commandline argument
- Date: Wed, 10 Jan 2018 15:33:51 +0000 (UTC)
commit 404829631414d1ee316d9891cf4ade20641fe8b0
Author: Akbar Hashmi <akbar6127 gmail com>
Date: Tue Dec 19 07:04:51 2017 +0530
application: Add --quit commandline argument
Overview: Clicking the close button in gnome-calendar doesn't always close all the instances of the
application. The window is closed, but an instance of gnome-calendar is still running as a
gapplication-service, which was probably run by gnome-shell search provider.
The two changes made were as follows:
1) added the argument quit to GOptionEntry
2) added the definition of quit to gcal_application_command_line
src/gcal-application.c | 11 +++++++++++
1 file changed, 11 insertions(+)
---
diff --git a/src/gcal-application.c b/src/gcal-application.c
index eea4ea11..30d6e2df 100644
--- a/src/gcal-application.c
+++ b/src/gcal-application.c
@@ -84,6 +84,11 @@ G_DEFINE_TYPE (GcalApplication, gcal_application, GTK_TYPE_APPLICATION);
static gboolean show_version = FALSE;
static GOptionEntry gcal_application_goptions[] = {
+ {
+ "quit", 'q', 0,
+ G_OPTION_ARG_NONE, NULL,
+ N_("Quit GNOME Calendar"), NULL
+ },
{
"version", 'v', 0,
G_OPTION_ARG_NONE, &show_version,
@@ -297,6 +302,12 @@ gcal_application_command_line (GApplication *app,
self = GCAL_APPLICATION (app);
options = g_application_command_line_get_options_dict (command_line);
+ if (g_variant_dict_contains (options, "quit"))
+ {
+ g_application_quit (app);
+ return 0;
+ }
+
if (g_variant_dict_contains (options, "debug"))
gcal_log_init ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]