comparison src/view_dir_tree.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 8e6f5bbe7843
children 4b2d7f9af171
comparison
equal deleted inserted replaced
406:8e6f5bbe7843 407:3a9074e73f53
177 177
178 VDTREE_INFO(vd, drop_expand_id) = -1; 178 VDTREE_INFO(vd, drop_expand_id) = -1;
179 return FALSE; 179 return FALSE;
180 } 180 }
181 181
182 void vdtree_dnd_drop_expand_cancel(ViewDir *vd) 182 static void vdtree_dnd_drop_expand_cancel(ViewDir *vd)
183 { 183 {
184 if (VDTREE_INFO(vd, drop_expand_id) != -1) g_source_remove(VDTREE_INFO(vd, drop_expand_id)); 184 if (VDTREE_INFO(vd, drop_expand_id) != -1) g_source_remove(VDTREE_INFO(vd, drop_expand_id));
185 VDTREE_INFO(vd, drop_expand_id) = -1; 185 VDTREE_INFO(vd, drop_expand_id) = -1;
186 } 186 }
187 187
188 void vdtree_dnd_drop_expand(ViewDir *vd) 188 static void vdtree_dnd_drop_expand(ViewDir *vd)
189 { 189 {
190 vdtree_dnd_drop_expand_cancel(vd); 190 vdtree_dnd_drop_expand_cancel(vd);
191 VDTREE_INFO(vd, drop_expand_id) = g_timeout_add(1000, vdtree_dnd_drop_expand_cb, vd); 191 VDTREE_INFO(vd, drop_expand_id) = g_timeout_add(1000, vdtree_dnd_drop_expand_cb, vd);
192 } 192 }
193 193
937 937
938 vd->info = g_new0(ViewDirInfoTree, 1); 938 vd->info = g_new0(ViewDirInfoTree, 1);
939 vd->type = DIRVIEW_TREE; 939 vd->type = DIRVIEW_TREE;
940 940
941 VDTREE_INFO(vd, drop_expand_id) = -1; 941 VDTREE_INFO(vd, drop_expand_id) = -1;
942
943 VDTREE_INFO(vd, busy_ref) = 0; 942 VDTREE_INFO(vd, busy_ref) = 0;
943
944 vd->dnd_drop_leave_func = vdtree_dnd_drop_expand_cancel;
945 vd->dnd_drop_update_func = vdtree_dnd_drop_expand;
944 946
945 store = gtk_tree_store_new(4, G_TYPE_POINTER, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_INT); 947 store = gtk_tree_store_new(4, G_TYPE_POINTER, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_INT);
946 vd->view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store)); 948 vd->view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store));
947 g_object_unref(store); 949 g_object_unref(store);
948 950