[gnome-screenshot] Start command line instances in non-unique mode
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-screenshot] Start command line instances in non-unique mode
- Date: Thu, 4 Sep 2014 23:58:15 +0000 (UTC)
commit cbdd3f5fa72f28a29069c3ada8ef4fb640b5dfb8
Author: Kalev Lember <kalevlember gmail com>
Date: Mon Sep 1 17:10:33 2014 +0200
Start command line instances in non-unique mode
This makes it possible to run non-interactive command line instances in
parallel to an existing UI instance. Activating the app from the
.desktop file launcher or starting with --interactive still brings up
the same, unique window.
https://bugzilla.gnome.org/show_bug.cgi?id=735375
src/screenshot-application.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/screenshot-application.c b/src/screenshot-application.c
index cc11dc1..ccd93ce 100644
--- a/src/screenshot-application.c
+++ b/src/screenshot-application.c
@@ -652,6 +652,18 @@ screenshot_application_handle_local_options (GApplication *app,
exit (EXIT_SUCCESS);
}
+ /* Start headless instances in non-unique mode */
+ if (!g_variant_dict_contains (options, "interactive"))
+ {
+ GApplicationFlags old_flags;
+
+ old_flags = g_application_get_flags (app);
+ if ((old_flags & G_APPLICATION_IS_SERVICE) == 0)
+ {
+ g_application_set_flags (app, old_flags | G_APPLICATION_NON_UNIQUE);
+ }
+ }
+
return -1;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]