2005-02-18 [colin] 1.0.1cvs11.6
[claws.git] / src / folderview.c
index 194144caa0fab1e0f64d56cc8bac99ceea107739..1ae1697d15d0bd306813b9bc61200ccad558da1c 100644 (file)
@@ -2097,11 +2097,11 @@ static gboolean folderview_drag_motion_cb(GtkWidget      *widget,
        FolderItem *item, *src_item = NULL;
        GtkCTreeNode *node = NULL;
        gboolean acceptable = FALSE;
-       gint height = folderview->ctree->allocation.height;
-       gint total_height = folderview->ctree->requisition.height;
        GtkAdjustment *pos = gtk_scrolled_window_get_vadjustment(
                                GTK_SCROLLED_WINDOW(folderview->scrolledwin));
-       gfloat vpos = pos->value;
+       int height = (int)pos->page_size;
+       int total_height = (int)pos->upper;
+       int vpos = (int) pos->value;
 
        if (gtk_clist_get_selection_info
                (GTK_CLIST(widget), x - 24, y - 24, &row, &column)) {
@@ -2110,7 +2110,7 @@ static gboolean folderview_drag_motion_cb(GtkWidget      *widget,
                if (y > height - 24 && height + vpos < total_height)
                        gtk_adjustment_set_value(pos, (vpos+5 > height ? height : vpos+5));
 
-               if (y < 24 && y > 0)
+               if (y < 48 && y > 0)
                        gtk_adjustment_set_value(pos, (vpos-5 < 0 ? 0 : vpos-5));
 
                node = gtk_ctree_node_nth(GTK_CTREE(widget), row);