[geary/wip/775956-dbus-activation: 4/11] Fix controller not being started when started as DBus service



commit 835ec11973520cda580cb770b07d9cf22eacbdf2
Author: Michael Gratton <mike vee net>
Date:   Wed Apr 10 01:03:06 2019 +1000

    Fix controller not being started when started as DBus service

 src/client/application/geary-application.vala | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/client/application/geary-application.vala b/src/client/application/geary-application.vala
index ae383d73..478afd5e 100644
--- a/src/client/application/geary-application.vala
+++ b/src/client/application/geary-application.vala
@@ -292,8 +292,13 @@ public class GearyApplication : Gtk.Application {
 
         add_action_entries(action_entries, this);
 
-        // Use a hold() here (if started as a service, we will shutdown after 10s).
-        hold();
+        if (this.is_background_service) {
+            // Since command_line won't be called below if running as
+            // a DBus service, disable logging spew and start the
+            // controller running.
+            Geary.Logging.log_to(null);
+            this.create_async.begin();
+        }
     }
 
     public override void activate() {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]