Index: panel-plugin/notes.h =================================================================== RCS file: /cvsroot/xfce-goodies/xfce4-notes-plugin/panel-plugin/notes.h,v retrieving revision 1.5 diff -u -r1.5 notes.h --- panel-plugin/notes.h 21 Oct 2003 14:12:23 -0000 1.5 +++ panel-plugin/notes.h 8 Jan 2005 22:52:26 -0000 @@ -91,6 +91,9 @@ /* other options */ gboolean notes_sticky; gboolean show_notes; + + /* save timeout */ + int save_id; } NoteApplet; Index: panel-plugin/notes_applet.c =================================================================== RCS file: /cvsroot/xfce-goodies/xfce4-notes-plugin/panel-plugin/notes_applet.c,v retrieving revision 1.9 diff -u -r1.9 notes_applet.c --- panel-plugin/notes_applet.c 23 Oct 2003 12:00:06 -0000 1.9 +++ panel-plugin/notes_applet.c 8 Jan 2005 22:52:26 -0000 @@ -736,10 +736,13 @@ } void -notes_destroy_cb(GtkWidget *widget, gpointer data) +notes_destroy_cb(GtkWidget *widget, NoteApplet *notes) { - gtk_widget_destroy(widget); - return; + if (notes->save_id > 0) + { + g_source_remove (notes->save_id); + notes->save_id = 0; + } } gboolean @@ -811,7 +814,7 @@ /* add timeout to save notes if required */ /* call notes_save_notes_timeout every 5 seconds */ - g_timeout_add(5000, notes_save_notes_timeout, NULL); + notes_applet.save_id = g_timeout_add(5000, notes_save_notes_timeout, NULL); gtk_widget_set_size_request(ctrl->base, -1, -1); @@ -831,7 +834,7 @@ g_object_ref(notes_applet.event_box); gtk_container_foreach(GTK_CONTAINER(notes_applet.event_box), - (GtkCallback)notes_destroy_cb, NULL); + (GtkCallback)notes_destroy_cb, ¬es_applet); pix = gdk_pixbuf_copy(notes_applet.pixbuf); pix = gdk_pixbuf_scale_simple(pix, dim, dim, GDK_INTERP_BILINEAR);