summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsiqi <me@siqi.fr>2013-07-05 00:23:46 +0200
committersiqi <me@siqi.fr>2013-07-05 09:56:06 +0200
commitf15a7ea1cabf7913d8c347a958650ae8e21684a9 (patch)
tree065eda17c673ceb144d342114a41d3306318e327
parent7a0b6004dc9218e7ade60ee750fe8af40ab2cefb (diff)
rebase
Change-Id: I7dcad32a9dff9d35e9641e80d9a8986a8b84889e
-rw-r--r--ios/iosremote/iosremote/en.lproj/MainStoryboard_iPhone.storyboard2
-rw-r--r--ios/iosremote/iosremote/serverList_vc.m31
-rw-r--r--qadevOOo/testdocs/XSimpleRegistry.rdbbin8192 -> 0 bytes
3 files changed, 31 insertions, 2 deletions
diff --git a/ios/iosremote/iosremote/en.lproj/MainStoryboard_iPhone.storyboard b/ios/iosremote/iosremote/en.lproj/MainStoryboard_iPhone.storyboard
index d7966c6c3491..1d19c7add264 100644
--- a/ios/iosremote/iosremote/en.lproj/MainStoryboard_iPhone.storyboard
+++ b/ios/iosremote/iosremote/en.lproj/MainStoryboard_iPhone.storyboard
@@ -356,6 +356,6 @@
<simulatedScreenMetrics key="destination" type="retina4"/>
</simulatedMetricsContainer>
<inferredMetricsTieBreakers>
- <segue reference="YBj-zE-J7L"/>
+ <segue reference="geL-Q8-f61"/>
</inferredMetricsTieBreakers>
</document>
diff --git a/ios/iosremote/iosremote/serverList_vc.m b/ios/iosremote/iosremote/serverList_vc.m
index ccd9f24b6fea..98768d715a93 100644
--- a/ios/iosremote/iosremote/serverList_vc.m
+++ b/ios/iosremote/iosremote/serverList_vc.m
@@ -16,6 +16,7 @@
@property (nonatomic, strong) CommunicationManager *comManager;
@property (nonatomic, weak) NSNotificationCenter* center;
@property (nonatomic, strong) id slideShowPreviewStartObserver;
+@property (nonatomic, strong) NSIndexPath *lastSpinningCellIndex;
@end
@@ -23,6 +24,7 @@
@synthesize center = _center;
@synthesize comManager = _comManager;
+@synthesize lastSpinningCellIndex = _lastSpinningCellIndex;
@synthesize slideShowPreviewStartObserver = _slideShowPreviewStartObserver;
- (id)initWithStyle:(UITableViewStyle)style
@@ -39,14 +41,23 @@
[super viewDidLoad];
// Uncomment the following line to preserve selection between presentations.
// self.clearsSelectionOnViewWillAppear = NO;
-
+
// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
// self.navigationItem.rightBarButtonItem = self.editButtonItem;
+ self.lastSpinningCellIndex = [[NSIndexPath alloc] init];
self.center = [NSNotificationCenter defaultCenter];
self.comManager = [CommunicationManager sharedComManager];
self.serverTable.dataSource = self;
self.serverTable.delegate = self;
+
+ NSOperationQueue *mainQueue = [NSOperationQueue mainQueue];
+ self.slideShowPreviewStartObserver = [[NSNotificationCenter defaultCenter] addObserverForName:STATUS_CONNECTED_SLIDESHOW_RUNNING
+ object:nil
+ queue:mainQueue
+ usingBlock:^(NSNotification *note) {
+ [self performSegueWithIdentifier:@"SlideShowPreview" sender:self ];
+ }];
}
-(void)viewWillAppear:(BOOL)animated
@@ -63,8 +74,26 @@
#pragma mark - Table view delegate
+- (void)disableSpinner
+{
+ [self.tableView cellForRowAtIndexPath:self.lastSpinningCellIndex].accessoryView = nil;
+}
+
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
+ UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
+
+ if(self.comManager.state!=CONNECTING){
+ self.lastSpinningCellIndex = indexPath;
+ UIActivityIndicatorView *activityView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
+ [activityView startAnimating];
+ [cell setAccessoryView:activityView];
+ }
+
+ NSLog(@"Connecting to %@:%@", [[self.comManager.servers objectAtIndex:indexPath.row] serverName], [[self.comManager.servers objectAtIndex:indexPath.row] serverAddress]);
+ self.comManager.delegate = self;
+ [self.comManager connectToServer:[self.comManager.servers objectAtIndex:indexPath.row]];
+ [tableView deselectRowAtIndexPath:indexPath animated:YES];
}
- (void)viewDidUnload {
diff --git a/qadevOOo/testdocs/XSimpleRegistry.rdb b/qadevOOo/testdocs/XSimpleRegistry.rdb
deleted file mode 100644
index a09a266b75ef..000000000000
--- a/qadevOOo/testdocs/XSimpleRegistry.rdb
+++ /dev/null
Binary files differ