mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-03-10 05:34:36 +00:00
Fixed compilation warnings on OS X
This commit is contained in:
parent
7594cccf8c
commit
4b6c4f048d
@ -140,7 +140,7 @@ http://www.hardcoded.net/licenses/bsd_license
|
|||||||
[op setAllowedFileTypes:[NSArray arrayWithObject:@"dupeguru"]];
|
[op setAllowedFileTypes:[NSArray arrayWithObject:@"dupeguru"]];
|
||||||
[op setTitle:NSLocalizedString(@"Select a results file to load", @"")];
|
[op setTitle:NSLocalizedString(@"Select a results file to load", @"")];
|
||||||
if ([op runModal] == NSOKButton) {
|
if ([op runModal] == NSOKButton) {
|
||||||
NSString *filename = [[op filenames] objectAtIndex:0];
|
NSString *filename = [[[op URLs] objectAtIndex:0] path];
|
||||||
[model loadResultsFrom:filename];
|
[model loadResultsFrom:filename];
|
||||||
[[self recentResults] addFile:filename];
|
[[self recentResults] addFile:filename];
|
||||||
}
|
}
|
||||||
@ -280,7 +280,7 @@ http://www.hardcoded.net/licenses/bsd_license
|
|||||||
[op setAllowsMultipleSelection:NO];
|
[op setAllowsMultipleSelection:NO];
|
||||||
[op setTitle:prompt];
|
[op setTitle:prompt];
|
||||||
if ([op runModal] == NSOKButton) {
|
if ([op runModal] == NSOKButton) {
|
||||||
return [[op filenames] objectAtIndex:0];
|
return [[[op URLs] objectAtIndex:0] path];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return nil;
|
return nil;
|
||||||
@ -294,7 +294,7 @@ http://www.hardcoded.net/licenses/bsd_license
|
|||||||
[sp setAllowedFileTypes:[NSArray arrayWithObject:extension]];
|
[sp setAllowedFileTypes:[NSArray arrayWithObject:extension]];
|
||||||
[sp setTitle:prompt];
|
[sp setTitle:prompt];
|
||||||
if ([sp runModal] == NSOKButton) {
|
if ([sp runModal] == NSOKButton) {
|
||||||
return [sp filename];
|
return [[sp URL] path];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return nil;
|
return nil;
|
||||||
|
@ -91,8 +91,8 @@ http://www.hardcoded.net/licenses/bsd_license
|
|||||||
[op setTitle:NSLocalizedString(@"Select a folder to add to the scanning list", @"")];
|
[op setTitle:NSLocalizedString(@"Select a folder to add to the scanning list", @"")];
|
||||||
[op setDelegate:self];
|
[op setDelegate:self];
|
||||||
if ([op runModal] == NSOKButton) {
|
if ([op runModal] == NSOKButton) {
|
||||||
for (NSString *directory in [op filenames]) {
|
for (NSURL *directoryURL in [op URLs]) {
|
||||||
[self addDirectory:directory];
|
[self addDirectory:[directoryURL path]];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -258,8 +258,8 @@ http://www.hardcoded.net/licenses/bsd_license
|
|||||||
[sp setAllowedFileTypes:[NSArray arrayWithObject:@"dupeguru"]];
|
[sp setAllowedFileTypes:[NSArray arrayWithObject:@"dupeguru"]];
|
||||||
[sp setTitle:NSLocalizedString(@"Select a file to save your results to", @"")];
|
[sp setTitle:NSLocalizedString(@"Select a file to save your results to", @"")];
|
||||||
if ([sp runModal] == NSOKButton) {
|
if ([sp runModal] == NSOKButton) {
|
||||||
[model saveResultsAs:[sp filename]];
|
[model saveResultsAs:[[sp URL] path]];
|
||||||
[[app recentResults] addFile:[sp filename]];
|
[[app recentResults] addFile:[[sp URL] path]];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#import "CocoaProxy.h"
|
#import "CocoaProxy.h"
|
||||||
#import <CoreServices/CoreServices.h>
|
|
||||||
#import "HSErrorReportWindow.h"
|
#import "HSErrorReportWindow.h"
|
||||||
|
|
||||||
@implementation CocoaProxy
|
@implementation CocoaProxy
|
||||||
@ -99,11 +98,7 @@
|
|||||||
|
|
||||||
- (NSString *)osxVersion
|
- (NSString *)osxVersion
|
||||||
{
|
{
|
||||||
SInt32 major, minor, bugfix;
|
return [[NSProcessInfo processInfo] operatingSystemVersionString];
|
||||||
Gestalt(gestaltSystemVersionMajor, &major);
|
|
||||||
Gestalt(gestaltSystemVersionMinor, &minor);
|
|
||||||
Gestalt(gestaltSystemVersionBugFix, &bugfix);
|
|
||||||
return [NSString stringWithFormat:@"%d.%d.%d", major, minor, bugfix];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)postNotification:(NSString *)name userInfo:(NSDictionary *)userInfo
|
- (void)postNotification:(NSString *)name userInfo:(NSDictionary *)userInfo
|
||||||
|
@ -113,7 +113,7 @@ MyCreateBitmapContext(int width, int height)
|
|||||||
}
|
}
|
||||||
|
|
||||||
context = CGBitmapContextCreate(bitmapData, width, height, 8, bitmapBytesPerRow, colorSpace,
|
context = CGBitmapContextCreate(bitmapData, width, height, 8, bitmapBytesPerRow, colorSpace,
|
||||||
kCGImageAlphaNoneSkipLast);
|
(CGBitmapInfo)kCGImageAlphaNoneSkipLast);
|
||||||
if (context== NULL) {
|
if (context== NULL) {
|
||||||
free(bitmapData);
|
free(bitmapData);
|
||||||
fprintf(stderr, "Context not created!");
|
fprintf(stderr, "Context not created!");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user