mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-07 08:23:17 +02:00
fixing launcher bugs
This commit is contained in:
parent
973e93aa2f
commit
53c875b8af
3 changed files with 52 additions and 2 deletions
|
@ -11,7 +11,7 @@
|
|||
<window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="QvC-M9-y7g" customClass="Window">
|
||||
<windowStyleMask key="styleMask" closable="YES"/>
|
||||
<rect key="contentRect" x="505" y="583" width="515" height="390"/>
|
||||
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1177"/>
|
||||
<rect key="screenRect" x="0.0" y="0.0" width="1680" height="1027"/>
|
||||
<view key="contentView" wantsLayer="YES" id="EiT-Mj-1SZ">
|
||||
<rect key="frame" x="0.0" y="0.0" width="515" height="390"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
|
|
|
@ -15,6 +15,31 @@ NSString* hifiBackgroundFilename = @"hifi_window";
|
|||
forObject:self];
|
||||
fieldEditor.insertionPointColor = insertionPointColor;
|
||||
}
|
||||
|
||||
- (BOOL) performKeyEquivalent:(NSEvent *)event
|
||||
{
|
||||
if ([event type] == NSEventTypeKeyDown) {
|
||||
if ([event modifierFlags] & NSEventModifierFlagCommand) {
|
||||
if ([[event charactersIgnoringModifiers] isEqualToString:@"v"]) {
|
||||
[NSApp sendAction:(NSSelectorFromString(@"paste:")) to:nil from:self];
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if ([[event charactersIgnoringModifiers] isEqualToString:@"c"]) {
|
||||
[NSApp sendAction:(NSSelectorFromString(@"copy:")) to:nil from:self];
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if ([[event charactersIgnoringModifiers] isEqualToString:@"a"]) {
|
||||
[NSApp sendAction:(NSSelectorFromString(@"selectAll:")) to:nil from:self];
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return [super performKeyEquivalent:event];
|
||||
}
|
||||
|
||||
- (void) mouseDown:(NSEvent *)event
|
||||
{
|
||||
NSColor *insertionPointColor = [NSColor whiteColor];
|
||||
|
@ -63,6 +88,30 @@ NSString* hifiBackgroundFilename = @"hifi_window";
|
|||
fieldEditor.insertionPointColor = insertionPointColor;
|
||||
return status;
|
||||
}
|
||||
|
||||
- (BOOL) performKeyEquivalent:(NSEvent *)event
|
||||
{
|
||||
if ([event type] == NSEventTypeKeyDown) {
|
||||
if ([event modifierFlags] & NSEventModifierFlagCommand) {
|
||||
if ([[event charactersIgnoringModifiers] isEqualToString:@"v"]) {
|
||||
[NSApp sendAction:(NSSelectorFromString(@"paste:")) to:nil from:self];
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if ([[event charactersIgnoringModifiers] isEqualToString:@"c"]) {
|
||||
[NSApp sendAction:(NSSelectorFromString(@"copy:")) to:nil from:self];
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if ([[event charactersIgnoringModifiers] isEqualToString:@"a"]) {
|
||||
[NSApp sendAction:(NSSelectorFromString(@"selectAll:")) to:nil from:self];
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return [super performKeyEquivalent:event];
|
||||
}
|
||||
@end
|
||||
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ void redirectLogToDocuments()
|
|||
|
||||
int main(int argc, const char* argv[]) {
|
||||
//NSApp.appearance = [NSAppearance appearanceNamed: NSAppearanceNameAqua];
|
||||
redirectLogToDocuments();
|
||||
//redirectLogToDocuments();
|
||||
NSArray* apps = [NSRunningApplication runningApplicationsWithBundleIdentifier:@"com.highfidelity.launcher"];
|
||||
if ([apps count] > 1) {
|
||||
NSLog(@"launcher is already running");
|
||||
|
@ -41,5 +41,6 @@ int main(int argc, const char* argv[]) {
|
|||
[appMenu addItem:quitMenuItem];
|
||||
[appMenuItem setSubmenu:appMenu];
|
||||
|
||||
[[NSApplication sharedApplication] activateIgnoringOtherApps:TRUE];
|
||||
return NSApplicationMain(argc, argv);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue