comparison src/layout.c @ 1558:e6da3a90e7b2

fixed metadata.confirm_on_dir_change
author nadvornik
date Tue, 21 Apr 2009 21:16:32 +0000
parents 7302ff300a52
children 9a64eda3e020
comparison
equal deleted inserted replaced
1557:c10cd5197447 1558:e6da3a90e7b2
936 936
937 937
938 gboolean layout_set_fd(LayoutWindow *lw, FileData *fd) 938 gboolean layout_set_fd(LayoutWindow *lw, FileData *fd)
939 { 939 {
940 gboolean have_file = FALSE; 940 gboolean have_file = FALSE;
941 gboolean dir_changed = TRUE;
941 942
942 if (!layout_valid(&lw)) return FALSE; 943 if (!layout_valid(&lw)) return FALSE;
943 944
944 if (!fd || !isname(fd->path)) return FALSE; 945 if (!fd || !isname(fd->path)) return FALSE;
945 if (lw->dir_fd && fd == lw->dir_fd) 946 if (lw->dir_fd && fd == lw->dir_fd)
963 964
964 base = remove_level_from_path(fd->path); 965 base = remove_level_from_path(fd->path);
965 if (lw->dir_fd && strcmp(lw->dir_fd->path, base) == 0) 966 if (lw->dir_fd && strcmp(lw->dir_fd->path, base) == 0)
966 { 967 {
967 g_free(base); 968 g_free(base);
969 dir_changed = FALSE;
968 } 970 }
969 else if (isdir(base)) 971 else if (isdir(base))
970 { 972 {
971 if (lw->dir_fd) 973 if (lw->dir_fd)
972 { 974 {
1006 else if (!options->lazy_image_sync) 1008 else if (!options->lazy_image_sync)
1007 { 1009 {
1008 layout_image_set_index(lw, 0); 1010 layout_image_set_index(lw, 0);
1009 } 1011 }
1010 1012
1011 if (options->metadata.confirm_on_dir_change) 1013 if (options->metadata.confirm_on_dir_change && dir_changed)
1012 metadata_write_queue_confirm(NULL, NULL); 1014 metadata_write_queue_confirm(NULL, NULL);
1013 1015
1014 return TRUE; 1016 return TRUE;
1015 } 1017 }
1016 1018