From c04ce4ea111fa38815975df46af6bea80e06241a Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Thu, 8 Jun 2000 07:55:21 +0000 Subject: The field chooser works now. 2000-06-08 Christopher James Lahey * The field chooser works now. * e-table-field-chooser-dialog.c: Make the dialog resizable. * e-table-field-chooser-item.c: Requested a reflow on realization. Made the correct column get dragged. * e-table-field-chooser.c: Set the height correctly. * e-table-field-chooser.glade: Replace the GnomeCanvas with an ECanvas. * e-table-header-item.c: Receive drags from the new dialog. svn path=/trunk/; revision=3476 --- widgets/table/e-table-header-item.c | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) (limited to 'widgets/table/e-table-header-item.c') diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c index d9b10343ce..8ee5242447 100644 --- a/widgets/table/e-table-header-item.c +++ b/widgets/table/e-table-header-item.c @@ -425,10 +425,6 @@ ethi_drag_motion (GtkObject *canvas, GdkDragContext *context, gint x, gint y, guint time, ETableHeaderItem *ethi) { - /* Check if it's the correct ethi */ - if (ethi->drag_col == -1) - return FALSE; - gdk_drag_status (context, 0, time); if ((x >= 0) && (x <= (ethi->width)) && (y >= 0) && (y <= (ethi->height))){ @@ -437,16 +433,19 @@ ethi_drag_motion (GtkObject *canvas, GdkDragContext *context, col = ethi_find_col_by_x (ethi, x); if (col != -1){ - ethi_remove_destroy_marker (ethi); + if (ethi->drag_col != -1) + ethi_remove_destroy_marker (ethi); ethi_add_drop_marker (ethi, col); gdk_drag_status (context, context->suggested_action, time); } else { ethi_remove_drop_marker (ethi); - ethi_add_destroy_marker (ethi); + if (ethi->drag_col != -1) + ethi_add_destroy_marker (ethi); } } else { ethi_remove_drop_marker (ethi); - ethi_add_destroy_marker (ethi); + if (ethi->drag_col != -1) + ethi_add_destroy_marker (ethi); } return TRUE; @@ -455,9 +454,6 @@ ethi_drag_motion (GtkObject *canvas, GdkDragContext *context, static void ethi_drag_end (GtkWidget *canvas, GdkDragContext *context, ETableHeaderItem *ethi) { - if (ethi->drag_col == -1) - return; - if (context->action == 0) { e_table_header_remove (ethi->eth, ethi->drag_col); gnome_canvas_item_request_update(GNOME_CANVAS_ITEM(ethi)); @@ -503,6 +499,7 @@ ethi_drag_data_received (GtkWidget *canvas, } } } + ethi_remove_drop_marker (ethi); gnome_canvas_item_request_update(GNOME_CANVAS_ITEM(ethi)); } @@ -537,9 +534,6 @@ ethi_drag_drop (GtkWidget *canvas, { gboolean successful = FALSE; - if (ethi->drag_col == -1) - return FALSE; - if ((x >= 0) && (x <= (ethi->width)) && (y >= 0) && (y <= (ethi->height))){ int col; @@ -563,11 +557,9 @@ ethi_drag_drop (GtkWidget *canvas, static void ethi_drag_leave (GtkWidget *widget, GdkDragContext *context, guint time, ETableHeaderItem *ethi) { - if (ethi->drag_col == -1) - return; - ethi_remove_drop_marker (ethi); - ethi_add_destroy_marker (ethi); + if (ethi->drag_col != -1) + ethi_add_destroy_marker (ethi); } static void -- cgit v1.2.3