aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog9
-rw-r--r--calendar/cal-util/calobj.c2
-rw-r--r--calendar/calobj.c2
-rw-r--r--calendar/gncal-day-panel.c21
-rw-r--r--calendar/gui/gncal-day-panel.c21
-rw-r--r--calendar/pcs/calobj.c2
6 files changed, 35 insertions, 22 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 8b76a9df4f..f77733a32d 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,12 @@
+1998-05-03 Miguel de Icaza <miguel@nuclecu.unam.mx>
+
+ * gncal-day-panel.c (update): Draw the day at startup.
+ (gncal_day_panel_set): Fix selected-day display.
+ (gncal_day_panel_new): Switch day on double clicks, not on single
+ clicks.
+
+ * calobj.c (ical_object_compute_end): Removed debug messages.
+
1998-04-30 Miguel de Icaza <miguel@nuclecu.unam.mx>
* prop.c (prop_apply): Do not call prop_cancel, ths is now using
diff --git a/calendar/cal-util/calobj.c b/calendar/cal-util/calobj.c
index b6f5fc7f20..f3cf23e78d 100644
--- a/calendar/cal-util/calobj.c
+++ b/calendar/cal-util/calobj.c
@@ -1184,11 +1184,9 @@ ical_object_compute_end (iCalObject *ico)
g_return_if_fail (ico->recur != NULL);
- printf ("compute end\n");
ico->recur->_enddate = 0;
ico->recur->enddate = 0;
ical_object_generate_events (ico, ico->dtstart, 0, duration_callback, &count);
- printf ("compute end\n");
}
int
diff --git a/calendar/calobj.c b/calendar/calobj.c
index b6f5fc7f20..f3cf23e78d 100644
--- a/calendar/calobj.c
+++ b/calendar/calobj.c
@@ -1184,11 +1184,9 @@ ical_object_compute_end (iCalObject *ico)
g_return_if_fail (ico->recur != NULL);
- printf ("compute end\n");
ico->recur->_enddate = 0;
ico->recur->enddate = 0;
ical_object_generate_events (ico, ico->dtstart, 0, duration_callback, &count);
- printf ("compute end\n");
}
int
diff --git a/calendar/gncal-day-panel.c b/calendar/gncal-day-panel.c
index 5a5a052f73..e27e8f7e4e 100644
--- a/calendar/gncal-day-panel.c
+++ b/calendar/gncal-day-panel.c
@@ -145,7 +145,7 @@ gncal_day_panel_new (GnomeCalendar *calendar, time_t start_of_day)
dpanel->gtk_calendar = GTK_CALENDAR (w);
gtk_calendar_display_options (dpanel->gtk_calendar,
GTK_CALENDAR_SHOW_HEADING | GTK_CALENDAR_SHOW_DAY_NAMES);
- dpanel->day_selected_id = gtk_signal_connect (GTK_OBJECT (dpanel->gtk_calendar), "day_selected",
+ dpanel->day_selected_id = gtk_signal_connect (GTK_OBJECT (dpanel->gtk_calendar), "day_selected_double_click",
(GtkSignalFunc) calendar_day_selected,
dpanel);
gtk_signal_connect (GTK_OBJECT (dpanel->gtk_calendar), "month_changed",
@@ -188,11 +188,16 @@ gncal_day_panel_new (GnomeCalendar *calendar, time_t start_of_day)
static void
update (GncalDayPanel *dpanel, int update_fullday, iCalObject *ico, int flags)
{
+ char buf [80];
+
if (update_fullday){
gncal_full_day_update (dpanel->fullday, ico, flags);
retag_calendar (dpanel->gtk_calendar, dpanel);
}
gncal_todo_update (dpanel->todo, ico, flags);
+
+ strftime (buf, sizeof (buf), "%a %b %d %Y", localtime (&dpanel->start_of_day));
+ gtk_label_set (GTK_LABEL (dpanel->date_label), buf);
}
void
@@ -207,8 +212,8 @@ gncal_day_panel_update (GncalDayPanel *dpanel, iCalObject *ico, int flags)
void
gncal_day_panel_set (GncalDayPanel *dpanel, time_t start_of_day)
{
- char buf[256];
- struct tm *tm;
+ char buf[80];
+ struct tm tm;
g_return_if_fail (dpanel != NULL);
g_return_if_fail (GNCAL_IS_DAY_PANEL (dpanel));
@@ -216,17 +221,17 @@ gncal_day_panel_set (GncalDayPanel *dpanel, time_t start_of_day)
dpanel->start_of_day = time_start_of_day (start_of_day);
if (dpanel->fullday->lower == dpanel->start_of_day)
return;
-
- strftime (buf, sizeof (buf), "%a %b %d %Y", localtime (&dpanel->start_of_day));
+
+ tm = *localtime (&dpanel->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));
- tm = localtime (&dpanel->start_of_day);
- gtk_calendar_select_month (dpanel->gtk_calendar, tm->tm_mon, tm->tm_year + 1900);
+ gtk_calendar_select_month (dpanel->gtk_calendar, tm.tm_mon, tm.tm_year + 1900);
gtk_signal_handler_block (GTK_OBJECT (dpanel->gtk_calendar), dpanel->day_selected_id);
- gtk_calendar_select_day (dpanel->gtk_calendar, tm->tm_mday);
+ gtk_calendar_select_day (dpanel->gtk_calendar, tm.tm_mday);
gtk_signal_handler_unblock (GTK_OBJECT (dpanel->gtk_calendar), dpanel->day_selected_id);
update (dpanel, FALSE, NULL, 0);
diff --git a/calendar/gui/gncal-day-panel.c b/calendar/gui/gncal-day-panel.c
index 5a5a052f73..e27e8f7e4e 100644
--- a/calendar/gui/gncal-day-panel.c
+++ b/calendar/gui/gncal-day-panel.c
@@ -145,7 +145,7 @@ gncal_day_panel_new (GnomeCalendar *calendar, time_t start_of_day)
dpanel->gtk_calendar = GTK_CALENDAR (w);
gtk_calendar_display_options (dpanel->gtk_calendar,
GTK_CALENDAR_SHOW_HEADING | GTK_CALENDAR_SHOW_DAY_NAMES);
- dpanel->day_selected_id = gtk_signal_connect (GTK_OBJECT (dpanel->gtk_calendar), "day_selected",
+ dpanel->day_selected_id = gtk_signal_connect (GTK_OBJECT (dpanel->gtk_calendar), "day_selected_double_click",
(GtkSignalFunc) calendar_day_selected,
dpanel);
gtk_signal_connect (GTK_OBJECT (dpanel->gtk_calendar), "month_changed",
@@ -188,11 +188,16 @@ gncal_day_panel_new (GnomeCalendar *calendar, time_t start_of_day)
static void
update (GncalDayPanel *dpanel, int update_fullday, iCalObject *ico, int flags)
{
+ char buf [80];
+
if (update_fullday){
gncal_full_day_update (dpanel->fullday, ico, flags);
retag_calendar (dpanel->gtk_calendar, dpanel);
}
gncal_todo_update (dpanel->todo, ico, flags);
+
+ strftime (buf, sizeof (buf), "%a %b %d %Y", localtime (&dpanel->start_of_day));
+ gtk_label_set (GTK_LABEL (dpanel->date_label), buf);
}
void
@@ -207,8 +212,8 @@ gncal_day_panel_update (GncalDayPanel *dpanel, iCalObject *ico, int flags)
void
gncal_day_panel_set (GncalDayPanel *dpanel, time_t start_of_day)
{
- char buf[256];
- struct tm *tm;
+ char buf[80];
+ struct tm tm;
g_return_if_fail (dpanel != NULL);
g_return_if_fail (GNCAL_IS_DAY_PANEL (dpanel));
@@ -216,17 +221,17 @@ gncal_day_panel_set (GncalDayPanel *dpanel, time_t start_of_day)
dpanel->start_of_day = time_start_of_day (start_of_day);
if (dpanel->fullday->lower == dpanel->start_of_day)
return;
-
- strftime (buf, sizeof (buf), "%a %b %d %Y", localtime (&dpanel->start_of_day));
+
+ tm = *localtime (&dpanel->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));
- tm = localtime (&dpanel->start_of_day);
- gtk_calendar_select_month (dpanel->gtk_calendar, tm->tm_mon, tm->tm_year + 1900);
+ gtk_calendar_select_month (dpanel->gtk_calendar, tm.tm_mon, tm.tm_year + 1900);
gtk_signal_handler_block (GTK_OBJECT (dpanel->gtk_calendar), dpanel->day_selected_id);
- gtk_calendar_select_day (dpanel->gtk_calendar, tm->tm_mday);
+ gtk_calendar_select_day (dpanel->gtk_calendar, tm.tm_mday);
gtk_signal_handler_unblock (GTK_OBJECT (dpanel->gtk_calendar), dpanel->day_selected_id);
update (dpanel, FALSE, NULL, 0);
diff --git a/calendar/pcs/calobj.c b/calendar/pcs/calobj.c
index b6f5fc7f20..f3cf23e78d 100644
--- a/calendar/pcs/calobj.c
+++ b/calendar/pcs/calobj.c
@@ -1184,11 +1184,9 @@ ical_object_compute_end (iCalObject *ico)
g_return_if_fail (ico->recur != NULL);
- printf ("compute end\n");
ico->recur->_enddate = 0;
ico->recur->enddate = 0;
ical_object_generate_events (ico, ico->dtstart, 0, duration_callback, &count);
- printf ("compute end\n");
}
int