Skip to content

Commit

Permalink
Merge pull request #322 from tmchow/master
Browse files Browse the repository at this point in the history
Transition from term "white list" to "allow list"
  • Loading branch information
Caldis committed Sep 12, 2022
2 parents c9698f3 + 7844662 commit fa6d989
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ Fixed a problem that could cause Mos to crash.

## New Feature

Add white list mode in Ignore panel.
Add allow list mode in Ignore panel.

Add Peak setting in Advance panel.

Expand Down
12 changes: 6 additions & 6 deletions Mos/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -1111,12 +1111,12 @@
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" id="NS2-ZW-iDh"/>
</constraints>
<buttonCell key="cell" type="check" title="Whitelist Mode" bezelStyle="regularSquare" imagePosition="left" alignment="right" controlSize="small" inset="2" id="Ksp-g1-48g">
<buttonCell key="cell" type="check" title="Allow list Mode" bezelStyle="regularSquare" imagePosition="left" alignment="right" controlSize="small" inset="2" id="Ksp-g1-48g">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="menu" size="11"/>
</buttonCell>
<connections>
<action selector="whiteListModeClick:" target="bga-wG-iim" id="MZ6-m7-C6o"/>
<action selector="allowListModeClick:" target="bga-wG-iim" id="MZ6-m7-C6o"/>
</connections>
</button>
<button horizontalHuggingPriority="750" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="8FH-Zr-4mB">
Expand Down Expand Up @@ -1180,7 +1180,7 @@
<outlet property="runningAndInstalledManuItem" destination="R0d-21-g6W" id="a14-sX-cP3"/>
<outlet property="runningAndInstalledMenuChildrenContainer" destination="tXQ-GJ-k5M" id="kvh-JP-b9D"/>
<outlet property="tableView" destination="LmV-gi-3fE" id="GOb-17-dvX"/>
<outlet property="whitelistModeCheckBox" destination="gnb-pe-ZN5" id="HTP-3G-Zme"/>
<outlet property="allowlistModeCheckBox" destination="gnb-pe-ZN5" id="HTP-3G-Zme"/>
</connections>
</viewController>
<menu id="v6G-mQ-Ddk">
Expand Down Expand Up @@ -1333,17 +1333,17 @@ Gw
</objects>
<point key="canvasLocation" x="1480.5" y="1849.5"/>
</scene>
<!--Exception whitelist hint-->
<!--Exception allowlist hint-->
<scene sceneID="57E-oo-PEW">
<objects>
<viewController id="o12-9v-Ej5" userLabel="Exception whitelist hint" sceneMemberID="viewController">
<viewController id="o12-9v-Ej5" userLabel="Exception allowlist hint" sceneMemberID="viewController">
<view key="view" id="wdx-Jb-jwG">
<rect key="frame" x="0.0" y="0.0" width="224" height="42"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" textCompletion="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KGW-PK-8DX">
<rect key="frame" x="10" y="10" width="204" height="22"/>
<textFieldCell key="cell" controlSize="mini" sendsActionOnEndEditing="YES" alignment="left" title="The whitelist mode will make Mos only apply to apps within the exception list." id="v26-RK-BtL">
<textFieldCell key="cell" controlSize="mini" sendsActionOnEndEditing="YES" alignment="left" title="The allow list mode will make Mos only apply to apps within the exception list." id="v26-RK-BtL">
<font key="font" metaFont="label" size="9"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
Expand Down
4 changes: 2 additions & 2 deletions Mos/Options/Options.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ extension Options {
// 常规
general.autoLaunch = LoginServiceKit.isExistLoginItems(at: Bundle.main.bundlePath)
general.hideStatusItem = UserDefaults.standard.bool(forKey: "hideStatusItem")
general.whitelist = UserDefaults.standard.bool(forKey: "whitelist")
general.allowlist = UserDefaults.standard.bool(forKey: "allowlist")
general.applications = EnhanceArray(
withData: UserDefaults.standard.value(forKey: "applications") as! Data,
matchKey: "path",
Expand Down Expand Up @@ -76,7 +76,7 @@ extension Options {
// 常规
// UserDefaults.standard.set(options.autoLaunch, forKey:"autoLaunch") // 直接从系统值初始化
UserDefaults.standard.set(general.hideStatusItem, forKey:"hideStatusItem")
UserDefaults.standard.set(general.whitelist, forKey:"whitelist")
UserDefaults.standard.set(general.allowlist, forKey:"allowlist")
UserDefaults.standard.set(general.applications.json(), forKey:"applications")
// 滚动:基础
UserDefaults.standard.set(scrollBasic.smooth, forKey:"smooth")
Expand Down
2 changes: 1 addition & 1 deletion Mos/Utils/Constants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class OPTIONS_GENERAL_DEFAULT {
didSet {Options.shared.saveOptions()}
}
// 例外
var whitelist = false {
var allowlist = false {
didSet {Options.shared.saveOptions()}
}
var applications = EnhanceArray<ExceptionalApplication>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class PreferencesExceptionViewController: NSViewController {

// UI Elements
// 白名单
@IBOutlet weak var whitelistModeCheckBox: NSButton!
@IBOutlet weak var allowlistModeCheckBox: NSButton!
// 表格及工具栏
@IBOutlet weak var tableView: NSTableView!
// 提示层
Expand Down Expand Up @@ -40,8 +40,8 @@ class PreferencesExceptionViewController: NSViewController {
}

// 白名单模式
@IBAction func whiteListModeClick(_ sender: NSButton) {
Options.shared.general.whitelist = sender.state.rawValue==0 ? false : true
@IBAction func allowListModeClick(_ sender: NSButton) {
Options.shared.general.allowlist = sender.state.rawValue==0 ? false : true
syncViewWithOptions()
}

Expand Down Expand Up @@ -77,7 +77,7 @@ extension PreferencesExceptionViewController {
// 同步界面与设置参数
func syncViewWithOptions() {
// 白名单
whitelistModeCheckBox.state = NSControl.StateValue(rawValue: Options.shared.general.whitelist ? 1 : 0)
allowlistModeCheckBox.state = NSControl.StateValue(rawValue: Options.shared.general.allowlist ? 1 : 0)
}
}

Expand Down
6 changes: 3 additions & 3 deletions Mos/de.lproj/Main.strings
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@
"Pw5-2q-7Fa.title" = "Allow accessibility access";
"bga-wG-iim.title" = "Ausnahmen";
"Rgu-cb-5lp.title" = "Anpassen pro Anwendung:";
"Ksp-g1-48g.title" = "Whitelist-Modus";
"v26-RK-BtL.title" = "Der Whitelistmodus bewirkt, dass Mos nur für Anwendungen innerhalb der Ausnahmeliste gilt.";
"ThS-Rm-st2.title" = "Keine Ausnahmen festgelegt";
"Ksp-g1-48g.title" = "Allowlist-Modus";
"v26-RK-BtL.title" = "Der Allowlistmodus bewirkt, dass Mos nur für Anwendungen innerhalb der Ausnahmeliste gilt.";
"ThS-Rm-st2.title" = "Niemand ist besonders";
"jaq-Cb-dKM.title" = "Sie können eine separate Konfiguration auf einige Anwendungen anwenden, indem Sie auf die Schaltfläche \'+\' unten klicken";
"R0d-21-g6W.title" = "Ausgeführte Anwendungen";
"dhF-95-kUJ.title" = "Manuelle Auswahl mit Finder";
Expand Down
4 changes: 2 additions & 2 deletions Mos/en.lproj/Main.strings
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
"Pw5-2q-7Fa.title" = "Allow accessibility access";
"bga-wG-iim.title" = "Exception";
"Rgu-cb-5lp.title" = "Customize per Application:";
"Ksp-g1-48g.title" = "Whitelist Mode";
"v26-RK-BtL.title" = "The whitelist mode will make Mos only apply to apps within the exception list.";
"Ksp-g1-48g.title" = "Allowlist Mode";
"v26-RK-BtL.title" = "The allowlist mode will make Mos only apply to apps within the exception list.";
"ThS-Rm-st2.title" = "No One is Special";
"jaq-Cb-dKM.title" = "You can apply a separate configuration to some apps by clicking the \'+\' button below";
"R0d-21-g6W.title" = "Running Applications";
Expand Down
4 changes: 2 additions & 2 deletions Mos/ja.lproj/Main.strings
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
"Pw5-2q-7Fa.title" = "Allow to use accessibility";
"bga-wG-iim.title" = "Exception";
"Rgu-cb-5lp.title" = "Customize per Application:";
"Ksp-g1-48g.title" = "Whitelist Mode";
"v26-RK-BtL.title" = "The whitelist mode will make Mos only apply to apps within the exception list.";
"Ksp-g1-48g.title" = "Allowlist Mode";
"v26-RK-BtL.title" = "The allowlist mode will make Mos only apply to apps within the exception list.";
"ThS-Rm-st2.title" = "No One is Special";
"jaq-Cb-dKM.title" = "You can apply a separate configuration to some apps by clicking the \'+\' button below";
"R0d-21-g6W.title" = "Running Applications";
Expand Down
4 changes: 2 additions & 2 deletions Mos/tr.lproj/Main.strings
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
/* Class = "NSTextFieldCell"; title = "Change vertical scrolling to horizontal scrolling"; ObjectID = "KnM-kA-wn5"; */
"KnM-kA-wn5.title" = "Dikey kaydırmayı yatay kaydırma ile değiştir";

/* Class = "NSButtonCell"; title = "Whitelist Mode"; ObjectID = "Ksp-g1-48g"; */
/* Class = "NSButtonCell"; title = "Allowlist Mode"; ObjectID = "Ksp-g1-48g"; */
"Ksp-g1-48g.title" = "Beyaz Liste Modu";

/* Class = "NSTextFieldCell"; title = "Before we smooth your mouse"; ObjectID = "Lhk-Nd-CdT"; */
Expand Down Expand Up @@ -383,7 +383,7 @@
/* Class = "NSTextFieldCell"; title = "Scientists have proven that running on multiple smooth scrolling application at the same time will lead to undescribed consequences. Please close the other, or disable the smooth function of it. Such as the smooth scrolling on Logitech Options or SmoothScroll extension on Chrome."; ObjectID = "u7p-zc-ERS"; */
"u7p-zc-ERS.title" = "Bilim adamları, aynı anda birden fazla yumuşak kaydırma uygulamasında çalıştırmanın açıklanamayan sonuçlara yol açacağını kanıtladılar. Lütfen diğerini kapatın veya yumuşak kaydırma işlevini devre dışı bırakın. Logitech Options'ta veya Chrome'da SmoothScroll uzantısındaki yumuşak kaydırma gibi.";

/* Class = "NSTextFieldCell"; title = "The whitelist mode will make Mos only apply to apps within the exception list."; ObjectID = "v26-RK-BtL"; */
/* Class = "NSTextFieldCell"; title = "The allowlist mode will make Mos only apply to apps within the exception list."; ObjectID = "v26-RK-BtL"; */
"v26-RK-BtL.title" = "Beyaz liste modu, Mos'ın yalnızca istisna listesindeki uygulamalar için geçerli olmasını sağlar.";

/* Class = "NSMenuItem"; title = "Disabled"; ObjectID = "vFk-37-HRU"; */
Expand Down
2 changes: 1 addition & 1 deletion README.enUS.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ http:https://mos.caldis.me/
- Allows customizing scroll behavior, such as the speed and acceleration.
- Allows customizing the scrolling behavior for touchpad and mouse wheel separately.
- Provides an informative graph that shows the scroll events.
- Built in per app blacklist/whitelist support.
- Built in per app block/allow list support.
- Coded with Swift.


Expand Down

0 comments on commit fa6d989

Please sign in to comment.