aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/year-view.c
diff options
context:
space:
mode:
authorArturo Espinosa <unammx@src.gnome.org>1998-04-18 07:48:05 +0800
committerArturo Espinosa <unammx@src.gnome.org>1998-04-18 07:48:05 +0800
commitd55901c052e7431d907f1db4aa243b79948c3f46 (patch)
treea7e6eeedf30f9a73d31029fef10773c72a7b46c1 /calendar/gui/year-view.c
parent4b926012c0cae01569d71d178dc651d9e4b2c8e8 (diff)
downloadgsoc2013-evolution-d55901c052e7431d907f1db4aa243b79948c3f46.tar
gsoc2013-evolution-d55901c052e7431d907f1db4aa243b79948c3f46.tar.gz
gsoc2013-evolution-d55901c052e7431d907f1db4aa243b79948c3f46.tar.bz2
gsoc2013-evolution-d55901c052e7431d907f1db4aa243b79948c3f46.tar.lz
gsoc2013-evolution-d55901c052e7431d907f1db4aa243b79948c3f46.tar.xz
gsoc2013-evolution-d55901c052e7431d907f1db4aa243b79948c3f46.tar.zst
gsoc2013-evolution-d55901c052e7431d907f1db4aa243b79948c3f46.zip
Year view, double click -mig
svn path=/trunk/; revision=152
Diffstat (limited to 'calendar/gui/year-view.c')
-rw-r--r--calendar/gui/year-view.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/calendar/gui/year-view.c b/calendar/gui/year-view.c
index a922ac2748..5376826239 100644
--- a/calendar/gui/year-view.c
+++ b/calendar/gui/year-view.c
@@ -15,9 +15,20 @@
static void gncal_year_view_init (GncalYearView *yview);
static void
-double_click(GtkWidget *widget, gpointer data)
+double_click(GtkCalendar *gc, GncalYearView *yview)
{
- printf("Recieved double click.\n");
+ struct tm tm;
+ time_t t;
+
+ tm.tm_mday = gc->selected_day;
+ tm.tm_mon = gc->month;
+ tm.tm_year = gc->year;
+ tm.tm_hour = 0;
+ tm.tm_min = 0;
+ tm.tm_sec = 0;
+ t = mktime (&tm);
+
+ gnome_calendar_dayjump (yview->gcal, t);
}
static void
@@ -189,6 +200,7 @@ gncal_year_view_set_year (GncalYearView *yview, int year)
for (i = 0; i < 12; i++) {
gtk_calendar_select_month (GTK_CALENDAR(yview->calendar[i]), i, yview->year);
+ gtk_calendar_clear_marks (GTK_CALENDAR (yview->calendar[i]));
}
year_begin = time_year_begin (yview->year);
@@ -197,7 +209,7 @@ gncal_year_view_set_year (GncalYearView *yview, int year)
l = calendar_get_events_in_range (yview->gcal->cal, year_begin, year_end);
for (; l; l = l->next){
CalendarObject *co = l->data;
-
+
year_view_mark_day (co->ico, co->ev_start, co->ev_end, yview);
}
calendar_destroy_event_list (l);
@@ -221,10 +233,8 @@ gncal_year_view_update (GncalYearView *yview, iCalObject *ico, int flags)
g_return_if_fail (GNCAL_IS_YEAR_VIEW (yview));
/* If only the summary changed, we dont care */
- if ((flags & CHANGE_SUMMARY) == flags)
+ if (flags && (flags & CHANGE_SUMMARY) == flags)
return;
- printf ("MARCANDO!\n");
- if (flags & CHANGE_NEW)
- gncal_year_view_set_year (yview, yview->year);
+ gncal_year_view_set_year (yview, yview->year);
}