Re: [evolution-patches] This patch removes some compiler warnings (on gcc 4.0)




More compiler-warning fixes in the same directory ...


btw: this one worries me:

e_calendar_view_edit_appointment (cal_view, event->comp_data->client,
                                                     event->comp_data->icalcomp,
                                                    icalcomponent_get_first_property(event->comp_data->icalcomp, ICAL_ATTENDEE_PROPERTY));


The 4th argument of e_calendar_view_edit_appointment is a boolean. icalcomponent_get_first_property is returning a icalproperty pointer. (checkout my patch to see if what it should do is indeed correctly interpreted by me).


On Mon, 2005-05-02 at 21:36 +0200, Philip Van Hoof wrote:
Mainly (xmlChar*) casting for libxml  . . .


-- 
Philip Van Hoof, Software Developer @ Cronos
home: me at pvanhoof dot be
gnome: pvanhoof at gnome dot org
work: philip dot vanhoof at cronos dot be
junk: philip dot vanhoof at gmail dot com
http://www.pvanhoof.be/
-- 
Philip Van Hoof, Software Developer @ Cronos
home: me at pvanhoof dot be
gnome: pvanhoof at gnome dot org
work: philip dot vanhoof at cronos dot be
junk: philip dot vanhoof at gmail dot com
http://www.pvanhoof.be/
Index: e-calendar-table.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-calendar-table.c,v
retrieving revision 1.132
diff -u -r1.132 e-calendar-table.c
--- e-calendar-table.c	25 Jan 2005 11:18:16 -0000	1.132
+++ e-calendar-table.c	2 May 2005 20:03:47 -0000
@@ -511,7 +511,7 @@
 	g_signal_connect (e_table, "key_press", G_CALLBACK (e_calendar_table_on_key_press), cal_table);
 	g_signal_connect (e_table, "popup_menu", G_CALLBACK (e_calendar_table_on_popup_menu), cal_table);
 
-	a11y = gtk_widget_get_accessible (e_table);
+	a11y = gtk_widget_get_accessible (GTK_WIDGET(e_table));
 	if (a11y)
 		atk_object_set_name (a11y, _("Task Table"));
 }
Index: e-calendar-view.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-calendar-view.c,v
retrieving revision 1.79
diff -u -r1.79 e-calendar-view.c
--- e-calendar-view.c	18 Apr 2005 14:21:33 -0000	1.79
+++ e-calendar-view.c	2 May 2005 20:03:50 -0000
@@ -1008,10 +1008,14 @@
 		ECalendarViewEvent *event = (ECalendarViewEvent *) selected->data;
 
 		if (event)
+		{
+			icalproperty *prop = icalcomponent_get_first_property(event->comp_data->icalcomp, ICAL_ATTENDEE_PROPERTY);
+			gboolean val = prop ? TRUE:FALSE;
 			e_calendar_view_edit_appointment (cal_view, event->comp_data->client,
 						     event->comp_data->icalcomp, 
-						     icalcomponent_get_first_property(event->comp_data->icalcomp, ICAL_ATTENDEE_PROPERTY));
-
+						     val);
+		}
+		
 		g_list_free (selected);
 	}
 }
@@ -1169,7 +1173,7 @@
 		return;
 
 	/* prompt the user for destination source */
-	destination_source = select_source_dialog ((GtkWindow *) gtk_widget_get_toplevel (cal_view), E_CAL_SOURCE_TYPE_EVENT);
+	destination_source = select_source_dialog ((GtkWindow *) gtk_widget_get_toplevel (GTK_WIDGET(cal_view)), E_CAL_SOURCE_TYPE_EVENT);
 	if (!destination_source)
 		return;
 
@@ -1493,9 +1497,14 @@
 	if (selected) {
 		ECalendarViewEvent *event = (ECalendarViewEvent *) selected->data;
 		if (event)
+		{
+			icalproperty *prop = icalcomponent_get_first_property(event->comp_data->icalcomp, ICAL_ATTENDEE_PROPERTY);
+			gboolean val = prop?TRUE:FALSE;
+			
 			e_calendar_view_edit_appointment (cal_view, event->comp_data->client,
-					event->comp_data->icalcomp, icalcomponent_get_first_property(event->comp_data->icalcomp, ICAL_ATTENDEE_PROPERTY));
-
+					event->comp_data->icalcomp, val);
+		}
+		
 		g_list_free (selected);
 	}
 }
