aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/gncal-day-panel.c
diff options
context:
space:
mode:
authorArturo Espinosa <unammx@src.gnome.org>1998-04-30 06:19:39 +0800
committerArturo Espinosa <unammx@src.gnome.org>1998-04-30 06:19:39 +0800
commit5c1c9710338cb7f3b29ed1eac1006bb95f39c048 (patch)
treedacbe29633e17a82ac619ea4c0a2fd67a650d56d /calendar/gui/gncal-day-panel.c
parentb14e3c892ce8feac4e72ab80800fb7b6e0408002 (diff)
downloadgsoc2013-evolution-5c1c9710338cb7f3b29ed1eac1006bb95f39c048.tar
gsoc2013-evolution-5c1c9710338cb7f3b29ed1eac1006bb95f39c048.tar.gz
gsoc2013-evolution-5c1c9710338cb7f3b29ed1eac1006bb95f39c048.tar.bz2
gsoc2013-evolution-5c1c9710338cb7f3b29ed1eac1006bb95f39c048.tar.lz
gsoc2013-evolution-5c1c9710338cb7f3b29ed1eac1006bb95f39c048.tar.xz
gsoc2013-evolution-5c1c9710338cb7f3b29ed1eac1006bb95f39c048.tar.zst
gsoc2013-evolution-5c1c9710338cb7f3b29ed1eac1006bb95f39c048.zip
Various fixes and optimizations; Tagging of the days with appointements.
Various fixes and optimizations; Tagging of the days with appointements. the 1969 bug is gone. Really. Miguel. svn path=/trunk/; revision=201
Diffstat (limited to 'calendar/gui/gncal-day-panel.c')
-rw-r--r--calendar/gui/gncal-day-panel.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/calendar/gui/gncal-day-panel.c b/calendar/gui/gncal-day-panel.c
index 26347428a6..5a5a052f73 100644
--- a/calendar/gui/gncal-day-panel.c
+++ b/calendar/gui/gncal-day-panel.c
@@ -78,6 +78,12 @@ calendar_day_selected (GtkCalendar *calendar, GncalDayPanel *dpanel)
gnome_calendar_goto (dpanel->calendar, mktime (&tm));
}
+static void
+retag_calendar (GtkCalendar *calendar, GncalDayPanel *dpanel)
+{
+ gnome_calendar_tag_calendar (dpanel->calendar, GTK_CALENDAR (dpanel->gtk_calendar));
+}
+
GtkWidget *
gncal_day_panel_new (GnomeCalendar *calendar, time_t start_of_day)
{
@@ -142,6 +148,8 @@ gncal_day_panel_new (GnomeCalendar *calendar, time_t start_of_day)
dpanel->day_selected_id = gtk_signal_connect (GTK_OBJECT (dpanel->gtk_calendar), "day_selected",
(GtkSignalFunc) calendar_day_selected,
dpanel);
+ gtk_signal_connect (GTK_OBJECT (dpanel->gtk_calendar), "month_changed",
+ GTK_SIGNAL_FUNC (retag_calendar), dpanel);
gtk_table_attach (GTK_TABLE (dpanel), w,
1, 2, 1, 2,
GTK_FILL | GTK_SHRINK,
@@ -180,9 +188,10 @@ gncal_day_panel_new (GnomeCalendar *calendar, time_t start_of_day)
static void
update (GncalDayPanel *dpanel, int update_fullday, iCalObject *ico, int flags)
{
- if (update_fullday)
+ if (update_fullday){
gncal_full_day_update (dpanel->fullday, ico, flags);
-
+ retag_calendar (dpanel->gtk_calendar, dpanel);
+ }
gncal_todo_update (dpanel->todo, ico, flags);
}
@@ -205,7 +214,9 @@ gncal_day_panel_set (GncalDayPanel *dpanel, time_t start_of_day)
g_return_if_fail (GNCAL_IS_DAY_PANEL (dpanel));
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));
gtk_label_set (GTK_LABEL (dpanel->date_label), buf);