diff options
author | Federico Mena Quintero <federico@helixcode.com> | 2000-09-08 14:39:05 +0800 |
---|---|---|
committer | Federico Mena Quintero <federico@src.gnome.org> | 2000-09-08 14:39:05 +0800 |
commit | a38d76bc2e91964b73ffac3efcb043db54bf2189 (patch) | |
tree | 8ed2564db7ff3ff60a50b162fc3a75039e322d3e /calendar/gui/mark.c | |
parent | 0a8b44f162e3d1db26967e972b99a39e174369e6 (diff) | |
download | gsoc2013-evolution-a38d76bc2e91964b73ffac3efcb043db54bf2189.tar gsoc2013-evolution-a38d76bc2e91964b73ffac3efcb043db54bf2189.tar.gz gsoc2013-evolution-a38d76bc2e91964b73ffac3efcb043db54bf2189.tar.bz2 gsoc2013-evolution-a38d76bc2e91964b73ffac3efcb043db54bf2189.tar.lz gsoc2013-evolution-a38d76bc2e91964b73ffac3efcb043db54bf2189.tar.xz gsoc2013-evolution-a38d76bc2e91964b73ffac3efcb043db54bf2189.tar.zst gsoc2013-evolution-a38d76bc2e91964b73ffac3efcb043db54bf2189.zip |
Fall equinox cleanup!
2000-09-08 Federico Mena Quintero <federico@helixcode.com>
Fall equinox cleanup!
OK, I know the equinox is not here yet, but weather has changed
enough to warrant it.
Sigh. This place is definitely not the tropics.
* gui/gnome-cal.c (obj_updated_cb): Renamed from
gnome_calendar_object_updated_cb(); fixed prototype.
(obj_removed_cb): Renamed from gnome_calendar_object_removed_cb();
fixed prototype.
(GnomeCalendarPrivate): Moved all the GnomeCalendar fields to a
private structure so I don't have to rebuild the whole calendar
GUI directory every time something changes in the object.
(GnomeCalendarPrivate): Removed the property bag and the control
fields; they are local to the control-factory now.
(gnome_calendar_update_view_buttons): Remove the
ignore_view_button_clicks mess and just block the signal.
(gnome_calendar_set_view): Added a "focus" argument to indicate
whether we want the main widget in the specified view to grab the
focus.
(gnome_calendar_set_view_internal): Handle the focus argument here.
(gnome_calendar_set_view_buttons): Temporary hack to notify the
calendar about its buttons.
(gnome_calendar_get_selected_time_range): New function.
(gnome_calendar_get_cal_client): New function.
* gui/control-factory.c (calendar_properties_init): Keep the
property bag local to here; it does not need to be in the calendar
object yet.
(control_factory_fn): Renamed from control_factory(). Just use
control_factory_new_control().
(control_factory_new_control): Moved the stuff over from
create_control(), and keep the control local to here. Check the
return value of bonobo_control_new().
* gui/calendar-commands.c (show_day_view_clicked): Remove the
ignore_view_button_clicks mess.
(new_calendar): Removed the useless "page" argument.
(calendar_control_activate): Use gnome_calendar_set_view_buttons()
for now.
svn path=/trunk/; revision=5255
Diffstat (limited to 'calendar/gui/mark.c')
-rw-r--r-- | calendar/gui/mark.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/calendar/gui/mark.c b/calendar/gui/mark.c index 383eca5196..1b90d390dd 100644 --- a/calendar/gui/mark.c +++ b/calendar/gui/mark.c @@ -102,7 +102,7 @@ mark_event_in_month (GnomeMonthItem *mitem, time_t start, time_t end) { struct tm tm; int day_index; - + tm = *localtime (&start); for (; start <= end; start += 60 * 60 * 24) { @@ -127,7 +127,7 @@ static gboolean mark_month_item_cb (CalComponent *comp, time_t istart, time_t iend, gpointer data) { struct minfo *mi = (struct minfo *)data; - + mark_event_in_month (mi->mitem, MAX (istart, mi->start), MIN (iend, mi->end)); return TRUE; @@ -136,6 +136,7 @@ mark_month_item_cb (CalComponent *comp, time_t istart, time_t iend, gpointer dat void mark_month_item (GnomeMonthItem *mitem, GnomeCalendar *gcal) { + CalClient *client; struct minfo mi; g_return_if_fail (mitem != NULL); @@ -143,12 +144,14 @@ mark_month_item (GnomeMonthItem *mitem, GnomeCalendar *gcal) g_return_if_fail (gcal != NULL); g_return_if_fail (GNOME_IS_CALENDAR (gcal)); + client = gnome_calendar_get_cal_client (gcal); + mi.mitem = mitem; mi.start = time_month_begin (time_from_day (mitem->year, mitem->month, 1)); mi.end = time_month_end (mi.start); - cal_client_generate_instances (gcal->client, CALOBJ_TYPE_EVENT, mi.start, mi.end, - mark_month_item_cb, &mi); + cal_client_generate_instances (client, CALOBJ_TYPE_EVENT, mi.start, mi.end, + mark_month_item_cb, &mi); } |