From 970662db34ff0a718cd5e39c1fa268beb51e1f64 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Fri, 4 Jun 2010 07:05:46 -0400 Subject: More GTK3 preparation. This uses the new gtk_assistant_commit() I had added to GTK+ for our EImportAssistant progress page. --- widgets/table/e-table-header-item.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 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 133a368754..a80315a596 100644 --- a/widgets/table/e-table-header-item.c +++ b/widgets/table/e-table-header-item.c @@ -37,6 +37,7 @@ #include #include "e-util/e-util.h" #include "e-util/e-xml-utils.h" +#include "e-util/gtk-compat.h" #include "misc/e-canvas.h" #include "misc/e-popup-menu.h" @@ -614,24 +615,26 @@ do_drag_motion (ETableHeaderItem *ethi, { if ((x >= 0) && (x <= (ethi->width)) && (y >= 0) && (y <= (ethi->height))) { + GdkDragAction suggested_action; gint col; d(g_print("In header\n")); col = ethi_find_col_by_x_nearest (ethi, x); + suggested_action = gdk_drag_context_get_suggested_action (context); if (ethi->drag_col != -1 && (col == ethi->drag_col || col == ethi->drag_col + 1)) { if (ethi->drag_col != -1) ethi_remove_destroy_marker (ethi); ethi_remove_drop_marker (ethi); - gdk_drag_status (context, context->suggested_action, time); + gdk_drag_status (context, suggested_action, time); } else if (col != -1) { if (ethi->drag_col != -1) ethi_remove_destroy_marker (ethi); ethi_add_drop_marker (ethi, col, recreate); - gdk_drag_status (context, context->suggested_action, time); + gdk_drag_status (context, suggested_action, time); } else { ethi_remove_drop_marker (ethi); if (ethi->drag_col != -1) @@ -750,6 +753,7 @@ ethi_drag_motion (GtkWidget *widget, { GtkAllocation allocation; GtkAdjustment *adjustment; + GList *targets; gdouble hadjustment_value; gdouble vadjustment_value; gchar *droptype, *headertype; @@ -757,7 +761,8 @@ ethi_drag_motion (GtkWidget *widget, gdk_drag_status (context, 0, time); - droptype = gdk_atom_name (GDK_POINTER_TO_ATOM (context->targets->data)); + targets = gdk_drag_context_list_targets (context); + droptype = gdk_atom_name (GDK_POINTER_TO_ATOM (targets->data)); headertype = g_strdup_printf ("%s-%s", TARGET_ETABLE_COL_TYPE, ethi->dnd_code); -- cgit v1.2.3