[geary] Ensure main window contents are shown when presented from application.
- From: Adam Dingle <adamd src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary] Ensure main window contents are shown when presented from application.
- Date: Mon, 9 May 2016 13:33:56 +0000 (UTC)
commit 56dedd7db7a357f10ad80feae666733e659a21c7
Author: Michael James Gratton <mike vee net>
Date: Sun May 8 18:36:49 2016 +1000
Ensure main window contents are shown when presented from application.
Bug 763961.
* src/client/application/geary-application.vala
(GearyApplication::present): Always call show_all on the main window
since if started hidden, it won't have had that called on it.
* src/client/application/geary-controller.vala:
(GearyController::on_indicator_activated_application,
GearyController::on_indicator_activated_composer,
GearyController::on_indicator_activated_inbox): Always call show_all
on the main window since if started hidden, it won't have had that
called on it.
src/client/application/geary-application.vala | 12 ++++++------
src/client/application/geary-controller.vala | 8 +++++---
2 files changed, 11 insertions(+), 9 deletions(-)
---
diff --git a/src/client/application/geary-application.vala b/src/client/application/geary-application.vala
index 7ab82e3..3d04f96 100644
--- a/src/client/application/geary-application.vala
+++ b/src/client/application/geary-application.vala
@@ -171,12 +171,12 @@ public class GearyApplication : Gtk.Application {
if (controller.main_window == null)
return false;
-
- if (!controller.main_window.get_realized())
- controller.main_window.show_all();
- else
- controller.main_window.present_with_time(Gdk.CURRENT_TIME);
-
+
+ // When the app is started hidden, show_all() never gets
+ // called, do so here to prevent an empty window appearing.
+ controller.main_window.show_all();
+ controller.main_window.present();
+
return true;
}
diff --git a/src/client/application/geary-controller.vala b/src/client/application/geary-controller.vala
index 4e1b657..8d7f806 100644
--- a/src/client/application/geary-controller.vala
+++ b/src/client/application/geary-controller.vala
@@ -1482,17 +1482,19 @@ public class GearyController : Geary.BaseObject {
}
private void on_indicator_activated_application(uint32 timestamp) {
+ // When the app is started hidden, show_all() never gets
+ // called, do so here to prevent an empty window appearing.
+ main_window.show_all();
main_window.present_with_time(timestamp);
}
private void on_indicator_activated_composer(uint32 timestamp) {
- main_window.present_with_time(timestamp);
+ on_indicator_activated_application(timestamp);
on_new_message();
}
private void on_indicator_activated_inbox(Geary.Folder folder, uint32 timestamp) {
- main_window.present_with_time(timestamp);
-
+ on_indicator_activated_application(timestamp);
main_window.folder_list.select_folder(folder);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]