[gnome-applets] stickynotes: Make sure we only save when asked to.



commit f318b474129c34ff262f5c75d7f32bf03417e3d0
Author: Callum McKenzie <callum spooky-possum org>
Date:   Wed Jul 22 20:53:15 2009 +1200

    stickynotes: Make sure we only save when asked to.
    
    Make sure the function stickynotes_save_now returns FALSE rather than
    whatever its void return value returned. Should fix bug 589213,
    I think the report of every 1 seconds in that case might be mistaken.

 stickynotes/stickynotes.c |    4 +++-
 stickynotes/stickynotes.h |    4 ++--
 2 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/stickynotes/stickynotes.c b/stickynotes/stickynotes.c
index 5844434..04e0daa 100644
--- a/stickynotes/stickynotes.c
+++ b/stickynotes/stickynotes.c
@@ -742,7 +742,7 @@ void stickynotes_remove(StickyNote *note)
 }
 
 /* Save all sticky notes in an XML configuration file */
-void
+gboolean
 stickynotes_save_now (void)
 {
 	WnckScreen *wnck_screen;
@@ -850,6 +850,8 @@ stickynotes_save_now (void)
 	xmlFreeDoc(doc);
 
 	save_scheduled = FALSE;
+
+	return FALSE;
 }
 
 void
diff --git a/stickynotes/stickynotes.h b/stickynotes/stickynotes.h
index 1339571..0e64c73 100644
--- a/stickynotes/stickynotes.h
+++ b/stickynotes/stickynotes.h
@@ -59,7 +59,7 @@ typedef struct
 	gchar *font_color;		/* Font color */
 	gchar *font;			/* Note font */
 	gboolean locked;		/* Note locked state */
-	
+
 	gint x;				/* Note x-coordinate */
 	gint y;				/* Note y-coordinate */
 	gint w;				/* Note width */
@@ -88,7 +88,7 @@ void stickynote_change_properties(StickyNote *note);
 void stickynotes_add(GdkScreen *screen);
 void stickynotes_remove(StickyNote *note);
 void stickynotes_save(void);
-void stickynotes_save_now (void);
+gboolean stickynotes_save_now (void);
 void stickynotes_load(GdkScreen *screen);
 
 #endif /* __STICKYNOTES_H__ */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]