[gnome-weather/wip/new-package-js: 14/14] Fix startup notification
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-weather/wip/new-package-js: 14/14] Fix startup notification
- Date: Thu, 13 Feb 2014 22:00:32 +0000 (UTC)
commit fdcac64f7b39b7020fa36714d1e0195895db13f8
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Sat Feb 8 19:23:52 2014 +0100
Fix startup notification
src/main.js | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/main.js b/src/main.js
index 5ffd350..288384c 100644
--- a/src/main.js
+++ b/src/main.js
@@ -117,15 +117,22 @@ const Application = new Lang.Class({
this.add_accelerator("Escape", "win.selection-mode(false)", null);
this.add_accelerator("<Primary>a", "win.select-all", null);
+
+ // Tell GTK+ to shut up, because we can show multiple
+ // windows over the lifetime of the process
+ Gtk.Window.set_auto_startup_notification(false);
},
vfunc_activate: function() {
let win = new Window.MainWindow({ application: this });
if (this.model.loading) {
+ Gtk.Application.set_auto_startup_notification(false);
let id = this.model.connect('notify::loading', function(model) {
model.disconnect(id);
+ Gtk.Application.set_auto_startup_notification(true);
win.show();
+ Gdk.notify_startup_complete();
});
} else {
win.show();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]