aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-05-26 02:44:55 +0800
committerChris Lahey <clahey@src.gnome.org>2000-05-26 02:44:55 +0800
commitd306c2932807d068f453196abd3ca39580c4039a (patch)
tree00b4048fc31844168b0ddcd857c57649d7cb41bb /widgets
parentf0b7b724ec7bb187a0b7ceceeb82999f2595845d (diff)
downloadgsoc2013-evolution-d306c2932807d068f453196abd3ca39580c4039a.tar
gsoc2013-evolution-d306c2932807d068f453196abd3ca39580c4039a.tar.gz
gsoc2013-evolution-d306c2932807d068f453196abd3ca39580c4039a.tar.bz2
gsoc2013-evolution-d306c2932807d068f453196abd3ca39580c4039a.tar.lz
gsoc2013-evolution-d306c2932807d068f453196abd3ca39580c4039a.tar.xz
gsoc2013-evolution-d306c2932807d068f453196abd3ca39580c4039a.tar.zst
gsoc2013-evolution-d306c2932807d068f453196abd3ca39580c4039a.zip
Made dragging columns work.
2000-05-25 Christopher James Lahey <clahey@helixcode.com> * e-table-header-item.c: Made dragging columns work. svn path=/trunk/; revision=3205
Diffstat (limited to 'widgets')
-rw-r--r--widgets/e-table/ChangeLog4
-rw-r--r--widgets/e-table/e-table-header-item.c54
-rw-r--r--widgets/table/e-table-header-item.c54
3 files changed, 58 insertions, 54 deletions
diff --git a/widgets/e-table/ChangeLog b/widgets/e-table/ChangeLog
index 57015bac91..0bda1dbade 100644
--- a/widgets/e-table/ChangeLog
+++ b/widgets/e-table/ChangeLog
@@ -1,3 +1,7 @@
+2000-05-25 Christopher James Lahey <clahey@helixcode.com>
+
+ * e-table-header-item.c: Made dragging columns work.
+
2000-05-23 Christopher James Lahey <clahey@helixcode.com>
* e-table-header-item.c: Fixed the remove column callback.
diff --git a/widgets/e-table/e-table-header-item.c b/widgets/e-table/e-table-header-item.c
index 7fc192ca20..6d3329ab11 100644
--- a/widgets/e-table/e-table-header-item.c
+++ b/widgets/e-table/e-table-header-item.c
@@ -493,15 +493,15 @@ ethi_drag_end (GtkWidget *canvas, GdkDragContext *context, ETableHeaderItem *eth
if (ethi->drag_col == -1)
return;
- if (canvas == gtk_drag_get_source_widget (context)) {
- if (context->action == 0) {
- ethi_request_redraw (ethi);
- e_table_header_remove (ethi->eth, ethi->drag_col);
- }
- ethi_remove_drop_marker (ethi);
- ethi_remove_destroy_marker (ethi);
- ethi->drag_col = -1;
+ /* if (canvas == gtk_drag_get_source_widget (context)) { */
+ if (context->action == 0) {
+ ethi_request_redraw (ethi);
+ e_table_header_remove (ethi->eth, ethi->drag_col);
}
+ ethi_remove_drop_marker (ethi);
+ ethi_remove_destroy_marker (ethi);
+ ethi->drag_col = -1;
+ /* } */
}
static gboolean
@@ -517,24 +517,24 @@ ethi_drag_drop (GtkWidget *canvas,
if (ethi->drag_col == -1)
return FALSE;
- if (GTK_WIDGET(canvas) == gtk_drag_get_source_widget (context)) {
- if ((x >= ethi->x1) && (x <= (ethi->x1 + ethi->width)) &&
- (y >= ethi->y1) && (y <= (ethi->y1 + ethi->height))){
- int col;
-
- col = ethi_find_col_by_x (ethi, x);
-
- ethi_add_drop_marker (ethi, col);
-
- if (col != -1) {
- if (col != ethi->drag_col) {
- ethi_request_redraw (ethi);
- e_table_header_move (ethi->eth, ethi->drag_col, col);
- }
- successful = TRUE;
+ /* if (GTK_WIDGET(canvas) == gtk_drag_get_source_widget (context)) {*/
+ if ((x >= ethi->x1) && (x <= (ethi->x1 + ethi->width)) &&
+ (y >= ethi->y1) && (y <= (ethi->y1 + ethi->height))){
+ int col;
+
+ col = ethi_find_col_by_x (ethi, x);
+
+ ethi_add_drop_marker (ethi, col);
+
+ if (col != -1) {
+ if (col != ethi->drag_col) {
+ ethi_request_redraw (ethi);
+ e_table_header_move (ethi->eth, ethi->drag_col, col);
}
+ successful = TRUE;
}
}
+ /* } */
gtk_drag_finish (context, successful, successful, time);
return successful;
}
@@ -545,10 +545,10 @@ ethi_drag_leave (GtkWidget *widget, GdkDragContext *context, guint time, ETableH
if (ethi->drag_col == -1)
return;
- if (widget == gtk_drag_get_source_widget (context)) {
- ethi_remove_drop_marker (ethi);
- ethi_add_destroy_marker (ethi);
- }
+ /* if (widget == gtk_drag_get_source_widget (context)) { */
+ ethi_remove_drop_marker (ethi);
+ ethi_add_destroy_marker (ethi);
+ /* } */
}
static void
diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c
index 7fc192ca20..6d3329ab11 100644
--- a/widgets/table/e-table-header-item.c
+++ b/widgets/table/e-table-header-item.c
@@ -493,15 +493,15 @@ ethi_drag_end (GtkWidget *canvas, GdkDragContext *context, ETableHeaderItem *eth
if (ethi->drag_col == -1)
return;
- if (canvas == gtk_drag_get_source_widget (context)) {
- if (context->action == 0) {
- ethi_request_redraw (ethi);
- e_table_header_remove (ethi->eth, ethi->drag_col);
- }
- ethi_remove_drop_marker (ethi);
- ethi_remove_destroy_marker (ethi);
- ethi->drag_col = -1;
+ /* if (canvas == gtk_drag_get_source_widget (context)) { */
+ if (context->action == 0) {
+ ethi_request_redraw (ethi);
+ e_table_header_remove (ethi->eth, ethi->drag_col);
}
+ ethi_remove_drop_marker (ethi);
+ ethi_remove_destroy_marker (ethi);
+ ethi->drag_col = -1;
+ /* } */
}
static gboolean
@@ -517,24 +517,24 @@ ethi_drag_drop (GtkWidget *canvas,
if (ethi->drag_col == -1)
return FALSE;
- if (GTK_WIDGET(canvas) == gtk_drag_get_source_widget (context)) {
- if ((x >= ethi->x1) && (x <= (ethi->x1 + ethi->width)) &&
- (y >= ethi->y1) && (y <= (ethi->y1 + ethi->height))){
- int col;
-
- col = ethi_find_col_by_x (ethi, x);
-
- ethi_add_drop_marker (ethi, col);
-
- if (col != -1) {
- if (col != ethi->drag_col) {
- ethi_request_redraw (ethi);
- e_table_header_move (ethi->eth, ethi->drag_col, col);
- }
- successful = TRUE;
+ /* if (GTK_WIDGET(canvas) == gtk_drag_get_source_widget (context)) {*/
+ if ((x >= ethi->x1) && (x <= (ethi->x1 + ethi->width)) &&
+ (y >= ethi->y1) && (y <= (ethi->y1 + ethi->height))){
+ int col;
+
+ col = ethi_find_col_by_x (ethi, x);
+
+ ethi_add_drop_marker (ethi, col);
+
+ if (col != -1) {
+ if (col != ethi->drag_col) {
+ ethi_request_redraw (ethi);
+ e_table_header_move (ethi->eth, ethi->drag_col, col);
}
+ successful = TRUE;
}
}
+ /* } */
gtk_drag_finish (context, successful, successful, time);
return successful;
}
@@ -545,10 +545,10 @@ ethi_drag_leave (GtkWidget *widget, GdkDragContext *context, guint time, ETableH
if (ethi->drag_col == -1)
return;
- if (widget == gtk_drag_get_source_widget (context)) {
- ethi_remove_drop_marker (ethi);
- ethi_add_destroy_marker (ethi);
- }
+ /* if (widget == gtk_drag_get_source_widget (context)) { */
+ ethi_remove_drop_marker (ethi);
+ ethi_add_destroy_marker (ethi);
+ /* } */
}
static void