aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@helixcode.com>2000-11-08 05:43:28 +0800
committerFederico Mena Quintero <federico@src.gnome.org>2000-11-08 05:43:28 +0800
commit13ef654ef7766db0bd74945607279ec56e49863d (patch)
tree56cb53b024607bb1dff8bdabef6abe4faf3411fd /calendar
parent35a8813a4800909bc39ba284e79db08ae1fa2d11 (diff)
downloadgsoc2013-evolution-13ef654ef7766db0bd74945607279ec56e49863d.tar
gsoc2013-evolution-13ef654ef7766db0bd74945607279ec56e49863d.tar.gz
gsoc2013-evolution-13ef654ef7766db0bd74945607279ec56e49863d.tar.bz2
gsoc2013-evolution-13ef654ef7766db0bd74945607279ec56e49863d.tar.lz
gsoc2013-evolution-13ef654ef7766db0bd74945607279ec56e49863d.tar.xz
gsoc2013-evolution-13ef654ef7766db0bd74945607279ec56e49863d.tar.zst
gsoc2013-evolution-13ef654ef7766db0bd74945607279ec56e49863d.zip
Added a "changed" signal to notify of changes to the set of selected days.
2000-11-07 Federico Mena Quintero <federico@helixcode.com> * gui/weekday-picker.h (WeekdayPickerClass): Added a "changed" signal to notify of changes to the set of selected days. * gui/weekday-picker.c (weekday_picker_class_init): Create the "changed" signal. (weekday_picker_set_days): Emit the "changed" signal. svn path=/trunk/; revision=6487
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog9
-rw-r--r--calendar/gui/weekday-picker.c23
-rw-r--r--calendar/gui/weekday-picker.h2
3 files changed, 33 insertions, 1 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index a7616b3728..8a79a0a802 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,12 @@
+2000-11-07 Federico Mena Quintero <federico@helixcode.com>
+
+ * gui/weekday-picker.h (WeekdayPickerClass): Added a "changed"
+ signal to notify of changes to the set of selected days.
+
+ * gui/weekday-picker.c (weekday_picker_class_init): Create the
+ "changed" signal.
+ (weekday_picker_set_days): Emit the "changed" signal.
+
2000-11-06 Jesse Pavel <jpavel@helixcode.com>
*gui/e-itip-control.c, gui/e-itip-control.glade: changed to GUI to
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);