Index: e-day-view.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-day-view.c,v
retrieving revision 1.270
diff -u -r1.270 e-day-view.c
--- e-day-view.c	21 Mar 2005 14:29:16 -0000	1.270
+++ e-day-view.c	2 May 2005 20:04:00 -0000
@@ -361,7 +361,8 @@
 					  gboolean scroll_up);
 static gboolean e_day_view_auto_scroll_handler (gpointer data);
 
-static EDayViewEvent* e_day_view_get_popup_menu_event (EDayView *day_view);
+/* 
+static EDayViewEvent* e_day_view_get_popup_menu_event (EDayView *day_view);*/
 
 static gboolean e_day_view_on_top_canvas_drag_motion (GtkWidget      *widget,
 						      GdkDragContext *context,
@@ -419,10 +420,12 @@
 							  guint           time,
 							  EDayView	 *day_view);
 
+/*
 static gboolean e_day_view_update_event_cb (EDayView *day_view,
 					    gint day,
 					    gint event_num,
-					    gpointer data);
+					    gpointer data);*/
+						
 static gboolean e_day_view_remove_event_cb (EDayView *day_view,
 					    gint day,
 					    gint event_num,
@@ -507,8 +510,6 @@
 static void
 process_component (EDayView *day_view, ECalModelComponent *comp_data)
 {
-	EDayViewEvent *event;
-	gint day, event_num;
 	const char *uid, *rid;
 	ECalComponent *comp;
 	AddEventData add_event_data;
@@ -1076,8 +1077,6 @@
 {
 	EDayView *day_view;
 	GdkColormap *colormap;
-	gboolean success[E_DAY_VIEW_COLOR_LAST];
-	gint nfailed;
 
 	if (GTK_WIDGET_CLASS (e_day_view_parent_class)->realize)
 		(*GTK_WIDGET_CLASS (e_day_view_parent_class)->realize)(widget);
@@ -1161,6 +1160,11 @@
 	day_view->colors[E_DAY_VIEW_COLOR_EVENT_BORDER] = widget->style->dark[GTK_STATE_NORMAL];
 	day_view->colors[E_DAY_VIEW_COLOR_LONG_EVENT_BACKGROUND] = widget->style->bg[GTK_STATE_ACTIVE];
 	day_view->colors[E_DAY_VIEW_COLOR_LONG_EVENT_BORDER] = widget->style->dark[GTK_STATE_NORMAL];
+
+	/* Shouldn't this use some standard GTK colors? */
+	day_view->colors[E_DAY_VIEW_COLOR_MARCUS_BAINS_LINE].red   = 65535;
+	day_view->colors[E_DAY_VIEW_COLOR_MARCUS_BAINS_LINE].green = 0;
+	day_view->colors[E_DAY_VIEW_COLOR_MARCUS_BAINS_LINE].blue  = 0;
 }
 
 static void
@@ -1576,6 +1580,7 @@
 	return FALSE;
 }
 
+/* Unused?!
 static gboolean
 e_day_view_update_event_cb (EDayView *day_view,
 			    gint day,
@@ -1614,7 +1619,7 @@
 
 	return TRUE;
 }
-
+*/
 
 /* This calls a given function for each event instance (in both views).
    If the callback returns FALSE the iteration is stopped.
@@ -2468,6 +2473,28 @@
 	gtk_widget_queue_draw (day_view->main_canvas);
 }
 
+
+/* Whether we display the Marcus Bains Line in the main canvas and time canvas. */
+gboolean
+e_day_view_get_show_marcus_bains_line	(EDayView       *day_view)
+{
+	g_return_val_if_fail (E_IS_DAY_VIEW (day_view), TRUE);
+	return day_view->show_marcus_bains_line;
+}
+
+void
+e_day_view_set_show_marcus_bains_line	(EDayView       *day_view,
+					 gboolean        show)
+{
+	g_return_if_fail (E_IS_DAY_VIEW (day_view));
+
+	if (day_view->show_marcus_bains_line != show) {
+		day_view->show_marcus_bains_line = show;
+		e_day_view_update_marcus_bains(day_view);
+	}
+}
+
+
 /* Whether we display event end times in the main canvas. */
 gboolean
 e_day_view_get_show_event_end_times	(EDayView	*day_view)
@@ -3319,6 +3346,7 @@
 				    day, event_num);
 }
 
