aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-header-item.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-05-01 12:01:05 +0800
committerChris Lahey <clahey@src.gnome.org>2000-05-01 12:01:05 +0800
commiteb5dc08dc91a593357a6c1b1db98fac8cdb1662e (patch)
tree95a4c1a740939467e6f179c73a13594c684e9cfc /widgets/table/e-table-header-item.c
parent64fbed6351453bc9e61c15cfe7267d6df4574ac0 (diff)
downloadgsoc2013-evolution-eb5dc08dc91a593357a6c1b1db98fac8cdb1662e.tar
gsoc2013-evolution-eb5dc08dc91a593357a6c1b1db98fac8cdb1662e.tar.gz
gsoc2013-evolution-eb5dc08dc91a593357a6c1b1db98fac8cdb1662e.tar.bz2
gsoc2013-evolution-eb5dc08dc91a593357a6c1b1db98fac8cdb1662e.tar.lz
gsoc2013-evolution-eb5dc08dc91a593357a6c1b1db98fac8cdb1662e.tar.xz
gsoc2013-evolution-eb5dc08dc91a593357a6c1b1db98fac8cdb1662e.tar.zst
gsoc2013-evolution-eb5dc08dc91a593357a6c1b1db98fac8cdb1662e.zip
Made this more reentrant.
2000-04-30 Christopher James Lahey <clahey@helixcode.com> * e-table-header-item.c: Made this more reentrant. * e-table-sorted-variable.c, e-table-sorted-variable.h: Does a proper resort when the sorting info changes. * e-table.c, e-table.h: Made it so that ETable doesn't destroy and recreate the entire table when sorting info changes. svn path=/trunk/; revision=2704
Diffstat (limited to 'widgets/table/e-table-header-item.c')
-rw-r--r--widgets/table/e-table-header-item.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c
index 65d0d3166e..f916ce447e 100644
--- a/widgets/table/e-table-header-item.c
+++ b/widgets/table/e-table-header-item.c
@@ -953,6 +953,7 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e)
GnomeCanvas *canvas = item->canvas;
const gboolean resizing = ETHI_RESIZING (ethi);
int x, y, start, col;
+ int was_maybe_drag = 0;
switch (e->type){
case GDK_ENTER_NOTIFY:
@@ -1042,11 +1043,15 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e)
case GDK_BUTTON_RELEASE: {
gboolean needs_ungrab = FALSE;
+
+ was_maybe_drag = ethi->maybe_drag;
+
+ ethi->maybe_drag = FALSE;
if (ethi->resize_col != -1){
needs_ungrab = (ethi->resize_guide != NULL);
ethi_end_resize (ethi, ethi->resize_width);
- } else if (ethi->maybe_drag && ethi->sort_info) {
+ } else if (was_maybe_drag && ethi->sort_info) {
ETableCol *col;
int model_col;
int length;
@@ -1090,10 +1095,10 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e)
e_table_sort_info_sorting_set_nth(ethi->sort_info, length - 1, column);
}
}
+
if (needs_ungrab)
gnome_canvas_item_ungrab (item, e->button.time);
- ethi->maybe_drag = FALSE;
break;
}