diff --git a/Frameworks/OakFilterList/src/FileChooser.h b/Frameworks/OakFilterList/src/FileChooser.h index ab49c562..e5d06275 100644 --- a/Frameworks/OakFilterList/src/FileChooser.h +++ b/Frameworks/OakFilterList/src/FileChooser.h @@ -1,7 +1,9 @@ #import +#import PUBLIC @interface FileChooser : NSObject @property (nonatomic) NSString* path; +@property (nonatomic) scm::info_ptr const& scmInfo; @property (nonatomic) std::vector const& openDocuments; @property (nonatomic) oak::uuid_t const& currentDocument; diff --git a/Frameworks/OakFilterList/src/FileChooser.mm b/Frameworks/OakFilterList/src/FileChooser.mm index 36e3f474..d321c760 100644 --- a/Frameworks/OakFilterList/src/FileChooser.mm +++ b/Frameworks/OakFilterList/src/FileChooser.mm @@ -141,6 +141,7 @@ static path::glob_list_t globs_for_path (std::string const& path) @interface FileChooser () { + scm::info_ptr _scmInfo; std::vector _openDocuments; std::map _openDocumentsMap; oak::uuid_t _currentDocument; @@ -299,11 +300,14 @@ static path::glob_list_t globs_for_path (std::string const& path) _retainedSelf = nil; } -- (BOOL)allowsMultipleSelection { return _tableView.allowsMultipleSelection; } -- (void)setAllowsMultipleSelection:(BOOL)flag { _tableView.allowsMultipleSelection = flag; } +- (BOOL)allowsMultipleSelection { return _tableView.allowsMultipleSelection; } +- (void)setAllowsMultipleSelection:(BOOL)flag { _tableView.allowsMultipleSelection = flag; } -- (oak::uuid_t const&)currentDocument { return _currentDocument; } -- (void)setCurrentDocument:(oak::uuid_t const&)newDocument { _currentDocument = newDocument; [self reload]; } +- (scm::info_ptr const&)scmInfo { return _scmInfo; } +- (void)setScmInfo:(scm::info_ptr const&)scmInfo { _scmInfo = scmInfo; [self reload]; } + +- (oak::uuid_t const&)currentDocument { return _currentDocument; } +- (void)setCurrentDocument:(oak::uuid_t const&)newDocument { _currentDocument = newDocument; [self reload]; } - (std::vector const&)openDocuments { @@ -699,6 +703,9 @@ inline void rank_record (document_record_t& record, filter_string_t const& filte record.image.exists = isOnDisk; record.image.modified = isModified; + if(_scmInfo && record.full_path != NULL_STR) + record.image.scmStatus = _scmInfo->status(record.full_path); + [cell setImage:record.image]; }