mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 14:02:57 +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">
|
<window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="QvC-M9-y7g" customClass="Window">
|
||||||
<windowStyleMask key="styleMask" closable="YES"/>
|
<windowStyleMask key="styleMask" closable="YES"/>
|
||||||
<rect key="contentRect" x="505" y="583" width="515" height="390"/>
|
<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">
|
<view key="contentView" wantsLayer="YES" id="EiT-Mj-1SZ">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="515" height="390"/>
|
<rect key="frame" x="0.0" y="0.0" width="515" height="390"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
|
|
|
@ -15,6 +15,31 @@ NSString* hifiBackgroundFilename = @"hifi_window";
|
||||||
forObject:self];
|
forObject:self];
|
||||||
fieldEditor.insertionPointColor = insertionPointColor;
|
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
|
- (void) mouseDown:(NSEvent *)event
|
||||||
{
|
{
|
||||||
NSColor *insertionPointColor = [NSColor whiteColor];
|
NSColor *insertionPointColor = [NSColor whiteColor];
|
||||||
|
@ -63,6 +88,30 @@ NSString* hifiBackgroundFilename = @"hifi_window";
|
||||||
fieldEditor.insertionPointColor = insertionPointColor;
|
fieldEditor.insertionPointColor = insertionPointColor;
|
||||||
return status;
|
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
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ void redirectLogToDocuments()
|
||||||
|
|
||||||
int main(int argc, const char* argv[]) {
|
int main(int argc, const char* argv[]) {
|
||||||
//NSApp.appearance = [NSAppearance appearanceNamed: NSAppearanceNameAqua];
|
//NSApp.appearance = [NSAppearance appearanceNamed: NSAppearanceNameAqua];
|
||||||
redirectLogToDocuments();
|
//redirectLogToDocuments();
|
||||||
NSArray* apps = [NSRunningApplication runningApplicationsWithBundleIdentifier:@"com.highfidelity.launcher"];
|
NSArray* apps = [NSRunningApplication runningApplicationsWithBundleIdentifier:@"com.highfidelity.launcher"];
|
||||||
if ([apps count] > 1) {
|
if ([apps count] > 1) {
|
||||||
NSLog(@"launcher is already running");
|
NSLog(@"launcher is already running");
|
||||||
|
@ -41,5 +41,6 @@ int main(int argc, const char* argv[]) {
|
||||||
[appMenu addItem:quitMenuItem];
|
[appMenu addItem:quitMenuItem];
|
||||||
[appMenuItem setSubmenu:appMenu];
|
[appMenuItem setSubmenu:appMenu];
|
||||||
|
|
||||||
|
[[NSApplication sharedApplication] activateIgnoringOtherApps:TRUE];
|
||||||
return NSApplicationMain(argc, argv);
|
return NSApplicationMain(argc, argv);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue