[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: CVS update: s_page.c
User: ahvezda
Date: 06/09/04 12:51:57
Modified: . s_page.c s_toplevel.c
Log:
Bug fixes for autosave related crashes
Revision Changes Path
1.24 +18 -0 eda/geda/gaf/libgeda/src/s_page.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: s_page.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/s_page.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- s_page.c 5 Jul 2006 03:13:39 -0000 1.23
+++ s_page.c 4 Sep 2006 16:51:57 -0000 1.24
@@ -525,6 +525,24 @@
}
+/*! \brief Autosave initialization function.
+ * \par Function Description
+ * This function sets up the autosave callback function.
+ *
+ * \param [in] toplevel The TOPLEVEL object.
+ */
+void s_page_autosave_init(TOPLEVEL *toplevel)
+{
+ if (toplevel->auto_save_interval != 0) {
+
+ /* 1000 converts seconds into milliseconds */
+ toplevel->auto_save_timeout =
+ g_timeout_add(toplevel->auto_save_interval*1000,
+ (GSourceFunc) s_page_autosave,
+ toplevel);
+ }
+}
+
/*! \brief Autosave callback function.
* \par Function Description
* This function is a callback of the glib g_timeout functions.
1.8 +6 -0 eda/geda/gaf/libgeda/src/s_toplevel.c
(In the diff below, changes in quantity of whitespace are not shown.)
Index: s_toplevel.c
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/src/s_toplevel.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- s_toplevel.c 2 Sep 2006 10:15:18 -0000 1.7
+++ s_toplevel.c 4 Sep 2006 16:51:57 -0000 1.8
@@ -459,6 +459,12 @@
*/
void s_toplevel_delete (TOPLEVEL *toplevel)
{
+ if (toplevel->auto_save_timeout != 0) {
+ gboolean ret;
+ ret = g_source_remove (toplevel->auto_save_timeout);
+ g_assert (ret);
+ }
+
if (toplevel->wid == -1) {
/* do no delete head */
return;
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs