comparison src/filedata.c @ 1239:254b09942e68

metadata write mode (direct or sidecar) made configurable for each file format
author nadvornik
date Sun, 11 Jan 2009 12:13:30 +0000
parents 878718372aca
children 8b89e3ff286b
comparison
equal deleted inserted replaced
1238:947e603a52c6 1239:254b09942e68
665 fd->change = NULL; 665 fd->change = NULL;
666 } 666 }
667 667
668 static gboolean file_data_can_write_directly(FileData *fd) 668 static gboolean file_data_can_write_directly(FileData *fd)
669 { 669 {
670 return (filter_file_class(fd->extension, FORMAT_CLASS_IMAGE)); 670 return filter_name_is_writable(fd->extension);
671 /* FIXME: detect what exiv2 really supports */
672 } 671 }
673 672
674 static gboolean file_data_can_write_sidecar(FileData *fd) 673 static gboolean file_data_can_write_sidecar(FileData *fd)
675 { 674 {
676 return (filter_file_class(fd->extension, FORMAT_CLASS_RAWIMAGE)); 675 return filter_name_allow_sidecar(fd->extension) && !filter_name_is_writable(fd->extension);
677 /* FIXME: detect what exiv2 really supports */
678 } 676 }
679 677
680 gchar *file_data_get_sidecar_path(FileData *fd, gboolean existing_only) 678 gchar *file_data_get_sidecar_path(FileData *fd, gboolean existing_only)
681 { 679 {
682 gchar *sidecar_path = NULL; 680 gchar *sidecar_path = NULL;