aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-header-item.c
diff options
context:
space:
mode:
authorArturo Espinosa <unammx@src.gnome.org>1999-11-30 17:34:50 +0800
committerArturo Espinosa <unammx@src.gnome.org>1999-11-30 17:34:50 +0800
commit0177093e774a519891d4432bf87f5fa6e6c9656d (patch)
tree341b4172e7680a77314457304d554a7041143242 /widgets/table/e-table-header-item.c
parentc50636dba333983e99deeb76338bbec3390a1fbe (diff)
downloadgsoc2013-evolution-0177093e774a519891d4432bf87f5fa6e6c9656d.tar
gsoc2013-evolution-0177093e774a519891d4432bf87f5fa6e6c9656d.tar.gz
gsoc2013-evolution-0177093e774a519891d4432bf87f5fa6e6c9656d.tar.bz2
gsoc2013-evolution-0177093e774a519891d4432bf87f5fa6e6c9656d.tar.lz
gsoc2013-evolution-0177093e774a519891d4432bf87f5fa6e6c9656d.tar.xz
gsoc2013-evolution-0177093e774a519891d4432bf87f5fa6e6c9656d.tar.zst
gsoc2013-evolution-0177093e774a519891d4432bf87f5fa6e6c9656d.zip
New cell-toggle stuff compiles -miguel
svn path=/trunk/; revision=1446
Diffstat (limited to 'widgets/table/e-table-header-item.c')
-rw-r--r--widgets/table/e-table-header-item.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c
index 1be7e7097b..52e01abef6 100644
--- a/widgets/table/e-table-header-item.c
+++ b/widgets/table/e-table-header-item.c
@@ -383,6 +383,8 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e)
case GDK_MOTION_NOTIFY:
convert (canvas, e->motion.x, e->motion.y, &x, &y);
if (resizing){
+ int new_width;
+
if (ethi->resize_guide == NULL){
/* Quick hack until I actually bind the views */
ethi->resize_guide = GINT_TO_POINTER (1);
@@ -393,12 +395,16 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e)
e->button.time);
}
- if (x - ethi->resize_start_pos <= 0)
+ new_width = x - ethi->resize_start_pos;
+ if (new_width <= 0)
break;
+ if (new_width < ethi->resize_min_width)
+ break;
+
ethi_request_redraw (ethi);
- ethi->resize_width = x - ethi->resize_start_pos;
+ ethi->resize_width = new_width;
e_table_header_set_size (ethi->eth, ethi->resize_col, ethi->resize_width);
ethi_request_redraw (ethi);
@@ -420,9 +426,13 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e)
* other event handlers).
*/
ecol = e_table_header_get_column (ethi->eth, col);
+
+ if (!ecol->resizeable)
+ break;
ethi->resize_col = col;
ethi->resize_width = ecol->width;
ethi->resize_start_pos = start - ecol->width;
+ ethi->resize_min_width = ecol->min_width;
}
break;