aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-calendar-view.c
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@ximian.com>2003-10-23 18:48:12 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2003-10-23 18:48:12 +0800
commit2c1e34fa853d10da883be5923ec207fc85dcd8b0 (patch)
treecb6219661392a9f7b298beb6dafaaf166a961507 /calendar/gui/e-calendar-view.c
parentccef3fc1c71d520ee8c14cff5ee3bf1f0ba74401 (diff)
downloadgsoc2013-evolution-2c1e34fa853d10da883be5923ec207fc85dcd8b0.tar.gz
gsoc2013-evolution-2c1e34fa853d10da883be5923ec207fc85dcd8b0.tar.zst
gsoc2013-evolution-2c1e34fa853d10da883be5923ec207fc85dcd8b0.zip
connect also to ETableModel's "model_cell_changed" signal.
2003-10-23 Rodrigo Moya <rodrigo@ximian.com> * gui/e-cal-view.c (e_cal_view_init): connect also to ETableModel's "model_cell_changed" signal. (e_cal_view_set_model): likewise. (model_cell_changed_cb): callback for "model_cell_changed". (e_cal_view_destroy): use g_signal_handlers_disconnect_matched instead of g_signal_handlers_disconnect_by_func, so that all handlers are disconnected. svn path=/trunk/; revision=23029
Diffstat (limited to 'calendar/gui/e-calendar-view.c')
-rw-r--r--calendar/gui/e-calendar-view.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c
index 869c8001a3..a95f976d21 100644
--- a/calendar/gui/e-calendar-view.c
+++ b/calendar/gui/e-calendar-view.c
@@ -234,6 +234,14 @@ model_row_changed_cb (ETableModel *etm, int row, gpointer user_data)
}
static void
+model_cell_changed_cb (ETableModel *etm, int col, int row, gpointer user_data)
+{
+ ECalView *cal_view = E_CAL_VIEW (user_data);
+
+ e_cal_view_update_query (cal_view);
+}
+
+static void
model_rows_changed_cb (ETableModel *etm, int row, int count, gpointer user_data)
{
ECalView *cal_view = E_CAL_VIEW (user_data);
@@ -391,6 +399,8 @@ e_cal_view_init (ECalView *cal_view, ECalViewClass *klass)
G_CALLBACK (model_changed_cb), cal_view);
g_signal_connect (G_OBJECT (cal_view->priv->model), "model_row_changed",
G_CALLBACK (model_row_changed_cb), cal_view);
+ g_signal_connect (G_OBJECT (cal_view->priv->model), "model_cell_changed",
+ G_CALLBACK (model_cell_changed_cb), cal_view);
g_signal_connect (G_OBJECT (cal_view->priv->model), "model_rows_inserted",
G_CALLBACK (model_rows_changed_cb), cal_view);
g_signal_connect (G_OBJECT (cal_view->priv->model), "model_rows_deleted",
@@ -421,7 +431,9 @@ e_cal_view_destroy (GtkObject *object)
if (cal_view->priv) {
if (cal_view->priv->model) {
- g_signal_handlers_disconnect_by_func (cal_view->priv->model, model_changed_cb, cal_view);
+ g_signal_handlers_disconnect_matched (cal_view->priv->model,
+ G_SIGNAL_MATCH_DATA,
+ 0, 0, NULL, NULL, cal_view);
g_object_unref (cal_view->priv->model);
cal_view->priv->model = NULL;
}
@@ -497,6 +509,7 @@ e_cal_view_set_model (ECalView *cal_view, ECalModel *model)
g_object_ref (cal_view->priv->model);
g_signal_connect (G_OBJECT (cal_view->priv->model), "model_changed", G_CALLBACK (model_changed_cb), cal_view);
g_signal_connect (G_OBJECT (cal_view->priv->model), "model_row_changed", G_CALLBACK (model_row_changed_cb), cal_view);
+ g_signal_connect (G_OBJECT (cal_view->priv->model), "model_cell_changed", G_CALLBACK (model_cell_changed_cb), cal_view);
g_signal_connect (G_OBJECT (cal_view->priv->model), "model_rows_inserted", G_CALLBACK (model_rows_changed_cb), cal_view);
g_signal_connect (G_OBJECT (cal_view->priv->model), "model_rows_deleted", G_CALLBACK (model_rows_changed_cb), cal_view);