From f2400678cb02d9a759324c78fa45c321cc783f8e Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Thu, 5 Feb 2004 21:22:37 +0000 Subject: Now takes a GdkContext arg... will need this later when we want to 2004-02-05 Jeffrey Stedfast * em-folder-tree-model.c (em_folder_tree_model_row_drop_target): Now takes a GdkContext arg... will need this later when we want to re-enable dnd of vfolders. svn path=/trunk/; revision=24637 --- mail/em-folder-tree-model.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'mail/em-folder-tree-model.c') diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c index cd8741d429..c9490628e1 100644 --- a/mail/em-folder-tree-model.c +++ b/mail/em-folder-tree-model.c @@ -1029,7 +1029,6 @@ struct _DragDataReceivedAsync { /* Drag & Drop methods */ static void drop_uid_list(struct _DragDataReceivedAsync *m, CamelFolder *dest) -/* (CamelFolder *dest, GtkSelectionData *selection, gboolean move, gboolean *moved, CamelException *ex) */ { CamelFolder *src; @@ -1046,7 +1045,6 @@ drop_uid_list(struct _DragDataReceivedAsync *m, CamelFolder *dest) static void drop_folder(struct _DragDataReceivedAsync *m) -/*CamelStore *dest_store, const char *name, GtkSelectionData *selection, gboolean move, gboolean *moved, CamelException *ex)*/ { CamelFolder *src; char *new_name; @@ -1313,12 +1311,12 @@ em_folder_tree_model_drag_data_received (EMFolderTreeModel *model, GdkDragContex GdkDragAction -em_folder_tree_model_row_drop_possible (EMFolderTreeModel *model, GtkTreePath *path, GList *targets) +em_folder_tree_model_row_drop_possible (EMFolderTreeModel *model, GdkDragContext *context, GtkTreePath *path) { GdkAtom target; int i; - target = em_folder_tree_model_row_drop_target (model, path, targets); + target = em_folder_tree_model_row_drop_target (model, context, path); if (target == GDK_NONE) return 0; @@ -1338,10 +1336,11 @@ em_folder_tree_model_row_drop_possible (EMFolderTreeModel *model, GtkTreePath *p GdkAtom -em_folder_tree_model_row_drop_target (EMFolderTreeModel *model, GtkTreePath *path, GList *targets) +em_folder_tree_model_row_drop_target (EMFolderTreeModel *model, GdkDragContext *context, GtkTreePath *path) { gboolean is_store; GtkTreeIter iter; + GList *targets; char *uri; if (!gtk_tree_model_get_iter ((GtkTreeModel *) model, &iter, path)) @@ -1350,11 +1349,15 @@ em_folder_tree_model_row_drop_target (EMFolderTreeModel *model, GtkTreePath *pat gtk_tree_model_get ((GtkTreeModel *) model, &iter, COL_BOOL_IS_STORE, &is_store, COL_STRING_URI, &uri, -1); /* can't drag&drop into/onto a vfolder or the vfolder store */ - if (uri && !strncmp (uri, "vfolder:", 8)) + if (uri && !strncmp (uri, "vfolder:", 8)) { + /* FIXME: ...unless the source is a vfolder */ return GDK_NONE; + } + + targets = context->targets; if (is_store) { - /* can only drop x-folder into a store */ + /* can only drop x-folders into a store */ GdkAtom xfolder; xfolder = drop_atoms[DND_DROP_TYPE_FOLDER]; @@ -1365,7 +1368,7 @@ em_folder_tree_model_row_drop_target (EMFolderTreeModel *model, GtkTreePath *pat targets = targets->next; } } else { - /* can drop anything into a folder */ + /* can drop anything into folders */ int i; while (targets != NULL) { -- cgit