aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@nuclecu.unam.mx>1998-04-02 16:10:50 +0800
committerArturo Espinosa <unammx@src.gnome.org>1998-04-02 16:10:50 +0800
commitd4f096e0ca0ec461d5ab7a3369aaa95480561d92 (patch)
treeb20d04d47a4e57825d53074c07067b887ab4ed17 /calendar
parentf865d886f5aae9279d44f726a0b8093316a40e09 (diff)
downloadgsoc2013-evolution-d4f096e0ca0ec461d5ab7a3369aaa95480561d92.tar
gsoc2013-evolution-d4f096e0ca0ec461d5ab7a3369aaa95480561d92.tar.gz
gsoc2013-evolution-d4f096e0ca0ec461d5ab7a3369aaa95480561d92.tar.bz2
gsoc2013-evolution-d4f096e0ca0ec461d5ab7a3369aaa95480561d92.tar.lz
gsoc2013-evolution-d4f096e0ca0ec461d5ab7a3369aaa95480561d92.tar.xz
gsoc2013-evolution-d4f096e0ca0ec461d5ab7a3369aaa95480561d92.tar.zst
gsoc2013-evolution-d4f096e0ca0ec461d5ab7a3369aaa95480561d92.zip
New customization function. We can't decide on a stupid border type :-)
1998-04-02 Federico Mena Quintero <federico@nuclecu.unam.mx> * gncal-day-view.c (gncal_day_view_set_shadow): New customization function. We can't decide on a stupid border type :-) (gncal_day_view_init): Made GTK_SHADOW_ETCHED_IN be the default shadow type. Looks good. svn path=/trunk/; revision=94
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog7
-rw-r--r--calendar/gncal-day-view.c17
-rw-r--r--calendar/gncal-day-view.h4
-rw-r--r--calendar/gui/gncal-day-view.c17
-rw-r--r--calendar/gui/gncal-day-view.h4
5 files changed, 47 insertions, 2 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 396f5d2a83..045ee929d9 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,10 @@
+1998-04-02 Federico Mena Quintero <federico@nuclecu.unam.mx>
+
+ * gncal-day-view.c (gncal_day_view_set_shadow): New customization
+ function. We can't decide on a stupid border type :-)
+ (gncal_day_view_init): Made GTK_SHADOW_ETCHED_IN be the default
+ shadow type. Looks good.
+
1998-04-02 Miguel de Icaza <miguel@nuclecu.unam.mx>
* main.c: New main program that uses our new datatypes and
diff --git a/calendar/gncal-day-view.c b/calendar/gncal-day-view.c
index aae6107b98..ce0b363c62 100644
--- a/calendar/gncal-day-view.c
+++ b/calendar/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/gncal-day-view.h b/calendar/gncal-day-view.h
index c10c0c78f8..e17eabcab7 100644
--- a/calendar/gncal-day-view.h
+++ b/calendar/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
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