1
0
mirror of https://github.com/Toxblh/MTMR.git synced 2026-01-11 17:38:38 +00:00

fix tests

This commit is contained in:
Serg 2018-10-14 11:12:28 +07:00
parent afbca86194
commit f928ac2aef
2 changed files with 14 additions and 14 deletions

View File

@ -48,20 +48,6 @@ class SupportedTypesHolder {
"delete": { _ in return (item: .staticButton(title: "del"), action: .keyPress(keycode: 117), longAction: .none, parameters: [:])},
"brightnessUp": { _ in
let imageParameter = GeneralParameter.image(source: #imageLiteral(resourceName: "brightnessUp"))
return (item: .staticButton(title: ""), action: .custom(closure: {
sharedBrightnessController.increase()
}), longAction: .none, parameters: [.image: imageParameter])
},
"brightnessDown": { _ in
let imageParameter = GeneralParameter.image(source: #imageLiteral(resourceName: "brightnessDown"))
return (item: .staticButton(title: ""), action: .custom(closure: {
sharedBrightnessController.decrease()
}), longAction: .none, parameters: [.image: imageParameter])
},
"illuminationUp": { _ in
let imageParameter = GeneralParameter.image(source: #imageLiteral(resourceName: "ill_up"))
return (item: .staticButton(title: ""), action: .hidKey(keycode: NX_KEYTYPE_ILLUMINATION_UP), longAction: .none, parameters: [.image: imageParameter])

View File

@ -104,6 +104,20 @@ class TouchBarController: NSObject, NSTouchBarDelegate {
}), longAction: .none, parameters: [.width: .width(30), .image: .image(source: (NSImage(named: NSImage.stopProgressFreestandingTemplateName))!)])
}
SupportedTypesHolder.sharedInstance.register(typename: "brightnessUp") { _ in
let imageParameter = GeneralParameter.image(source: #imageLiteral(resourceName: "brightnessUp"))
return (item: .staticButton(title: ""), action: .custom(closure: {
sharedBrightnessController.increase()
}), longAction: .none, parameters: [.image: imageParameter])
}
SupportedTypesHolder.sharedInstance.register(typename: "brightnessDown") { _ in
let imageParameter = GeneralParameter.image(source: #imageLiteral(resourceName: "brightnessDown"))
return (item: .staticButton(title: ""), action: .custom(closure: {
sharedBrightnessController.decrease()
}), longAction: .none, parameters: [.image: imageParameter])
}
if let blackListed = UserDefaults.standard.stringArray(forKey: "com.toxblh.mtmr.blackListedApps") {
self.blacklistAppIdentifiers = blackListed
}