added DEBUG preprocessor macro for Debug build configuration; added DLog macro to pch file

This commit is contained in:
Gennadiy Potapov 2016-04-03 13:50:05 +08:00
parent f77c33120a
commit 18de0ac22e
4 changed files with 20 additions and 15 deletions

View file

@ -709,7 +709,7 @@
CGEventSourceRef sourceRef = CGEventSourceCreate(kCGEventSourceStateCombinedSessionState);
if (!sourceRef)
{
NSLog(@"No event source");
DLog(@"No event source");
return;
}
CGKeyCode veeCode = (CGKeyCode)[keyCode intValue];
@ -865,7 +865,7 @@
[self toggleMenuIconDisabled];
if ( contents == nil || [self shouldSkip:contents] ) {
NSLog(@"Contents: Empty or skipped");
DLog(@"Contents: Empty or skipped");
} else {
if (( [clippingStore jcListCount] == 0 || ! [contents isEqualToString:[clippingStore clippingContentsAtPosition:0]])
&& ! [pbCount isEqualTo:pbBlockCount] ) {
@ -1002,8 +1002,8 @@
[self saveFromStackToFavorites];
break;
default: // It's not a navigation/application-defined thing, so let's figure out what to do with it.
NSLog(@"PRESSED %d", pressed);
NSLog(@"CODE %ld", (long)[mainRecorder keyCombo].code);
DLog(@"PRESSED %d", pressed);
DLog(@"CODE %ld", (long)[mainRecorder keyCombo].code);
break;
}
}
@ -1210,7 +1210,7 @@
if ( (indexInt + 1) > [clippingStore jcListCount] ) {
// We're asking for a clipping that isn't there yet
// This only tends to happen immediately on startup when not saving, as the entire list is empty.
NSLog(@"Out of bounds request to jcList ignored.");
DLog(@"Out of bounds request to jcList ignored.");
return false;
}
pbFullText = [self clippingStringWithCount:indexInt];
@ -1264,7 +1264,7 @@
fromAppBundleURL:[aSavedClipping objectForKey:@"AppBundleURL"]
atTimestamp:[[aSavedClipping objectForKey:@"Timestamp"] integerValue]];
}
} else NSLog(@"Not array");
} else DLog(@"Not array");
[self updateMenu];
[loadDict release];
}
@ -1385,17 +1385,17 @@
[self toggleMainHotKey: aRecorder];
[self setHotKeyPreferenceForRecorder: aRecorder];
}
NSLog(@"code: %ld, flags: %lu", (long)newKeyCombo.code, (unsigned long)newKeyCombo.flags);
DLog(@"code: %ld, flags: %lu", (long)newKeyCombo.code, (unsigned long)newKeyCombo.flags);
}
- (void)applicationWillTerminate:(NSNotification *)notification {
if ( [[NSUserDefaults standardUserDefaults] integerForKey:@"savePreference"] >= 1 ) {
NSLog(@"Saving on exit");
DLog(@"Saving on exit");
[self saveEngine];
} else {
// Remove clips from store
[[NSUserDefaults standardUserDefaults] setValue:[NSDictionary dictionary] forKey:@"store"];
NSLog(@"Saving preferences on exit");
DLog(@"Saving preferences on exit");
[[NSUserDefaults standardUserDefaults] synchronize];
}
//Unregister our hot key (not required)

View file

@ -107,7 +107,7 @@
29B97319FDCFA39411CA2CEA /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/MainMenu.nib; sourceTree = "<group>"; };
29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
32CA4F630368D1EE00C91783 /* Jumpcut_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Jumpcut_Prefix.pch; sourceTree = "<group>"; };
32CA4F630368D1EE00C91783 /* Flycut_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Flycut_Prefix.pch; sourceTree = "<group>"; };
773ABFAF13E9AA1A00AE3969 /* NSWindow+TrueCenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSWindow+TrueCenter.h"; sourceTree = "<group>"; };
773ABFB013E9AA1A00AE3969 /* NSWindow+TrueCenter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSWindow+TrueCenter.m"; sourceTree = "<group>"; };
7761C878139BDE7F000FB3AB /* JumpcutClipping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JumpcutClipping.h; sourceTree = "<group>"; };
@ -243,7 +243,7 @@
29B97315FDCFA39411CA2CEA /* Other Sources */ = {
isa = PBXGroup;
children = (
32CA4F630368D1EE00C91783 /* Jumpcut_Prefix.pch */,
32CA4F630368D1EE00C91783 /* Flycut_Prefix.pch */,
29B97316FDCFA39411CA2CEA /* main.m */,
);
name = "Other Sources";
@ -557,6 +557,9 @@
GCC_DYNAMIC_NO_PIC = NO;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = Flycut_Prefix.pch;
GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Applications";
MACOSX_DEPLOYMENT_TARGET = 10.7;
@ -579,6 +582,8 @@
);
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_MODEL_TUNING = G5;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = Flycut_Prefix.pch;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Applications";
MACOSX_DEPLOYMENT_TARGET = 10.7;

View file

@ -1,5 +1,5 @@
//
// Prefix header for all source files of the 'Jumpcut' target in the 'Jumpcut' project
// Prefix header for all source files of the 'Flycut' target in the 'Flycut' project
//
#ifdef __OBJC__

View file

@ -17,7 +17,7 @@
OSStatus err = LIAECopyLoginItems( (CFArrayRef*) &itemsList ); // Take advantage of toll-free bridging.
if( err != noErr )
{
NSLog(@"Couldn't list login items error %d", (int)err);
DLog(@"Couldn't list login items error %d", (int)err);
return nil;
}
@ -29,7 +29,7 @@
OSStatus err = LIAEAddURLAtEnd( (CFURLRef) url, hide ); // CFURLRef is toll-free bridged to NSURL.
if( err != noErr )
NSLog(@"Couldn't add login item error %d", (int)err);
DLog(@"Couldn't add login item error %d", (int)err);
return( err == noErr );
}
@ -40,7 +40,7 @@
OSStatus err = LIAERemove( idx );
if( err != noErr )
NSLog(@"Couldn't remove login intem error %d", (int)err);
DLog(@"Couldn't remove login intem error %d", (int)err);
return( err == noErr );
}