Fixed #289. Pressing ALT now toggles between Save as… and Save a Copy…

This commit is contained in:
michael starke
2014-12-13 16:13:30 +01:00
parent e109901fa8
commit e552c725f8
4 changed files with 17 additions and 5 deletions

View File

@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="6250" systemVersion="13F34" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="6254" systemVersion="13F34" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="6250"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="6254"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="NSApplication">
@@ -144,6 +144,12 @@
<action selector="saveDocumentAs:" target="-1" id="1255"/>
</connections>
</menuItem>
<menuItem title="Save a Copy…" alternate="YES" keyEquivalent="s" id="i24-Gn-j9c">
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
<connections>
<action selector="saveDocumentTo:" target="-1" id="NHY-sz-zoR"/>
</connections>
</menuItem>
<menuItem title="Revert to Saved" id="112">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>

View File

@@ -143,6 +143,7 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGroupKey
}
- (void)saveDocumentAs:(id)sender {
/* take a look at NSEditor Protocoll commitEding, as NSDocument supports that */
[[NSNotificationCenter defaultCenter] postNotificationName:MPDocumentWillSaveNotification object:self];
[super saveDocumentAs:sender];
}
@@ -152,6 +153,11 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGroupKey
[super saveDocument:sender];
}
- (void)saveDocumentTo:(id)sender {
[[NSNotificationCenter defaultCenter] postNotificationName:MPDocumentWillSaveNotification object:self];
[super saveDocumentTo:sender];
}
- (void)windowControllerDidLoadNib:(NSWindowController *)aController
{
[super windowControllerDidLoadNib:aController];

View File

@@ -132,10 +132,10 @@
"1181.title" = "Inspector ein/ausblenden";
/* Class = "NSMenuItem"; title = "Show Password Creator"; ObjectID = "1200"; */
"1200.title" = "Passwortwerkzeug anzeigen";
"1200.title" = "Passwortgenerator anzeigen";
/* Class = "NSMenuItem"; title = "Change Master Password…"; ObjectID = "1203"; */
"1203.title" = "Hauptpassword ändern …";
"1203.title" = "Datenbankpassword ändern …";
/* Class = "NSMenuItem"; title = "Database Settings…"; ObjectID = "1231"; */
"1231.title" = "Datenbankeinstellungen …";

View File

@@ -132,7 +132,7 @@
"1181.title" = "Toggle Inspector";
/* Class = "NSMenuItem"; title = "Show Password Creator"; ObjectID = "1200"; */
"1200.title" = "Show Password Creator";
"1200.title" = "Show Password Generator";
/* Class = "NSMenuItem"; title = "Change Master Password…"; ObjectID = "1203"; */
"1203.title" = "Change Master Password…";