diff options
author | Srinivasa Ragavan <sragavan@novell.com> | 2006-01-13 17:12:59 +0800 |
---|---|---|
committer | Srinivasa Ragavan <sragavan@src.gnome.org> | 2006-01-13 17:12:59 +0800 |
commit | 1e2901cd509edbbe74b5effd5c44a7570100ca85 (patch) | |
tree | de147a7643c3527f5253a78b610318b11004d722 /calendar/gui/e-week-view-main-item.c | |
parent | bc8ab923cec3f385e3641dc19278d2ce288d41a7 (diff) | |
download | gsoc2013-evolution-1e2901cd509edbbe74b5effd5c44a7570100ca85.tar.gz gsoc2013-evolution-1e2901cd509edbbe74b5effd5c44a7570100ca85.tar.zst gsoc2013-evolution-1e2901cd509edbbe74b5effd5c44a7570100ca85.zip |
** Fixes bug #274234
2006-01-13 Srinivasa Ragavan <sragavan@novell.com>
** Fixes bug #274234
* gui/e-week-view-main-item.c: (e_week_view_main_item_draw_day): Bolds
the date if drawing Today.
* gui/gnome-cal.c (gnome_calendar_goto)
(gnome_calendar_on_date_navigator_selection_changed): Call the parent
views to update the selection.
svn path=/trunk/; revision=31158
Diffstat (limited to 'calendar/gui/e-week-view-main-item.c')
-rw-r--r-- | calendar/gui/e-week-view-main-item.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/calendar/gui/e-week-view-main-item.c b/calendar/gui/e-week-view-main-item.c index e33ec66e3f..06669b5ecb 100644 --- a/calendar/gui/e-week-view-main-item.c +++ b/calendar/gui/e-week-view-main-item.c @@ -210,6 +210,7 @@ e_week_view_main_item_draw_day (EWeekViewMainItem *wvmitem, 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 (EWeekViewMainItem *wvmitem, 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); |