Mercurial > geeqie.yaz
diff src/view_dir.c @ 407:3a9074e73f53
Rename vd_drop_update() to vd_dnd_drop_update().
Add two function pointers to ViewDir struct to keep
vdtree_dnd_drop_expand_cancel() and vdtree_dnd_drop_expand()
static to view_dir_tree.c.
author | zas_ |
---|---|
date | Fri, 18 Apr 2008 16:53:41 +0000 |
parents | 7840ccc95aee |
children | 440979320308 |
line wrap: on
line diff
--- a/src/view_dir.c Fri Apr 18 16:29:47 2008 +0000 +++ b/src/view_dir.c Fri Apr 18 16:53:41 2008 +0000 @@ -70,6 +70,9 @@ vd->popup = NULL; + vd->dnd_drop_leave_func = NULL; + vd->dnd_drop_update_func = NULL; + vd->widget = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(vd->widget), GTK_SHADOW_IN); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(vd->widget), @@ -727,7 +730,7 @@ } } -static void vd_drop_update(ViewDir *vd, gint x, gint y) +static void vd_dnd_drop_update(ViewDir *vd, gint x, gint y) { GtkTreePath *tpath; FileData *fd = NULL; @@ -743,7 +746,7 @@ { vd_color_set(vd, vd->drop_fd, FALSE); vd_color_set(vd, fd, TRUE); - if (vd->type == DIRVIEW_TREE && fd) vdtree_dnd_drop_expand(vd); + if (fd && vd->dnd_drop_update_func) vd->dnd_drop_update_func(vd); } vd->drop_fd = fd; @@ -770,7 +773,7 @@ gdk_drawable_get_size(window, &w, &h); if (x >= 0 && x < w && y >= 0 && y < h) { - vd_drop_update(vd, x, y); + vd_dnd_drop_update(vd, x, y); } } @@ -807,7 +810,7 @@ gdk_drag_status(context, context->suggested_action, time); } - vd_drop_update(vd, x, y); + vd_dnd_drop_update(vd, x, y); if (vd->drop_fd) { @@ -826,7 +829,7 @@ vd->drop_fd = NULL; - if (vd->type == DIRVIEW_TREE) vdtree_dnd_drop_expand_cancel(vd); + if (vd->dnd_drop_leave_func) vd->dnd_drop_leave_func(vd); } void vd_dnd_init(ViewDir *vd)