]> git.saurik.com Git - cydia.git/commitdiff
Completed new "Who Are You?" panel. Details:
authorGrant Paul <chpwn@chpwn.com>
Sun, 3 Oct 2010 08:35:15 +0000 (01:35 -0700)
committerJay Freeman <saurik@Jay-Freemans-MacBook-Pro.local>
Mon, 4 Oct 2010 07:12:22 +0000 (00:12 -0700)
 - Fixed strange crash (introduced with last commit).
 - Changed to a "form sheet" style of view controller on the iPad"
 - Added Settings under the "Sources" tab on the iPad (where else to put it?)
 - Changed English localization to reflect the above iPad change, and made the _EX role descriptions more useful.

Cydia.app/English.lproj/Localizable.strings
Cydia.mm

index d655c1ebe18948625bd40943d657c86882cebc64..80ff0be82af02c7d27b116fc0d5e20bb1190900d 100644 (file)
@@ -42,7 +42,7 @@
 "DATABASE" = "Database";
 "DETAILS" = "Details";
 "DEVELOPER" = "Developer";
-"DEVELOPER_EX" = "No Filters";
+"DEVELOPER_EX" = "Everything, even scary internal stuff.";
 "DEVELOPERS_ONLY" = "Developers Only";
 "DISK_FREEING" = "Disk Freeing";
 "DISK_USING" = "Disk Using";
@@ -77,7 +77,7 @@
 "FROWNY_PANTS" = "Frowny Pants";
 "FUTURE_FEATURE_ROADMAP" = "Future Feature Roadmap";
 "HACKER" = "Hacker";
-"HACKER_EX" = "+ Command Line";
+"HACKER_EX" = "Adds Command Line tools.";
 "HALFINSTALLED_PACKAGE" = "Half-Installed Package";
 "HALFINSTALLED_PACKAGES" = "%d Half-Installed Packages";
 "HALFINSTALLED_PACKAGE_EX" = "When the shell scripts associated with packages fail, they are left in a bad state known as either half-configured or half-installed. These errors don't go away and instead continue to cause issues. These scripts can be deleted and the packages forcibly removed.";
 "RESUBMIT_FORM" = "Are you sure you want to submit this form again?";
 "RESUMING_AT" = "Resuming At";
 "RETURN_TO_CYDIA" = "Return to Cydia";
-"ROLE_EX" = "Not all of the packages available via Cydia are designed to be used by all users. Please categorize yourself so that Cydia can apply helpful filters.\n\nThis choice can be changed from \"Settings\" under the \"Manage\" tab.";
+"ROLE_EX" = "Not all of the packages available via Cydia are designed to be used by all users. Please categorize yourself so that Cydia can apply helpful filters.\n\nThis choice can be changed from \"Settings\" under the \"Manage\" tab (on the iPhone or iPod touch), or the \"Sources\" tab (on the iPad).";
 "RUNNING" = "Running";
 "SAFE" = "Safe";
 "SAMPLE" = "Sample";
 "UPGRADE_ESSENTIAL" = "Upgrade Essential";
 "UPGRADING_TO_READ_THIS" = "Upgrading to %@? Read This";
 "USER" = "User";
-"USER_EX" = "Graphical Only";
+"USER_EX" = "Apps, Tweaks, and Themes.";
 "USER_GUIDES" = "User Guides";
 "USERNAME" = "username";
 "VERIFICATION_ERROR" = "Verification Error";
index b8bdb0ef305ffd13d24788665f5d246ee62467eb..ba5cb322e2b0adb4cb99250725b6055b3515857a 100644 (file)
--- a/Cydia.mm
+++ b/Cydia.mm
@@ -6222,6 +6222,21 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
     ];
     [[self navigationItem] setRightBarButtonItem:rightItem animated:animated];
     [rightItem release];
+    
+    if (IsWildcat_ && !editing) {
+        UIBarButtonItem *settingsItem = [[UIBarButtonItem alloc]
+            initWithTitle:UCLocalize("SETTINGS")
+            style:UIBarButtonItemStylePlain
+            target:self
+            action:@selector(settingsButtonClicked)
+            ];
+        [[self navigationItem] setLeftBarButtonItem:settingsItem];
+        [settingsItem release];
+    }
+}
+
+- (void) settingsButtonClicked {
+    [delegate_ showSettings];
 }
 
 - (void) editButtonClicked {
@@ -7503,8 +7518,6 @@ freeing the view controllers on tab change */
         segment_ = [[UISegmentedControl alloc] initWithItems:items];
         container_ = [[UIView alloc] initWithFrame:CGRectMake(0, 0, [[self view] frame].size.width, 44.0f)];
         [container_ addSubview:segment_];
-        CGFloat width = [[self view] frame].size.width;
-        [segment_ setFrame:CGRectMake(width / 32.0f, 0, width - (width / 32.0f * 2.0f), 44.0f)];
         
         int index = -1;
         if ([Role_ isEqualToString:@"User"]) index = 0;
@@ -7526,6 +7539,13 @@ freeing the view controllers on tab change */
     } return self;
 }
 
+- (void) viewWillAppear:(BOOL)animated {
+    [super viewWillAppear:animated];
+    
+    CGFloat width = [[self view] frame].size.width;
+    [segment_ setFrame:CGRectMake(width / 32.0f, 0, width - (width / 32.0f * 2.0f), 44.0f)];
+}
+
 - (void) save {
     switch ([segment_ selectedSegmentIndex]) {
         case 0: Role_ = @"User"; break;
@@ -8282,6 +8302,7 @@ static _finline void _setHomePage(Cydia *self) {
 - (void) showSettings {
     RoleController *role = [[RoleController alloc] initWithDatabase:database_ delegate:self];
     UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:role];
+    if (IsWildcat_) [nav setModalPresentationStyle:UIModalPresentationFormSheet];
     [container_ presentModalViewController:nav animated:YES];
 }
 
@@ -8836,8 +8857,7 @@ int main(int argc, char *argv[]) { _pooled
     if (Metadata_ == NULL)
         Metadata_ = [NSMutableDictionary dictionaryWithCapacity:2];
     else {
-        
-        Role_ = [Metadata_ objectForKey:@"Settings"];
+        Settings_ = [Metadata_ objectForKey:@"Settings"];
 
         Packages_ = [Metadata_ objectForKey:@"Packages"];
         Sections_ = [Metadata_ objectForKey:@"Sections"];