Drop unused variables and associated code.
[geeqie.git] / src / pan-calendar.c
index dec9e59..3934729 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
  *
@@ -14,8 +14,7 @@
 #include "main.h"
 #include "pan-types.h"
 
-#include "debug.h"
-
+#include <glib/gprintf.h>
 #include <math.h>
 
 
@@ -187,7 +186,7 @@ void pan_calendar_update(PanWindow *pw, PanItem *pi_day)
        pan_layout_resize(pw);
 }
 
-void pan_calendar_compute(PanWindow *pw, const gchar *path, gint *width, gint *height)
+void pan_calendar_compute(PanWindow *pw, FileData *dir_fd, gint *width, gint *height)
 {
        GList *list;
        GList *work;
@@ -195,15 +194,13 @@ void pan_calendar_compute(PanWindow *pw, const gchar *path, gint *width, gint *h
        time_t tc;
        gint count;
        gint day_max;
-       gint day_width;
-       gint day_height;
        gint grid;
        gint year = 0;
        gint month = 0;
        gint end_year = 0;
        gint end_month = 0;
 
-       list = pan_list_tree(path, SORT_NONE, TRUE, pw->ignore_symlinks);
+       list = pan_list_tree(dir_fd, SORT_NONE, TRUE, pw->ignore_symlinks);
 
        if (pw->cache_list && pw->exif_date_enable)
                {
@@ -240,9 +237,7 @@ void pan_calendar_compute(PanWindow *pw, const gchar *path, gint *width, gint *h
 
        DEBUG_1("biggest day contains %d images", day_max);
 
-       grid = (gint)(sqrt((double)day_max) + 0.5) * (PAN_THUMB_SIZE + PAN_SHADOW_OFFSET * 2 + PAN_THUMB_GAP);
-       day_width = MAX(PAN_CAL_DAY_WIDTH, grid);
-       day_height = MAX(PAN_CAL_DAY_HEIGHT, grid);
+       grid = (gint)(sqrt((gdouble)day_max) + 0.5) * (PAN_THUMB_SIZE + PAN_SHADOW_OFFSET * 2 + PAN_THUMB_GAP);
 
        if (list)
                {
@@ -324,7 +319,7 @@ void pan_calendar_compute(PanWindow *pw, const gchar *path, gint *width, gint *h
                        PanItem *pi_day;
                        gint dx, dy;
                        gint n = 0;
-                       char fake_path[20];
+                       gchar fake_path[20];
 
                        dt = pan_date_to_time(year, month, day);
 
@@ -334,7 +329,7 @@ void pan_calendar_compute(PanWindow *pw, const gchar *path, gint *width, gint *h
                         */
 
                        g_snprintf(fake_path, sizeof(fake_path), "//%04d-%02d-%02d", year, month, day);
-                       fd = file_data_new_simple(fake_path);
+                       fd = file_data_new_no_grouping(fake_path);
                        fd->date = dt;
                        pi_day = pan_item_box_new(pw, fd, x, y, PAN_CAL_DAY_WIDTH, PAN_CAL_DAY_HEIGHT,
                                                  PAN_CAL_DAY_BORDER,
@@ -430,3 +425,4 @@ void pan_calendar_compute(PanWindow *pw, const gchar *path, gint *width, gint *h
 
        g_list_free(list);
 }
+/* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */