]> git.saurik.com Git - cydia.git/commitdiff
Sanity in rotation handling: centralize in CYViewController, as it should be.
authorGrant Paul <chpwn@chpwn.com>
Fri, 28 Jan 2011 01:44:39 +0000 (17:44 -0800)
committerGrant Paul <chpwn@chpwn.com>
Fri, 28 Jan 2011 01:44:39 +0000 (17:44 -0800)
MobileCydia.mm
UICaboodle/RVPage.mm

index 2079a6abac81b5d86105fe267689c69176bc5e4b..4421211fbca8dc73277353a1fc85c5407c1ac6c9 100644 (file)
@@ -4030,7 +4030,7 @@ static NSString *Warning_;
 @end
 /* }}} */
 /* Emulated Loading Controller {{{ */
-@interface CYEmulatedLoadingController : UIViewController {
+@interface CYEmulatedLoadingController : CYViewController {
     CYLoadingIndicator *indicator_;
     UITabBar *tabbar_;
     UINavigationBar *navbar_;
@@ -4062,10 +4062,6 @@ static NSString *Warning_;
     } return self;
 }
 
-- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orientation {
-    return (IsWildcat_ || orientation == UIInterfaceOrientationPortrait);
-}
-
 @end
 /* }}} */
 
@@ -6241,10 +6237,6 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
     } return self;
 }
 
-- (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orientation {
-    return IsWildcat_ || orientation == UIInterfaceOrientationPortrait;
-}
-
 - (void) setUpdate:(NSDate *)date {
     [self beginUpdate];
 }
@@ -6480,17 +6472,6 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
 
 @implementation CYNavigationController
 
-- (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orientation {
-    // Inherit autorotation settings for modal parents.
-    if ([self parentViewController] && [[self parentViewController] modalViewController] == self) {
-        return [[self parentViewController] shouldAutorotateToInterfaceOrientation:orientation];
-    } else if ([self parentViewController]) {
-        return [[self parentViewController] shouldAutorotateToInterfaceOrientation:orientation];
-    } else {
-        return [super shouldAutorotateToInterfaceOrientation:orientation];
-    }
-}
-
 - (void) dealloc {
     [super dealloc];
 }
@@ -8183,9 +8164,6 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
     } return self;
 }
 
-- (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orientation {
-    return IsWildcat_ || orientation == UIInterfaceOrientationPortrait;
-}
 @end
 /* }}} */
 
index 4a8ea5de01e40ce518a7edc06b0c8fa37d5e85d4..a28e37ce74c8c3696af00b4d1589b19b21e1d1c2 100644 (file)
 - (void) reloadData {
 }
 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orientation {
-    if ([self parentViewController]) {
-        return [[self parentViewController] shouldAutorotateToInterfaceOrientation:orientation];
-    } else {
-        return [super shouldAutorotateToInterfaceOrientation:orientation];
-    }
+    return (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad || orientation == UIInterfaceOrientationPortrait);
 }
 @end