From 9ff9063fe66817737f89decc3fdadb473fa51278 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Mon, 17 Aug 2009 16:54:42 -0400 Subject: =?UTF-8?q?Bug=C2=A0591829=20-=20Dragging=20mails=20to=20folder=20?= =?UTF-8?q?tree=20does=20not=20work?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mail/message-list.c | 71 +++-------------------------------------------------- 1 file changed, 4 insertions(+), 67 deletions(-) (limited to 'mail/message-list.c') diff --git a/mail/message-list.c b/mail/message-list.c index 7e0fb9b4c2..714768ef21 100644 --- a/mail/message-list.c +++ b/mail/message-list.c @@ -131,7 +131,7 @@ static struct { GdkAtom atom; guint32 actions; } ml_drag_info[] = { - { "x-uid-list", NULL, GDK_ACTION_ASK|GDK_ACTION_MOVE|GDK_ACTION_COPY }, + { "x-uid-list", NULL, GDK_ACTION_MOVE|GDK_ACTION_COPY }, { "message/rfc822", NULL, GDK_ACTION_COPY }, { "text/uri-list", NULL, GDK_ACTION_COPY }, }; @@ -2161,49 +2161,6 @@ ml_drop_action(struct _drop_msg *m) mail_msg_unordered_push (m); } -#if 0 /* KILL-BONOBO */ -static void -ml_drop_popup_copy(EPopup *ep, EPopupItem *item, gpointer data) -{ - struct _drop_msg *m = data; - - m->action = GDK_ACTION_COPY; - ml_drop_action(m); -} - -static void -ml_drop_popup_move(EPopup *ep, EPopupItem *item, gpointer data) -{ - struct _drop_msg *m = data; - - m->action = GDK_ACTION_MOVE; - ml_drop_action(m); -} - -static void -ml_drop_popup_cancel(EPopup *ep, EPopupItem *item, gpointer data) -{ - struct _drop_msg *m = data; - - m->aborted = TRUE; - mail_msg_unref(m); -} - -static EPopupItem ml_drop_popup_menu[] = { - { E_POPUP_ITEM, (gchar *) "00.emc.02", (gchar *) N_("_Copy"), ml_drop_popup_copy, NULL, (gchar *) "folder-copy", 0 }, - { E_POPUP_ITEM, (gchar *) "00.emc.03", (gchar *) N_("_Move"), ml_drop_popup_move, NULL, (gchar *) "folder-move", 0 }, - { E_POPUP_BAR, (gchar *) "10.emc" }, - { E_POPUP_ITEM, (gchar *) "99.emc.00", (gchar *) N_("Cancel _Drag"), ml_drop_popup_cancel, NULL, NULL, 0 }, -}; - -static void -ml_drop_popup_free(EPopup *ep, GSList *items, gpointer data) -{ - g_slist_free(items); - - /* FIXME: free data if no item was selected? */ -} - static void ml_tree_drag_data_received (ETree *tree, gint row, ETreePath path, gint col, GdkDragContext *context, gint x, gint y, @@ -2230,24 +2187,8 @@ ml_tree_drag_data_received (ETree *tree, gint row, ETreePath path, gint col, memcpy(m->selection->data, data->data, data->length); m->selection->length = data->length; - if (context->action == GDK_ACTION_ASK) { - EMPopup *emp; - GSList *menus = NULL; - GtkMenu *menu; - gint i; - - emp = em_popup_new("org.gnome.mail.messagelist.popup.drop"); - for (i=0;isuggested_action; if (action == GDK_ACTION_COPY && (actions & GDK_ACTION_MOVE)) action = GDK_ACTION_MOVE; - else if (action == GDK_ACTION_ASK && (actions & (GDK_ACTION_MOVE|GDK_ACTION_COPY)) != (GDK_ACTION_MOVE|GDK_ACTION_COPY)) - action = GDK_ACTION_MOVE; gdk_drag_status(context, action, time); @@ -2707,19 +2646,17 @@ message_list_construct (MessageList *message_list) e_tree_drag_source_set(message_list->tree, GDK_BUTTON1_MASK, ml_drag_types, sizeof(ml_drag_types)/sizeof(ml_drag_types[0]), - GDK_ACTION_MOVE|GDK_ACTION_COPY|GDK_ACTION_ASK); + GDK_ACTION_MOVE|GDK_ACTION_COPY); g_signal_connect(message_list->tree, "tree_drag_data_get", G_CALLBACK(ml_tree_drag_data_get), message_list); e_tree_drag_dest_set(message_list->tree, GTK_DEST_DEFAULT_ALL, ml_drop_types, sizeof(ml_drop_types)/sizeof(ml_drop_types[0]), - GDK_ACTION_MOVE|GDK_ACTION_COPY|GDK_ACTION_ASK); + GDK_ACTION_MOVE|GDK_ACTION_COPY); -#if 0 /* KILL-BONOBO */ g_signal_connect(message_list->tree, "tree_drag_data_received", G_CALLBACK(ml_tree_drag_data_received), message_list); -#endif g_signal_connect(message_list->tree, "drag-motion", G_CALLBACK(ml_tree_drag_motion), message_list); } -- cgit v1.2.3