From a59c4a505e3c8001f09b941692b2a5467958a2c0 Mon Sep 17 00:00:00 2001 From: Kalle Olavi Niemitalo Date: Thu, 18 Oct 2007 10:59:07 +0300 Subject: [PATCH] Remove Event.* and the test mode that used them. The NSEvent (ModifierKeys) category was using GetCurrentKeyModifiers() while GetCurrentEventKeyModifiers() would be more appropriate in Mac OS X 10.2 or later. (MacTF requires Mac OS X 10.4 or later.) Besides, that function is part of Carbon and MacTF is a Cocoa program. I don't see a need for a test mode like that anyway. --- Event.h | 6 ------ Event.m | 26 -------------------------- MacTF.xcodeproj/project.pbxproj | 8 -------- UIElements.h | 1 - UIElements.m | 9 --------- 5 files changed, 50 deletions(-) delete mode 100644 Event.h delete mode 100644 Event.m diff --git a/Event.h b/Event.h deleted file mode 100644 index 936316c..0000000 --- a/Event.h +++ /dev/null @@ -1,6 +0,0 @@ -@interface NSEvent (ModifierKeys) -+ (BOOL) isControlKeyDown; -+ (BOOL) isOptionKeyDown; -+ (BOOL) isCommandKeyDown; -+ (BOOL) isShiftKeyDown; -@end \ No newline at end of file diff --git a/Event.m b/Event.m deleted file mode 100644 index 59ff86b..0000000 --- a/Event.m +++ /dev/null @@ -1,26 +0,0 @@ -#import - - -@implementation NSEvent (ModifierKeys) - -+ (BOOL) isControlKeyDown -{ - return (GetCurrentKeyModifiers() & controlKey) != 0; -} - -+ (BOOL) isOptionKeyDown -{ - return (GetCurrentKeyModifiers() & optionKey) != 0; -} - -+ (BOOL) isCommandKeyDown -{ - return (GetCurrentKeyModifiers() & cmdKey) != 0; -} - -+ (BOOL) isShiftKeyDown -{ - return (GetCurrentKeyModifiers() & shiftKey) != 0; -} - -@end \ No newline at end of file diff --git a/MacTF.xcodeproj/project.pbxproj b/MacTF.xcodeproj/project.pbxproj index 4bb5498..7eab098 100644 --- a/MacTF.xcodeproj/project.pbxproj +++ b/MacTF.xcodeproj/project.pbxproj @@ -20,8 +20,6 @@ C136E8EF0B269E9600F1BC97 /* Sparkle.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = C136E8870B269DFD00F1BC97 /* Sparkle.framework */; }; C139ED66096BD88F00FFF05D /* ConnectTBIcon.png in Resources */ = {isa = PBXBuildFile; fileRef = C139ED65096BD88F00FFF05D /* ConnectTBIcon.png */; }; C139ED6D096BE3D000FFF05D /* RenameTBIcon.tiff in Resources */ = {isa = PBXBuildFile; fileRef = C139ED6C096BE3D000FFF05D /* RenameTBIcon.tiff */; }; - C15CE08D098E0BB8008BC46F /* Event.m in Sources */ = {isa = PBXBuildFile; fileRef = C15CE08C098E0BB8008BC46F /* Event.m */; }; - C15CE08F098E0C2F008BC46F /* Event.h in Headers */ = {isa = PBXBuildFile; fileRef = C15CE08E098E0C2F008BC46F /* Event.h */; }; C16B42CC0B2140F0007AA424 /* iLifeControls.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C16B42CB0B2140F0007AA424 /* iLifeControls.framework */; }; C16B431E0B2142EE007AA424 /* iLifeControls.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = C16B42CB0B2140F0007AA424 /* iLifeControls.framework */; }; C16B43850B214AC7007AA424 /* TFUSBController.m in Sources */ = {isa = PBXBuildFile; fileRef = C16B43830B214AC7007AA424 /* TFUSBController.m */; }; @@ -122,8 +120,6 @@ C136E8870B269DFD00F1BC97 /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Sparkle.framework; sourceTree = ""; }; C139ED65096BD88F00FFF05D /* ConnectTBIcon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ConnectTBIcon.png; sourceTree = ""; }; C139ED6C096BE3D000FFF05D /* RenameTBIcon.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = RenameTBIcon.tiff; sourceTree = ""; }; - C15CE08C098E0BB8008BC46F /* Event.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = Event.m; sourceTree = ""; }; - C15CE08E098E0C2F008BC46F /* Event.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Event.h; sourceTree = ""; }; C16B43830B214AC7007AA424 /* TFUSBController.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = TFUSBController.m; sourceTree = ""; }; C16B43840B214AC7007AA424 /* TFUSBController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TFUSBController.h; sourceTree = ""; }; C16B462F0B2210BE007AA424 /* DownloadStopRollover.tif */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = DownloadStopRollover.tif; sourceTree = ""; }; @@ -269,8 +265,6 @@ 29B97315FDCFA39411CA2CEA /* Other Sources */ = { isa = PBXGroup; children = ( - C15CE08C098E0BB8008BC46F /* Event.m */, - C15CE08E098E0C2F008BC46F /* Event.h */, C1B981DF0784F54700C9F654 /* Scripting_Additions.h */, C1B981E00784F54700C9F654 /* Scripting_Additions.m */, C1DE5FA206BE181900BCF0CB /* TfDllEx.h */, @@ -379,7 +373,6 @@ C1B981E10784F54700C9F654 /* Scripting_Additions.h in Headers */, C1CDD8840969BF40004C9E74 /* UKToolbarFactory.h in Headers */, C1CDD8880969BF4F004C9E74 /* UKFirstResponder.h in Headers */, - C15CE08F098E0C2F008BC46F /* Event.h in Headers */, C1318BD2098E3435006EE82B /* AOSegmentedControl.h in Headers */, C16B43860B214AC7007AA424 /* TFUSBController.h in Headers */, ); @@ -506,7 +499,6 @@ C1B981E20784F54700C9F654 /* Scripting_Additions.m in Sources */, C1CDD8850969BF40004C9E74 /* UKToolbarFactory.m in Sources */, C1CDD8890969BF4F004C9E74 /* UKFirstResponder.m in Sources */, - C15CE08D098E0BB8008BC46F /* Event.m in Sources */, C1318BD3098E3435006EE82B /* AOSegmentedControl.m in Sources */, C16B43850B214AC7007AA424 /* TFUSBController.m in Sources */, ); diff --git a/UIElements.h b/UIElements.h index 626169e..b098490 100644 --- a/UIElements.h +++ b/UIElements.h @@ -22,7 +22,6 @@ #import #import "DataHandler.h" #import "TFUSBController.h" -#import "Event.h" #import @interface UIElements : NSObject diff --git a/UIElements.m b/UIElements.m index a2addb8..ca4380d 100644 --- a/UIElements.m +++ b/UIElements.m @@ -68,15 +68,6 @@ [self connect:nil]; [autoCB setState:1]; } - // test code heres - if ([NSEvent isShiftKeyDown] && [NSEvent isControlKeyDown]) { NSLog(@"Testmode activated"); - unsigned long long offset = 512*2000; - NSLog(@"%qu", offset); - const UInt64 offset_bigendian = EndianU64_NtoB(offset); - NSData* dat = [NSData dataWithBytes:&offset_bigendian length:8]; - NSLog([dat description]); - - } } - (BOOL)validateMenuItem:(NSMenuItem*)anItem { -- 2.11.4.GIT