[gedit] gedit-app: fix gedit --wait
- From: Ryan Lortie <desrt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] gedit-app: fix gedit --wait
- Date: Thu, 6 Feb 2014 17:53:38 +0000 (UTC)
commit 9be9c7fcca2b9f8b514df45090d49b08683b68e8
Author: Ryan Lortie <desrt desrt ca>
Date: Thu Feb 6 17:51:50 2014 +0000
gedit-app: fix gedit --wait
Fix a longstanding bug in "wait mode" so that the invoked instance
always exits when the tab is closed, even in the case that it was the
first-run of gedit and another document was opened since.
We do this by forcing D-Bus activation (using IS_LAUNCHER flag), so -w
might not work if gedit is not installed.
gedit/gedit-app.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/gedit/gedit-app.c b/gedit/gedit-app.c
index a61d927..ed0d17f 100644
--- a/gedit/gedit-app.c
+++ b/gedit/gedit-app.c
@@ -934,6 +934,14 @@ gedit_app_handle_local_options (GApplication *application,
g_application_set_flags (application, old_flags | G_APPLICATION_NON_UNIQUE);
}
+ if (g_variant_dict_contains (options, "wait"))
+ {
+ GApplicationFlags old_flags;
+
+ old_flags = g_application_get_flags (application);
+ g_application_set_flags (application, old_flags | G_APPLICATION_IS_LAUNCHER);
+ }
+
return -1;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]