[gnome-clocks/bilelmoussauoi/stay-in-bg] Don't quit the app at delete-event
- From: Bilal Elmoussaoui <bilelmoussaoui src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-clocks/bilelmoussauoi/stay-in-bg] Don't quit the app at delete-event
- Date: Thu, 26 Sep 2019 09:42:47 +0000 (UTC)
commit 27287d70f447d40a2435b404eea7ef18de56be09
Author: Bilal Elmoussaoui <bil elmoussaoui gmail com>
Date: Thu Sep 26 11:42:33 2019 +0200
Don't quit the app at delete-event
Instead of closing the app, let's just hide the window
the application already runs as --gapplication-service
src/application.vala | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/application.vala b/src/application.vala
index 0292426..305c098 100644
--- a/src/application.vala
+++ b/src/application.vala
@@ -41,8 +41,8 @@ public class Application : Gtk.Application {
private void ensure_window () {
if (window == null) {
window = new Window (this);
- window.destroy.connect (() => {
- window = null;
+ window.delete_event.connect(() => {
+ return window.hide_on_delete();
});
}
}
@@ -177,6 +177,7 @@ public class Application : Gtk.Application {
}
void on_quit_activate () {
+ window.destroy ();
quit ();
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]