aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-column-specification.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2002-06-15 06:26:43 +0800
committerChris Lahey <clahey@src.gnome.org>2002-06-15 06:26:43 +0800
commitbfccd5b470c3bcc0d23d619e9c0d93f0fdc80cce (patch)
treef420e29e4a0140d0728511a2979c927978d2e0e7 /widgets/table/e-table-column-specification.c
parentc397a95d08f8c2b9ce1dd2830324e3cc14a13926 (diff)
downloadgsoc2013-evolution-bfccd5b470c3bcc0d23d619e9c0d93f0fdc80cce.tar
gsoc2013-evolution-bfccd5b470c3bcc0d23d619e9c0d93f0fdc80cce.tar.gz
gsoc2013-evolution-bfccd5b470c3bcc0d23d619e9c0d93f0fdc80cce.tar.bz2
gsoc2013-evolution-bfccd5b470c3bcc0d23d619e9c0d93f0fdc80cce.tar.lz
gsoc2013-evolution-bfccd5b470c3bcc0d23d619e9c0d93f0fdc80cce.tar.xz
gsoc2013-evolution-bfccd5b470c3bcc0d23d619e9c0d93f0fdc80cce.tar.zst
gsoc2013-evolution-bfccd5b470c3bcc0d23d619e9c0d93f0fdc80cce.zip
Don't draw or interact with the popup button if a cell isn't editable
2002-06-14 Christopher James Lahey <clahey@ximian.com> * e-cell-popup.c (ecp_draw, ecp_event): Don't draw or interact with the popup button if a cell isn't editable (based on a patch by JPR.) * e-table-col.c, e-table-col.h: Added the compare_col field to this structure. Added a GtkArg to set it. * e-table-column-specification.c, e-table-column-specification.h: Added the compare_col field here. Made it load properly from xml. * e-table-sorting-utils.c: Sort based on the compare_col in the ETableCol instead of the col_idx. * e-table-utils.c (et_col_spec_to_col): Set the compare_col field in the ETableCol properly. * e-table.c, e-table.h: Removed the drag_get_data_row and drag_get_data_col fields since they're not used any longer. (e_table_construct): If specification loading fails, return a NULL ETable instead of just ignoring it. (e_table_drag_highlight): Only destroy table->drop_highlight if it exists. svn path=/trunk/; revision=17190
Diffstat (limited to 'widgets/table/e-table-column-specification.c')
-rw-r--r--widgets/table/e-table-column-specification.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/widgets/table/e-table-column-specification.c b/widgets/table/e-table-column-specification.c
index 6ff4a67bd3..bc296e0885 100644
--- a/widgets/table/e-table-column-specification.c
+++ b/widgets/table/e-table-column-specification.c
@@ -66,6 +66,7 @@ static void
etcs_init (ETableColumnSpecification *specification)
{
specification->model_col = 0;
+ specification->compare_col = 0;
specification->title = g_strdup("");
specification->pixbuf = NULL;
@@ -97,6 +98,7 @@ e_table_column_specification_load_from_node (ETableColumnSpecification *etcs,
free_strings(etcs);
etcs->model_col = e_xml_get_integer_prop_by_name (node, "model_col");
+ etcs->compare_col = e_xml_get_integer_prop_by_name_with_default (node, "compare_col", etcs->model_col);
etcs->title = e_xml_get_string_prop_by_name (node, "_title");
etcs->pixbuf = e_xml_get_string_prop_by_name (node, "pixbuf");
@@ -125,6 +127,8 @@ e_table_column_specification_save_to_node (ETableColumnSpecification *specificat
node = xmlNewNode(NULL, "ETableColumn");
e_xml_set_integer_prop_by_name(node, "model_col", specification->model_col);
+ if (specification->compare_col != specification->model_col)
+ e_xml_set_integer_prop_by_name(node, "compare_col", specification->compare_col);
e_xml_set_string_prop_by_name(node, "_title", specification->title);
e_xml_set_string_prop_by_name(node, "pixbuf", specification->pixbuf);