diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2004-02-06 05:22:37 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2004-02-06 05:22:37 +0800 |
commit | f2400678cb02d9a759324c78fa45c321cc783f8e (patch) | |
tree | 8dfe3d4eab7c7392d8742023e485032898ed7f35 /mail/em-folder-tree-model.c | |
parent | 3212a68494c3f5ffc9a405b81bc5b45637284fbd (diff) | |
download | gsoc2013-evolution-f2400678cb02d9a759324c78fa45c321cc783f8e.tar.gz gsoc2013-evolution-f2400678cb02d9a759324c78fa45c321cc783f8e.tar.zst gsoc2013-evolution-f2400678cb02d9a759324c78fa45c321cc783f8e.zip |
Now takes a GdkContext arg... will need this later when we want to
2004-02-05 Jeffrey Stedfast <fejj@ximian.com>
* 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
Diffstat (limited to 'mail/em-folder-tree-model.c')
-rw-r--r-- | mail/em-folder-tree-model.c | 19 |
1 files changed, 11 insertions, 8 deletions
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) { |