aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/weekday-picker.c23
-rw-r--r--calendar/gui/weekday-picker.h2
2 files changed, 24 insertions, 1 deletions
diff --git a/calendar/gui/weekday-picker.c b/calendar/gui/weekday-picker.c
index a9a0d50c7c..8ebcf1d970 100644
--- a/calendar/gui/weekday-picker.c
+++ b/calendar/gui/weekday-picker.c
@@ -52,6 +52,12 @@ struct _WeekdayPickerPrivate {
+/* Signal IDs */
+enum {
+ CHANGED,
+ LAST_SIGNAL
+};
+
static void weekday_picker_class_init (WeekdayPickerClass *class);
static void weekday_picker_init (WeekdayPicker *wp);
static void weekday_picker_finalize (GtkObject *object);
@@ -63,6 +69,8 @@ static void weekday_picker_style_set (GtkWidget *widget, GtkStyle *previous_styl
static GnomeCanvasClass *parent_class;
+static guint wp_signals[LAST_SIGNAL];
+
/**
@@ -108,12 +116,24 @@ weekday_picker_class_init (WeekdayPickerClass *class)
parent_class = gtk_type_class (GNOME_TYPE_CANVAS);
+ wp_signals[CHANGED] =
+ gtk_signal_new ("changed",
+ GTK_RUN_FIRST,
+ object_class->type,
+ GTK_SIGNAL_OFFSET (WeekdayPickerClass, changed),
+ gtk_marshal_NONE__NONE,
+ GTK_TYPE_NONE, 0);
+
+ gtk_object_class_add_signals (object_class, wp_signals, LAST_SIGNAL);
+
object_class->finalize = weekday_picker_finalize;
widget_class->realize = weekday_picker_realize;
widget_class->size_request = weekday_picker_size_request;
widget_class->size_allocate = weekday_picker_size_allocate;
widget_class->style_set = weekday_picker_style_set;
+
+ class->changed = NULL;
}
/* Event handler for the day items */
@@ -187,7 +207,6 @@ create_items (WeekdayPicker *wp)
gtk_signal_connect (GTK_OBJECT (priv->labels[i]), "event",
GTK_SIGNAL_FUNC (day_event_cb),
wp);
-
}
}
@@ -470,6 +489,8 @@ weekday_picker_set_days (WeekdayPicker *wp, guint8 day_mask)
priv->day_mask = day_mask;
colorize_items (wp);
+
+ gtk_signal_emit (GTK_OBJECT (wp), wp_signals[CHANGED]);
}
/**
diff --git a/calendar/gui/weekday-picker.h b/calendar/gui/weekday-picker.h
index df053a1f6f..cd24bb86e4 100644
--- a/calendar/gui/weekday-picker.h
+++ b/calendar/gui/weekday-picker.h
@@ -49,6 +49,8 @@ struct _WeekdayPicker {
struct _WeekdayPickerClass {
GnomeCanvasClass parent_class;
+
+ void (* changed) (WeekdayPicker *wp);
};
GtkType weekday_picker_get_type (void);