aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-specification.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2001-01-12 11:57:32 +0800
committerChris Lahey <clahey@src.gnome.org>2001-01-12 11:57:32 +0800
commit36c2e495136a79067158d6c08b418bcb7d511657 (patch)
tree836fe9469f52f093bde82ed6a3349b56be4d8059 /widgets/table/e-table-specification.c
parent01a5bc2c2c4ff45929078632294d53660d6263ee (diff)
downloadgsoc2013-evolution-36c2e495136a79067158d6c08b418bcb7d511657.tar.gz
gsoc2013-evolution-36c2e495136a79067158d6c08b418bcb7d511657.tar.zst
gsoc2013-evolution-36c2e495136a79067158d6c08b418bcb7d511657.zip
Added selection_mode argument.
2001-01-11 Christopher James Lahey <clahey@helixcode.com> * e-table-selection-model.c, e-table-selection-model.h: Added selection_mode argument. * e-table-specification.c, e-table-specification.h: Added a selection_mode field that is set based on the selection-mode attribute in the ETableSpecification element. * e-table.c (et_real_construct): Set the selection model's selection mode based on the ETableSpecification. svn path=/trunk/; revision=7427
Diffstat (limited to 'widgets/table/e-table-specification.c')
-rw-r--r--widgets/table/e-table-specification.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/widgets/table/e-table-specification.c b/widgets/table/e-table-specification.c
index f44212755b..e562f85ccb 100644
--- a/widgets/table/e-table-specification.c
+++ b/widgets/table/e-table-specification.c
@@ -62,6 +62,7 @@ etsp_init (ETableSpecification *etsp)
etsp->click_to_add = FALSE;
etsp->draw_grid = FALSE;
etsp->cursor_mode = E_TABLE_CURSOR_SIMPLE;
+ etsp->selection_mode = GTK_SELECTION_MULTIPLE;
etsp->click_to_add_message_ = NULL;
}
@@ -117,6 +118,17 @@ e_table_specification_load_from_node (ETableSpecification *specification,
specification->click_to_add = e_xml_get_bool_prop_by_name(node, "click-to-add");
specification->draw_grid = e_xml_get_bool_prop_by_name(node, "draw-grid");
+ specification->selection_mode = GTK_SELECTION_MULTIPLE;
+ temp = e_xml_get_string_prop_by_name(node, "selection-mode");
+ if (temp && !strcasecmp(temp, "single")) {
+ specification->selection_mode = GTK_SELECTION_SINGLE;
+ } else if (temp && !strcasecmp(temp, "browse")) {
+ specification->selection_mode = GTK_SELECTION_BROWSE;
+ } else if (temp && !strcasecmp(temp, "extended")) {
+ specification->selection_mode = GTK_SELECTION_EXTENDED;
+ }
+ g_free(temp);
+
specification->cursor_mode = E_TABLE_CURSOR_SIMPLE;
temp = e_xml_get_string_prop_by_name(node, "cursor-mode");
if (temp && !strcasecmp(temp, "line")) {