aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/e-meeting-time-sel.c5
-rw-r--r--calendar/gui/e-task-table.c22
-rw-r--r--calendar/gui/e-week-view.c10
-rw-r--r--calendar/gui/gnome-cal.c5
4 files changed, 32 insertions, 10 deletions
diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c
index 9bea92f2dc..3caf71795d 100644
--- a/calendar/gui/e-meeting-time-sel.c
+++ b/calendar/gui/e-meeting-time-sel.c
@@ -47,6 +47,7 @@
struct _EMeetingTimeSelectorPrivate {
gboolean use_24_hour_format;
+ gulong notify_free_busy_template_id;
};
/* An array of hour strings for 24 hour time, "0:00" .. "23:00". */
@@ -251,6 +252,8 @@ meeting_time_selector_dispose (GObject *object)
g_signal_handlers_disconnect_matched (
mts->model, G_SIGNAL_MATCH_DATA,
0, 0, NULL, NULL, mts);
+ e_signal_disconnect_notify_handler (mts->model, &mts->priv->notify_free_busy_template_id);
+
g_object_unref (mts->model);
mts->model = NULL;
}
@@ -396,7 +399,7 @@ e_meeting_time_selector_construct (EMeetingTimeSelector *mts,
if (mts->model)
g_object_ref (mts->model);
- e_signal_connect_notify_swapped (
+ mts->priv->notify_free_busy_template_id = e_signal_connect_notify_swapped (
mts->model, "notify::free-busy-template",
G_CALLBACK (free_busy_template_changed_cb), mts);
diff --git a/calendar/gui/e-task-table.c b/calendar/gui/e-task-table.c
index 10184ef725..0370997c32 100644
--- a/calendar/gui/e-task-table.c
+++ b/calendar/gui/e-task-table.c
@@ -58,6 +58,11 @@ struct _ETaskTablePrivate {
GtkTargetList *copy_target_list;
GtkTargetList *paste_target_list;
+
+ gulong notify_highlight_due_today_id;
+ gulong notify_color_due_today_id;
+ gulong notify_highlight_overdue_id;
+ gulong notify_color_overdue_id;
};
enum {
@@ -315,26 +320,25 @@ task_table_set_model (ETaskTable *task_table,
task_table);
/* redraw on drawing options change */
- e_signal_connect_notify (
+ task_table->priv->notify_highlight_due_today_id = e_signal_connect_notify (
model, "notify::highlight-due-today",
G_CALLBACK (task_table_queue_draw_cb),
task_table);
- e_signal_connect_notify (
+ task_table->priv->notify_color_due_today_id = e_signal_connect_notify (
model, "notify::color-due-today",
G_CALLBACK (task_table_queue_draw_cb),
task_table);
- e_signal_connect_notify (
+ task_table->priv->notify_highlight_overdue_id = e_signal_connect_notify (
model, "notify::highlight-overdue",
G_CALLBACK (task_table_queue_draw_cb),
task_table);
- e_signal_connect_notify (
+ task_table->priv->notify_color_overdue_id = e_signal_connect_notify (
model, "notify::color-overdue",
G_CALLBACK (task_table_queue_draw_cb),
task_table);
-
}
static void
@@ -428,7 +432,13 @@ task_table_dispose (GObject *object)
}
if (priv->model != NULL) {
- g_signal_handlers_disconnect_by_func (priv->model, task_table_queue_draw_cb, object);
+ g_signal_handlers_disconnect_by_data (priv->model, object);
+
+ e_signal_disconnect_notify_handler (priv->model, &priv->notify_highlight_due_today_id);
+ e_signal_disconnect_notify_handler (priv->model, &priv->notify_color_due_today_id);
+ e_signal_disconnect_notify_handler (priv->model, &priv->notify_highlight_overdue_id);
+ e_signal_disconnect_notify_handler (priv->model, &priv->notify_color_overdue_id);
+
g_object_unref (priv->model);
priv->model = NULL;
}
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index 21ec0229f4..f3343d9e5d 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -102,6 +102,8 @@ struct _EWeekViewPrivate {
* week_start_day, but if the Sat & Sun are compressed and the
* week starts on Sunday then we have to use Saturday. */
GDateWeekday display_start_day;
+
+ gulong notify_week_start_day_id;
};
typedef struct {
@@ -724,8 +726,10 @@ week_view_dispose (GObject *object)
e_week_view_cancel_layout (week_view);
- if (model)
+ if (model) {
g_signal_handlers_disconnect_by_data (model, object);
+ e_signal_disconnect_notify_handler (model, &week_view->priv->notify_week_start_day_id);
+ }
if (week_view->events) {
e_week_view_free_events (week_view);
@@ -761,18 +765,20 @@ week_view_dispose (GObject *object)
static void
week_view_constructed (GObject *object)
{
+ EWeekView *week_view;
ECalModel *model;
ECalendarView *calendar_view;
/* Chain up to parent's constructed() method. */
G_OBJECT_CLASS (e_week_view_parent_class)->constructed (object);
+ week_view = E_WEEK_VIEW (object);
calendar_view = E_CALENDAR_VIEW (object);
model = e_calendar_view_get_model (calendar_view);
e_week_view_recalc_display_start_day (E_WEEK_VIEW (object));
- e_signal_connect_notify_swapped (
+ week_view->priv->notify_week_start_day_id = e_signal_connect_notify_swapped (
model, "notify::week-start-day",
G_CALLBACK (week_view_notify_week_start_day_cb), object);
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index 58877dc87d..dd89119c72 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -123,6 +123,8 @@ struct _GnomeCalendarPrivate {
gboolean lview_select_daten_range;
GCancellable *cancellable;
+
+ gulong notify_week_start_day_id;
};
struct _ViewData {
@@ -591,7 +593,7 @@ gnome_calendar_constructed (GObject *object)
calendar_view, "selection-changed",
G_CALLBACK (view_selection_changed_cb), gcal);
- e_signal_connect_notify_swapped (
+ gcal->priv->notify_week_start_day_id = e_signal_connect_notify_swapped (
model, "notify::week-start-day",
G_CALLBACK (gnome_calendar_notify_week_start_day_cb), gcal);
@@ -1575,6 +1577,7 @@ gnome_calendar_do_dispose (GObject *object)
if (priv->model != NULL) {
g_signal_handlers_disconnect_by_data (priv->model, object);
+ e_signal_disconnect_notify_handler (priv->model, &priv->notify_week_start_day_id);
g_object_unref (priv->model);
priv->model = NULL;
}