aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-folder-tree.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2004-01-27 05:16:01 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-01-27 05:16:01 +0800
commitb09318f2bbd4898494462aee9b47669b045dfde3 (patch)
treef28a69fca6febcddf56d480d7515e9575ad2004e /mail/em-folder-tree.c
parentca1452156e8e50ac1980319c9e30920cd06236a7 (diff)
downloadgsoc2013-evolution-b09318f2bbd4898494462aee9b47669b045dfde3.tar.gz
gsoc2013-evolution-b09318f2bbd4898494462aee9b47669b045dfde3.tar.zst
gsoc2013-evolution-b09318f2bbd4898494462aee9b47669b045dfde3.zip
Set priv->drag_row.
2004-01-26 Jeffrey Stedfast <fejj@ximian.com> * em-folder-tree.c (tree_drag_begin): Set priv->drag_row. svn path=/trunk/; revision=24447
Diffstat (limited to 'mail/em-folder-tree.c')
-rw-r--r--mail/em-folder-tree.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
index 0ffc95b561..62b3deba2a 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -512,8 +512,23 @@ em_folder_tree_new_with_model (EMFolderTreeModel *model)
static void
tree_drag_begin (GtkWidget *widget, GdkDragContext *context, EMFolderTree *emft)
{
- /* FIXME: set an icon? */
+ struct _EMFolderTreePrivate *priv = emft->priv;
+ GtkTreeSelection *selection;
+ GtkTreeModel *model;
+ GtkTreePath *path;
+ GtkTreeIter iter;
+
printf ("::drag-begin called\n");
+
+ selection = gtk_tree_view_get_selection ((GtkTreeView *) widget);
+ if (!gtk_tree_selection_get_selected (selection, &model, &iter))
+ return;
+
+ path = gtk_tree_model_get_path (model, &iter);
+ priv->drag_row = gtk_tree_row_reference_new (model, path);
+ gtk_tree_path_free (path);
+
+ /* FIXME: set a drag icon? */
}
static void
@@ -590,7 +605,6 @@ tree_drag_drop (GtkWidget *widget, GdkDragContext *context, int x, int y, guint
}
gtk_tree_path_free (path);
- widget = gtk_drag_get_source_widget (context);
gtk_drag_get_data (widget, context, target, time);
return TRUE;