summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrant Paul <chpwn@chpwn.com>2010-10-03 01:35:15 -0700
committerJay Freeman <saurik@Jay-Freemans-MacBook-Pro.local>2010-10-04 00:12:22 -0700
commit2bdd73bd2a0e988a2148f12f676f8f71f43c7b55 (patch)
tree970c8fa20c087442119cb0e3dc4f16fd8d50ad5f
parent21c6da4bd0e412e8b9f8ecec4e872335c770a910 (diff)
Completed new "Who Are You?" panel. Details:
- 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.
-rw-r--r--Cydia.app/English.lproj/Localizable.strings8
-rw-r--r--Cydia.mm28
2 files changed, 28 insertions, 8 deletions
diff --git a/Cydia.app/English.lproj/Localizable.strings b/Cydia.app/English.lproj/Localizable.strings
index d655c1e..80ff0be 100644
--- a/Cydia.app/English.lproj/Localizable.strings
+++ b/Cydia.app/English.lproj/Localizable.strings
@@ -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.";
@@ -153,7 +153,7 @@
"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";
@@ -198,7 +198,7 @@
"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";
diff --git a/Cydia.mm b/Cydia.mm
index b8bdb0e..ba5cb32 100644
--- 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"];