From 6aaa290d8c5d11e61bf4470b5951157ff6628d90 Mon Sep 17 00:00:00 2001 From: GRMrGecko Date: Wed, 5 May 2010 22:09:21 +0000 Subject: [PATCH] Fixed problems with LSUIElement applications and added Lynx as 10.7 as that is what I think it'll be. --- Classes/Framework/MGMBugWindow.m | 3 + Classes/Framework/MGMContactWindow.m | 3 + Classes/Framework/MGMReportWindow.m | 9 +- Classes/Framework/MGMReporter.h | 2 +- Classes/Framework/MGMReporter.m | 2 +- Classes/Framework/MGMSender.m | 2 +- Classes/Framework/MGMSystemInfo.h | 1 + Classes/Framework/MGMSystemInfo.m | 8 +- GeckoReporter.xcodeproj/grmrgecko.pbxuser | 110 +++++++----------- .../grmrgecko.perspectivev3 | 80 +++++++++---- 10 files changed, 120 insertions(+), 100 deletions(-) diff --git a/Classes/Framework/MGMBugWindow.m b/Classes/Framework/MGMBugWindow.m index 0c30aa0..ce041fd 100644 --- a/Classes/Framework/MGMBugWindow.m +++ b/Classes/Framework/MGMBugWindow.m @@ -27,6 +27,9 @@ [userEmailField setStringValue:[userDefautls objectForKey:MGMGRUserEmail]]; [mainWindow makeKeyAndOrderFront:self]; + MGMSystemInfo *sysInfo = [[MGMSystemInfo new] autorelease]; + if ([sysInfo isUIElement]) + [[NSApplication sharedApplication] activateIgnoringOtherApps:YES]; } } diff --git a/Classes/Framework/MGMContactWindow.m b/Classes/Framework/MGMContactWindow.m index 4b392f0..8b83fa6 100644 --- a/Classes/Framework/MGMContactWindow.m +++ b/Classes/Framework/MGMContactWindow.m @@ -29,6 +29,9 @@ [userNameField setStringValue:[userDefautls objectForKey:MGMGRUserName]]; [mainWindow makeKeyAndOrderFront:self]; + MGMSystemInfo *sysInfo = [[MGMSystemInfo new] autorelease]; + if ([sysInfo isUIElement]) + [[NSApplication sharedApplication] activateIgnoringOtherApps:YES]; } } diff --git a/Classes/Framework/MGMReportWindow.m b/Classes/Framework/MGMReportWindow.m index efd1cf3..111389f 100644 --- a/Classes/Framework/MGMReportWindow.m +++ b/Classes/Framework/MGMReportWindow.m @@ -27,17 +27,16 @@ NSString * const MGMSaveLastDate = @"MGMSaveLastDate"; } else { reportFile = [theReportFile retain]; reportDate = [theReportDate retain]; - NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary]; NSUserDefaults *userDefautls = [NSUserDefaults standardUserDefaults]; MGMSystemInfo *sysInfo = [[MGMSystemInfo new] autorelease]; NSString *applicationName = [sysInfo applicationName]; appMainMenu = [[[NSApplication sharedApplication] mainMenu] retain]; [[NSApplication sharedApplication] setMainMenu:mainMenu]; - if ([[infoDictionary objectForKey:@"LSUIElement"] boolValue]) - [[NSApplication sharedApplication] requestUserAttention:NSInformationalRequest]; - else + if ([sysInfo isUIElement]) [[NSApplication sharedApplication] activateIgnoringOtherApps:YES]; + else + [[NSApplication sharedApplication] requestUserAttention:NSInformationalRequest]; NSBeep(); if (applicationName==nil) @@ -59,7 +58,7 @@ NSString * const MGMSaveLastDate = @"MGMSaveLastDate"; return self; } - (void)dealloc { -#if releaseDebug +#if MGMGRReleaseDebug MGMLog(@"%s Releasing", __PRETTY_FUNCTION__); #endif if (reportFile!=nil) diff --git a/Classes/Framework/MGMReporter.h b/Classes/Framework/MGMReporter.h index 0866b75..5cd9fc6 100644 --- a/Classes/Framework/MGMReporter.h +++ b/Classes/Framework/MGMReporter.h @@ -15,7 +15,7 @@ extern NSString * const MGMGRLastCrashDate; extern NSString * const MGMGRSendAll; extern NSString * const MGMGRIgnoreAll; -#define releaseDebug 1 +#define MGMGRReleaseDebug 0 @class MGMSender; diff --git a/Classes/Framework/MGMReporter.m b/Classes/Framework/MGMReporter.m index 18bde9d..430ce69 100644 --- a/Classes/Framework/MGMReporter.m +++ b/Classes/Framework/MGMReporter.m @@ -78,7 +78,7 @@ NSString * const MGMGRIgnoreAll = @"MGMGRIgnoreAll"; } - (void)dealloc { -#if releaseDebug +#if MGMGRReleaseDebug MGMLog(@"%s Releasing", __PRETTY_FUNCTION__); #endif if (lastDate!=nil) diff --git a/Classes/Framework/MGMSender.m b/Classes/Framework/MGMSender.m index 6213d9f..8e66e6d 100644 --- a/Classes/Framework/MGMSender.m +++ b/Classes/Framework/MGMSender.m @@ -35,7 +35,7 @@ NSString * const MGMGRLogFiles = @"MGMGRLogFiles"; @implementation MGMSender - (void)dealloc { -#if releaseDebug +#if MGMGRReleaseDebug MGMLog(@"%s Releasing", __PRETTY_FUNCTION__); #endif if (theConnection!=nil) diff --git a/Classes/Framework/MGMSystemInfo.h b/Classes/Framework/MGMSystemInfo.h index 98ddeee..af0fdf5 100644 --- a/Classes/Framework/MGMSystemInfo.h +++ b/Classes/Framework/MGMSystemInfo.h @@ -37,6 +37,7 @@ - (NSString *)applicationName; - (NSString *)applicationEXECName; - (NSString *)applicationVersion; +- (BOOL)isUIElement; - (NSBundle *)frameworkBundle; - (NSString *)frameworkVersion; - (NSString *)useragentWithApplicationNameAndVersion:(NSString *)nameAndVersion; diff --git a/Classes/Framework/MGMSystemInfo.m b/Classes/Framework/MGMSystemInfo.m index 38a301e..3cf2c78 100644 --- a/Classes/Framework/MGMSystemInfo.m +++ b/Classes/Framework/MGMSystemInfo.m @@ -196,8 +196,10 @@ NSString * const MGMModel = @"hw.model"; if (minorVersion==6) return @"Snow Leopard"; if (minorVersion==7) - return @"Garfield"; + return @"Lynx"; if (minorVersion==8) + return @"Garfield"; + if (minorVersion==9) return @"Liger"; } return @"Unknown"; @@ -282,6 +284,10 @@ NSString * const MGMModel = @"hw.model"; return [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]; } +- (BOOL)isUIElement { + return [[[NSBundle mainBundle] objectForInfoDictionaryKey:@"LSUIElement"] boolValue]; +} + - (NSBundle *)frameworkBundle { return FRAMEWORKBUNDLE; } diff --git a/GeckoReporter.xcodeproj/grmrgecko.pbxuser b/GeckoReporter.xcodeproj/grmrgecko.pbxuser index 1c1534e..0234d36 100644 --- a/GeckoReporter.xcodeproj/grmrgecko.pbxuser +++ b/GeckoReporter.xcodeproj/grmrgecko.pbxuser @@ -136,13 +136,12 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 284998280; - PBXWorkspaceStateSaveDate = 284998280; + PBXPerProjectTemplateStateSaveDate = 294773209; + PBXWorkspaceStateSaveDate = 294773209; }; perUserProjectItems = { - 2A5B7B1010FCBA8B00051C18 /* PBXTextBookmark */ = 2A5B7B1010FCBA8B00051C18 /* PBXTextBookmark */; - 2A5B7B1C10FCBA9500051C18 /* PBXTextBookmark */ = 2A5B7B1C10FCBA9500051C18 /* PBXTextBookmark */; - 2A85029A10F05D6B00CA1273 /* PBXTextBookmark */ = 2A85029A10F05D6B00CA1273 /* PBXTextBookmark */; + 2A8FF6CA1191E47400E27292 /* PBXBookmark */ = 2A8FF6CA1191E47400E27292 /* PBXBookmark */; + 2A8FF6D01192232500E27292 /* PBXTextBookmark */ = 2A8FF6D01192232500E27292 /* PBXTextBookmark */; }; sourceControlManager = 2A478DA110E8456500EBC4A9 /* Source Control */; userBuildSettings = { @@ -162,26 +161,6 @@ isa = PBXCodeSenseManager; indexTemplatePath = ""; }; - 2A5B7B1010FCBA8B00051C18 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 2AC8694C10EE8062000743D2 /* MGMReporter.m */; - name = "MGMReporter.m: 28"; - rLen = 0; - rLoc = 835; - rType = 0; - vrLen = 785; - vrLoc = 442; - }; - 2A5B7B1C10FCBA9500051C18 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 2AC8694C10EE8062000743D2 /* MGMReporter.m */; - name = "MGMReporter.m: 28"; - rLen = 0; - rLoc = 835; - rType = 0; - vrLen = 0; - vrLoc = 0; - }; 2A85014210EFA6A700CA1273 /* MGMFeedback.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {1176, 646}}"; @@ -208,22 +187,12 @@ }; 2A85014810EFA81C00CA1273 /* MGMBugWindow.m */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1176, 1157}}"; - sepNavSelRange = "{332, 21}"; - sepNavVisRange = "{0, 1109}"; + sepNavIntBoundsRect = "{{0, 0}, {1176, 1170}}"; + sepNavSelRange = "{784, 164}"; + sepNavVisRange = "{0, 1237}"; sepNavWindowFrame = "{{15, 4}, {1235, 774}}"; }; }; - 2A85029A10F05D6B00CA1273 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 2AC86CD710EEC2B4000743D2 /* NSThread.h */; - name = "NSThread.h: 9"; - rLen = 3; - rLoc = 180; - rType = 0; - vrLen = 0; - vrLoc = 0; - }; 2A8502FC10F0636600CA1273 /* MGMSenderDelegate.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {1176, 646}}"; @@ -232,6 +201,20 @@ sepNavWindowFrame = "{{15, 4}, {1235, 774}}"; }; }; + 2A8FF6CA1191E47400E27292 /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 2AC8694E10EE8062000743D2 /* MGMReportWindow.m */; + }; + 2A8FF6D01192232500E27292 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 2AC8694E10EE8062000743D2 /* MGMReportWindow.m */; + name = "MGMReportWindow.m: 31"; + rLen = 59; + rLoc = 974; + rType = 0; + vrLen = 2178; + vrLoc = 0; + }; 2AB2902810F132290080C6A1 /* MGMContactWindow.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {1176, 646}}"; @@ -242,9 +225,9 @@ }; 2AB2902910F132290080C6A1 /* MGMContactWindow.m */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1176, 1352}}"; - sepNavSelRange = "{344, 25}"; - sepNavVisRange = "{0, 1243}"; + sepNavIntBoundsRect = "{{0, 0}, {1176, 1430}}"; + sepNavSelRange = "{932, 164}"; + sepNavVisRange = "{0, 1341}"; sepNavWindowFrame = "{{15, 4}, {1235, 774}}"; }; }; @@ -311,16 +294,16 @@ 2AC8694B10EE8062000743D2 /* MGMReporter.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {1176, 646}}"; - sepNavSelRange = "{183, 0}"; - sepNavVisRange = "{0, 632}"; + sepNavSelRange = "{489, 0}"; + sepNavVisRange = "{0, 637}"; sepNavWindowFrame = "{{15, 4}, {1235, 774}}"; }; }; 2AC8694C10EE8062000743D2 /* MGMReporter.m */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1219, 1365}}"; + sepNavIntBoundsRect = "{{0, 0}, {1176, 1352}}"; sepNavSelRange = "{835, 0}"; - sepNavVisRange = "{442, 785}"; + sepNavVisRange = "{0, 2162}"; sepNavWindowFrame = "{{15, 4}, {1235, 774}}"; }; }; @@ -334,9 +317,9 @@ }; 2AC8694E10EE8062000743D2 /* MGMReportWindow.m */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1475, 1846}}"; - sepNavSelRange = "{3108, 10}"; - sepNavVisRange = "{1834, 1670}"; + sepNavIntBoundsRect = "{{0, 0}, {1475, 1690}}"; + sepNavSelRange = "{974, 59}"; + sepNavVisRange = "{0, 2178}"; sepNavWindowFrame = "{{15, 4}, {1235, 774}}"; }; }; @@ -351,16 +334,16 @@ 2AC8695110EE8062000743D2 /* MGMSystemInfo.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {1176, 646}}"; - sepNavSelRange = "{568, 0}"; - sepNavVisRange = "{0, 1046}"; + sepNavSelRange = "{891, 0}"; + sepNavVisRange = "{0, 1067}"; sepNavWindowFrame = "{{15, 4}, {1235, 774}}"; }; }; 2AC8695210EE8062000743D2 /* MGMSystemInfo.m */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1176, 4277}}"; - sepNavSelRange = "{5446, 12}"; - sepNavVisRange = "{4820, 911}"; + sepNavIntBoundsRect = "{{0, 0}, {1176, 4043}}"; + sepNavSelRange = "{6602, 11}"; + sepNavVisRange = "{5911, 1575}"; sepNavWindowFrame = "{{15, 4}, {1235, 774}}"; }; }; @@ -466,7 +449,7 @@ 2AC86A9C10EE9149000743D2 /* main.m */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {1176, 646}}"; - sepNavSelRange = "{227, 0}"; + sepNavSelRange = "{134, 120}"; sepNavVisRange = "{0, 254}"; sepNavWindowFrame = "{{15, 4}, {1235, 774}}"; }; @@ -474,7 +457,7 @@ 2AC86B4510EE9DD7000743D2 /* MGMLog.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {1176, 646}}"; - sepNavSelRange = "{176, 0}"; + sepNavSelRange = "{205, 82}"; sepNavVisRange = "{0, 287}"; sepNavWindowFrame = "{{15, 4}, {1235, 774}}"; }; @@ -482,23 +465,16 @@ 2AC86B4610EE9DD7000743D2 /* MGMLog.m */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {1176, 1196}}"; - sepNavSelRange = "{2825, 6}"; - sepNavVisRange = "{1151, 2082}"; + sepNavSelRange = "{201, 3032}"; + sepNavVisRange = "{0, 1785}"; sepNavWindowFrame = "{{15, 4}, {1235, 774}}"; }; }; - 2AC86CD710EEC2B4000743D2 /* NSThread.h */ = { - isa = PBXFileReference; - lastKnownFileType = sourcecode.c.h; - name = NSThread.h; - path = /Users/grmrgecko/Desktop/AppKit/NSThread.h; - sourceTree = ""; - }; 2AC86CF010EEC54C000743D2 /* MGMSender.m */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1209, 4875}}"; - sepNavSelRange = "{16252, 0}"; - sepNavVisRange = "{14265, 3068}"; + sepNavIntBoundsRect = "{{0, 0}, {1496, 5018}}"; + sepNavSelRange = "{10263, 0}"; + sepNavVisRange = "{13505, 2481}"; sepNavWindowFrame = "{{15, 4}, {1235, 774}}"; }; }; diff --git a/GeckoReporter.xcodeproj/grmrgecko.perspectivev3 b/GeckoReporter.xcodeproj/grmrgecko.perspectivev3 index 67970a8..589bda2 100644 --- a/GeckoReporter.xcodeproj/grmrgecko.perspectivev3 +++ b/GeckoReporter.xcodeproj/grmrgecko.perspectivev3 @@ -197,7 +197,48 @@ Notifications OpenEditors - + + + Content + + PBXProjectModuleGUID + 2A8FF6CE1192232500E27292 + PBXProjectModuleLabel + MGMReportWindow.m + PBXSplitModuleInNavigatorKey + + Split0 + + PBXProjectModuleGUID + 2A8FF6CF1192232500E27292 + PBXProjectModuleLabel + MGMReportWindow.m + _historyCapacity + 0 + bookmark + 2A8FF6D01192232500E27292 + history + + 2A8FF6CA1191E47400E27292 + + + SplitCount + 1 + + StatusBarVisibility + + + Geometry + + Frame + {{0, 20}, {1235, 677}} + PBXModuleWindowStatusBarHidden2 + + RubberWindowFrame + 15 60 1235 718 0 0 1280 778 + + + PerspectiveWidths 1280 @@ -233,8 +274,6 @@ Layout - BecomeActive - ContentConfiguration PBXBottomSmartGroupGIDs @@ -287,14 +326,14 @@ PBXSmartGroupTreeModuleOutlineStateSelectionKey - 39 - 37 - 28 + 7 + 2 + 1 0 PBXSmartGroupTreeModuleOutlineStateVisibleRectKey - {{0, 107}, {185, 660}} + {{0, 0}, {185, 660}} PBXTopSmartGroupGIDs @@ -327,7 +366,7 @@ PBXProjectModuleGUID 2A478DDD10E8598900EBC4A9 PBXProjectModuleLabel - MGMReporter.m + NSThread.h PBXSplitModuleInNavigatorKey Split0 @@ -335,16 +374,7 @@ PBXProjectModuleGUID 2A478DDE10E8598900EBC4A9 PBXProjectModuleLabel - MGMReporter.m - _historyCapacity - 0 - bookmark - 2A5B7B1C10FCBA9500051C18 - history - - 2A85029A10F05D6B00CA1273 - 2A5B7B1010FCBA8B00051C18 - + NSThread.h SplitCount 1 @@ -383,8 +413,6 @@ Frame {{10, 27}, {1073, 646}} - RubberWindowFrame - 0 59 1280 719 0 0 1280 778 Module XCDetailModule @@ -406,6 +434,8 @@ PBXProjectFindModule + BecomeActive + ContentConfiguration PBXCVSModuleFilterTypeKey @@ -440,6 +470,8 @@ Frame {{10, 27}, {1073, 646}} + RubberWindowFrame + 0 59 1280 719 0 0 1280 778 Module PBXCVSModule @@ -487,11 +519,11 @@ TableOfContents - 2A5B7B1310FCBA9400051C18 + 2A8FF6BE1191E1FB00E27292 1CA23ED40692098700951B8B - 2A5B7B1410FCBA9400051C18 + 2A8FF6BF1191E1FB00E27292 2A478DDD10E8598900EBC4A9 - 2A5B7B1510FCBA9400051C18 + 2A8FF6C01191E1FB00E27292 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -683,7 +715,7 @@ 5 WindowOrderList - 2A5B7B1B10FCBA9400051C18 + 2A8FF6CE1192232500E27292 /Development/James' Applications/GeckoReporter/GeckoReporter.xcodeproj WindowString