Permalink
Browse files

Merge pull request #10 from darvin/master

small fixes for iPhone version mainly
  • Loading branch information...
2 parents 17ae479 + b4c9e9c commit 2fb65c2d2dbecfc3fab98a3057435a67afa9c74b @rileytestut committed Jun 4, 2012
@@ -38,11 +38,15 @@ - (void)viewDidLoad {
self.contentSizeForViewInPopover = CGSizeMake(320.0, 600.0);
UIBarButtonItem *refreshButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemRefresh target:self action:@selector(rescanRomDirectory)];
+
self.navigationItem.rightBarButtonItem = refreshButton;
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
UIBarButtonItem *searchButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemSearch target:self action:@selector(getMoreRoms)];
self.navigationItem.leftBarButtonItem = searchButton;
+
+ UIBarButtonItem *settingsButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAction target:self action:@selector(showSettings)];
+ self.navigationItem.rightBarButtonItems = [NSArray arrayWithObjects:settingsButton, refreshButton, nil];
}
[self scanRomDirectory:[AppDelegate() romDirectoryPath]];
@@ -56,6 +60,10 @@ - (void)getMoreRoms {
[self.navigationController presentModalViewController:AppDelegate().webNavController animated:YES];
}
+- (void)showSettings {
+ [self.navigationController pushViewController:AppDelegate().settingsViewController animated:YES];
+}
+
- (void)loadSNESController {
if (AppDelegate().snesControllerViewController == nil) {
AppDelegate().snesControllerViewController = [[SNESControllerViewController alloc] initWithNibName:@"SNESControllerViewController" bundle:[NSBundle mainBundle]];
@@ -274,7 +274,7 @@ - (void)webViewDidFinishLoad:(UIWebView *)aWebView
- (void)loadBaseURL
{
- NSString *urlAddress = @"http://www.google.com/search?hl=en&source=hp&q=doperoms+legal+backups+super+nintendo&aq=f&oq=&aqi=";
+ NSString *urlAddress = @"http://www.coolrom.com/roms/snes/";
//[NSClassFromString(@"WebDownload") changeMethod: @selector(initWithRequest:delegate:) withMethod: @selector(NSURLDownload_initWithRequest:delegate:) error:nil];
@@ -324,7 +324,7 @@ -(void)startDownload
if(returnData != nil)
{
- NSString* fileName = [[[downloadRequest URL] path] lastPathComponent];
+ NSString* fileName = [urlResponse suggestedFilename];
if(![fileName hasSuffix:@".zip"] && ![fileName hasSuffix:@".smc"] && ![fileName hasSuffix:@".swc"] && ![fileName hasSuffix:@".zip"] && ![fileName hasSuffix:@".bin"])
{
if([downloadType isEqualToString:@"application/zip"] || [downloadType isEqualToString:@"application/x-zip"])
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -557,8 +557,6 @@
ARCHS = "$(ARCHS_UNIVERSAL_IPHONE_OS)";
"ARCHS[sdk=iphonesimulator*]" = "$(ARCHS_STANDARD_32_BIT)";
CLANG_ENABLE_OBJC_ARC = YES;
- CODE_SIGN_IDENTITY = "iPhone Developer: Yvette Testut (B5VNWGK3MY)";
- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Yvette Testut (B5VNWGK3MY)";
CODE_SIGN_RESOURCE_RULES_PATH = "$(SDKROOT)/ResourceRules.plist";
COPY_PHASE_STRIP = NO;
FRAMEWORK_SEARCH_PATHS = "\"$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"";
@@ -574,8 +572,6 @@
"\"$(SRCROOT)/src/snes4iphone_src\"",
);
PRODUCT_NAME = SNES4iOS;
- PROVISIONING_PROFILE = "A540BE5B-E262-4CC6-B213-FE164727E409";
- "PROVISIONING_PROFILE[sdk=iphoneos*]" = "A540BE5B-E262-4CC6-B213-FE164727E409";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALID_ARCHS = armv7;
@@ -588,7 +584,6 @@
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_UNIVERSAL_IPHONE_OS)";
CLANG_ENABLE_OBJC_ARC = YES;
- CODE_SIGN_IDENTITY = "iPhone Developer: Yvette Testut (B5VNWGK3MY)";
CODE_SIGN_RESOURCE_RULES_PATH = "$(SDKROOT)/ResourceRules.plist";
COPY_PHASE_STRIP = YES;
FRAMEWORK_SEARCH_PATHS = "\"$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"";
@@ -603,7 +598,6 @@
"\"$(SRCROOT)/src/snes4iphone_src\"",
);
PRODUCT_NAME = SNES4iOS;
- PROVISIONING_PROFILE = "A540BE5B-E262-4CC6-B213-FE164727E409";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
@@ -618,7 +612,7 @@
"ARCHS[sdk=iphonesimulator*]" = i386;
CLANG_ENABLE_OBJC_ARC = YES;
CODE_SIGN_ENTITLEMENTS = SNES4iOS.entitlements;
- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Yvette Testut";
+ CODE_SIGN_IDENTITY = "iPhone Developer";
FRAMEWORK_SEARCH_PATHS = /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.2.sdk/System/Library/PrivateFrameworks/;
GCC_C_LANGUAGE_STANDARD = c99;
GCC_OPTIMIZATION_LEVEL = 0;
@@ -627,7 +621,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
- "PROVISIONING_PROFILE[sdk=iphoneos*]" = "6DB7727D-B0CE-4F92-916B-7B1CF284433D";
+ PROVISIONING_PROFILE = "";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = 2;
};
@@ -639,8 +633,6 @@
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_UNIVERSAL_IPHONE_OS)";
CLANG_ENABLE_OBJC_ARC = YES;
- CODE_SIGN_IDENTITY = "iPhone Distribution: Yvette Testut";
- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Yvette Testut (B5VNWGK3MY)";
CODE_SIGN_RESOURCE_RULES_PATH = "$(SDKROOT)/ResourceRules.plist";
COPY_PHASE_STRIP = YES;
FRAMEWORK_SEARCH_PATHS = "\"$(SDKROOT)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"";
@@ -655,8 +647,6 @@
"\"$(SRCROOT)/src/snes4iphone_src\"",
);
PRODUCT_NAME = SNES4iOS;
- PROVISIONING_PROFILE = "CE5B1EC1-A8D4-4891-B616-B1DDB7070FCB";
- "PROVISIONING_PROFILE[sdk=iphoneos*]" = "A540BE5B-E262-4CC6-B213-FE164727E409";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
@@ -671,15 +661,15 @@
"ARCHS[sdk=iphonesimulator*]" = i386;
CLANG_ENABLE_OBJC_ARC = YES;
CODE_SIGN_ENTITLEMENTS = SNES4iOS.entitlements;
- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Yvette Testut (B5VNWGK3MY)";
+ CODE_SIGN_IDENTITY = "iPhone Developer";
FRAMEWORK_SEARCH_PATHS = /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.2.sdk/System/Library/PrivateFrameworks/;
GCC_C_LANGUAGE_STANDARD = c99;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
- "PROVISIONING_PROFILE[sdk=iphoneos*]" = "A540BE5B-E262-4CC6-B213-FE164727E409";
+ PROVISIONING_PROFILE = "";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = 2;
};
@@ -692,7 +682,7 @@
"ARCHS[sdk=iphonesimulator*]" = i386;
CLANG_ENABLE_OBJC_ARC = YES;
CODE_SIGN_ENTITLEMENTS = SNES4iOS.entitlements;
- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ CODE_SIGN_IDENTITY = "iPhone Developer";
FRAMEWORK_SEARCH_PATHS = /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.2.sdk/System/Library/PrivateFrameworks/;
GCC_C_LANGUAGE_STANDARD = c99;
GCC_OPTIMIZATION_LEVEL = 0;
@@ -701,6 +691,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
+ PROVISIONING_PROFILE = "";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = 2;
};

0 comments on commit 2fb65c2

Please sign in to comment.