aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-tree-model.c
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/table/e-tree-model.c')
-rw-r--r--widgets/table/e-tree-model.c114
1 files changed, 71 insertions, 43 deletions
diff --git a/widgets/table/e-tree-model.c b/widgets/table/e-tree-model.c
index ed15f28f8c..9b205bbc51 100644
--- a/widgets/table/e-tree-model.c
+++ b/widgets/table/e-tree-model.c
@@ -53,6 +53,7 @@ enum {
NODE_INSERTED,
NODE_REMOVED,
NODE_DELETED,
+ NODE_REQUEST_COLLAPSE,
LAST_SIGNAL
};
@@ -130,51 +131,60 @@ e_tree_model_class_init (GtkObjectClass *klass)
gtk_marshal_NONE__POINTER,
GTK_TYPE_NONE, 1, GTK_TYPE_POINTER);
+ e_tree_model_signals [NODE_REQUEST_COLLAPSE] =
+ gtk_signal_new ("node_request_collapse",
+ GTK_RUN_LAST,
+ E_OBJECT_CLASS_TYPE (klass),
+ GTK_SIGNAL_OFFSET (ETreeModelClass, node_request_collapse),
+ gtk_marshal_NONE__POINTER,
+ GTK_TYPE_NONE, 1, GTK_TYPE_POINTER);
+
E_OBJECT_CLASS_ADD_SIGNALS (klass, e_tree_model_signals, LAST_SIGNAL);
- tree_class->get_root = NULL;
-
- tree_class->get_parent = NULL;
- tree_class->get_first_child = NULL;
- tree_class->get_last_child = NULL;
- tree_class->get_next = NULL;
- tree_class->get_prev = NULL;
-
- tree_class->is_root = NULL;
- tree_class->is_expandable = NULL;
- tree_class->get_children = NULL;
- tree_class->depth = NULL;
-
- tree_class->icon_at = NULL;
-
- tree_class->get_expanded_default = NULL;
- tree_class->column_count = NULL;
-
- tree_class->has_save_id = NULL;
- tree_class->get_save_id = NULL;
- tree_class->has_get_node_by_id = NULL;
- tree_class->get_node_by_id = NULL;
-
- tree_class->has_change_pending = NULL;
-
- tree_class->value_at = NULL;
- tree_class->set_value_at = NULL;
- tree_class->is_editable = NULL;
-
- tree_class->duplicate_value = NULL;
- tree_class->free_value = NULL;
- tree_class->initialize_value = NULL;
- tree_class->value_is_empty = NULL;
- tree_class->value_to_string = NULL;
-
- tree_class->pre_change = NULL;
- tree_class->no_change = NULL;
- tree_class->node_changed = NULL;
- tree_class->node_data_changed = NULL;
- tree_class->node_col_changed = NULL;
- tree_class->node_inserted = NULL;
- tree_class->node_removed = NULL;
- tree_class->node_deleted = NULL;
+ tree_class->get_root = NULL;
+
+ tree_class->get_parent = NULL;
+ tree_class->get_first_child = NULL;
+ tree_class->get_last_child = NULL;
+ tree_class->get_next = NULL;
+ tree_class->get_prev = NULL;
+
+ tree_class->is_root = NULL;
+ tree_class->is_expandable = NULL;
+ tree_class->get_children = NULL;
+ tree_class->depth = NULL;
+
+ tree_class->icon_at = NULL;
+
+ tree_class->get_expanded_default = NULL;
+ tree_class->column_count = NULL;
+
+ tree_class->has_save_id = NULL;
+ tree_class->get_save_id = NULL;
+ tree_class->has_get_node_by_id = NULL;
+ tree_class->get_node_by_id = NULL;
+
+ tree_class->has_change_pending = NULL;
+
+ tree_class->value_at = NULL;
+ tree_class->set_value_at = NULL;
+ tree_class->is_editable = NULL;
+
+ tree_class->duplicate_value = NULL;
+ tree_class->free_value = NULL;
+ tree_class->initialize_value = NULL;
+ tree_class->value_is_empty = NULL;
+ tree_class->value_to_string = NULL;
+
+ tree_class->pre_change = NULL;
+ tree_class->no_change = NULL;
+ tree_class->node_changed = NULL;
+ tree_class->node_data_changed = NULL;
+ tree_class->node_col_changed = NULL;
+ tree_class->node_inserted = NULL;
+ tree_class->node_removed = NULL;
+ tree_class->node_deleted = NULL;
+ tree_class->node_request_collapse = NULL;
}
static void
@@ -340,6 +350,24 @@ e_tree_model_node_deleted (ETreeModel *tree_model, ETreePath deleted_node)
deleted_node);
}
+/**
+ * e_tree_model_node_request_collapse:
+ * @tree_model:
+ * @collapsed_node:
+ *
+ *
+ **/
+void
+e_tree_model_node_request_collapse (ETreeModel *tree_model, ETreePath collapsed_node)
+{
+ g_return_if_fail (tree_model != NULL);
+ g_return_if_fail (E_IS_TREE_MODEL (tree_model));
+
+ gtk_signal_emit (GTK_OBJECT (tree_model),
+ e_tree_model_signals [NODE_REQUEST_COLLAPSE],
+ collapsed_node);
+}
+
/**