diff options
author | Christopher James Lahey <clahey@ximian.com> | 2001-09-25 11:19:26 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2001-09-25 11:19:26 +0800 |
commit | 78dc7a128a3f11fc1590e8b95a1017171b0c7f2a (patch) | |
tree | 40cb3dbb1109425a7ec0aaa493cfc7183dadc383 /widgets/table/e-tree-selection-model.c | |
parent | 917de6bd879b9463be724f58c10c9a9e986e59ad (diff) | |
download | gsoc2013-evolution-78dc7a128a3f11fc1590e8b95a1017171b0c7f2a.tar.gz gsoc2013-evolution-78dc7a128a3f11fc1590e8b95a1017171b0c7f2a.tar.zst gsoc2013-evolution-78dc7a128a3f11fc1590e8b95a1017171b0c7f2a.zip |
Attach to the resorted signal instead of the changed signal on the sorted
2001-09-24 Christopher James Lahey <clahey@ximian.com>
* e-tree-selection-model.c (etsm_sorted_node_resorted): Attach to
the resorted signal instead of the changed signal on the sorted
model.
* e-tree-sorted.c, e-tree-sorted.h (e_tree_sorted_node_resorted):
Added this signal.
svn path=/trunk/; revision=13108
Diffstat (limited to 'widgets/table/e-tree-selection-model.c')
-rw-r--r-- | widgets/table/e-tree-selection-model.c | 78 |
1 files changed, 7 insertions, 71 deletions
diff --git a/widgets/table/e-tree-selection-model.c b/widgets/table/e-tree-selection-model.c index 282e0bfb49..d7dcb7b648 100644 --- a/widgets/table/e-tree-selection-model.c +++ b/widgets/table/e-tree-selection-model.c @@ -63,12 +63,7 @@ struct ETreeSelectionModelPriv { int tree_model_node_inserted_id; int tree_model_node_removed_id; - int sorted_model_pre_change_id; - int sorted_model_node_changed_id; - int sorted_model_node_data_changed_id; - int sorted_model_node_col_changed_id; - int sorted_model_node_inserted_id; - int sorted_model_node_removed_id; + int sorted_model_node_resorted_id; }; /* ETreeSelectionModelNode helpers */ @@ -419,14 +414,8 @@ etsm_node_removed (ETreeModel *etm, ETreePath parent, ETreePath child, int old_p } - static void -etsm_sorted_pre_change (ETreeModel *etm, ETreeSelectionModel *etsm) -{ -} - -static void -etsm_sorted_node_changed (ETreeModel *etm, ETreePath node, ETreeSelectionModel *etsm) +etsm_sorted_node_resorted (ETreeModel *etm, ETreePath node, ETreeSelectionModel *etsm) { int cursor_row = etsm_cursor_row_real (etsm); e_selection_model_selection_changed(E_SELECTION_MODEL(etsm)); @@ -438,29 +427,6 @@ etsm_sorted_node_changed (ETreeModel *etm, ETreePath node, ETreeSelectionModel * } static void -etsm_sorted_node_data_changed (ETreeModel *etm, ETreePath node, ETreeSelectionModel *etsm) -{ -} - -static void -etsm_sorted_node_col_changed (ETreeModel *etm, ETreePath node, int col, ETreeSelectionModel *etsm) -{ -} - -static void -etsm_sorted_node_inserted (ETreeModel *etm, ETreePath parent, ETreePath child, ETreeSelectionModel *etsm) -{ - etsm_sorted_node_changed(etm, parent, etsm); -} - -static void -etsm_sorted_node_removed (ETreeModel *etm, ETreePath parent, ETreePath child, int old_position, ETreeSelectionModel *etsm) -{ - etsm_sorted_node_changed(etm, parent, etsm); -} - - -static void add_model(ETreeSelectionModel *etsm, ETreeModel *model) { ETreeSelectionModelPriv *priv = etsm->priv; @@ -529,18 +495,8 @@ add_ets(ETreeSelectionModel *etsm, ETreeSorted *ets) return; gtk_object_ref(GTK_OBJECT(priv->ets)); - priv->sorted_model_pre_change_id = gtk_signal_connect (GTK_OBJECT (priv->ets), "pre_change", - GTK_SIGNAL_FUNC (etsm_sorted_pre_change), etsm); - priv->sorted_model_node_changed_id = gtk_signal_connect (GTK_OBJECT (priv->ets), "node_changed", - GTK_SIGNAL_FUNC (etsm_sorted_node_changed), etsm); - priv->sorted_model_node_data_changed_id = gtk_signal_connect (GTK_OBJECT (priv->ets), "node_data_changed", - GTK_SIGNAL_FUNC (etsm_sorted_node_data_changed), etsm); - priv->sorted_model_node_col_changed_id = gtk_signal_connect (GTK_OBJECT (priv->ets), "node_col_changed", - GTK_SIGNAL_FUNC (etsm_sorted_node_col_changed), etsm); - priv->sorted_model_node_inserted_id = gtk_signal_connect (GTK_OBJECT (priv->ets), "node_inserted", - GTK_SIGNAL_FUNC (etsm_sorted_node_inserted), etsm); - priv->sorted_model_node_removed_id = gtk_signal_connect (GTK_OBJECT (priv->ets), "node_removed", - GTK_SIGNAL_FUNC (etsm_sorted_node_removed), etsm); + priv->sorted_model_node_resorted_id = gtk_signal_connect (GTK_OBJECT (priv->ets), "node_resorted", + GTK_SIGNAL_FUNC (etsm_sorted_node_resorted), etsm); } static void @@ -552,27 +508,12 @@ drop_ets(ETreeSelectionModel *etsm) return; gtk_signal_disconnect (GTK_OBJECT (priv->ets), - priv->sorted_model_pre_change_id); - gtk_signal_disconnect (GTK_OBJECT (priv->ets), - priv->sorted_model_node_changed_id); - gtk_signal_disconnect (GTK_OBJECT (priv->ets), - priv->sorted_model_node_data_changed_id); - gtk_signal_disconnect (GTK_OBJECT (priv->ets), - priv->sorted_model_node_col_changed_id); - gtk_signal_disconnect (GTK_OBJECT (priv->ets), - priv->sorted_model_node_inserted_id); - gtk_signal_disconnect (GTK_OBJECT (priv->ets), - priv->sorted_model_node_removed_id); + priv->sorted_model_node_resorted_id); gtk_object_unref (GTK_OBJECT (priv->ets)); priv->ets = NULL; - priv->sorted_model_pre_change_id = 0; - priv->sorted_model_node_changed_id = 0; - priv->sorted_model_node_data_changed_id = 0; - priv->sorted_model_node_col_changed_id = 0; - priv->sorted_model_node_inserted_id = 0; - priv->sorted_model_node_removed_id = 0; + priv->sorted_model_node_resorted_id = 0; } /* Virtual functions */ @@ -1235,12 +1176,7 @@ e_tree_selection_model_init (ETreeSelectionModel *etsm) priv->tree_model_node_inserted_id = 0; priv->tree_model_node_removed_id = 0; - priv->sorted_model_pre_change_id = 0; - priv->sorted_model_node_changed_id = 0; - priv->sorted_model_node_data_changed_id = 0; - priv->sorted_model_node_col_changed_id = 0; - priv->sorted_model_node_inserted_id = 0; - priv->sorted_model_node_removed_id = 0; + priv->sorted_model_node_resorted_id = 0; } static void |