[evolution-patches] [UIHackFest] Fix for http://bugzilla.gnome.org/show_bug.cgi?id=274234



Attached

-Srini
Index: e-week-view-main-item.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/e-week-view-main-item.c,v
retrieving revision 1.21
diff -u -p -r1.21 e-week-view-main-item.c
--- e-week-view-main-item.c	14 Oct 2004 14:56:18 -0000	1.21
+++ e-week-view-main-item.c	12 Jan 2006 07:06:16 -0000
@@ -210,6 +210,7 @@ e_week_view_main_item_draw_day (EWeekVie
 	PangoContext *pango_context;
 	PangoFontMetrics *font_metrics;
 	PangoLayout *layout;
+	gboolean today = FALSE;
 
 #if 0
 	g_print ("Drawing Day:%i at %i,%i\n", day, x, y);
@@ -345,18 +346,27 @@ e_week_view_main_item_draw_day (EWeekVie
 						    e_calendar_view_get_timezone (E_CALENDAR_VIEW (week_view)));
 		if (g_date_year (date) == tt.year 
 		    && g_date_month (date) == tt.month
-		    && g_date_day (date) == tt.day)
+		    && g_date_day (date) == tt.day) {
 			gdk_gc_set_foreground (gc, &week_view->colors[E_WEEK_VIEW_COLOR_TODAY]);
+			today = TRUE;
+		}
 		else
 			gdk_gc_set_foreground (gc, &week_view->colors[E_WEEK_VIEW_COLOR_DATES]);
 	} else {
 		gdk_gc_set_foreground (gc, &week_view->colors[E_WEEK_VIEW_COLOR_DATES]);
 	}
 
-	g_date_strftime (buffer, sizeof (buffer),
-			 format_string ? format_string : "%d", date);
+	if (today) {
+		g_date_strftime (buffer, sizeof (buffer),
+				 format_string ? format_string : "<b>%d</b>", date);
+		layout = gtk_widget_create_pango_layout (GTK_WIDGET (week_view), buffer);
+		pango_layout_set_markup (layout, buffer, strlen(buffer));	
+	} else {
+		g_date_strftime (buffer, sizeof (buffer),
+				 format_string ? format_string : "%d", date);
+		layout = gtk_widget_create_pango_layout (GTK_WIDGET (week_view), buffer);	
+	}
 
-	layout = gtk_widget_create_pango_layout (GTK_WIDGET (week_view), buffer);
 	pango_layout_get_pixel_size (layout, &date_width, NULL);
 	date_x = x + width - date_width - E_WEEK_VIEW_DATE_R_PAD;
 	date_x = MAX (date_x, x + 1);
Index: gnome-cal.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/gnome-cal.c,v
retrieving revision 1.393
diff -u -p -r1.393 gnome-cal.c
--- gnome-cal.c	26 Nov 2005 02:31:49 -0000	1.393
+++ gnome-cal.c	12 Jan 2006 07:06:20 -0000
@@ -1774,7 +1774,8 @@ void
 gnome_calendar_goto (GnomeCalendar *gcal, time_t new_time)
 {
 	GnomeCalendarPrivate *priv;
-	
+	int i;
+
 	g_return_if_fail (gcal != NULL);
 	g_return_if_fail (GNOME_IS_CALENDAR (gcal));
 	g_return_if_fail (new_time != -1);
@@ -1784,6 +1785,11 @@ gnome_calendar_goto (GnomeCalendar *gcal
 	update_view_times (gcal, new_time);
 	gnome_calendar_update_date_navigator (gcal);
 	gnome_calendar_notify_dates_shown_changed (gcal);
+	
+	for (i = 0; i < GNOME_CAL_LAST_VIEW; i++) {
+		if (E_CALENDAR_VIEW_CLASS (G_OBJECT_GET_CLASS (priv->views[i]))->set_selected_time_range) 
+			E_CALENDAR_VIEW_CLASS (G_OBJECT_GET_CLASS (priv->views[i]))->set_selected_time_range (priv->views[i], new_time, new_time);
+	}		
 }
 
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]