mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-20 08:19:25 +00:00
Experimenting with edit mode for the Inspector
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user