Experimenting with edit mode for the Inspector

This commit is contained in:
michael starke
2013-07-13 18:45:32 +02:00
parent a31e287ec8
commit 6b14f84afb
4 changed files with 218 additions and 11 deletions

View File

@@ -68,6 +68,8 @@ enum {
- (IBAction)saveAttachment:(id)sender;
- (IBAction)addAttachment:(id)sender;
- (IBAction)removeAttachment:(id)sender;
- (IBAction)edit:(id)sender;
- (IBAction)finishEdit:(id)sender;
@end
@@ -376,6 +378,21 @@ enum {
}
}
- (IBAction)edit:(id)sender {
[self.titleTextField setEditable:YES];
[self.usernameTextField setEditable:YES];
[[[[self windowController] document] undoManager] beginUndoGrouping];
}
- (IBAction)finishEdit:(id)sender {
NSUndoManager *undoManger = [[[self windowController] document] undoManager];
[undoManger setActionName:@"Edit"];
[undoManger endUndoGrouping];
[self.titleTextField setEditable:NO];
[self.usernameTextField setEditable:NO];
}
#pragma mark Notificiations
- (void)_didChangeCurrentItem:(NSNotification *)notification {
MPDocumentWindowController *sender = [notification object];