aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2004-02-06 05:22:37 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-02-06 05:22:37 +0800
commitf2400678cb02d9a759324c78fa45c321cc783f8e (patch)
tree8dfe3d4eab7c7392d8742023e485032898ed7f35 /mail
parent3212a68494c3f5ffc9a405b81bc5b45637284fbd (diff)
downloadgsoc2013-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')
-rw-r--r--mail/ChangeLog4
-rw-r--r--mail/em-folder-tree-model.c19
-rw-r--r--mail/em-folder-tree-model.h4
-rw-r--r--mail/em-folder-tree.c4
4 files changed, 19 insertions, 12 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 3920a0d3fc..3bc54cc1ec 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,9 @@
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.
+
* em-folder-browser.c (emfb_set_folder): Always set the
search_state, even if it is NULL (NULL means default/unset state).
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) {
diff --git a/mail/em-folder-tree-model.h b/mail/em-folder-tree-model.h
index 71cf0dd4bd..c5afc9f98e 100644
--- a/mail/em-folder-tree-model.h
+++ b/mail/em-folder-tree-model.h
@@ -127,8 +127,8 @@ void em_folder_tree_model_set_unread_count (EMFolderTreeModel *model, CamelStore
/* Drag & Drop stuff */
void em_folder_tree_model_drag_data_received (EMFolderTreeModel *model, GdkDragContext *context, GtkTreePath *path,
GtkSelectionData *selection, guint info);
-GdkDragAction em_folder_tree_model_row_drop_possible (EMFolderTreeModel *model, GtkTreePath *path, GList *targets);
-GdkAtom em_folder_tree_model_row_drop_target (EMFolderTreeModel *model, GtkTreePath *path, GList *targets);
+GdkDragAction em_folder_tree_model_row_drop_possible (EMFolderTreeModel *model, GdkDragContext *context, GtkTreePath *path);
+GdkAtom em_folder_tree_model_row_drop_target (EMFolderTreeModel *model, GdkDragContext *context, GtkTreePath *path);
gboolean em_folder_tree_model_row_draggable (EMFolderTreeModel *model, GtkTreePath *path);
void em_folder_tree_model_drag_data_get (EMFolderTreeModel *model, GdkDragContext *context, GtkTreePath *path,
GtkSelectionData *selection, guint info);
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
index 776a5c9ef0..17080668d8 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -581,7 +581,7 @@ tree_drag_drop (GtkWidget *widget, GdkDragContext *context, int x, int y, guint
if (!gtk_tree_view_get_path_at_pos (priv->treeview, x, y, &path, &column, &cell_x, &cell_y))
return FALSE;
- target = em_folder_tree_model_row_drop_target (priv->model, path, context->targets);
+ target = em_folder_tree_model_row_drop_target (priv->model, context, path);
gtk_tree_path_free (path);
if (target == GDK_NONE)
return FALSE;
@@ -621,7 +621,7 @@ tree_drag_motion (GtkWidget *widget, GdkDragContext *context, int x, int y, guin
/* FIXME: highlight target row? */
- action = em_folder_tree_model_row_drop_possible (priv->model, path, context->targets);
+ action = em_folder_tree_model_row_drop_possible (priv->model, context, path);
gtk_tree_path_free (path);
gdk_drag_status (context, action, time);