[geary/wip/775956-dbus-activation: 5/16] Update main window lifecycle management
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/775956-dbus-activation: 5/16] Update main window lifecycle management
- Date: Fri, 12 Apr 2019 12:05:34 +0000 (UTC)
commit 3ae24d75b8e73bae145544409b4435f47a9f4f5d
Author: Michael Gratton <mike vee net>
Date: Wed Apr 10 00:50:16 2019 +1000
Update main window lifecycle management
Ensure main window is not shown when started as service, and is only hidden when closed
and the background startup pref is set.
src/client/application/geary-controller.vala | 3 ++-
src/client/components/main-window.vala | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/client/application/geary-controller.vala b/src/client/application/geary-controller.vala
index 93eb48f8..06bc4e4a 100644
--- a/src/client/application/geary-controller.vala
+++ b/src/client/application/geary-controller.vala
@@ -1059,7 +1059,8 @@ public class GearyController : Geary.BaseObject {
private void display_main_window_if_ready() {
if (did_attempt_open_all_accounts() &&
!upgrade_dialog.visible &&
- !cancellable_open_account.is_cancelled())
+ !cancellable_open_account.is_cancelled() &&
+ !this.application.is_background_service)
main_window.show();
}
diff --git a/src/client/components/main-window.vala b/src/client/components/main-window.vala
index 39f15911..4b53422e 100644
--- a/src/client/components/main-window.vala
+++ b/src/client/components/main-window.vala
@@ -637,7 +637,7 @@ public class MainWindow : Gtk.ApplicationWindow, Geary.BaseInterface {
[GtkCallback]
private bool on_delete_event() {
- if (this.application.is_background_service) {
+ if (this.application.config.startup_notifications) {
if (this.application.controller.close_composition_windows(true)) {
hide();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]