Skip to content
Snippets Groups Projects
Commit a7a83194 authored by Petr Hruška's avatar Petr Hruška
Browse files

iPad bugs fixed

parent de847b03
No related merge requests found
......@@ -29,6 +29,15 @@
return 0;
}
- (void)setRemoveButtonPosition:(BOOL)animated
{
CGRect frame = self.removeButton.frame;
frame.origin.y = self.tableView.frame.origin.y + [self tableView:self.tableView numberOfRowsInSection:TEXTFIELDS_SECTION] * CELL_HEIGHT + REMOVEBUTTON_OFFSET;
if (animated)
[UIView animateWithDuration:0.3 animations:^{ self.removeButton.frame = frame; }];
else
self.removeButton.frame = frame;
}
- (void)setupAliasCell
{
......@@ -44,9 +53,7 @@
else
[self.tableView deleteRowsAtIndexPaths:aliasRow withRowAnimation:UITableViewRowAnimationTop];
CGRect frame = self.removeButton.frame;
frame.origin.y = self.tableView.frame.origin.y + [self tableView:self.tableView numberOfRowsInSection:TEXTFIELDS_SECTION] * CELL_HEIGHT + REMOVEBUTTON_OFFSET;
[UIView animateWithDuration:0.3 animations:^{ self.removeButton.frame = frame; }];
[self setRemoveButtonPosition:YES];
}
......@@ -93,6 +100,7 @@
self.autoAliasCell.on = !self.account.useAlias;
self.aliasTextField.text = self.account.alias;
[self setRemoveButtonPosition:YES];
[super viewWillAppear:animated];
}
......
......@@ -51,7 +51,7 @@
- (void)lastDigitEntered:(id)sender {
ISDSDefaults* defaults = [ISDSDefaults sharedDefaults];
NSLog(@"%@\n", defaults.pin);
//NSLog(@"%@\n", defaults.pin);
if ([defaults.pin isEqualToString:self.pinEditViewController.pin]) {
defaults.pin = nil;
[PinEditViewController resetFailureCount];
......
......@@ -9,7 +9,7 @@
#import "Estimate.h"
#define DEFAULT_DELAY 1000
#define DEFAULT_DELAY 1.0
#define ESTIMATE_RIGIDITY 0.3
......@@ -104,7 +104,10 @@
if (!plist) return DEFAULT_DELAY;
NSNumber *delay = [plist objectForKey:className];
if (!delay) return DEFAULT_DELAY;
if (!delay) {
NSLog(@"Can't find default delay for class '%@'", className);
return DEFAULT_DELAY;
}
return [delay floatValue];
}
......
......@@ -49,6 +49,7 @@
- (void)sendFailure;
- (NSString*)taskDescription;
- (void)setErrorDescriptionForError:(NSError*)error;
- (void)failWithDescription:(NSString*)errorDescription;
- (void)start;
......
......@@ -106,6 +106,26 @@
return testing ? ISDS_SUBJECT_TESTING : ISDS_SUBJECT_RELEASE;
}
- (void)setErrorDescriptionForError:(NSError*)error
{
NSString* errDescr;
if (error.code == -1012) {
if (self.errorDescription) {
errDescr = self.errorDescription;
} else {
errDescr = NSLocalizedString(@"Cannot access databox. Please check databox settings.", @"Cannot access databox. Please check databox settings.");
}
} else {
if ([self networkUnavailable])
errDescr = NSLocalizedString(@"Network not available.", @"Network not available.");
else
errDescr = NSLocalizedString(@"Cannot connect to ISDS server.", @"Cannot connect to ISDS server.");
}
self.errorDescription = errDescr;
}
- (void)failWithDescription:(NSString*)errorDescription
{
[self cancel];
......@@ -232,6 +252,7 @@
- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error {
[self setErrorDescriptionForError:error];
[self sendFailure];
}
......
......@@ -92,6 +92,8 @@
}
- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error {
[self setErrorDescriptionForError:error];
[self sendResult];
}
......
......@@ -21,12 +21,15 @@
@property (nonatomic, retain) UIProgressView* bar;
@property (nonatomic, retain) NSArray* items;
@property (nonatomic, retain) UIActivityIndicatorView* activityIndicator;
@property (nonatomic, retain) UIView* progressView;
- (id)initWithText:(NSString*)text andFrame:(CGRect)frame;
- (id)initWithText:(NSString*)text;
- (void)willShowInSplitView;
- (void)willHideInSplitView;
- (void)setFrame:(CGRect)frame;
@end
......@@ -15,13 +15,14 @@
@synthesize bar;
@synthesize items;
@synthesize activityIndicator=_activityIndicator;
@synthesize progressView=_progressView;
- (id)initWithText:(NSString*)text andFrame:(CGRect)frame {
if ((self = [super init])) {
UIView* progressView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 300, 30)];
progressView.autoresizingMask = UIViewAutoresizingFlexibleWidth;
self.progressView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 300, 30)];
self.progressView.autoresizingMask = UIViewAutoresizingFlexibleWidth;
self.label = [[UILabel alloc] initWithFrame:CGRectMake(25, 0, 260, 12)];
[self.label release];
......@@ -29,10 +30,10 @@
self.label.backgroundColor = [UIColor clearColor];
self.label.font = [UIFont boldSystemFontOfSize:[UIFont smallSystemFontSize]];
self.label.textColor = [UIColor whiteColor];
[progressView addSubview:self.label];
[self.progressView addSubview:self.label];
self.bar = [[UIProgressView alloc] initWithFrame:CGRectMake(25, 15, 260, 10)];
[progressView addSubview:self.bar];
[self.progressView addSubview:self.bar];
[self.bar release];
self.bar.autoresizingMask = UIViewAutoresizingFlexibleWidth;
......@@ -40,12 +41,12 @@
[self.activityIndicator release];
self.activityIndicator.hidden = NO;
[self.activityIndicator startAnimating];
[progressView addSubview:self.activityIndicator];
[self.progressView addSubview:self.activityIndicator];
if (!CGRectIsNull(frame)) progressView.frame = frame;
if (!CGRectIsNull(frame)) self.progressView.frame = frame;
UIBarButtonItem* toolbarItem = [[UIBarButtonItem alloc] initWithCustomView:progressView];
[progressView release];
UIBarButtonItem* toolbarItem = [[UIBarButtonItem alloc] initWithCustomView:self.progressView];
[self.progressView release];
self.items = [NSArray arrayWithObject: toolbarItem];
[toolbarItem release];
......@@ -54,6 +55,13 @@
return self;
}
- (void)setFrame:(CGRect)frame
{
CGRect f = self.progressView.frame;
f.size.width = frame.size.width;
self.progressView.frame = f;
}
- (id)initWithText:(NSString*)text {
return [self initWithText:text andFrame:CGRectNull];
......@@ -81,6 +89,7 @@
[bar release];
[items release];
[_activityIndicator release];
[_progressView release];
[super dealloc];
}
......
......@@ -51,8 +51,12 @@
- (void)setupCookiesAndScheduleUpdate
{
UIViewController* topViewController = [self.navigationController topViewController];
if ([topViewController isKindOfClass:[TokenViewController class]]) return;
TokenViewController* tokenViewController = [[NetworkUpdater networkUpdater] tokenViewController];
if (tokenViewController) {
self.title = NSLocalizedString(@"Accounts", @"Accounts view title");
tokenViewController.delegate = self;
[self.navigationController pushViewController:tokenViewController animated:TRUE];
}
......
......@@ -104,23 +104,8 @@
for (id key in error.userInfo) {
NSLog(@" key=%@, value=%@", key, [error.userInfo objectForKey:key]);
}
NSString* errDescr;
if (error.code == -1012) {
if (self.errorDescription) {
errDescr = self.errorDescription;
[[errDescr retain] autorelease];
} else {
errDescr = NSLocalizedString(@"Cannot access databox. Please check databox settings.", @"Cannot access databox. Please check databox settings.");
}
} else {
if ([self networkUnavailable])
errDescr = NSLocalizedString(@"Network not available.", @"Network not available.");
else
errDescr = NSLocalizedString(@"Cannot connect to ISDS server.", @"Cannot connect to ISDS server.");
}
self.errorDescription = errDescr;
[self setErrorDescriptionForError:error];
[self.delegate taskFailed:self];
}
......
......@@ -145,6 +145,8 @@
[self setToolbarItems:self.progressToolbar.items animated:YES];
self.navigationController.toolbarHidden = NO;
}
CGRect frame = CGRectMake(0, 0, self.view.frame.size.width - 20, 30);
[self.progressToolbar setFrame:frame];
}
......
......@@ -389,7 +389,7 @@
- (void)showActionSheet
{
if (self.actionSheet) [self dismissActionSheet];
self.actionSheet = [[UIActionSheet alloc] initWithTitle:NSLocalizedString(@"Some accounts are missing tokens. Do you with to continue?", nil) delegate:self cancelButtonTitle:NSLocalizedString(@"Cancel", nil) destructiveButtonTitle:NSLocalizedString(@"Continue", nil) otherButtonTitles: nil];
self.actionSheet = [[UIActionSheet alloc] initWithTitle:NSLocalizedString(@"Some accounts are missing tokens. Do you wish to continue?", nil) delegate:self cancelButtonTitle:NSLocalizedString(@"Cancel", nil) destructiveButtonTitle:NSLocalizedString(@"Continue", nil) otherButtonTitles: nil];
[self.actionSheet showInView:self.view];
[self.actionSheet release];
......@@ -542,8 +542,10 @@
- (void)actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger)buttonIndex
{
self.actionSheet = nil;
[self.navigationController setToolbarHidden:NO];
[self.navigationController setToolbarHidden:YES];
if (buttonIndex != CONTINUE_BUTTON_INDEX) {
[self.navigationController setToolbarHidden:NO];
[self.navigationController setToolbarHidden:YES];
}
}
@end
......@@ -2,15 +2,13 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>GetOwnerInfoFromLogin</key>
<real>0.5</real>
<key>GetListOfSentMessages</key>
<real>0.5</real>
<key>GetListOfReceivedMessages</key>
<real>0.5</real>
<key>SignedSentMessageDownload</key>
<real>1.7</real>
<key>ReceivedMessageDownload</key>
<real>1.7</real>
<key>SmsTask</key>
<integer>1</integer>
<key>SOAPTask</key>
<integer>1</integer>
<key>HotpCookieTask</key>
<integer>1</integer>
<key>TotpCookieTask</key>
<integer>1</integer>
</dict>
</plist>
......@@ -177,6 +177,10 @@ T17 . . . .
-------------------
21.9.2011
-------------------
23.5.2011
tel-cs tel-en pad-cs pad-en
......
......@@ -90,7 +90,7 @@
/* Token table */
"Authorization"="Autorizace";
"Some accounts are missing tokens. Do you with to continue?"="Některým účtům chybí kódy. Přejete si pokračovat?";
"Some accounts are missing tokens. Do you wish to continue?"="Některým účtům chybí kódy. Přejete si pokračovat?";
"Verifying authorization code"="Ověřuji autorizační kód";
"Requesting sms message"="Žádám o sms zprávu";
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment