Revision: 1882
          http://geeqie.svn.sourceforge.net/geeqie/?rev=1882&view=rev
Author:   DarkEndymion
Date:     2009-12-27 21:35:42 +0000 (Sun, 27 Dec 2009)

Log Message:
-----------


Modified Paths:
--------------
    branches/calendar/src/bar_histogram.c
    branches/calendar/src/img-view.c
    branches/calendar/src/img-view.h
    branches/calendar/src/layout_util.c
    branches/calendar/src/main.c
    branches/calendar/src/pan-calendar.c
    branches/calendar/src/pan-item.c
    branches/calendar/src/pan-types.h
    branches/calendar/src/pan-util.c
    branches/calendar/src/pan-view.c
    branches/calendar/src/slideshow.c
    branches/calendar/src/slideshow.h

Modified: branches/calendar/src/bar_histogram.c
===================================================================
--- branches/calendar/src/bar_histogram.c       2009-12-19 12:53:20 UTC (rev 
1881)
+++ branches/calendar/src/bar_histogram.c       2009-12-27 21:35:42 UTC (rev 
1882)
@@ -311,6 +311,7 @@
        static gboolean show_current = TRUE;
 
        menu = popup_menu_short_lived();
+       DEBUG_1("Entro en menu de histogram");
        bar_pane_histogram_add_channels(menu, 
G_CALLBACK(bar_pane_histogram_popup_channels_cb), phd,
                                        show_current, 
histogram_get_channel(phd->histogram));
        bar_pane_histogram_add_logmode(menu, 
G_CALLBACK(bar_pane_histogram_popup_logmode_cb), phd,

Modified: branches/calendar/src/img-view.c
===================================================================
--- branches/calendar/src/img-view.c    2009-12-19 12:53:20 UTC (rev 1881)
+++ branches/calendar/src/img-view.c    2009-12-27 21:35:42 UTC (rev 1882)
@@ -73,6 +73,8 @@
 
 static void view_window_notify_cb(FileData *fd, NotifyType type, gpointer 
data);
 
+
+
 /*
  *-----------------------------------------------------------------------------
  * misc
@@ -881,8 +883,10 @@
        else if (list)
                {
                view_window_set_list(vw, list);
-               vw->list_pointer = vw->list;
-               image_change_fd(vw->imd, (FileData *)vw->list->data, 
image_zoom_get_default(NULL));
+               if (!fd) vw->list_pointer = vw->list;
+       
+               if (!fd) image_change_fd(vw->imd, (FileData *)vw->list->data, 
image_zoom_get_default(NULL));
+               else image_change_fd(vw->imd, fd, image_zoom_get_default(NULL));
 
                if (options->image.enable_read_ahead)
                        {
@@ -1720,4 +1724,32 @@
                        break;
                }
 }
+
+
+
+/*
+ *-----------------------------------------------------------------------------
+ * pan-cronos
+ *-----------------------------------------------------------------------------
+ */
+void view_window_new_from_list_position(GList *list,FileData *click_fd)
+{
+   ViewWindow *vw = real_view_window_new(click_fd, list, NULL, NULL);
+   view_fullscreen_toggle(vw,FALSE);
+     
+   
+   /*   GList *work = list;
+   GList *newlist=NULL;
+   FileData *fd = work->data;
+   while(work && fd!=click_fd)
+     {
+       fd = work->data;
+       work = work->next;
+     }
+  
+   vw->list_pointer = work;
+
+   view_list_step(vw,TRUE);*/
+}
+
 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */

Modified: branches/calendar/src/img-view.h
===================================================================
--- branches/calendar/src/img-view.h    2009-12-19 12:53:20 UTC (rev 1881)
+++ branches/calendar/src/img-view.h    2009-12-27 21:35:42 UTC (rev 1882)
@@ -17,6 +17,7 @@
 
 void view_window_new(FileData *fd);
 void view_window_new_from_list(GList *list);
+void view_window_new_from_list_position(GList *list,FileData *click_pi);
 void view_window_new_from_collection(CollectionData *cd, CollectInfo *info);
 
 void view_window_colors_update(void);

Modified: branches/calendar/src/layout_util.c
===================================================================
--- branches/calendar/src/layout_util.c 2009-12-19 12:53:20 UTC (rev 1881)
+++ branches/calendar/src/layout_util.c 2009-12-27 21:35:42 UTC (rev 1882)
@@ -249,7 +249,8 @@
        LayoutWindow *lw = data;
 
        layout_exit_fullscreen(lw);
-       pan_window_new(lw->dir_fd);
+        pan_window_new(lw->dir_fd);
+//     new_pan_calendar_window(lw->dir_fd);
 }
 
 static void layout_menu_print_cb(GtkAction *action, gpointer data)

Modified: branches/calendar/src/main.c
===================================================================
--- branches/calendar/src/main.c        2009-12-19 12:53:20 UTC (rev 1881)
+++ branches/calendar/src/main.c        2009-12-27 21:35:42 UTC (rev 1882)
@@ -758,6 +758,7 @@
 #ifdef HAVE_LIBCHAMPLAIN_GTK
        gtk_clutter_init(&argc, &argv);
 #else
+       gtk_clutter_init(&argc, &argv);
        gtk_init(&argc, &argv);
 #endif
 #else

Modified: branches/calendar/src/pan-calendar.c
===================================================================
--- branches/calendar/src/pan-calendar.c        2009-12-19 12:53:20 UTC (rev 
1881)
+++ branches/calendar/src/pan-calendar.c        2009-12-27 21:35:42 UTC (rev 
1882)
@@ -34,7 +34,7 @@
 #define PAN_CAL_DAY_TEXT_COLOR 0, 0, 0
 
 #define PAN_CAL_MONTH_COLOR 255, 255, 255
-#define PAN_CAL_MONTH_ALPHA 200
+#define PAN_CAL_MONTH_ALPHA 100
 #define PAN_CAL_MONTH_BORDER 4
 #define PAN_CAL_MONTH_BORDER_COLOR 0, 0, 0
 #define PAN_CAL_MONTH_TEXT_COLOR 0, 0, 0
@@ -201,16 +201,16 @@
        gint month = 0;
        gint end_year = 0;
        gint end_month = 0;
-
+       /** Get all files from directory dir_fd and turns them into a FileData 
object */
        list = pan_list_tree(dir_fd, SORT_NONE, TRUE, pw->ignore_symlinks);
-
+       /** If cache is enabled and exif data; sort it BY NAME, and sync with 
new list */
        if (pw->cache_list && pw->exif_date_enable)
                {
                pw->cache_list = pan_cache_sort(pw->cache_list, SORT_NAME, 
TRUE);
                list = filelist_sort(list, SORT_NAME, TRUE);
                pan_cache_sync_date(pw, list);
                }
-
+        /** Now sync it by time , to get earlier pics at first of the list */
        pw->cache_list = pan_cache_sort(pw->cache_list, SORT_TIME, TRUE);
        list = filelist_sort(list, SORT_TIME, TRUE);
 
@@ -224,7 +224,9 @@
 
                fd = work->data;
                work = work->next;
-
+               /** Compares new considered file date with day 'tc'. If 
tc=fd->date ; then increments the total
+                   amount of pics found for that day; and updates day_max if 
that day has more pics than
+                   all the days considered since now.If not, it updates 'tc' 
with the new day, and resets counting */
                if (!pan_date_compare(fd->date, tc, PAN_DATE_LENGTH_DAY))
                        {
                        count = 0;
@@ -238,11 +240,14 @@
                }
 
        DEBUG_1("biggest day contains %d images", day_max);
-
+       /** Grid computing.Grid size is determinated by 'day_max', so it 
ensured that all days will fit it,because
+           they have less pics than 'day_max'.
+            Day width and height are MAX between grid and their constants; in 
order to look pretty*/
        grid = (gint)(sqrt((gdouble)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);
 
+       /** Gets first and last year and month of the pics */
        if (list)
                {
                FileData *fd = list->data;
@@ -258,7 +263,7 @@
                end_year = pan_date_value(fd->date, PAN_DATE_LENGTH_YEAR);
                end_month = pan_date_value(fd->date, PAN_DATE_LENGTH_MONTH);
                }
-
+       /** Update height and weigth with borders length; and sets x and y to 
their value,respectively*/
        *width = PAN_BOX_BORDER * 2;
        *height = PAN_BOX_BORDER * 2;
 
@@ -266,10 +271,12 @@
        y = PAN_BOX_BORDER;
 
        work = list;
+       /** While we have¡n reached end_year; and if so we haven't reached 
end_motnh, do work */
        while (work && (year < end_year || (year == end_year && month <= 
end_month)))
                {
                PanItem *pi_month;
                PanItem *pi_text;
+               PanItem *pi_image;
                gint day;
                gint days;
                gint col;
@@ -292,31 +299,34 @@
                                }
                        continue;
                        }
