mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-21 16:39:35 +00:00
Added settings to disable password generation for newly created entries. Fixes #1050
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="17156" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="17701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||
<dependencies>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="17156"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="17701"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
@@ -11,6 +11,7 @@
|
||||
<outlet property="browserPopup" destination="ehI-gq-lsb" id="YMy-L1-pQw"/>
|
||||
<outlet property="doubleClickTitlePopup" destination="40" id="aKJ-q9-xjb"/>
|
||||
<outlet property="doubleClickURLPopup" destination="13" id="fGP-5I-0XK"/>
|
||||
<outlet property="generatePasswordOnEntriesCheckButton" destination="yxq-YK-61i" id="0SK-CT-Wdn"/>
|
||||
<outlet property="hideAfterCopyToClipboardCheckButton" destination="vT4-wF-ned" id="d7e-vc-cAQ"/>
|
||||
<outlet property="updatePasswordOnTemplateEntriesCheckButton" destination="LPY-sM-hjS" id="wav-op-uck"/>
|
||||
<outlet property="view" destination="1" id="52"/>
|
||||
@@ -19,16 +20,16 @@
|
||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||
<customView translatesAutoresizingMaskIntoConstraints="NO" id="1">
|
||||
<rect key="frame" x="0.0" y="0.0" width="400" height="316"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="449" height="338"/>
|
||||
<subviews>
|
||||
<box autoresizesSubviews="NO" horizontalHuggingPriority="249" verticalHuggingPriority="500" borderType="line" title="Entry Table" translatesAutoresizingMaskIntoConstraints="NO" id="2">
|
||||
<rect key="frame" x="17" y="168" width="366" height="99"/>
|
||||
<rect key="frame" x="17" y="194" width="415" height="96"/>
|
||||
<view key="contentView" id="cfa-nq-Kzt">
|
||||
<rect key="frame" x="3" y="3" width="360" height="81"/>
|
||||
<rect key="frame" x="3" y="3" width="409" height="78"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="9">
|
||||
<rect key="frame" x="18" y="53" width="134" height="16"/>
|
||||
<rect key="frame" x="18" y="51" width="134" height="16"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Double-click on URL:" id="10">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
@@ -36,7 +37,7 @@
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="13">
|
||||
<rect key="frame" x="156" y="47" width="109" height="25"/>
|
||||
<rect key="frame" x="155" y="44" width="110" height="25"/>
|
||||
<popUpButtonCell key="cell" type="push" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" id="14">
|
||||
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="menu"/>
|
||||
@@ -49,7 +50,7 @@
|
||||
</popUpButtonCell>
|
||||
</popUpButton>
|
||||
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="36">
|
||||
<rect key="frame" x="18" y="22" width="134" height="16"/>
|
||||
<rect key="frame" x="18" y="21" width="134" height="16"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" enabled="NO" sendsActionOnEndEditing="YES" title="Double-click on Title:" id="37">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
@@ -57,7 +58,7 @@
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="40">
|
||||
<rect key="frame" x="156" y="17" width="139" height="24"/>
|
||||
<rect key="frame" x="155" y="16" width="140" height="23"/>
|
||||
<popUpButtonCell key="cell" type="push" title="Opens Inspector" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="44" id="41">
|
||||
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="menu"/>
|
||||
@@ -90,7 +91,7 @@
|
||||
</constraints>
|
||||
</box>
|
||||
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="ehI-gq-lsb">
|
||||
<rect key="frame" x="113" y="272" width="135" height="25"/>
|
||||
<rect key="frame" x="112" y="294" width="136" height="25"/>
|
||||
<popUpButtonCell key="cell" type="push" title="Default Browser" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="7YX-EA-9KA" id="7Ip-sU-sAK">
|
||||
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="menu"/>
|
||||
@@ -104,22 +105,29 @@
|
||||
</popUpButtonCell>
|
||||
</popUpButton>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="lOo-NI-b07">
|
||||
<rect key="frame" x="18" y="278" width="91" height="16"/>
|
||||
<rect key="frame" x="18" y="301" width="91" height="16"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" enabled="NO" sendsActionOnEndEditing="YES" title="Open URLs in:" id="soD-wI-YOH">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<box horizontalHuggingPriority="249" borderType="line" title="Templates" translatesAutoresizingMaskIntoConstraints="NO" id="Xvt-tP-TbR">
|
||||
<rect key="frame" x="17" y="92" width="366" height="72"/>
|
||||
<box horizontalHuggingPriority="249" borderType="line" title="New Entries" translatesAutoresizingMaskIntoConstraints="NO" id="Xvt-tP-TbR">
|
||||
<rect key="frame" x="17" y="94" width="415" height="96"/>
|
||||
<view key="contentView" id="g0i-00-sng">
|
||||
<rect key="frame" x="3" y="3" width="360" height="54"/>
|
||||
<rect key="frame" x="3" y="3" width="409" height="78"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="LPY-sM-hjS">
|
||||
<rect key="frame" x="18" y="18" width="222" height="18"/>
|
||||
<buttonCell key="cell" type="check" title="Update password for new entries" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="RaM-t2-DVR">
|
||||
<rect key="frame" x="18" y="41" width="354" height="18"/>
|
||||
<buttonCell key="cell" type="check" title="Generate password for entries created from templates" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="RaM-t2-DVR">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
</button>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="yxq-YK-61i">
|
||||
<rect key="frame" x="18" y="19" width="238" height="18"/>
|
||||
<buttonCell key="cell" type="check" title="Generate password for new entries" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="iCq-mG-p81">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
@@ -127,20 +135,23 @@
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="LPY-sM-hjS" firstAttribute="top" secondItem="g0i-00-sng" secondAttribute="top" constant="20" symbolic="YES" id="Ip3-vX-0L9"/>
|
||||
<constraint firstItem="yxq-YK-61i" firstAttribute="leading" secondItem="LPY-sM-hjS" secondAttribute="leading" id="LfJ-z5-Q3P"/>
|
||||
<constraint firstItem="LPY-sM-hjS" firstAttribute="leading" secondItem="g0i-00-sng" secondAttribute="leading" constant="20" symbolic="YES" id="RE9-Jf-nFR"/>
|
||||
<constraint firstAttribute="bottom" secondItem="LPY-sM-hjS" secondAttribute="bottom" constant="20" symbolic="YES" id="nGd-XA-Jj9"/>
|
||||
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="yxq-YK-61i" secondAttribute="trailing" constant="20" symbolic="YES" id="WHR-l8-6ce"/>
|
||||
<constraint firstAttribute="bottom" secondItem="yxq-YK-61i" secondAttribute="bottom" constant="20" symbolic="YES" id="rNE-sZ-z2e"/>
|
||||
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="LPY-sM-hjS" secondAttribute="trailing" constant="20" symbolic="YES" id="wyU-eZ-BSC"/>
|
||||
<constraint firstItem="yxq-YK-61i" firstAttribute="top" secondItem="LPY-sM-hjS" secondAttribute="bottom" constant="6" symbolic="YES" id="yNh-4f-kMr"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</box>
|
||||
<box horizontalHuggingPriority="249" title="Clipboard" translatesAutoresizingMaskIntoConstraints="NO" id="Kff-Xp-hAT">
|
||||
<rect key="frame" x="17" y="16" width="366" height="72"/>
|
||||
<rect key="frame" x="17" y="16" width="415" height="74"/>
|
||||
<view key="contentView" id="Ntf-zj-VZL">
|
||||
<rect key="frame" x="3" y="3" width="360" height="54"/>
|
||||
<rect key="frame" x="3" y="3" width="409" height="56"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="vT4-wF-ned">
|
||||
<rect key="frame" x="18" y="18" width="280" height="18"/>
|
||||
<rect key="frame" x="18" y="19" width="284" height="18"/>
|
||||
<buttonCell key="cell" type="check" title="Hide application after copying to clipboard" bezelStyle="regularSquare" imagePosition="left" inset="2" id="1Vr-nY-Ogv">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
|
||||
@@ -687,9 +687,14 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGrou
|
||||
if([self.tree.metaData.defaultUserName length] > 0) {
|
||||
newEntry.username = self.tree.metaData.defaultUserName;
|
||||
}
|
||||
NSString *defaultPassword = [NSString passwordWithDefaultSettings];
|
||||
if(defaultPassword) {
|
||||
newEntry.password = defaultPassword;
|
||||
|
||||
/* only generate passwords for new entries, if set */
|
||||
BOOL generatePassword = [NSUserDefaults.standardUserDefaults boolForKey:kMPSettingsKeyGeneratePasswordForNewEntires];
|
||||
if(generatePassword) {
|
||||
NSString *defaultPassword = [NSString passwordWithDefaultSettings];
|
||||
if(defaultPassword) {
|
||||
newEntry.password = defaultPassword;
|
||||
}
|
||||
}
|
||||
/* re-enable undo/redo if we did turn it off */
|
||||
if(wasUndoEnabeld) {
|
||||
|
||||
@@ -81,6 +81,7 @@ APPKIT_EXTERN NSString *const kMPSettingsKeyEnableQuicklookPreview;
|
||||
APPKIT_EXTERN NSString *const kMPSettingsKeyDoubleClickURLAction;
|
||||
APPKIT_EXTERN NSString *const kMPSettingsKeyDoubleClickTitleAction;
|
||||
APPKIT_EXTERN NSString *const kMPSettingsKeyUpdatePasswordOnTemplateEntries;
|
||||
APPKIT_EXTERN NSString *const kMPSettingsKeyGeneratePasswordForNewEntires;
|
||||
APPKIT_EXTERN NSString *const kMPSettingsKeyHideAfterCopyToClipboard;
|
||||
|
||||
/* Plugins */
|
||||
|
||||
@@ -79,6 +79,7 @@ NSString *const kMPSettingsKeyPasswordDefaultsForEntry = @"Pa
|
||||
NSString *const kMPSettingsKeyDoubleClickURLAction = @"DoubleClickURLAction";
|
||||
NSString *const kMPSettingsKeyDoubleClickTitleAction = @"DoubleClickTitleAction";
|
||||
NSString *const kMPSettingsKeyUpdatePasswordOnTemplateEntries = @"UpdatePasswordOnTemplateEntries";
|
||||
NSString *const kMPSettingsKeyGeneratePasswordForNewEntires = @"GeneratePasswordForNewEntires";
|
||||
NSString *const kMPSettingsKeyHideAfterCopyToClipboard = @"HideAfterCopyToClipboard";
|
||||
|
||||
NSString *const kMPSettingsKeyLoadUnsecurePlugins = @"LoadUnsecurePlugins";
|
||||
@@ -162,6 +163,7 @@ NSString *const kMPDepricatedSettingsKeyAutotypeHideAccessibiltyWarning = @"Au
|
||||
kMPSettingsKeyDoubleClickTitleAction: @(MPDoubleClickTitleActionInspect),
|
||||
kMPSettingsKeyLoadUnsecurePlugins: @NO,
|
||||
kMPSettingsKeyUpdatePasswordOnTemplateEntries: @YES,
|
||||
kMPSettingsKeyGeneratePasswordForNewEntires: @YES,
|
||||
kMPSettingsKeyDisabledPlugins: @[],
|
||||
kMPSettingsKeyLoadIncompatiblePlugins: @NO,
|
||||
kMPSettingsKeyQuitOnLastWindowClose: @NO,
|
||||
|
||||
@@ -29,8 +29,7 @@
|
||||
@property (strong) IBOutlet NSPopUpButton *doubleClickURLPopup;
|
||||
@property (strong) IBOutlet NSPopUpButton *doubleClickTitlePopup;
|
||||
@property (strong) IBOutlet NSButton *updatePasswordOnTemplateEntriesCheckButton;
|
||||
@property (strong) IBOutlet NSButton *generatePasswordOnEntriesCheckButton;
|
||||
@property (strong) IBOutlet NSButton *hideAfterCopyToClipboardCheckButton;
|
||||
|
||||
- (IBAction)_showCustomBrowserSelection:(id)sender;
|
||||
|
||||
@end
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
|
||||
@interface MPWorkflowPreferencesController ()
|
||||
|
||||
- (IBAction)_showCustomBrowserSelection:(id)sender;
|
||||
|
||||
@end
|
||||
|
||||
@implementation MPWorkflowPreferencesController
|
||||
@@ -35,11 +37,12 @@
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
NSUserDefaultsController *defaultsController = [NSUserDefaultsController sharedUserDefaultsController];
|
||||
NSUserDefaultsController *defaultsController = NSUserDefaultsController.sharedUserDefaultsController;
|
||||
|
||||
[self.doubleClickURLPopup bind:NSSelectedIndexBinding toObject:defaultsController withKeyPath:[MPSettingsHelper defaultControllerPathForKey:kMPSettingsKeyDoubleClickURLAction] options:nil];
|
||||
[self.doubleClickTitlePopup bind:NSSelectedIndexBinding toObject:defaultsController withKeyPath:[MPSettingsHelper defaultControllerPathForKey:kMPSettingsKeyDoubleClickTitleAction] options:nil];
|
||||
[self.updatePasswordOnTemplateEntriesCheckButton bind:NSValueBinding toObject:defaultsController withKeyPath:[MPSettingsHelper defaultControllerPathForKey:kMPSettingsKeyUpdatePasswordOnTemplateEntries] options:nil];
|
||||
[self.generatePasswordOnEntriesCheckButton bind:NSValueBinding toObject:defaultsController withKeyPath:[MPSettingsHelper defaultControllerPathForKey:kMPSettingsKeyGeneratePasswordForNewEntires] options:nil];
|
||||
[self.hideAfterCopyToClipboardCheckButton bind:NSValueBinding toObject:defaultsController withKeyPath:[MPSettingsHelper defaultControllerPathForKey:kMPSettingsKeyHideAfterCopyToClipboard] options:nil];
|
||||
[self _updateBrowserSelection];
|
||||
}
|
||||
@@ -65,18 +68,17 @@
|
||||
- (void)_selectBrowser:(id)sender {
|
||||
NSString *browserBundleId = [sender representedObject];
|
||||
if(nil == browserBundleId) {
|
||||
[[NSUserDefaults standardUserDefaults] removeObjectForKey:kMPSettingsKeyBrowserBundleId];
|
||||
[NSUserDefaults.standardUserDefaults removeObjectForKey:kMPSettingsKeyBrowserBundleId];
|
||||
}
|
||||
else {
|
||||
[[NSUserDefaults standardUserDefaults] setObject:browserBundleId forKey:kMPSettingsKeyBrowserBundleId];
|
||||
[NSUserDefaults.standardUserDefaults setObject:browserBundleId forKey:kMPSettingsKeyBrowserBundleId];
|
||||
}
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
[self _updateBrowserSelection];
|
||||
}
|
||||
|
||||
- (void)_showCustomBrowserSelection:(id)sender {
|
||||
NSOpenPanel *openPanel = [NSOpenPanel openPanel];
|
||||
NSURL *applicationURL = [[NSFileManager defaultManager] URLsForDirectory:NSApplicationDirectory inDomains:NSLocalDomainMask][0];
|
||||
NSURL *applicationURL = [NSFileManager.defaultManager URLsForDirectory:NSApplicationDirectory inDomains:NSLocalDomainMask].firstObject;
|
||||
openPanel.directoryURL = applicationURL;
|
||||
openPanel.allowsMultipleSelection = NO;
|
||||
openPanel.canChooseDirectories = NO;
|
||||
@@ -105,29 +107,26 @@
|
||||
NSMenu *browserMenu = [[NSMenu alloc] init];
|
||||
self.browserPopup.menu = browserMenu;
|
||||
|
||||
NSMenuItem *defaultItem = [[NSMenuItem alloc] init];
|
||||
defaultItem.title = NSLocalizedString(@"DEFAULT_BROWSER", "Default Browser");
|
||||
defaultItem.action = @selector(_selectBrowser:);
|
||||
defaultItem.keyEquivalent = @"";
|
||||
defaultItem.representedObject = nil;
|
||||
NSMenuItem *defaultItem = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"DEFAULT_BROWSER", "Default Browser")
|
||||
action:@selector(_selectBrowser:)
|
||||
keyEquivalent:@""];
|
||||
defaultItem.target = self;
|
||||
[browserMenu addItem:defaultItem];
|
||||
|
||||
NSString *currentDefaultBrowser = [[NSUserDefaults standardUserDefaults] objectForKey:kMPSettingsKeyBrowserBundleId];
|
||||
NSString *currentDefaultBrowser = [NSUserDefaults.standardUserDefaults objectForKey:kMPSettingsKeyBrowserBundleId];
|
||||
NSMenuItem *selectedItem = defaultItem;
|
||||
|
||||
[browserMenu addItem:[NSMenuItem separatorItem]];
|
||||
|
||||
for(NSString *bundleIdentifier in [self _bundleIdentifierForHTTPS]) {
|
||||
NSString *bundlePath = [[NSWorkspace sharedWorkspace] absolutePathForAppBundleWithIdentifier:bundleIdentifier];
|
||||
NSString *browserName = [[NSFileManager defaultManager] displayNameAtPath:bundlePath];
|
||||
NSString *bundlePath = [NSWorkspace.sharedWorkspace absolutePathForAppBundleWithIdentifier:bundleIdentifier];
|
||||
NSString *browserName = [NSFileManager.defaultManager displayNameAtPath:bundlePath];
|
||||
if(nil == bundlePath || nil == browserName) {
|
||||
continue; // Skip missing Applications
|
||||
}
|
||||
NSMenuItem *browserItem = [[NSMenuItem alloc] init];
|
||||
browserItem.title = browserName;
|
||||
browserItem.action = @selector(_selectBrowser:);
|
||||
browserItem.keyEquivalent = @"";
|
||||
NSMenuItem *browserItem = [[NSMenuItem alloc] initWithTitle:browserName
|
||||
action:@selector(_selectBrowser:)
|
||||
keyEquivalent:@""];
|
||||
browserItem.representedObject = bundleIdentifier;
|
||||
browserItem.target = self;
|
||||
[browserMenu addItem:browserItem];
|
||||
@@ -141,14 +140,13 @@
|
||||
[browserMenu addItem:[NSMenuItem separatorItem]];
|
||||
}
|
||||
|
||||
if (currentDefaultBrowser != nil && selectedItem == defaultItem) {
|
||||
NSString *bundlePath = [[NSWorkspace sharedWorkspace] absolutePathForAppBundleWithIdentifier:currentDefaultBrowser];
|
||||
if (bundlePath != nil) {
|
||||
NSString *browserName = [[NSFileManager defaultManager] displayNameAtPath:bundlePath];
|
||||
NSMenuItem *browserItem = [[NSMenuItem alloc] init];
|
||||
browserItem.title = browserName;
|
||||
browserItem.action = @selector(_selectBrowser:);
|
||||
browserItem.keyEquivalent = @"";
|
||||
if(currentDefaultBrowser != nil && selectedItem == defaultItem) {
|
||||
NSString *bundlePath = [NSWorkspace.sharedWorkspace absolutePathForAppBundleWithIdentifier:currentDefaultBrowser];
|
||||
if(bundlePath != nil) {
|
||||
NSString *browserName = [NSFileManager.defaultManager displayNameAtPath:bundlePath];
|
||||
NSMenuItem *browserItem = [[NSMenuItem alloc] initWithTitle:browserName
|
||||
action:@selector(_selectBrowser:)
|
||||
keyEquivalent:@""];
|
||||
browserItem.representedObject = currentDefaultBrowser;
|
||||
browserItem.target = self;
|
||||
[browserMenu addItem:browserItem];
|
||||
@@ -157,12 +155,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
NSMenuItem *selectOtherBrowserItem = [[NSMenuItem alloc] init];
|
||||
selectOtherBrowserItem.title = NSLocalizedString(@"OTHER_BROWSER", "Select Browser");
|
||||
selectOtherBrowserItem.action = @selector(_showCustomBrowserSelection:);
|
||||
selectOtherBrowserItem.keyEquivalent = @"";
|
||||
NSMenuItem *selectOtherBrowserItem = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"OTHER_BROWSER", "Select Browser")
|
||||
action:@selector(_showCustomBrowserSelection:)
|
||||
keyEquivalent:@""];
|
||||
selectOtherBrowserItem.target = self;
|
||||
|
||||
[browserMenu addItem:selectOtherBrowserItem];
|
||||
[self.browserPopup selectItem:selectedItem];
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
"Kff-Xp-hAT.title" = "Zwischenablage";
|
||||
|
||||
/* Class = "NSButtonCell"; title = "Update password for new entries"; ObjectID = "RaM-t2-DVR"; */
|
||||
"RaM-t2-DVR.title" = "Passwörter für neue Einträge aktualisieren";
|
||||
"RaM-t2-DVR.title" = "Passwörter für neue Einträge aus Vorlagen aktualisieren";
|
||||
|
||||
/* Class = "NSTextFieldCell"; title = "Open URLs in:"; ObjectID = "soD-wI-YOH"; */
|
||||
"soD-wI-YOH.title" = "Links öffnen in:";
|
||||
@@ -47,7 +47,7 @@
|
||||
"XgO-Tj-QjO.title" = "OtherViews";
|
||||
|
||||
/* Class = "NSBox"; title = "Templates"; ObjectID = "Xvt-tP-TbR"; */
|
||||
"Xvt-tP-TbR.title" = "Vorlagen";
|
||||
"Xvt-tP-TbR.title" = "Neue Einträge";
|
||||
|
||||
/* Class = "NSMenuItem"; title = "Item 3"; ObjectID = "zC2-cM-KDv"; */
|
||||
"zC2-cM-KDv.title" = "Item 3";
|
||||
|
||||
Reference in New Issue
Block a user