5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-03 07:10:40 +08:00
wails/v2/internal/frontend/desktop/darwin/WailsAlert.m
Lea Anthony b93cdcd942
Releasetest/release workflow (#1869)
* Test release workflow

* Update release.yml

* Update release.yml

* add linux deps

* Update release.yml

* Update release.yml

* Update release.yml

* Update release.yml

* Update release.yml

* Update release.yml

* Update release.yml

* Update release.yml

* Update release.yml

* Fix: Misc tests

* Fix: Misc tests + linux build tags

* Fix: Bindings tests + move templates to pkg. Add json schema for templates

* Fix: template tests

* Add tests to release workflow. Test for go 1.18 + go 1.19
Fix: ignore .m files for non darwin builds. Fix watcher test. Fix warning in clilogger.

* Fix release pipeline

* Matrix for tests

* Rename templates to make tests work

* Update template test

* Debug template test

* Debug template test

* Debug template test

* Fix gitignore

* Update release.yml
2022-09-18 08:55:21 +10:00

32 lines
670 B
Objective-C

//go:build darwin
//
// WailsAlert.m
// test
//
// Created by Lea Anthony on 20/10/21.
//
#import <Foundation/Foundation.h>
#import "WailsAlert.h"
@implementation WailsAlert
- (void)addButton:(NSString*)text :(NSString*)defaultButton :(NSString*)cancelButton {
if( text == nil ) {
return;
}
NSButton *button = [self addButtonWithTitle:text];
if( defaultButton != nil && [text isEqualToString:defaultButton]) {
[button setKeyEquivalent:@"\r"];
} else if( cancelButton != nil && [text isEqualToString:cancelButton]) {
[button setKeyEquivalent:@"\033"];
} else {
[button setKeyEquivalent:@""];
}
}
@end