diff options
author | Christopher James Lahey <clahey@helixcode.com> | 2000-05-26 02:44:55 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2000-05-26 02:44:55 +0800 |
commit | d306c2932807d068f453196abd3ca39580c4039a (patch) | |
tree | 00b4048fc31844168b0ddcd857c57649d7cb41bb | |
parent | f0b7b724ec7bb187a0b7ceceeb82999f2595845d (diff) | |
download | gsoc2013-evolution-d306c2932807d068f453196abd3ca39580c4039a.tar.gz 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
-rw-r--r-- | widgets/e-table/ChangeLog | 4 | ||||
-rw-r--r-- | widgets/e-table/e-table-header-item.c | 54 | ||||
-rw-r--r-- | widgets/table/e-table-header-item.c | 54 |
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 |