aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/e-table/e-table-header-item.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-02-10 20:05:01 +0800
committerChris Lahey <clahey@src.gnome.org>2000-02-10 20:05:01 +0800
commit11a8bba27ea6fd7dc37b478be03831ddc561f28a (patch)
tree2bb67fa483ea10ee89cc1f658c623800d1d8d19e /widgets/e-table/e-table-header-item.c
parent4a2a09a7bae99778d6e11df7da7d0a166815030f (diff)
downloadgsoc2013-evolution-11a8bba27ea6fd7dc37b478be03831ddc561f28a.tar
gsoc2013-evolution-11a8bba27ea6fd7dc37b478be03831ddc561f28a.tar.gz
gsoc2013-evolution-11a8bba27ea6fd7dc37b478be03831ddc561f28a.tar.bz2
gsoc2013-evolution-11a8bba27ea6fd7dc37b478be03831ddc561f28a.tar.lz
gsoc2013-evolution-11a8bba27ea6fd7dc37b478be03831ddc561f28a.tar.xz
gsoc2013-evolution-11a8bba27ea6fd7dc37b478be03831ddc561f28a.tar.zst
gsoc2013-evolution-11a8bba27ea6fd7dc37b478be03831ddc561f28a.zip
Handle button releases properly.
2000-02-10 Christopher James Lahey <clahey@helixcode.com> * e-cell-text.c: Handle button releases properly. * e-table-header-item.c (ethi_start_drag): Added a drag icon. svn path=/trunk/; revision=1724
Diffstat (limited to 'widgets/e-table/e-table-header-item.c')
-rw-r--r--widgets/e-table/e-table-header-item.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/widgets/e-table/e-table-header-item.c b/widgets/e-table/e-table-header-item.c
index e8f73fc432..ad4d12395c 100644
--- a/widgets/e-table/e-table-header-item.c
+++ b/widgets/e-table/e-table-header-item.c
@@ -592,6 +592,10 @@ ethi_start_drag (ETableHeaderItem *ethi, GdkEvent *event)
GtkWidget *widget = GTK_WIDGET (GNOME_CANVAS_ITEM (ethi)->canvas);
GtkTargetList *list;
GdkDragContext *context;
+ ETableCol *ecol;
+ int col_width;
+ GdkPixmap *pixmap;
+ GdkGC *gc;
ethi->drag_col = ethi_find_col_by_x (ethi, event->motion.x);
if (ethi->drag_col == -1)
@@ -599,6 +603,25 @@ ethi_start_drag (ETableHeaderItem *ethi, GdkEvent *event)
list = gtk_target_list_new (ethi_drag_types, ELEMENTS (ethi_drag_types));
context = gtk_drag_begin (widget, list, GDK_ACTION_MOVE, 1, event);
+
+ ecol = e_table_header_get_column (ethi->eth, ethi->drag_col);
+ if (ethi->drag_col == ethi->resize_col)
+ col_width = ethi->resize_width;
+ else
+ col_width = ecol->width;
+ pixmap = gdk_pixmap_new(widget->window, col_width, ethi->height, -1);
+ gc = widget->style->bg_gc [GTK_STATE_ACTIVE];
+ draw_button (ethi, ecol, pixmap, gc,
+ widget->style,
+ 0, 0, col_width, ethi->height);
+ gtk_drag_set_icon_pixmap (context,
+ gdk_window_get_colormap(widget->window),
+ pixmap,
+ NULL,
+ col_width / 2,
+ ethi->height / 2);
+ gdk_pixmap_unref(pixmap);
+
ethi->maybe_drag = FALSE;
}