comparison src/pan-calendar.c @ 301:8cecb9695d28

fixed dates in pan-calendar
author nadvornik
date Thu, 10 Apr 2008 19:27:42 +0000
parents 09a676f57a3d
children 4b2d7f9af171
comparison
equal deleted inserted replaced
300:bda275cf9821 301:8cecb9695d28
319 { 319 {
320 FileData *fd; 320 FileData *fd;
321 PanItem *pi_day; 321 PanItem *pi_day;
322 gint dx, dy; 322 gint dx, dy;
323 gint n = 0; 323 gint n = 0;
324 char fake_path[20];
324 325
325 dt = pan_date_to_time(year, month, day); 326 dt = pan_date_to_time(year, month, day);
326 327
327 fd = file_data_new_simple(""); 328 /*
329 * Create a FileData entry that represents the given day.
330 * It does not correspond to any real file
331 */
332
333 g_snprintf(fake_path, sizeof(fake_path), "//%04d-%02d-%02d", year, month, day);
334 fd = file_data_new_simple(fake_path);
328 fd->date = dt; 335 fd->date = dt;
329 pi_day = pan_item_box_new(pw, fd, x, y, PAN_CAL_DAY_WIDTH, PAN_CAL_DAY_HEIGHT, 336 pi_day = pan_item_box_new(pw, fd, x, y, PAN_CAL_DAY_WIDTH, PAN_CAL_DAY_HEIGHT,
330 PAN_CAL_DAY_BORDER, 337 PAN_CAL_DAY_BORDER,
331 PAN_CAL_DAY_COLOR, PAN_CAL_DAY_ALPHA, 338 PAN_CAL_DAY_COLOR, PAN_CAL_DAY_ALPHA,
332 PAN_CAL_DAY_BORDER_COLOR, PAN_CAL_DAY_ALPHA); 339 PAN_CAL_DAY_BORDER_COLOR, PAN_CAL_DAY_ALPHA);