gncal bug (patch included)



Hi

playing with the cvs rep I found some bug that caused gnomecal to get FPEs
on my AXP. I was able to track the problem down to year-view.c (see diff)
(btw: I also dared to fix some nasty compile warnings...)

I hope this is the right place for patches... otherwise try to forgive me
:-)

Index: eventedit.c
===================================================================
RCS file: /cvs/gnome/gnome-utils/gncal/eventedit.c,v
retrieving revision 1.39
diff -u -r1.39 eventedit.c
--- eventedit.c	1998/11/17 16:53:59	1.39
+++ eventedit.c	1998/11/22 00:04:29
@@ -1317,7 +1317,7 @@
 	int sel;
 
 	clist = GTK_CLIST (ee->recur_ex_clist);
-	sel = (gint) clist->selection->data;
+	sel = GPOINTER_TO_INT(clist->selection->data);
 
 	t = gtk_clist_get_row_data (clist, sel);
 	*t = gnome_date_edit_get_date (GNOME_DATE_EDIT (ee->recur_ex_date));
@@ -1332,7 +1332,7 @@
 	int sel;
 
 	clist = GTK_CLIST (ee->recur_ex_clist);
-	sel = (gint) clist->selection->data;
+	sel = GPOINTER_TO_INT(clist->selection->data);
 
 	g_free (gtk_clist_get_row_data (clist, sel)); /* free the time_t stored there */
 
Index: gncal-todo.c
===================================================================
RCS file: /cvs/gnome/gnome-utils/gncal/gncal-todo.c,v
retrieving revision 1.5
diff -u -r1.5 gncal-todo.c
--- gncal-todo.c	1998/11/16 20:29:44	1.5
+++ gncal-todo.c	1998/11/22 00:04:29
@@ -143,7 +143,7 @@
 	if (!clist->selection)
 		return NULL;
 
-	sel = (gint) clist->selection->data;
+	sel = GPOINTER_TO_INT(clist->selection->data);
 
 	return gtk_clist_get_row_data (clist, sel);
 }
Index: timeutil.c
===================================================================
RCS file: /cvs/gnome/gnome-utils/gncal/timeutil.c,v
retrieving revision 1.23
diff -u -r1.23 timeutil.c
--- timeutil.c	1998/10/02 23:59:33	1.23
+++ timeutil.c	1998/11/22 00:04:29
@@ -7,6 +7,7 @@
  */
 
 #include <libgnome/libgnome.h>
+#include <string.h>
 #include "timeutil.h"
 
 #define digit_at(x,y) (x [y] - '0')
Index: year-view.c
===================================================================
RCS file: /cvs/gnome/gnome-utils/gncal/year-view.c,v
retrieving revision 1.28
diff -u -r1.28 year-view.c
--- year-view.c	1998/10/16 22:19:12	1.28
+++ year-view.c	1998/11/22 00:04:30
@@ -432,7 +432,7 @@
 
 	args[0].name = "text_width";
 	args[1].name = "text_height";
-	gtk_object_getv (GTK_OBJECT (yv->heading), 1, args);
+	gtk_object_getv (GTK_OBJECT (yv->heading), 2, args);
 
 	m_width = GTK_VALUE_DOUBLE (args[0]);
 	m_height = 2 * HEAD_SPACING + GTK_VALUE_DOUBLE (args[1]);


--




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