[dconf-editor] Clean more completely on quit.
- From: Arnaud Bonatti <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dconf-editor] Clean more completely on quit.
- Date: Sat, 13 Aug 2016 17:31:33 +0000 (UTC)
commit 52bd19ba954848105754a083bb810f3ef3d8d247
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Sat Aug 13 19:31:21 2016 +0200
Clean more completely on quit.
editor/dconf-editor.vala | 17 +++++++++++------
editor/dconf-window.vala | 2 +-
2 files changed, 12 insertions(+), 7 deletions(-)
---
diff --git a/editor/dconf-editor.vala b/editor/dconf-editor.vala
index 95a4b81..baf5d3e 100644
--- a/editor/dconf-editor.vala
+++ b/editor/dconf-editor.vala
@@ -114,12 +114,7 @@ class ConfigurationEditor : Gtk.Application
clipboard.set_text (text, text.length);
// notification
- if (notification_number > 0)
- {
- withdraw_notification ("copy"); // TODO needed, report bug: Shell cancels previous
notification of the same name, instead of replacing it
- Source.remove (notification_number);
- notification_number = 0;
- }
+ clean_copy_notification ();
notification_number = Timeout.add_seconds (30, () => {
withdraw_notification ("copy");
@@ -131,6 +126,16 @@ class ConfigurationEditor : Gtk.Application
send_notification ("copy", notification);
}
+ public void clean_copy_notification ()
+ {
+ if (notification_number > 0)
+ {
+ withdraw_notification ("copy"); // TODO needed, report bug: Shell cancels previous
notification of the same name, instead of replacing it
+ Source.remove (notification_number);
+ notification_number = 0;
+ }
+ }
+
/*\
* * App-menu callbacks
\*/
diff --git a/editor/dconf-window.vala b/editor/dconf-window.vala
index 930423d..f00de84 100644
--- a/editor/dconf-window.vala
+++ b/editor/dconf-window.vala
@@ -190,7 +190,7 @@ class DConfWindow : ApplicationWindow
[GtkCallback]
private void on_destroy ()
{
- get_application ().withdraw_notification ("copy");
+ ((ConfigurationEditor) get_application ()).clean_copy_notification ();
settings.disconnect (behaviour_changed_handler);
settings.disconnect (theme_changed_handler);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]