From 40e5e5b1039fef8d4c14bd3c727f0405316f7f2e Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Thu, 14 Dec 2000 01:20:18 +0000 Subject: #if 0ed cal_obj_date_only_compare_func. (cal_object_get_rdate_end): 2000-12-13 Christopher James Lahey * cal-util/cal-recur.c: #if 0ed cal_obj_date_only_compare_func. (cal_object_get_rdate_end): Changed this function to get rid of a possible uninitialized error on the rdate function. * gui/calendar-model.c: Fixed some warnings involving the #define _XOPEN_SOURCE lines here. * gui/component-factory.c: #ifdef WANT_THE_EXECUTIVE_SUMMARYed out the summary_factory object since it's unused if WANT_THE_EXCUTIVE_SUMMARY is not defined. * gui/e-day-view.c: #if 0ed out e_day_view_remove_event_cb. (obj_updated_cb): #ifndef NO_WARNINGSed out a #warning. * gui/e-week-view-event-item.c (e_week_view_event_item_draw): Made it so that * gui/e-week-view.c (obj_updated_cb): #ifndef NO_WARNINGSed out a #warning. svn path=/trunk/; revision=6982 --- calendar/ChangeLog | 22 ++++++++++++++++++++++ calendar/cal-util/cal-recur.c | 6 +++++- calendar/gui/calendar-component.c | 2 ++ calendar/gui/calendar-model.c | 11 ++++++----- calendar/gui/component-factory.c | 2 ++ calendar/gui/e-day-view.c | 9 ++++++--- calendar/gui/e-week-view-event-item.c | 5 +++++ calendar/gui/e-week-view.c | 2 ++ 8 files changed, 50 insertions(+), 9 deletions(-) diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 3d7c05ffa1..df3740d539 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,25 @@ +2000-12-13 Christopher James Lahey + + * cal-util/cal-recur.c: #if 0ed cal_obj_date_only_compare_func. + (cal_object_get_rdate_end): Changed this function to get rid of a + possible uninitialized error on the rdate function. + + * gui/calendar-model.c: Fixed some warnings involving the #define + _XOPEN_SOURCE lines here. + + * gui/component-factory.c: #ifdef WANT_THE_EXECUTIVE_SUMMARYed out + the summary_factory object since it's unused if + WANT_THE_EXCUTIVE_SUMMARY is not defined. + + * gui/e-day-view.c: #if 0ed out e_day_view_remove_event_cb. + (obj_updated_cb): #ifndef NO_WARNINGSed out a #warning. + + * gui/e-week-view-event-item.c (e_week_view_event_item_draw): Made + it so that + + * gui/e-week-view.c (obj_updated_cb): #ifndef NO_WARNINGSed out a + #warning. + 2000-12-13 JP Rosevear * conduits/todo/Makefile.am: Revert federico's change for now diff --git a/calendar/cal-util/cal-recur.c b/calendar/cal-util/cal-recur.c index 5746bfc5f2..12381b7819 100644 --- a/calendar/cal-util/cal-recur.c +++ b/calendar/cal-util/cal-recur.c @@ -439,8 +439,10 @@ static void cal_obj_time_find_first_week (CalObjTime *cotime, RecurData *recur_data); static void cal_object_time_from_time (CalObjTime *cotime, time_t t); +#if 0 static gint cal_obj_date_only_compare_func (const void *arg1, const void *arg2); +#endif @@ -1194,7 +1196,7 @@ static gboolean cal_object_get_rdate_end (CalObjTime *occ, GArray *rdate_periods) { - CalObjRecurrenceDate *rdate; + CalObjRecurrenceDate *rdate = NULL; CalComponentPeriod *p; gint lower, upper, middle, cmp = 0; time_t t; @@ -3424,6 +3426,7 @@ cal_obj_time_compare_func (const void *arg1, return retval; } +#if 0 static gint cal_obj_date_only_compare_func (const void *arg1, const void *arg2) @@ -3450,6 +3453,7 @@ cal_obj_date_only_compare_func (const void *arg1, return 0; } +#endif /* Returns the weekday of the given CalObjTime, from 0 (Mon) - 6 (Sun). */ static gint diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c index 91e50f84eb..f0de87fddc 100644 --- a/calendar/gui/calendar-component.c +++ b/calendar/gui/calendar-component.c @@ -39,7 +39,9 @@ #define SUMMARY_FACTORY_ID "OAFIID:GNOME_Evolution_Calendar_ExecutiveSummaryComponentFactory" static BonoboGenericFactory *factory = NULL; +#ifdef WANT_THE_EXECUTIVE_SUMMARY static BonoboGenericFactory *summary_factory = NULL; +#endif char *evolution_dir; static const EvolutionShellComponentFolderType folder_types[] = { diff --git a/calendar/gui/calendar-model.c b/calendar/gui/calendar-model.c index 20c2bff234..cbf8a1195c 100644 --- a/calendar/gui/calendar-model.c +++ b/calendar/gui/calendar-model.c @@ -21,15 +21,16 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. */ -/* We need this for strptime. */ -#define _XOPEN_SOURCE #include -#include #include -#undef _XOPEN_SOURCE -#include +/* We need this for strptime. */ +#include #define _XOPEN_SOURCE +#define __USE_XOPEN +#include +#undef _XOPEN_SOURCE +#undef __USE_XOPEN #include #include #include diff --git a/calendar/gui/component-factory.c b/calendar/gui/component-factory.c index 91e50f84eb..f0de87fddc 100644 --- a/calendar/gui/component-factory.c +++ b/calendar/gui/component-factory.c @@ -39,7 +39,9 @@ #define SUMMARY_FACTORY_ID "OAFIID:GNOME_Evolution_Calendar_ExecutiveSummaryComponentFactory" static BonoboGenericFactory *factory = NULL; +#ifdef WANT_THE_EXECUTIVE_SUMMARY static BonoboGenericFactory *summary_factory = NULL; +#endif char *evolution_dir; static const EvolutionShellComponentFolderType folder_types[] = { diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c index 9078fcef73..0d941caaff 100644 --- a/calendar/gui/e-day-view.c +++ b/calendar/gui/e-day-view.c @@ -385,11 +385,12 @@ static void e_day_view_on_main_canvas_drag_data_received (GtkWidget *widget guint time, EDayView *day_view); +#if 0 static gboolean e_day_view_update_event_cb (EDayView *day_view, gint day, gint event_num, gpointer data); - +#endif static gboolean e_day_view_remove_event_cb (EDayView *day_view, gint day, gint event_num, @@ -1362,7 +1363,9 @@ obj_updated_cb (CalClient *client, const char *uid, gpointer data) else event = &g_array_index (day_view->events[day], EDayViewEvent, event_num); +#ifndef NO_WARNINGS #warning "FIXME" +#endif /* Do this the long way every time for now */ #if 0 @@ -1457,7 +1460,7 @@ e_day_view_set_cal_client (EDayView *day_view, e_day_view_queue_reload_events (day_view); } - +#if 0 static gboolean e_day_view_update_event_cb (EDayView *day_view, gint day, @@ -1493,7 +1496,7 @@ e_day_view_update_event_cb (EDayView *day_view, } return TRUE; } - +#endif /* This calls a given function for each event instance (in both views). If the callback returns TRUE the iteration is stopped. diff --git a/calendar/gui/e-week-view-event-item.c b/calendar/gui/e-week-view-event-item.c index d50172787b..ee77573f6e 100644 --- a/calendar/gui/e-week-view-event-item.c +++ b/calendar/gui/e-week-view-event-item.c @@ -318,6 +318,11 @@ e_week_view_event_item_draw (GnomeCanvasItem *canvas_item, draw_start = FALSE; draw_end = FALSE; break; + default: + g_assert_not_reached(); + draw_start = FALSE; + draw_end = FALSE; + break; } if (draw_start) { diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c index 5b6c4960f4..a6d42b8bbd 100644 --- a/calendar/gui/e-week-view.c +++ b/calendar/gui/e-week-view.c @@ -891,7 +891,9 @@ obj_updated_cb (CalClient *client, const char *uid, gpointer data) update the event fairly easily without changing the events arrays or computing a new layout. */ if (e_week_view_find_event_from_uid (week_view, uid, &event_num)) { +#ifndef NO_WARNINGS #warning "FIXME" +#endif event = &g_array_index (week_view->events, EWeekViewEvent, event_num); -- cgit