aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table.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.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.c')
-rw-r--r--widgets/table/e-table.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c
index 903193a755..248f90f873 100644
--- a/widgets/table/e-table.c
+++ b/widgets/table/e-table.c
@@ -489,8 +489,6 @@ e_table_init (GtkObject *object)
e_table->click_to_add_message = NULL;
e_table->domain = NULL;
- e_table->drag_get_data_row = -1;
- e_table->drag_get_data_col = -1;
e_table->drop_row = -1;
e_table->drop_col = -1;
e_table->site = NULL;
@@ -1519,7 +1517,10 @@ e_table_construct (ETable *e_table, ETableModel *etm, ETableExtras *ete,
g_return_val_if_fail(spec_str != NULL, NULL);
specification = e_table_specification_new();
- e_table_specification_load_from_string(specification, spec_str);
+ if (!e_table_specification_load_from_string(specification, spec_str)) {
+ gtk_object_unref(GTK_OBJECT(specification));
+ return NULL;
+ }
if (state_str) {
state = e_table_state_new();
e_table_state_load_from_string(state, state_str);
@@ -2338,8 +2339,6 @@ e_table_drag_get_data (ETable *table,
g_return_if_fail(table != NULL);
g_return_if_fail(E_IS_TABLE(table));
- table->drag_get_data_row = row;
- table->drag_get_data_col = col;
gtk_drag_get_data(GTK_WIDGET(table),
context,
target,
@@ -2392,8 +2391,10 @@ e_table_drag_highlight (ETable *table,
"y2", (double) y + height - 1,
NULL);
} else {
- gtk_object_destroy (GTK_OBJECT (table->drop_highlight));
- table->drop_highlight = NULL;
+ if (table->drop_highlight) {
+ gtk_object_destroy (GTK_OBJECT (table->drop_highlight));
+ table->drop_highlight = NULL;
+ }
}
}