diff options
Diffstat (limited to 'calendar/gui')
-rw-r--r-- | calendar/gui/gncal-day-view.c | 17 | ||||
-rw-r--r-- | calendar/gui/gncal-day-view.h | 4 |
2 files changed, 20 insertions, 1 deletions
diff --git a/calendar/gui/gncal-day-view.c b/calendar/gui/gncal-day-view.c index aae6107b98..ce0b363c62 100644 --- a/calendar/gui/gncal-day-view.c +++ b/calendar/gui/gncal-day-view.c @@ -77,6 +77,8 @@ gncal_day_view_init (GncalDayView *dview) dview->lower = 0; dview->upper = 0; + + dview->shadow_type = GTK_SHADOW_ETCHED_IN; } static void @@ -202,7 +204,7 @@ gncal_day_view_expose (GtkWidget *widget, GdkEventExpose *event) event->area.width, event->area.height); gtk_draw_shadow (widget->style, widget->window, - GTK_STATE_NORMAL, GTK_SHADOW_IN, + GTK_STATE_NORMAL, dview->shadow_type, 0, 0, widget->allocation.width, widget->allocation.height); @@ -305,3 +307,16 @@ gncal_day_view_set_bounds (GncalDayView *dview, time_t lower, time_t upper) gncal_day_view_update (dview); } } + +void +gncal_day_view_set_shadow (GncalDayView *dview, GtkShadowType shadow_type) +{ + g_return_if_fail (dview != NULL); + g_return_if_fail (GNCAL_IS_DAY_VIEW (dview)); + + if (shadow_type != dview->shadow_type) { + dview->shadow_type = shadow_type; + + gtk_widget_draw (GTK_WIDGET (dview), NULL); + } +} diff --git a/calendar/gui/gncal-day-view.h b/calendar/gui/gncal-day-view.h index c10c0c78f8..e17eabcab7 100644 --- a/calendar/gui/gncal-day-view.h +++ b/calendar/gui/gncal-day-view.h @@ -34,6 +34,8 @@ struct _GncalDayView { time_t upper; char *day_str; /* what day is it? */ + + GtkShadowType shadow_type; }; struct _GncalDayViewClass { @@ -47,6 +49,8 @@ GtkWidget *gncal_day_view_new (Calendar *calendar, time_t lower, time_t void gncal_day_view_update (GncalDayView *dview); void gncal_day_view_set_bounds (GncalDayView *dview, time_t lower, time_t upper); +void gncal_day_view_set_shadow (GncalDayView *dview, GtkShadowType shadow_type); + END_GNOME_DECLS |