[Xfce4-commits] <xfce4-notes-plugin:master> Save notes before Xnp.Application destruction

Mike Massonnet noreply at xfce.org
Sat Dec 26 16:08:01 CET 2009


Updating branch refs/heads/master
         to 2c0d492dd960516210cbfa01dd7fb75add239fa4 (commit)
       from ee81479198450700efef853775136cc65b79a084 (commit)

commit 2c0d492dd960516210cbfa01dd7fb75add239fa4
Author: Mike Massonnet <mmassonnet at xfce.org>
Date:   Sat Dec 26 14:53:56 2009 +0100

    Save notes before Xnp.Application destruction

 ChangeLog                 |    9 +++++++++
 lib/application.vala      |    1 -
 src/main-status-icon.vala |    1 +
 3 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c0dd3a8..dceea48 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2009-12-26  Mike Massonnet <mmassonnet at xfce.org>
+
+Save notes before Xnp.Application destruction
+
+The Xnp.Application.save_notes method emits a signal to tell the notes must be
+saved and then receives for each note a signal back. This cannot be achieved
+while the object is being destroyed. The only affected source was the
+xfce4-notes binary.
+
 2009-12-23  Mike Massonnet <mmassonnet at xfce.org>
 
 Crap, another one, forget ChangeLog
diff --git a/lib/application.vala b/lib/application.vala
index ca99845..693205e 100644
--- a/lib/application.vala
+++ b/lib/application.vala
@@ -72,7 +72,6 @@ namespace Xnp {
 
 		~Application () {
 			save_windows_configuration ();
-			save_notes ();
 			xfconf_channel = null;
 			Xfconf.shutdown ();
 			foreach (var win in this.window_list) {
diff --git a/src/main-status-icon.vala b/src/main-status-icon.vala
index 6ddd10f..6fcef56 100644
--- a/src/main-status-icon.vala
+++ b/src/main-status-icon.vala
@@ -71,6 +71,7 @@ static Gtk.Menu build_context_menu () {
 
 	mi = new Gtk.ImageMenuItem.from_stock (Gtk.STOCK_REMOVE, null);
 	mi.activate += () => {
+		application.save_notes ();
 		Xfce.Autostart. at set ("xfce4-notes-autostart", "xfce4-notes", true);
 		Gtk.main_quit ();
 	};



More information about the Xfce4-commits mailing list