#include "pan-item.h"
#include "pan-util.h"
#include "pan-view.h"
+#include "pan-view-filter.h"
void pan_timeline_compute(PanWindow *pw, FileData *dir_fd, gint *width, gint *height)
{
GList *list;
GList *work;
gint x, y;
- time_t tc;
+ time_t group_start_date;
gint total;
gint count;
PanItem *pi_month = NULL;
gint y_height;
list = pan_list_tree(dir_fd, SORT_NONE, TRUE, pw->ignore_symlinks);
+ pan_filter_fd_list(&list, pw->filter_ui->filter_elements);
if (pw->cache_list && pw->exif_date_enable)
{
day_start = month_start;
x_width = 0;
y_height = 0;
- tc = 0;
+ group_start_date = 0;
+ // total and count are used to enforce a stride of PAN_GROUP_MAX thumbs.
total = 0;
count = 0;
work = list;
fd = work->data;
work = work->next;
- if (!pan_date_compare(fd->date, tc, PAN_DATE_LENGTH_DAY))
+ if (!pan_date_compare(fd->date, group_start_date, PAN_DATE_LENGTH_DAY))
{
+ // FD starts a new day group.
GList *needle;
gchar *buf;
- if (!pan_date_compare(fd->date, tc, PAN_DATE_LENGTH_MONTH))
+ if (!pan_date_compare(fd->date, group_start_date, PAN_DATE_LENGTH_MONTH))
{
+ // FD starts a new month group.
pi_day = NULL;
if (pi_month)
if (pi_day) x = pi_day->x + pi_day->width + PAN_BOX_BORDER;
- tc = fd->date;
+ group_start_date = fd->date;
total = 1;
count = 0;
FileData *nfd;
nfd = needle->data;
- if (pan_date_compare(nfd->date, tc, PAN_DATE_LENGTH_DAY))
+ if (pan_date_compare(nfd->date, group_start_date, PAN_DATE_LENGTH_DAY))
{
needle = needle->next;
total++;