Added entry creation via templates

This commit is contained in:
michael starke
2013-12-01 23:10:25 +01:00
parent d16ebfc4d7
commit f266375a09
5 changed files with 38 additions and 29 deletions

View File

@@ -36,7 +36,7 @@
/*
The Method is rather brute force
It's possible nicer to cache the entries and just update
the menu entries, that actuyll need updating
the menu entries, that actually need updating
*/
MPDocument *document = [[NSDocumentController sharedDocumentController] currentDocument];
if(!document) {
@@ -51,7 +51,7 @@
NSMenuItem *templateItem = [[NSMenuItem allocWithZone:[NSMenu menuZone]] initWithTitle:[NSString stringWithFormat:templateMask, entry.title]
action:@selector(createEntryFromTemplate:)
keyEquivalent:@""];
[templateItem setRepresentedObject:entry];
[templateItem setRepresentedObject:entry.uuid];
[menu addItem:templateItem];
}
/* If there are no entries, add a note as disabled menu item */