aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-table-group-container.c
diff options
context:
space:
mode:
Diffstat (limited to 'e-util/e-table-group-container.c')
-rw-r--r--e-util/e-table-group-container.c29
1 files changed, 28 insertions, 1 deletions
diff --git a/e-util/e-table-group-container.c b/e-util/e-table-group-container.c
index 72fee11c26..fece704449 100644
--- a/e-util/e-table-group-container.c
+++ b/e-util/e-table-group-container.c
@@ -60,7 +60,8 @@ enum {
PROP_CURSOR_MODE,
PROP_SELECTION_MODEL,
PROP_LENGTH_THRESHOLD,
- PROP_UNIFORM_ROW_HEIGHT
+ PROP_UNIFORM_ROW_HEIGHT,
+ PROP_IS_EDITING
};
static EPrintable *
@@ -992,6 +993,9 @@ etgc_get_property (GObject *object,
case PROP_UNIFORM_ROW_HEIGHT:
g_value_set_boolean (value, etgc->uniform_row_height);
break;
+ case PROP_IS_EDITING:
+ g_value_set_boolean (value, e_table_group_container_is_editing (etgc));
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
@@ -1148,6 +1152,11 @@ e_table_group_container_class_init (ETableGroupContainerClass *class)
"Minimum Width",
0.0, G_MAXDOUBLE, 0.0,
G_PARAM_READWRITE));
+
+ g_object_class_override_property (
+ object_class,
+ PROP_IS_EDITING,
+ "is-editing");
}
static void
@@ -1666,3 +1675,21 @@ etgc_get_printable (ETableGroup *etg)
return printable;
}
+
+gboolean
+e_table_group_container_is_editing (ETableGroupContainer *etgc)
+{
+ GList *list;
+
+ g_return_val_if_fail (E_IS_TABLE_GROUP_CONTAINER (etgc), FALSE);
+
+ for (list = etgc->children; list; list = g_list_next (list)) {
+ ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *) list->data;
+
+ if (e_table_group_is_editing (child_node->child)) {
+ return TRUE;
+ }
+ }
+
+ return FALSE;
+}