From b8a5d89d89d8662536b2f651fae0598f21ea17bd Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Wed, 23 Feb 2011 18:13:36 -0800 Subject: [PATCH 1/1] Added cydia.setHidesBackButton(). --- MobileCydia.mm | 6 ++++++ UICaboodle/BrowserView.mm | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/MobileCydia.mm b/MobileCydia.mm index 4430dc7c..d99a0e86 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -4114,6 +4114,8 @@ static NSString *Warning_; return @"setButtonImage"; else if (selector == @selector(setButtonTitle:withStyle:toFunction:)) return @"setButtonTitle"; + else if (selector == @selector(setHidesBackButton:)) + return @"setHidesBackButton"; else if (selector == @selector(setPopupHook:)) return @"setPopupHook"; else if (selector == @selector(setToken:)) @@ -4278,6 +4280,10 @@ static NSString *Warning_; [indirect_ setButtonTitle:button withStyle:style toFunction:function]; } +- (void) setHidesBackButton:(NSString *)value { + [indirect_ performSelectorOnMainThread:@selector(setHidesBackButtonByNumber:) withObject:value waitUntilDone:NO]; +} + - (void) _setToken:(NSString *)token { Token_ = token; diff --git a/UICaboodle/BrowserView.mm b/UICaboodle/BrowserView.mm index d5116cfd..2a05005a 100644 --- a/UICaboodle/BrowserView.mm +++ b/UICaboodle/BrowserView.mm @@ -1170,6 +1170,14 @@ static void $UIWebViewWebViewDelegate$webViewClose$(UIWebViewWebViewDelegate *se return 980; } +- (void) setHidesBackButton:(bool)value { + [[self navigationItem] setHidesBackButton:value]; +} + +- (void) setHidesBackButtonByNumber:(NSNumber *)value { + [self setHidesBackButton:[value boolValue]]; +} + - (void) dispatchEvent:(NSString *)event { WebThreadLocked lock; -- 2.45.2