-
+               /** Get day and week values */
                days = pan_date_value(dt, PAN_DATE_LENGTH_DAY);
                dt = pan_date_to_time(year, month, 1);
                col = pan_date_value(dt, PAN_DATE_LENGTH_WEEK);
                row = 1;
 
                x = PAN_BOX_BORDER;
-
+               /** New pan item : month */
                pi_month = pan_item_box_new(pw, NULL, x, y, PAN_CAL_DAY_WIDTH * 
7, PAN_CAL_DAY_HEIGHT / 4,
                                            PAN_CAL_MONTH_BORDER,
                                            PAN_CAL_MONTH_COLOR, 
PAN_CAL_MONTH_ALPHA,
                                            PAN_CAL_MONTH_BORDER_COLOR, 
PAN_CAL_MONTH_ALPHA);
                buf = pan_date_value_string(dt, PAN_DATE_LENGTH_MONTH);
+
+               /** Date text */
                pi_text = pan_item_text_new(pw, x, y, buf,
                                            PAN_TEXT_ATTR_BOLD | 
PAN_TEXT_ATTR_HEADING,
                                            PAN_TEXT_BORDER_SIZE,
                                            PAN_CAL_MONTH_TEXT_COLOR, 255);
                g_free(buf);
+               /** pi_text x and y position.To make it start at left upper 
corner of month box. */
                pi_text->x = pi_month->x + (pi_month->width - pi_text->width) / 
2;
-
+               
                pi_month->height = pi_text->y + pi_text->height - pi_month->y;
-
+               /** Updates x and y, to start writting inside month box, at the 
left upper corner of next day box */
                x = PAN_BOX_BORDER + col * PAN_CAL_DAY_WIDTH;
                y = pi_month->y + pi_month->height + PAN_BOX_BORDER;
-
+               /** While there are days to show, do work */
                for (day = 1; day <= days; day++)
                        {
                        FileData *fd;
@@ -324,7 +334,7 @@
                        gint dx, dy;
                        gint n = 0;
                        gchar fake_path[20];
-
+                       /** Get day of the week ; string and number */
                        dt = pan_date_to_time(year, month, day);
 
                        /*
@@ -335,26 +345,28 @@
                        g_snprintf(fake_path, sizeof(fake_path), 
"//%04d-%02d-%02d", year, month, day);
                        fd = file_data_new_simple(fake_path);
                        fd->date = dt;
+                       /** Creates new pan item box that represents all the 
pictures in current considered day */
                        pi_day = pan_item_box_new(pw, fd, x, y, 
PAN_CAL_DAY_WIDTH, PAN_CAL_DAY_HEIGHT,
                                                  PAN_CAL_DAY_BORDER,
                                                  PAN_CAL_DAY_COLOR, 
PAN_CAL_DAY_ALPHA,
                                                  PAN_CAL_DAY_BORDER_COLOR, 
PAN_CAL_DAY_ALPHA);
                        pan_item_set_key(pi_day, "day");
-
+                       /** Computes gaps between days */
                        dx = x + PAN_CAL_DOT_GAP * 2;
                        dy = y + PAN_CAL_DOT_GAP * 2;
-
+                       /** Do we have pics that day to show? */
                        fd = (work) ? work->data : NULL;
+                       /** While we have pics to show current considered day, 
do work */
                        while (fd && pan_date_compare(fd->date, dt, 
PAN_DATE_LENGTH_DAY))
                                {
                                PanItem *pi;
-
+                               /** Pan item box to present a pic. No borders 
or alpha.*/
                                pi = pan_item_box_new(pw, fd, dx, dy, 
PAN_CAL_DOT_SIZE, PAN_CAL_DOT_SIZE,
                                                      0,
                                                      PAN_CAL_DOT_COLOR, 
PAN_CAL_DOT_ALPHA,
                                                      0, 0, 0, 0);
                                pan_item_set_key(pi, "dot");
-
+                               /** Updates 'dx' to position next picture . 
Same for 'dy'.*/
                                dx += PAN_CAL_DOT_SIZE + PAN_CAL_DOT_GAP;
                                if (dx + PAN_CAL_DOT_SIZE > pi_day->x + 
pi_day->width - PAN_CAL_DOT_GAP * 2)
                                        {
@@ -366,40 +378,42 @@
                                        /* must keep all dots within respective 
day even if it gets ugly */
                                        dy = y + PAN_CAL_DOT_GAP * 2;
                                        }
-
+                               /** Updates numbers of pics found. */
                                n++;
-
+                               
                                work = work->next;
                                fd = (work) ? work->data : NULL;
                                }
-
+                       /** If we found any pic that day, do work */
                        if (n > 0)
                                {
                                PanItem *pi;
-
+                               /** It computes intensity of color, depending 
of how many pics we found that day.
+                                   It will be darker if there are many pics, 
and lighter otherwise.*/
                                pi_day->color_r = MAX(pi_day->color_r - 61 - n 
* 3, 80);
                                pi_day->color_g = pi_day->color_r;
-
+                               /** */
                                buf = g_strdup_printf("( %d )", n);
                                pi = pan_item_text_new(pw, x, y, buf, 
PAN_TEXT_ATTR_NONE,
                                                       PAN_TEXT_BORDER_SIZE,
                                                       PAN_CAL_DAY_TEXT_COLOR, 
255);
                                g_free(buf);
-
+                               /** Positionates numbers of pictures found*/
                                pi->x = pi_day->x + (pi_day->width - pi->width) 
/ 2;
                                pi->y = pi_day->y + (pi_day->height - 
pi->height) / 2;
                                }
-
+                       
                        buf = g_strdup_printf("%d", day);
                        pan_item_text_new(pw, x + 4, y + 4, buf, 
PAN_TEXT_ATTR_BOLD | PAN_TEXT_ATTR_HEADING,
                                          PAN_TEXT_BORDER_SIZE,
                                          PAN_CAL_DAY_TEXT_COLOR, 255);
                        g_free(buf);
 
-
+                       /** Updates width and height to the right bottom of 
current pan item box*/
                        pan_item_size_coordinates(pi_day, PAN_BOX_BORDER, 
width, height);
 
                        col++;
+                       /** If we have more than 6 columns, reset it. If not, 
update 'x' with next x for next day */
                        if (col > 6)
                                {
                                col = 0;
@@ -412,10 +426,10 @@
                                x += PAN_CAL_DAY_WIDTH;
                                }
                        }
-
+               
                if (col > 0) y += PAN_CAL_DAY_HEIGHT;
                y += PAN_BOX_BORDER * 2;
-
+               /** If month > 12; consider next year*/
                month ++;
                if (month > 12)
                        {
@@ -423,7 +437,7 @@
                        month = 1;
                        }
                }
-
+       /** Finally, update width and height */
        *width += grid;
        *height = MAX(*height, grid + PAN_BOX_BORDER * 2 * 2);
 

Modified: branches/calendar/src/pan-item.c
===================================================================
--- branches/calendar/src/pan-item.c    2009-12-19 12:53:20 UTC (rev 1881)
+++ branches/calendar/src/pan-item.c    2009-12-27 21:35:42 UTC (rev 1882)
@@ -65,6 +65,29 @@
        pan_item_free(pi);
 }
 
+
+void pan_item_adjust_size_to_item(PanItem *pi,PanItem *parent)
+{
+       if (!pi || !parent) return;
+       
+       pi->width = parent->width - parent->border;
+       pi->height = parent->height - parent->border;
+       
+}
+/**
+ *  \brief Sets PanItem *pi as a parent of PanItem *chield
+ *
+ *  Updates pi->width & pi->height to fit with child->width & child->height.
+ */
+
+void pan_item_center_by_item(PanItem *pi, PanItem *child)
+{
+       if (!pi || !child) return;
+       
+       child->x += ((pi->width - child->width)/2);
+       child->y += ((pi->height - child->height)/2);
+
+}
 void pan_item_size_by_item(PanItem *pi, PanItem *child, gint border)
 {
        if (!pi || !child) return;
@@ -75,7 +98,21 @@
        if (pi->y + pi->height < child->y + child->height + border)
                pi->height = child->y + child->height + border - pi->y;
 }
-
+/**
+ *  \brief It updates weigth and height of pan item.
+ * 
+ *  Updates weigth 'w' and heigth 'h' of pan item 'pi'.It does so if 
+ *  weigth 'w' is less that current pi->x coordinate plus border plus
+ *  pi->width ;with exactly this summatory.In other words, it positionates
+ *  w to the rigth of the item box. Same for height 'w'; but positionates it
+ *  to the bottom of the box.
+ * 
+ *  \param[in] pi The pan item argument
+ *  \param[in] border Pan item's border
+ *  \param[out] w Updated weigth
+ *  \param[out] h Updated height
+ *  
+ */
 void pan_item_size_coordinates(PanItem *pi, gint border, gint *w, gint *h)
 {
        if (!pi) return;
@@ -444,7 +481,18 @@
  * item thumbnail type
  *-----------------------------------------------------------------------------
  */
-
+/**
+*   \brief Creates a new thumbnail.
+*
+*   Creates a new thumbnail in PanWindow pw;using FileData 'fd'; and puts it
+*   int 'x' and 'y' coordinates
+*   
+*   \param[in] pw Pan Window
+*   \param[in] fd FileData strcture that contains the image that we want to 
thumbnail.
+*   \param[in] x  x coordinate for new pan item thumbnail
+*   \param[in] y  y coordinate for new pan item thumbnail
+*   
+*/
 PanItem *pan_item_thumb_new(PanWindow *pw, FileData *fd, gint x, gint y)
 {
        PanItem *pi;
@@ -455,9 +503,10 @@
        pi->fd = fd;
        pi->x = x;
        pi->y = y;
+       /** Default pan thumbnails size + default pan shadow size */
        pi->width = PAN_THUMB_SIZE + PAN_SHADOW_OFFSET * 2;
        pi->height = PAN_THUMB_SIZE + PAN_SHADOW_OFFSET * 2;
-
+       /** Add to the Pan Window list in order to be considered by pan-view */
        pw->list = g_list_prepend(pw->list, pi);
 
        return pi;

Modified: branches/calendar/src/pan-types.h
===================================================================
--- branches/calendar/src/pan-types.h   2009-12-19 12:53:20 UTC (rev 1881)
+++ branches/calendar/src/pan-types.h   2009-12-27 21:35:42 UTC (rev 1882)
@@ -88,6 +88,7 @@
        PAN_LAYOUT_FOLDERS_LINEAR,
        PAN_LAYOUT_FOLDERS_FLOWER,
        PAN_LAYOUT_GRID,
+       PAN_LAYOUT_CRONOS,
        PAN_LAYOUT_COUNT
 } PanLayoutType;
 
@@ -134,6 +135,14 @@
 #define PAN_BORDER_BOTTOM      PAN_BORDER_3
 #define PAN_BORDER_LEFT                PAN_BORDER_4
 
+typedef enum {
+       PAN_DATE_LENGTH_EXACT,
+       PAN_DATE_LENGTH_HOUR,
+       PAN_DATE_LENGTH_DAY,
+       PAN_DATE_LENGTH_WEEK,
+       PAN_DATE_LENGTH_MONTH,
+       PAN_DATE_LENGTH_YEAR
+} PanDateLengthType;
 
 typedef struct _PanItem PanItem;
 struct _PanItem {
@@ -228,6 +237,16 @@
        
        /* file list for edit menu */
        GList *editmenu_fd_list;
+
+       /** Pan cronos */
+       PanDateLengthType depth;
+       gint current_year;
+       gint current_month;
+       gint current_day;
+       gint nthumbnails;
+       gint current_list_position;
+       SlideShowData *slide_show;
+        PanItem *cronos_click;
 };
 
 typedef struct _PanGrid PanGrid;
@@ -327,14 +346,6 @@
 
 /* utils in pan-util.c */
 
-typedef enum {
-       PAN_DATE_LENGTH_EXACT,
-       PAN_DATE_LENGTH_HOUR,
-       PAN_DATE_LENGTH_DAY,
-       PAN_DATE_LENGTH_WEEK,
-       PAN_DATE_LENGTH_MONTH,
-       PAN_DATE_LENGTH_YEAR
-} PanDateLengthType;
 
 gboolean pan_date_compare(time_t a, time_t b, PanDateLengthType length);
 gint pan_date_value(time_t d, PanDateLengthType length);
@@ -351,6 +362,7 @@
 
 void pan_calendar_update(PanWindow *pw, PanItem *pi_day);
 void pan_calendar_compute(PanWindow *pw, FileData *dir_fd, gint *width, gint 
*height);
+void pan_cronos_compute(PanWindow *pw, FileData *dir_fd, gint *width, gint 
*height);
 void pan_flower_compute(PanWindow *pw, FileData *dir_fd,
                        gint *width, gint *height,
                        gint *scroll_x, gint *scroll_y);

Modified: branches/calendar/src/pan-util.c
===================================================================
--- branches/calendar/src/pan-util.c    2009-12-19 12:53:20 UTC (rev 1881)
+++ branches/calendar/src/pan-util.c    2009-12-27 21:35:42 UTC (rev 1882)
@@ -21,7 +21,19 @@
  * date functions
  *-----------------------------------------------------------------------------
  */
-
+/**
+ * \brief Compare if a = b.
+ * 
+ * Compares time_t a with time_b.It uses length to determinate if it has
+ * to be compared by day,week,month,years or you want to compare exactly
+ * whole time_t date.
+ * \param a First time_t to compare
+ * \param b Second time_t to compare
+ * \return 
+ *    TRUE if (a == b)     
+ *    FALSE if ( a!= b)
+ *    
+ */
 gboolean pan_date_compare(time_t a, time_t b, PanDateLengthType length)
 {
        struct tm ta;
@@ -215,23 +227,25 @@
        GList *dlist;
        GList *result;
        GList *folders;
-
-       filelist_read(dir_fd, &flist, &dlist);
+       
+       filelist_read(dir_fd, &flist, &dlist); /** reads current directory */
        if (sort != SORT_NONE)
                {
                flist = filelist_sort(flist, sort, ascend);
                dlist = filelist_sort(dlist, sort, ascend);
                }
 
-       result = flist;
-       folders = dlist;
+       result = flist; /** result = files read in current directory */
+       folders = dlist; /** folders = folders read in current directory */
+
+       /** Iterates all found directories */
        while (folders)
                {
                FileData *fd;
 
                fd = folders->data;
                folders = g_list_remove(folders, fd);
-
+               /** Looks for more folders inside previous folders found */
                if (!pan_is_ignored(fd->path, ignore_symlinks) &&
                    filelist_read(fd, &flist, &dlist))
                        {
@@ -247,7 +261,7 @@
 
                file_data_unref(fd);
                }
-
+       /** here we have all files. We could then insert it in Sqlite */
        return result;
 }
 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */

Modified: branches/calendar/src/pan-view.c
===================================================================
--- branches/calendar/src/pan-view.c    2009-12-19 12:53:20 UTC (rev 1881)
+++ branches/calendar/src/pan-view.c    2009-12-27 21:35:42 UTC (rev 1882)
@@ -941,7 +941,7 @@
        *height = 0;
        *scroll_x = 0;
        *scroll_y = 0;
-
+       DEBUG_1("pan layour compute layout change: %d",pw->layout);
        switch (pw->layout)
                {
                case PAN_LAYOUT_GRID:
@@ -960,6 +960,11 @@
                case PAN_LAYOUT_TIMELINE:
                        pan_timeline_compute(pw, dir_fd, width, height);
                        break;
+               case PAN_LAYOUT_CRONOS:
+
+                       DEBUG_1("pan layout compute: Enters Cronos");
+                       pan_cronos_compute(pw, dir_fd, width, height);
+                       break;
                }
 
        pan_cache_free(pw);
@@ -1111,7 +1116,7 @@
                        return FALSE;
                        }
                }
-
+       //new_pan_calendar_window(pw->dir_fd);
        pan_layout_compute(pw, pw->dir_fd, &width, &height, &scroll_x, 
&scroll_y);
 
        pan_window_zoom_limit(pw);
@@ -1412,6 +1417,15 @@
                                case '/':
                                        pan_search_toggle_visible(pw, TRUE);
                                        break;
+
+                               case GDK_BackSpace:
+                               if (pw->layout == PAN_LAYOUT_CRONOS) 
+                               {
+                               pan_cronos_update(pw,-1,NULL);
+                               pan_layout_update(pw);
+                               break;
+                               }
+                               
                                default:
                                        stop_signal = FALSE;
                                        break;
@@ -2052,10 +2066,18 @@
                                pi = pan_item_find_by_coord(pw, PAN_ITEM_BOX, 
rx, ry, "day");
                                pan_calendar_update(pw, pi);
                                }
+                       else if (pi && pw->layout == PAN_LAYOUT_CRONOS && 
pw->depth != 99)
+                               {
+                               pan_cronos_update(pw,1,pi);
+                                pw->cronos_click = pi;
+                               pan_layout_update(pw);
+                               }
                        break;
                case MOUSE_BUTTON_MIDDLE:
                        break;
                case MOUSE_BUTTON_RIGHT:
+                       if (!pi && pw->layout == PAN_LAYOUT_CRONOS) 
pan_cronos_update(pw,-1,NULL);
+                       
                        pan_info_update(pw, pi);
                        menu = pan_popup_menu(pw);
                        gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, 
3, event->time);
@@ -2236,9 +2258,11 @@
 static void pan_window_layout_change_cb(GtkWidget *combo, gpointer data)
 {
        PanWindow *pw = data;
-
-       pw->layout = gtk_combo_box_get_active(GTK_COMBO_BOX(combo));
+       
+        pw->layout = gtk_combo_box_get_active(GTK_COMBO_BOX(combo));
+       DEBUG_1("pan layout selected: %d",pw->layout);
        pan_layout_update(pw);
+       
 }
 
 static void pan_window_layout_size_cb(GtkWidget *combo, gpointer data)
@@ -2249,6 +2273,14 @@
        pan_layout_update(pw);
 }
 
+static void pan_window_thumbnail_number(GtkWidget *combo, gpointer data)
+{
+       PanWindow *pw = data;
+
+       pw->nthumbnails = gtk_combo_box_get_active(GTK_COMBO_BOX(combo));
+       pan_layout_update(pw);
+}
+
 #if 0
 static void pan_window_date_toggle_cb(GtkWidget *button, gpointer data)
 {
@@ -2334,6 +2366,8 @@
        PanWindow *pw;
        GtkWidget *vbox;
        GtkWidget *box;
+       GtkWidget *vbox_cronos;
+       GtkWidget *box_cronos;
        GtkWidget *combo;
        GtkWidget *hbox;
        GtkWidget *frame;
@@ -2342,12 +2376,13 @@
 
        pw = g_new0(PanWindow, 1);
 
-       pw->dir_fd = file_data_ref(dir_fd);
-       pw->layout = PAN_LAYOUT_TIMELINE;
-       pw->size = PAN_IMAGE_SIZE_THUMB_NORMAL;
-       pw->thumb_size = PAN_THUMB_SIZE_NORMAL;
-       pw->thumb_gap = PAN_THUMB_GAP_NORMAL;
+       pw->dir_fd = file_data_ref(dir_fd);     /** Ref FileData */
+       pw->layout = PAN_LAYOUT_TIMELINE;      /** Type of oan layout : 
PAN_LAYOUT_NEW_CALENDAR */
+       pw->size = PAN_IMAGE_SIZE_THUMB_NORMAL;/** Image Size * /
+        pw->thumb_size = PAN_THUMB_SIZE_NORMAL; /** Image size */
+       pw->thumb_gap = PAN_THUMB_GAP_NORMAL;  /** spaces beteen items 
/deprected at this level */
 
+       /** Various options about using exif issues */
        if (!pref_list_int_get(PAN_PREF_GROUP, PAN_PREF_EXIF_PAN_DATE, 
&pw->exif_date_enable))
                {
                pw->exif_date_enable = FALSE;
@@ -2360,28 +2395,31 @@
                {
                pw->info_includes_exif = TRUE;
                }
-
+       /** Yes, ignore symbolic links */
        pw->ignore_symlinks = TRUE;
-
+        /** Don't know yet */
        pw->idle_id = 0;
-
+        /** new GTK window : initialization */
        pw->window = window_new(GTK_WINDOW_TOPLEVEL, "panview", NULL, NULL, 
_("Pan View"));
 
+        /** Geometry issues */
        geometry.min_width = DEFAULT_MINIMAL_WINDOW_SIZE;
        geometry.min_height = DEFAULT_MINIMAL_WINDOW_SIZE;
        gtk_window_set_geometry_hints(GTK_WINDOW(pw->window), NULL, &geometry, 
GDK_HINT_MIN_SIZE);
 
        gtk_window_set_resizable(GTK_WINDOW(pw->window), TRUE);
        gtk_container_set_border_width(GTK_CONTAINER(pw->window), 0);
-
+        
+        /** new Vbox*/
        vbox = gtk_vbox_new(FALSE, 0);
        gtk_container_add(GTK_CONTAINER(pw->window), vbox);
        gtk_widget_show(vbox);
-
+       /** prefered orientation box */
        box = pref_box_new(vbox, FALSE, GTK_ORIENTATION_HORIZONTAL, 
PREF_PAD_SPACE);
 
        pref_spacer(box, 0);
        pref_label_new(box, _("Location:"));
+       /** more bars */
        combo = tab_completion_new_with_history(&pw->path_entry, dir_fd->path, 
"pan_view_path", -1,
                                                pan_window_entry_activate_cb, 
pw);
        g_signal_connect(G_OBJECT(pw->path_entry->parent), "changed",
@@ -2395,7 +2433,9 @@
        gtk_combo_box_append_text(GTK_COMBO_BOX(combo), _("Folders"));
        gtk_combo_box_append_text(GTK_COMBO_BOX(combo), _("Folders (flower)"));
        gtk_combo_box_append_text(GTK_COMBO_BOX(combo), _("Grid"));
+       gtk_combo_box_append_text(GTK_COMBO_BOX(combo), _("Cronos"));
 
+
        gtk_combo_box_set_active(GTK_COMBO_BOX(combo), pw->layout);
        g_signal_connect(G_OBJECT(combo), "changed",
                         G_CALLBACK(pan_window_layout_change_cb), pw);
@@ -2414,16 +2454,20 @@
        gtk_combo_box_append_text(GTK_COMBO_BOX(combo), _("1:2 (50%)"));
        gtk_combo_box_append_text(GTK_COMBO_BOX(combo), _("1:1 (100%)"));
 
+       
+
        gtk_combo_box_set_active(GTK_COMBO_BOX(combo), pw->size);
        g_signal_connect(G_OBJECT(combo), "changed",
                         G_CALLBACK(pan_window_layout_size_cb), pw);
        gtk_box_pack_start(GTK_BOX(box), combo, FALSE, FALSE, 0);
        gtk_widget_show(combo);
 
+       combo = gtk_combo_box_new_text();
+
        table = pref_table_new(vbox, 2, 2, FALSE, TRUE);
        gtk_table_set_row_spacings(GTK_TABLE(table), 2);
        gtk_table_set_col_spacings(GTK_TABLE(table), 2);
-
+       /** new real image, in fact it's a widget */
        pw->imd = image_new(TRUE);
        pw->imd_normal = pw->imd;
 
@@ -2536,6 +2580,13 @@
        gtk_widget_show(pw->window);
 
        pan_window_list = g_list_append(pan_window_list, pw);
+
+
+       /** Pan Cronos */
+
+       pw->depth = PAN_DATE_LENGTH_YEAR;
+       pw->nthumbnails = 1;
+
 }
 
 /*

Modified: branches/calendar/src/slideshow.c
===================================================================
--- branches/calendar/src/slideshow.c   2009-12-19 12:53:20 UTC (rev 1881)
+++ branches/calendar/src/slideshow.c   2009-12-27 21:35:42 UTC (rev 1882)
@@ -112,7 +112,7 @@
        src_list = generate_list(ss);
        src_array = generate_ptr_array_from_list(src_list);
        g_list_free(src_list);
-
+       
        ptr_array_random_shuffle(src_array);
        g_ptr_array_foreach(src_array, (GFunc) list_prepend, &list);
        g_ptr_array_free(src_array, TRUE);
@@ -420,6 +420,12 @@
        return real_slideshow_start(imd, NULL, list, -1, NULL, NULL, stop_func, 
stop_data);
 }
 
+SlideShowData *slideshow_start_from_filelist_position(ImageWindow *imd, GList 
*list,
+                                                     void 
(*stop_func)(SlideShowData *, gpointer), gpointer stop_data,gint list_position)
+{
+  return real_slideshow_start(imd, NULL, list, list_position, NULL, NULL, 
stop_func, stop_data);
+}
+
 SlideShowData *slideshow_start_from_collection(ImageWindow *imd, 
CollectionData *cd,
                                               void (*stop_func)(SlideShowData 
*, gpointer), gpointer stop_data,
                                               CollectInfo *start_info)

Modified: branches/calendar/src/slideshow.h
===================================================================
--- branches/calendar/src/slideshow.h   2009-12-19 12:53:20 UTC (rev 1881)
+++ branches/calendar/src/slideshow.h   2009-12-27 21:35:42 UTC (rev 1882)
@@ -31,6 +31,8 @@
 void slideshow_next(SlideShowData *ss);
 void slideshow_prev(SlideShowData *ss);
 
+SlideShowData *slideshow_start_from_filelist_position(ImageWindow *imd, GList 
*list,
+                                                  void 
(*stop_func)(SlideShowData *, gpointer), gpointer stop_data,gint start_point);
 SlideShowData *slideshow_start_from_filelist(ImageWindow *imd, GList *list,
                                              void (*stop_func)(SlideShowData 
*, gpointer), gpointer stop_data);
 SlideShowData *slideshow_start_from_collection(ImageWindow *imd, 
CollectionData *cd,


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Geeqie-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geeqie-svn

Reply via email to