aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@nuclecu.unam.mx>1998-10-03 07:59:35 +0800
committerArturo Espinosa <unammx@src.gnome.org>1998-10-03 07:59:35 +0800
commit96439bc6fffe21b8359bd825aa89fc586d36380a (patch)
treedc5a71f7b8cfbe15af6721f9440ef4c6c75f57a4 /calendar/gui
parente9a632c3c15bac86946af5f6d75a79517b4c6a07 (diff)
downloadgsoc2013-evolution-96439bc6fffe21b8359bd825aa89fc586d36380a.tar.gz
gsoc2013-evolution-96439bc6fffe21b8359bd825aa89fc586d36380a.tar.zst
gsoc2013-evolution-96439bc6fffe21b8359bd825aa89fc586d36380a.zip
Changed name from time_start_of_day() to be consistent with the other
1998-10-02 Federico Mena Quintero <federico@nuclecu.unam.mx> * timeutil.c (time_day_begin): Changed name from time_start_of_day() to be consistent with the other begin/end functions. (time_day_end): Likewise. * calobj.c (ical_object_get_first_weekday): New public function to get the first toggled day in a weekday mask. Since we do not support multiple weekdays in a monthly-by-pos rule, we just fetch the first toggled one. (ical_object_generate_events): Added a missing break statement. * timeutil.c (time_month_end): Made it consistent with the rest of the time begin/end functions -- now it returns the first second of the *next* month. (time_week_end): Actually implemented this function. It will be used when the week view is rewritten. * calobj.c (time_in_range): Fix off-by-one in the comparison of the time against the end time. * gncal-full-day.c (expand_space): Fixed bug where the columns not were being expanded due to a missing "slot + j". svn path=/trunk/; revision=425
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/calendar.c4
-rw-r--r--calendar/gui/eventedit.c1
-rw-r--r--calendar/gui/gncal-day-panel.c6
-rw-r--r--calendar/gui/gncal-full-day.c2
-rw-r--r--calendar/gui/gnome-cal.c6
-rw-r--r--calendar/gui/main.c2
-rw-r--r--calendar/gui/year-view.c2
7 files changed, 11 insertions, 12 deletions
diff --git a/calendar/gui/calendar.c b/calendar/gui/calendar.c
index a76d95758f..bacd7c9291 100644
--- a/calendar/gui/calendar.c
+++ b/calendar/gui/calendar.c
@@ -287,8 +287,8 @@ calendar_load (Calendar *cal, char *fname)
return "Could not load the calendar";
calendar_today = time (NULL);
- calendar_day_begin = time_start_of_day (calendar_today);
- calendar_day_end = time_end_of_day (calendar_today);
+ calendar_day_begin = time_day_begin (calendar_today);
+ calendar_day_end = time_day_end (calendar_today);
calendar_load_from_vobject (cal, vcal);
cleanVObject (vcal);
diff --git a/calendar/gui/eventedit.c b/calendar/gui/eventedit.c
index 3189b11300..a44b18e886 100644
--- a/calendar/gui/eventedit.c
+++ b/calendar/gui/eventedit.c
@@ -565,7 +565,6 @@ ee_store_recur_rule_to_ical (EventEditor *ee)
ical->recur->u.month_day = option_menu_active_number (ee->recur_rr_month_weekday);
}
-
break;
case 4:
diff --git a/calendar/gui/gncal-day-panel.c b/calendar/gui/gncal-day-panel.c
index 11a2d21a7d..c4ea354e25 100644
--- a/calendar/gui/gncal-day-panel.c
+++ b/calendar/gui/gncal-day-panel.c
@@ -128,7 +128,7 @@ gncal_day_panel_new (GnomeCalendar *calendar, time_t start_of_day)
0, 0);
gtk_widget_show (w);
- w = gncal_full_day_new (calendar, time_start_of_day (start_of_day), time_end_of_day (start_of_day));
+ w = gncal_full_day_new (calendar, time_day_begin (start_of_day), time_day_end (start_of_day));
dpanel->fullday = GNCAL_FULL_DAY (w);
gtk_signal_connect (GTK_OBJECT (dpanel->fullday), "range_activated",
(GtkSignalFunc) day_view_range_activated,
@@ -221,7 +221,7 @@ gncal_day_panel_set (GncalDayPanel *dpanel, time_t start_of_day)
g_return_if_fail (dpanel != NULL);
g_return_if_fail (GNCAL_IS_DAY_PANEL (dpanel));
- dpanel->start_of_day = time_start_of_day (start_of_day);
+ dpanel->start_of_day = time_day_begin (start_of_day);
if (dpanel->fullday->lower == dpanel->start_of_day)
return;
@@ -229,7 +229,7 @@ gncal_day_panel_set (GncalDayPanel *dpanel, time_t start_of_day)
strftime (buf, sizeof (buf), "%a %b %d %Y", &tm);
gtk_label_set (GTK_LABEL (dpanel->date_label), buf);
- gncal_full_day_set_bounds (dpanel->fullday, dpanel->start_of_day, time_end_of_day (dpanel->start_of_day));
+ gncal_full_day_set_bounds (dpanel->fullday, dpanel->start_of_day, time_day_end (dpanel->start_of_day));
gtk_calendar_select_month (dpanel->gtk_calendar, tm.tm_mon, tm.tm_year + 1900);
diff --git a/calendar/gui/gncal-full-day.c b/calendar/gui/gncal-full-day.c
index a84e185eb1..6acc8ca16b 100644
--- a/calendar/gui/gncal-full-day.c
+++ b/calendar/gui/gncal-full-day.c
@@ -825,7 +825,7 @@ expand_space (char *array, int *allocations, int val, int lower, int count, int
for (i = 0; i < count; i++){
slot = allocations [val] + 1;
for (j = 0; j < cols; j++)
- xy (array, slot, lower+i) = val;
+ xy (array, slot + j, lower+i) = val;
}
}
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index fbbd5c2c19..979c6df667 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -94,7 +94,7 @@ gnome_calendar_goto (GnomeCalendar *gcal, time_t new_time)
g_return_if_fail (new_time != -1);
- new_time = time_start_of_day (new_time);
+ new_time = time_day_begin (new_time);
if (current == gcal->day_view)
gncal_day_panel_set (GNCAL_DAY_PANEL (gcal->day_view), new_time);
@@ -192,7 +192,7 @@ gnome_calendar_new (char *title)
gtk_window_set_title(GTK_WINDOW(retval), title);
- gcal->current_display = time_start_of_day (time (NULL));
+ gcal->current_display = time_day_begin (time (NULL));
gcal->cal = calendar_new (title);
setup_widgets (gcal);
return retval;
@@ -385,7 +385,7 @@ mark_gtk_calendar_day (iCalObject *obj, time_t start, time_t end, void *c)
time_t t, day_end;
tm_s = *localtime (&start);
- day_end = time_end_of_day (end);
+ day_end = time_day_end (end);
for (t = start; t <= day_end; t += 60*60*24){
time_t new = mktime (&tm_s);
diff --git a/calendar/gui/main.c b/calendar/gui/main.c
index 9b468de7f8..7fad966413 100644
--- a/calendar/gui/main.c
+++ b/calendar/gui/main.c
@@ -511,7 +511,7 @@ static void
process_dates (void)
{
if (!from_t)
- from_t = time_start_of_day (time (NULL));
+ from_t = time_day_begin (time (NULL));
if (!to_t || to_t < from_t)
to_t = time_add_day (from_t, 1);
diff --git a/calendar/gui/year-view.c b/calendar/gui/year-view.c
index 6878080d3a..5746d61803 100644
--- a/calendar/gui/year-view.c
+++ b/calendar/gui/year-view.c
@@ -325,7 +325,7 @@ do_quick_view_popup (YearView *yv, GdkEventButton *event, int year, int month, i
char date_str[256];
day_start = time_from_day (year, month, day);
- day_end = time_end_of_day (day_start);
+ day_end = time_day_end (day_start);
list = calendar_get_events_in_range (yv->calendar->cal, day_start, day_end);