+/* Unused?!
 static EDayViewEvent*
 e_day_view_get_popup_menu_event (EDayView *day_view)
 {
@@ -3334,7 +3362,7 @@
 				       EDayViewEvent,
 				       day_view->popup_event_num);
 }
-
+*/
 
 static gboolean
 e_day_view_on_top_canvas_button_release (GtkWidget *widget,
@@ -3394,7 +3422,6 @@
 e_day_view_update_calendar_selection_time (EDayView *day_view)
 {
 	time_t start, end;
-	GnomeCalendar *calendar;
 
 	e_day_view_get_selected_time_range ((ECalendarView *) day_view, &start, &end);
 
@@ -4153,7 +4180,7 @@
 			e_day_view_layout_day_events (day_view->events[day],
 						      day_view->rows,
 						      day_view->mins_per_row,
-						      day_view->cols_per_row[day]);
+						      (gint8*)day_view->cols_per_row[day]);
 
 		if (day_view->need_layout[day]
 		    || day_view->need_reshape[day]) {
@@ -7004,7 +7031,7 @@
 		comp_str = icalcomponent_as_ical_string (vcal);
 		if (comp_str) {
 			gtk_selection_data_set (selection_data, selection_data->target,
-						8, comp_str, strlen (comp_str));
+						8, (const guchar*)comp_str, strlen (comp_str));
 		}
 
 		icalcomponent_free (vcal);
@@ -7501,5 +7528,3 @@
 
 	return (day_view->editing_event_day != -1) ? 1 : 0;
 }
-
-
Index: e-itip-control.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-itip-control.c,v
retrieving revision 1.165
diff -u -r1.165 e-itip-control.c
--- e-itip-control.c	8 Jan 2005 10:53:52 -0000	1.165
+++ e-itip-control.c	2 May 2005 20:04:03 -0000
@@ -19,7 +19,7 @@
  *
  * Author: JP Rosevear
  */
-
+ 
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
@@ -361,8 +361,9 @@
 }
 
 static void
-cleanup_ecal (ECal *ecal) 
+cleanup_ecal (gpointer user_data) 
 {
+	ECal *ecal = user_data;
 	/* Clean up any signals */
 	g_signal_handlers_disconnect_matched (ecal, G_SIGNAL_MATCH_FUNC, 0, 0, NULL, cal_opened_cb, NULL);
 	g_signal_handlers_disconnect_matched (ecal, G_SIGNAL_MATCH_FUNC, 0, 0, NULL, find_cal_opened_cb, NULL);
@@ -1986,6 +1987,7 @@
 	gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
 }
 
+/* Unused ?!
 static void
 remove_item (EItipControl *itip)
 {
@@ -1996,7 +1998,7 @@
 	
 	priv = itip->priv;
 
-	/* FIXME Is this check necessary? */
+	/-* FIXME Is this check necessary? *-/
 	if (!priv->current_ecal)
 		return;
 	
@@ -2011,6 +2013,8 @@
 	
 	g_clear_error (&error);
 }
+*/
+
 
 static void
 send_item (EItipControl *itip)
@@ -2094,7 +2098,7 @@
 	}
 
        	while ((len = read (fd, buffer, 4096)) > 0) {
-		gtk_html_write (html, handle, buffer, len);
+		gtk_html_write (html, handle, (const gchar*)buffer, len);
 	}
 
 	if (len < 0) {
Index: e-meeting-store.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-meeting-store.c,v
retrieving revision 1.10
diff -u -r1.10 e-meeting-store.c
--- e-meeting-store.c	22 Dec 2004 20:02:26 -0000	1.10
+++ e-meeting-store.c	2 May 2005 20:04:04 -0000
@@ -516,7 +516,7 @@
 		break;
 	}
 }
-
+/* Unused !?
 static gboolean
 is_cell_editable (EMeetingStore *etm, int col, int row)
 {
@@ -551,6 +551,7 @@
 
 	return TRUE;
 }
+*/
 
 static void
 refresh_queue_remove (EMeetingStore *store, EMeetingAttendee *attendee) 
@@ -989,8 +990,9 @@
 
 /* Process the callbacks in the main thread. Avoids widget redrawing issues. */
 static gboolean
-process_callbacks_main_thread (EMeetingStore *store)
+process_callbacks_main_thread (gpointer user_data)
 {
+	EMeetingStore *store = user_data;
 	EMeetingStorePrivate *priv;
 	QueueCbData *aqueue_data;
 	gboolean threads_done = FALSE;
@@ -1434,7 +1436,8 @@
 		g_ptr_array_add (qdata->call_backs, call_back);
 		g_ptr_array_add (qdata->data, data);
 
-		g_hash_table_insert (priv->refresh_data, itip_strip_mailto (e_meeting_attendee_get_address (attendee)), qdata);
+		
+		g_hash_table_insert (priv->refresh_data, (gpointer)itip_strip_mailto (e_meeting_attendee_get_address (attendee)), qdata);
 	} else {
 		if (e_meeting_time_compare_times (start, &qdata->start) == -1)
 			qdata->start = *start;


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