Allow editing .tm_properties files from bundle item chooser

This commit is contained in:
Allan Odgaard
2014-09-06 15:08:39 +02:00
parent 1f1cfee5e9
commit ac151e7d4c
2 changed files with 3 additions and 1 deletions

View File

@@ -486,6 +486,8 @@ BOOL HasDocumentWindow (NSArray* windows)
if(NSString* uuid = [[[sender selectedItems] lastObject] objectForKey:@"uuid"])
[[BundleEditor sharedInstance] revealBundleItem:bundles::lookup(to_s(uuid))];
else if(NSString* path = [[[sender selectedItems] lastObject] objectForKey:@"path"])
OakOpenDocuments(@[ path ]);
}
- (void)editBundleItemWithUUIDString:(NSString*)uuidString

View File

@@ -746,7 +746,7 @@ static std::vector<bundles::item_ptr> relevant_items_in_scope (scope::context_t
- (BOOL)canEdit
{
BundleItemChooserItem* item = self.tableView.selectedRow != -1 ? self.items[self.tableView.selectedRow] : nil;
return item.uuid && self.editAction;
return item.uuid && self.editAction || item.path;
}
- (void)accept:(id)sender