aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-header-item.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-03-01 05:07:06 +0800
committerChris Lahey <clahey@src.gnome.org>2000-03-01 05:07:06 +0800
commit832150b0dda320f18f1aedf2da23d0b087cde748 (patch)
treea81426b3f8f314cdd91eb152072ab5d53f9e3c2b /widgets/table/e-table-header-item.c
parent2f6721bf5bd7d5c853279db40b1fb15ded4745a2 (diff)
downloadgsoc2013-evolution-832150b0dda320f18f1aedf2da23d0b087cde748.tar
gsoc2013-evolution-832150b0dda320f18f1aedf2da23d0b087cde748.tar.gz
gsoc2013-evolution-832150b0dda320f18f1aedf2da23d0b087cde748.tar.bz2
gsoc2013-evolution-832150b0dda320f18f1aedf2da23d0b087cde748.tar.lz
gsoc2013-evolution-832150b0dda320f18f1aedf2da23d0b087cde748.tar.xz
gsoc2013-evolution-832150b0dda320f18f1aedf2da23d0b087cde748.tar.zst
gsoc2013-evolution-832150b0dda320f18f1aedf2da23d0b087cde748.zip
Test frozen columns
2000-02-29 Christopher James Lahey <clahey@helixcode.com> * test-table.c: Test frozen columns * e-table.c: Make frozen columns available through the xml file. * e-table-header.c, e-table-header.h, e-table-header-item.c: Added frozen columns API to let you specify some number of leading columns as undraggable. * Makefile.am: Add e-table-example-1.c and e-table-example-2.c. * e-table-example-1.c, e-table-example-2.c: New files. A couple of examples of ETable use. svn path=/trunk/; revision=1993
Diffstat (limited to 'widgets/table/e-table-header-item.c')
-rw-r--r--widgets/table/e-table-header-item.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c
index 0289703bf2..91a64d204a 100644
--- a/widgets/table/e-table-header-item.c
+++ b/widgets/table/e-table-header-item.c
@@ -40,6 +40,7 @@
static GnomeCanvasItemClass *ethi_parent_class;
static void ethi_request_redraw (ETableHeaderItem *ethi);
+static void ethi_drop_table_header (ETableHeaderItem *ethi);
/*
@@ -326,6 +327,8 @@ ethi_drag_motion (GtkObject *canvas, GdkDragContext *context,
int col;
col = ethi_find_col_by_x (ethi, x);
+ if ( col < ethi->eth->frozen_count )
+ col = ethi->eth->frozen_count;
if (col != -1){
ethi_remove_destroy_marker (ethi);
@@ -380,6 +383,8 @@ ethi_drag_drop (GtkWidget *canvas,
int col;
col = ethi_find_col_by_x (ethi, x);
+ if ( col < ethi->eth->frozen_count )
+ col = ethi->eth->frozen_count;
ethi_add_drop_marker(ethi, col);
if (col != -1) {
@@ -700,6 +705,10 @@ ethi_start_drag (ETableHeaderItem *ethi, GdkEvent *event)
GdkGC *gc;
ethi->drag_col = ethi_find_col_by_x (ethi, event->motion.x);
+ if ( ethi->drag_col < ethi->eth->frozen_count && ethi->drag_col >= 0 ) {
+ ethi->maybe_drag = FALSE;
+ ethi->drag_col = -1;
+ }
if (ethi->drag_col == -1)
return;