Remove commented out code.
[geeqie.git] / src / pan-folder.c
index c499453..8788e20 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Geeqie
  * (C) 2006 John Ellis
- * Copyright (C) 2008 The Geeqie Team
+ * Copyright (C) 2008 - 2012 The Geeqie Team
  *
  * Author: John Ellis
  *
@@ -109,7 +109,7 @@ static void pan_flower_move(FlowerGroup *group, gint x, gint y)
        group->y += y;
 }
 
-#define PI 3.14159
+#define PI 3.14159265
 
 static void pan_flower_position(FlowerGroup *group, FlowerGroup *parent,
                                                             gint *result_x, gint *result_y)
@@ -123,8 +123,8 @@ static void pan_flower_position(FlowerGroup *group, FlowerGroup *parent,
 
        a = 2*PI * group->diameter / parent->circumference;
 
-       x = (gint)((double)radius * cos(parent->angle + a / 2));
-       y = (gint)((double)radius * sin(parent->angle + a / 2));
+       x = (gint)((gdouble)radius * cos(parent->angle + a / 2));
+       y = (gint)((gdouble)radius * sin(parent->angle + a / 2));
 
        parent->angle += a;
 
@@ -239,7 +239,7 @@ static FlowerGroup *pan_flower_group(PanWindow *pw, FileData *dir_fd, gint x, gi
 
        y += pi_box->height;
 
-       pi_box = pan_item_box_new(pw, dir_fd,
+       pi_box = pan_item_box_new(pw, file_data_ref(dir_fd),
                                  x, y,
                                  PAN_BOX_BORDER * 2, PAN_BOX_BORDER * 2,
                                  PAN_BOX_OUTLINE_THICKNESS,
@@ -294,7 +294,7 @@ static FlowerGroup *pan_flower_group(PanWindow *pw, FileData *dir_fd, gint x, gi
 
        group->width = pi_box->width;
        group->height = pi_box->y + pi_box->height;
-       group->diameter = (int)sqrt(group->width * group->width + group->height * group->height);
+       group->diameter = (gint)sqrt(group->width * group->width + group->height * group->height);
 
        group->children = NULL;
 
@@ -385,7 +385,7 @@ static void pan_folder_tree_path(PanWindow *pw, FileData *dir_fd,
 
        *y += pi_box->height;
 
-       pi_box = pan_item_box_new(pw, dir_fd,
+       pi_box = pan_item_box_new(pw, file_data_ref(dir_fd),
                                  *x, *y,
                                  PAN_BOX_BORDER, PAN_BOX_BORDER,
                                  PAN_BOX_OUTLINE_THICKNESS,
@@ -467,3 +467,4 @@ void pan_folder_tree_compute(PanWindow *pw, FileData *dir_fd, gint *width, gint
        if (width) *width = w;
        if (height) *height = h;
 }
+/* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */