X-Git-Url: http://geeqie.org/cgi-bin/gitweb.cgi?p=geeqie.git;a=blobdiff_plain;f=src%2Flayout.c;h=c411d9af5546d814448ca6a6828a0cbc512af506;hp=338b05c26bdb10b2baab6035fd710e52eb9f1c2c;hb=8552b6786d67b5712bc5cd45830cdbd48e18769b;hpb=1eefe9b77417f8f30c96fc5e389535b4132950be diff --git a/src/layout.c b/src/layout.c index 338b05c2..c411d9af 100644 --- a/src/layout.c +++ b/src/layout.c @@ -1184,6 +1184,7 @@ gboolean layout_set_fd(LayoutWindow *lw, FileData *fd) { gboolean have_file = FALSE; gboolean dir_changed = TRUE; + gchar *last_image; if (!layout_valid(&lw)) return FALSE; @@ -1202,6 +1203,16 @@ gboolean layout_set_fd(LayoutWindow *lw, FileData *fd) } lw->dir_fd = file_data_ref(fd); file_data_register_real_time_monitor(fd); + + last_image = get_recent_viewed_folder_image(fd->path); + if (last_image) + { + fd = file_data_new_group(last_image); + g_free(last_image); + + if (isfile(fd->path)) have_file = TRUE; + } + } else { @@ -2977,6 +2988,8 @@ static void layout_config_startup_path(LayoutOptions *lop, gchar **path) static void layout_config_commandline(LayoutOptions *lop, gchar **path) { + gchar *last_image; + if (command_line->startup_blank) { *path = NULL; @@ -2991,6 +3004,16 @@ static void layout_config_commandline(LayoutOptions *lop, gchar **path) } else layout_config_startup_path(lop, path); + if (isdir(*path)) + { + last_image = get_recent_viewed_folder_image(*path); + if (last_image) + { + g_free(*path); + *path = last_image; + } + } + if (command_line->tools_show) { lop->tools_float = FALSE;