[Libreoffice-commits] core.git: 3 commits - ios/iosremote

siqi me at siqi.fr
Wed Jul 10 01:48:19 PDT 2013


 ios/iosremote/iosremote.xcodeproj/project.pbxproj                                                                |   12 
 ios/iosremote/iosremote.xcodeproj/project.xcworkspace/xcuserdata/siqi.xcuserdatad/UserInterfaceState.xcuserstate |binary
 ios/iosremote/iosremote.xcodeproj/xcuserdata/siqi.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist                  |   26 
 ios/iosremote/iosremote/Communication/Client.m                                                                   |   41 
 ios/iosremote/iosremote/Communication/CommandInterpreter.m                                                       |   46 
 ios/iosremote/iosremote/Communication/SlideShow.m                                                                |    9 
 ios/iosremote/iosremote/Communication/pinValidation_vc.h                                                         |   14 
 ios/iosremote/iosremote/Communication/pinValidation_vc.m                                                         |   14 
 ios/iosremote/iosremote/SWReavealMainController.h                                                                |   14 
 ios/iosremote/iosremote/SWReavealMainController.m                                                                |   14 
 ios/iosremote/iosremote/en.lproj/MainStoryboard_iPhone.storyboard                                                |  783 ----------
 ios/iosremote/iosremote/en.lproj/iPhone_autolayout.storyboard                                                    |  783 ++++++++++
 ios/iosremote/iosremote/iosremote-Info.plist                                                                     |    5 
 ios/iosremote/iosremote/main.m                                                                                   |   14 
 ios/iosremote/iosremote/newServer_vc.h                                                                           |   12 
 ios/iosremote/iosremote/newServer_vc.m                                                                           |   77 
 ios/iosremote/iosremote/serverList_vc.m                                                                          |   12 
 ios/iosremote/iosremote/slideShowPreviewTable_vc.h                                                               |   14 
 ios/iosremote/iosremote/slideShowPreviewTable_vc.m                                                               |   18 
 ios/iosremote/iosremote/slideShowPreview_vc.h                                                                    |   14 
 ios/iosremote/iosremote/slideShowPreview_vc.m                                                                    |   16 
 ios/iosremote/iosremote/slideShowSwipeInList.h                                                                   |   15 
 ios/iosremote/iosremote/slideShowSwipeInList.m                                                                   |    4 
 ios/iosremote/iosremote/slideShow_vc.h                                                                           |   14 
 ios/iosremote/iosremote/slideShow_vc.m                                                                           |   22 
 25 files changed, 980 insertions(+), 1013 deletions(-)

New commits:
commit 424bc075d0d03832759e69b4a4eb35ec2eab2174
Author: siqi <me at siqi.fr>
Date:   Wed Jul 10 10:47:34 2013 +0200

    continue to interpret command from server if is not ended
    
    Change-Id: Id970a54db5c61a9cada6b1fda0c3cecdebb4ffe7

diff --git a/ios/iosremote/iosremote.xcodeproj/project.pbxproj b/ios/iosremote/iosremote.xcodeproj/project.pbxproj
index bd13696..d35a80d 100644
--- a/ios/iosremote/iosremote.xcodeproj/project.pbxproj
+++ b/ios/iosremote/iosremote.xcodeproj/project.pbxproj
@@ -36,7 +36,7 @@
 		57C6E405175E06E800E8BC5F /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 57C6E404175E06E800E8BC5F /* Default.png */; };
 		57C6E407175E06E800E8BC5F /* Default at 2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 57C6E406175E06E800E8BC5F /* Default at 2x.png */; };
 		57C6E409175E06E800E8BC5F /* Default-568h at 2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 57C6E408175E06E800E8BC5F /* Default-568h at 2x.png */; };
-		57C6E40C175E06E800E8BC5F /* MainStoryboard_iPhone.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 57C6E40A175E06E800E8BC5F /* MainStoryboard_iPhone.storyboard */; };
+		57C6E40C175E06E800E8BC5F /* iPhone_autolayout.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 57C6E40A175E06E800E8BC5F /* iPhone_autolayout.storyboard */; };
 		57C6E42E175E076900E8BC5F /* Client.m in Sources */ = {isa = PBXBuildFile; fileRef = 57C6E427175E076900E8BC5F /* Client.m */; };
 		57C6E42F175E076900E8BC5F /* CommunicationManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 57C6E429175E076900E8BC5F /* CommunicationManager.m */; };
 		57C6E430175E076900E8BC5F /* CommandInterpreter.m in Sources */ = {isa = PBXBuildFile; fileRef = 57C6E42B175E076900E8BC5F /* CommandInterpreter.m */; };
@@ -93,7 +93,7 @@
 		57C6E404175E06E800E8BC5F /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = "<group>"; };
 		57C6E406175E06E800E8BC5F /* Default at 2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default at 2x.png"; sourceTree = "<group>"; };
 		57C6E408175E06E800E8BC5F /* Default-568h at 2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h at 2x.png"; sourceTree = "<group>"; };
-		57C6E40B175E06E800E8BC5F /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/MainStoryboard_iPhone.storyboard; sourceTree = "<group>"; };
+		57C6E40B175E06E800E8BC5F /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/iPhone_autolayout.storyboard; sourceTree = "<group>"; };
 		57C6E426175E076900E8BC5F /* Client.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Client.h; sourceTree = "<group>"; };
 		57C6E427175E076900E8BC5F /* Client.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Client.m; sourceTree = "<group>"; };
 		57C6E428175E076900E8BC5F /* CommunicationManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = CommunicationManager.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
@@ -217,7 +217,7 @@
 			isa = PBXGroup;
 			children = (
 				57C6E3F9175E06E800E8BC5F /* Supporting Files */,
-				57C6E40A175E06E800E8BC5F /* MainStoryboard_iPhone.storyboard */,
+				57C6E40A175E06E800E8BC5F /* iPhone_autolayout.storyboard */,
 				57FE71E11785C61300B50125 /* pinValidation_vc.h */,
 				57FE71E21785C61400B50125 /* pinValidation_vc.m */,
 				57AEEDAB1789443D007F4F97 /* slideShowPreview */,
@@ -327,7 +327,7 @@
 				57C6E405175E06E800E8BC5F /* Default.png in Resources */,
 				57C6E407175E06E800E8BC5F /* Default at 2x.png in Resources */,
 				57C6E409175E06E800E8BC5F /* Default-568h at 2x.png in Resources */,
-				57C6E40C175E06E800E8BC5F /* MainStoryboard_iPhone.storyboard in Resources */,
+				57C6E40C175E06E800E8BC5F /* iPhone_autolayout.storyboard in Resources */,
 				57867A541787172A00EBBE52 /* impress.jpeg in Resources */,
 				57867A5A1787510700EBBE52 /* pushed_next_button.png in Resources */,
 				57867A5B1787510700EBBE52 /* released_next_button.png in Resources */,
@@ -384,12 +384,12 @@
 			name = InfoPlist.strings;
 			sourceTree = "<group>";
 		};
-		57C6E40A175E06E800E8BC5F /* MainStoryboard_iPhone.storyboard */ = {
+		57C6E40A175E06E800E8BC5F /* iPhone_autolayout.storyboard */ = {
 			isa = PBXVariantGroup;
 			children = (
 				57C6E40B175E06E800E8BC5F /* en */,
 			);
-			name = MainStoryboard_iPhone.storyboard;
+			name = iPhone_autolayout.storyboard;
 			sourceTree = "<group>";
 		};
 /* End PBXVariantGroup section */
diff --git a/ios/iosremote/iosremote.xcodeproj/project.xcworkspace/xcuserdata/siqi.xcuserdatad/UserInterfaceState.xcuserstate b/ios/iosremote/iosremote.xcodeproj/project.xcworkspace/xcuserdata/siqi.xcuserdatad/UserInterfaceState.xcuserstate
index b49a1f0..8869eee 100644
Binary files a/ios/iosremote/iosremote.xcodeproj/project.xcworkspace/xcuserdata/siqi.xcuserdatad/UserInterfaceState.xcuserstate and b/ios/iosremote/iosremote.xcodeproj/project.xcworkspace/xcuserdata/siqi.xcuserdatad/UserInterfaceState.xcuserstate differ
diff --git a/ios/iosremote/iosremote.xcodeproj/xcuserdata/siqi.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist b/ios/iosremote/iosremote.xcodeproj/xcuserdata/siqi.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist
index 1011728..e0c2aef 100644
--- a/ios/iosremote/iosremote.xcodeproj/xcuserdata/siqi.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist
+++ b/ios/iosremote/iosremote.xcodeproj/xcuserdata/siqi.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist
@@ -16,5 +16,31 @@
          landmarkName = "@implementation libreoffice_sdremoteViewController"
          landmarkType = "3">
       </FileBreakpoint>
+      <FileBreakpoint
+         shouldBeEnabled = "Yes"
+         ignoreCount = "0"
+         continueAfterRunningActions = "No"
+         filePath = "iosremote/newServer_vc.m"
+         timestampString = "395055655.034211"
+         startingColumnNumber = "9223372036854775807"
+         endingColumnNumber = "9223372036854775807"
+         startingLineNumber = "50"
+         endingLineNumber = "50"
+         landmarkName = "-viewWillAppear:"
+         landmarkType = "5">
+      </FileBreakpoint>
+      <FileBreakpoint
+         shouldBeEnabled = "Yes"
+         ignoreCount = "0"
+         continueAfterRunningActions = "No"
+         filePath = "iosremote/newServer_vc.m"
+         timestampString = "395055655.034211"
+         startingColumnNumber = "9223372036854775807"
+         endingColumnNumber = "9223372036854775807"
+         startingLineNumber = "46"
+         endingLineNumber = "46"
+         landmarkName = "-viewDidLoad"
+         landmarkType = "5">
+      </FileBreakpoint>
    </FileBreakpoints>
 </Bucket>
diff --git a/ios/iosremote/iosremote/Communication/Client.m b/ios/iosremote/iosremote/Communication/Client.m
index 42bcd8b..ed8d3af 100644
--- a/ios/iosremote/iosremote/Communication/Client.m
+++ b/ios/iosremote/iosremote/Communication/Client.m
@@ -195,7 +195,7 @@ int count = 0;
                     }
                 }
             }
-
+            NSLog(@"Command:%@", str);
             NSArray *commands = [str componentsSeparatedByString:@"\n"];
             [self.receiver parse:commands];
             data = nil;
diff --git a/ios/iosremote/iosremote/Communication/CommandInterpreter.m b/ios/iosremote/iosremote/Communication/CommandInterpreter.m
index 27c93fd..fb26da5 100644
--- a/ios/iosremote/iosremote/Communication/CommandInterpreter.m
+++ b/ios/iosremote/iosremote/Communication/CommandInterpreter.m
@@ -33,64 +33,56 @@
 
 // Received a set of instructions from server.
 - (void) parse:(NSArray*)command{
+    uint marker = 0;
     if ([command count] == 0) {
         return;
     }
-//    NSLog(@"Command:%@", command);
+
     NSString *instruction = [command objectAtIndex:0];
     if ([instruction isEqualToString:STATUS_PAIRING_PINVALIDATION]) {
         [[NSNotificationCenter defaultCenter] postNotificationName:STATUS_PAIRING_PINVALIDATION
                                                             object:nil];
+        marker = 2;
     }
     else if ([instruction isEqualToString:STATUS_PAIRING_PAIRED]){
         NSLog(@"Paired command: %@", command);
         [[NSNotificationCenter defaultCenter] postNotificationName:STATUS_PAIRING_PAIRED
                                                             object:nil];
-        if ([command objectAtIndex:2] && [[command objectAtIndex:2] isEqualToString:@"slideshow_started"]){
-            NSRange range;
-            range.location = 2;
-            range.length = [command count] - 2;
-            [self parse:[command subarrayWithRange:range]];
-        }
+        marker = 2;
     }
     else if([instruction isEqualToString:@"slideshow_started"]){
         uint slideLength = [[command objectAtIndex:1] integerValue];
         uint currentSlide = [[command objectAtIndex:2] integerValue];
         NSLog(@"Interpreter: slideshow_started with currentSlide: %u slideLength: %u", currentSlide, slideLength);
-        
+
         [self.slideShow setSize:slideLength];
         [self.slideShow setCurrentSlide:currentSlide];
-        
+
         [[NSNotificationCenter defaultCenter] postNotificationName:STATUS_CONNECTED_SLIDESHOW_RUNNING
-                          object:nil];
+                                                            object:nil];
         [[NSNotificationCenter defaultCenter] postNotificationName:MSG_SLIDE_CHANGED object:nil];
-        
+        marker = 4;
     } else if ([instruction isEqualToString:@"slideshow_finished"]){
         NSLog(@"Interpreter: slideshow_finished");
         self.slideShow = [[SlideShow alloc] init];
         [[NSNotificationCenter defaultCenter] postNotificationName:STATUS_CONNECTED_NOSLIDESHOW object:nil];
+        marker = 2;
     } else {
         if ([instruction isEqualToString:@"slide_updated"]) {
             NSLog(@"Interpreter: slide_updated");
             uint newSlideNumber = [[command objectAtIndex:1] integerValue];
             [self.slideShow setCurrentSlide:newSlideNumber];
-            
+
             [[NSNotificationCenter defaultCenter] postNotificationName:MSG_SLIDE_CHANGED object:nil];
-            
+            marker = 3;
         } else if ([instruction isEqualToString:@"slide_preview"]){
             NSLog(@"Interpreter: slide_preview");
             uint slideNumber = [[command objectAtIndex:1] integerValue];
             NSString * imageData = [command objectAtIndex:2];
             [self.slideShow putImage:imageData
-                              AtIndex:slideNumber];
+                             AtIndex:slideNumber];
             [[NSNotificationCenter defaultCenter] postNotificationName:MSG_SLIDE_PREVIEW object:[NSNumber numberWithUnsignedInt:slideNumber]];
-            if ([[command objectAtIndex:4] isEqualToString:@"slide_notes"])
-            {
-                NSRange range;
-                range.location = 4;
-                range.length = [command count] - 4;
-                [self parse:[command subarrayWithRange:range]];
-            }
+            marker = 4;
         } else if ([instruction isEqualToString:@"slide_notes"]){
             NSLog(@"Interpreter: slide_notes");
             uint slideNumber = [[command objectAtIndex:1] integerValue];
@@ -98,15 +90,23 @@
             for (int i = 2; i<command.count; ++i) {
                 [notes appendString:[command objectAtIndex:i]];
                 if ([notes hasSuffix:@"</body>"]) {
+                    marker = i+2;
                     break;
                 }
             }
             [self.slideShow putNotes:notes
-                              AtIndex:slideNumber];
+                             AtIndex:slideNumber];
             [[NSNotificationCenter defaultCenter] postNotificationName:MSG_SLIDE_NOTES object: [NSNumber numberWithUnsignedInt:slideNumber]];
         }
+
+    }
+    if ([command objectAtIndex:marker] && ![[command objectAtIndex:marker] isEqualToString:@""])
+    {
+        NSRange range;
+        range.location = marker;
+        range.length = [command count] - marker;
+        [self parse:[command subarrayWithRange:range]];
     }
-    
 }
 
 @end
diff --git a/ios/iosremote/iosremote/Communication/SlideShow.m b/ios/iosremote/iosremote/Communication/SlideShow.m
index 079a23b..3ec06b8 100644
--- a/ios/iosremote/iosremote/Communication/SlideShow.m
+++ b/ios/iosremote/iosremote/Communication/SlideShow.m
@@ -14,10 +14,10 @@
 
 @interface SlideShow()
 
- at property (nonatomic, strong) NSMutableDictionary* imagesDictionary;
- at property (nonatomic, strong) NSMutableDictionary* notesDictionary;
+ at property (atomic, strong) NSMutableDictionary* imagesDictionary;
+ at property (atomic, strong) NSMutableDictionary* notesDictionary;
 
- at property (nonatomic, strong) NSMutableDictionary* loadBuffer;
+ at property (atomic, strong) NSMutableDictionary* loadBuffer;
 @property (nonatomic, strong) id slideShowImageReadyObserver;
 @property (nonatomic, strong) id slideShowNoteReadyObserver;
 
@@ -93,10 +93,8 @@ dispatch_queue_t backgroundQueue;
 }
 
 - (void) putImage: (NSString *)img AtIndex: (uint) index{
-//    NSLog(@"Put Image into %u", index);
         NSData* data = [NSData dataWithBase64String:img];
         UIImage* image = [UIImage imageWithData:data];
-        NSLog(@"%@", image);
         [self.imagesDictionary setObject:image forKey:[NSNumber numberWithUnsignedInt:index]];
         [[NSNotificationCenter defaultCenter] postNotificationName:@"storage_update_ready"
                                                             object:nil
@@ -129,6 +127,7 @@ dispatch_queue_t backgroundQueue;
     }
     if (![self.imagesDictionary objectForKey:[NSNumber numberWithUnsignedInt:index]])
     {
+        NSLog(@"Didn't find %u, putting into buffer", index);
         [self.loadBuffer setObject:[NSNumber numberWithInt:index ] forKey:[NSNumber numberWithInt:[view tag]]];
     }
     else{
diff --git a/ios/iosremote/iosremote/Communication/pinValidation_vc.h b/ios/iosremote/iosremote/Communication/pinValidation_vc.h
index 6c7be76..6d00f66 100644
--- a/ios/iosremote/iosremote/Communication/pinValidation_vc.h
+++ b/ios/iosremote/iosremote/Communication/pinValidation_vc.h
@@ -1,10 +1,10 @@
-//
-//  pinValidation_vcViewController.h
-//  iosremote
-//
-//  Created by Liu Siqi on 7/4/13.
-//  Copyright (c) 2013 libreoffice. All rights reserved.
-//
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
 
 #import <UIKit/UIKit.h>
 
diff --git a/ios/iosremote/iosremote/Communication/pinValidation_vc.m b/ios/iosremote/iosremote/Communication/pinValidation_vc.m
index 7a8c4d8..2d9d3c3 100644
--- a/ios/iosremote/iosremote/Communication/pinValidation_vc.m
+++ b/ios/iosremote/iosremote/Communication/pinValidation_vc.m
@@ -1,10 +1,10 @@
-//
-//  pinValidation_vcViewController.m
-//  iosremote
-//
-//  Created by Liu Siqi on 7/4/13.
-//  Copyright (c) 2013 libreoffice. All rights reserved.
-//
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
 
 #import "pinValidation_vc.h"
 #import "slideShowPreview_vc.h"
diff --git a/ios/iosremote/iosremote/SWReavealMainController.h b/ios/iosremote/iosremote/SWReavealMainController.h
index 3d08f01..0f1601e 100644
--- a/ios/iosremote/iosremote/SWReavealMainController.h
+++ b/ios/iosremote/iosremote/SWReavealMainController.h
@@ -1,10 +1,10 @@
-//
-//  SWReavealMainController.h
-//  iosremote
-//
-//  Created by Liu Siqi on 7/8/13.
-//  Copyright (c) 2013 libreoffice. All rights reserved.
-//
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
 
 #import <UIKit/UIKit.h>
 
diff --git a/ios/iosremote/iosremote/SWReavealMainController.m b/ios/iosremote/iosremote/SWReavealMainController.m
index e2801f4..acf91e4 100644
--- a/ios/iosremote/iosremote/SWReavealMainController.m
+++ b/ios/iosremote/iosremote/SWReavealMainController.m
@@ -1,10 +1,10 @@
-//
-//  SWReavealMainController.m
-//  iosremote
-//
-//  Created by Liu Siqi on 7/8/13.
-//  Copyright (c) 2013 libreoffice. All rights reserved.
-//
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
 
 #import "SWReavealMainController.h"
 
diff --git a/ios/iosremote/iosremote/en.lproj/MainStoryboard_iPhone.storyboard b/ios/iosremote/iosremote/en.lproj/iPhone_autolayout.storyboard
similarity index 100%
rename from ios/iosremote/iosremote/en.lproj/MainStoryboard_iPhone.storyboard
rename to ios/iosremote/iosremote/en.lproj/iPhone_autolayout.storyboard
diff --git a/ios/iosremote/iosremote/iosremote-Info.plist b/ios/iosremote/iosremote/iosremote-Info.plist
index 2bd910b..1dd50c9 100644
--- a/ios/iosremote/iosremote/iosremote-Info.plist
+++ b/ios/iosremote/iosremote/iosremote-Info.plist
@@ -25,7 +25,7 @@
 	<key>LSRequiresIPhoneOS</key>
 	<true/>
 	<key>UIMainStoryboardFile</key>
-	<string>MainStoryboard_iPhone</string>
+	<string>iPhone_autolayout</string>
 	<key>UIRequiredDeviceCapabilities</key>
 	<array>
 		<string>armv7</string>
@@ -33,8 +33,7 @@
 	<key>UISupportedInterfaceOrientations</key>
 	<array>
 		<string>UIInterfaceOrientationPortrait</string>
-		<string>UIInterfaceOrientationLandscapeLeft</string>
-		<string>UIInterfaceOrientationLandscapeRight</string>
+		<string>UIInterfaceOrientationPortraitUpsideDown</string>
 	</array>
 	<key>UISupportedInterfaceOrientations~ipad</key>
 	<array>
diff --git a/ios/iosremote/iosremote/main.m b/ios/iosremote/iosremote/main.m
index 126838a..51ae8dc 100644
--- a/ios/iosremote/iosremote/main.m
+++ b/ios/iosremote/iosremote/main.m
@@ -1,10 +1,10 @@
-//
-//  main.m
-//  iosremote
-//
-//  Created by Liu Siqi on 6/4/13.
-//  Copyright (c) 2013 libreoffice. All rights reserved.
-//
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
 
 #import <UIKit/UIKit.h>
 
diff --git a/ios/iosremote/iosremote/newServer_vc.h b/ios/iosremote/iosremote/newServer_vc.h
index 6d725b5..7214829 100644
--- a/ios/iosremote/iosremote/newServer_vc.h
+++ b/ios/iosremote/iosremote/newServer_vc.h
@@ -1,3 +1,10 @@
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
 
 #import <UIKit/UIKit.h>
 
@@ -27,12 +34,7 @@ typedef NSUInteger ServerAttribute;
 @property (nonatomic, strong) EditableTableViewCell *addrCell;
 @property (nonatomic, strong) CommunicationManager *comManager;
 - (IBAction)save:(id)sender;
-- (BOOL)isModal;
 
 - (EditableTableViewCell *)newDetailCellWithTag:(NSInteger)tag;
 
-//  Action Methods
-- (void)save;
-- (void)cancel;
-
 @end
diff --git a/ios/iosremote/iosremote/newServer_vc.m b/ios/iosremote/iosremote/newServer_vc.m
index 59d8d0b..acd887e 100644
--- a/ios/iosremote/iosremote/newServer_vc.m
+++ b/ios/iosremote/iosremote/newServer_vc.m
@@ -38,14 +38,6 @@
     }
 }
 
-- (BOOL)isModal
-{
-    NSArray *viewControllers = [[self navigationController] viewControllers];
-    UIViewController *rootViewController = [viewControllers objectAtIndex:0];
-    
-    return rootViewController == self;
-}
-
 - (EditableTableViewCell *)newDetailCellWithTag:(NSInteger)tag
 {
     EditableTableViewCell *cell = [[EditableTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil];
@@ -57,45 +49,10 @@
 }
 
 #pragma mark -
-#pragma mark Action Methods
-
-- (void)save
-{
-    [self dismissModalViewControllerAnimated:YES];
-}
-
-- (void)cancel
-{
-    [self dismissModalViewControllerAnimated:YES];
-}
-
-#pragma mark -
 #pragma mark UIViewController Methods
 
 - (void)viewDidLoad
 {
-    //  If the user clicked the '+' button in the list view, we're
-    //  creating a new entry rather than modifying an existing one, so
-    //  we're in a modal nav controller. Modal nav controllers don't add
-    //  a back button to the nav bar; instead we'll add Save and
-    //  Cancel buttons.
-    //
-    if ([self isModal])
-    {
-        UIBarButtonItem *saveButton = [[UIBarButtonItem alloc]
-                                       initWithBarButtonSystemItem:UIBarButtonSystemItemSave
-                                       target:self
-                                       action:@selector(save)];
-        
-        [[self navigationItem] setRightBarButtonItem:saveButton];
-        
-        UIBarButtonItem *cancelButton = [[UIBarButtonItem alloc]
-                                         initWithBarButtonSystemItem:UIBarButtonSystemItemCancel
-                                         target:self
-                                         action:@selector(cancel)];
-        
-        [[self navigationItem] setLeftBarButtonItem:cancelButton];
-    }
     self.comManager = [CommunicationManager sharedComManager];
     [self setNameCell: [self newDetailCellWithTag:ServerName]];
     [self setAddrCell: [self newDetailCellWithTag:ServerAddr]];
@@ -166,14 +123,7 @@
 //  value to the corresponding property of the model object.
 //
 - (void)textFieldDidEndEditing:(UITextField *)textField
-{
-    static NSNumberFormatter *_formatter;
-    
-    if (_formatter == nil)
-    {
-        _formatter = [[NSNumberFormatter alloc] init];
-    }
-    
+{    
     NSString *text = [textField text];
     
     switch ([textField tag])
@@ -207,16 +157,9 @@
         
         [nextTextField becomeFirstResponder];
     }
-    else if ([self isModal])
-    {
-        //  We're in a modal navigation controller, which means the user is
-        //  adding a new book rather than editing an existing one.
-        //
-        [self save];
-    }
     else
     {
-        [[self navigationController] popViewControllerAnimated:YES];
+        [self save:nil];
     }
     
     return YES;
@@ -233,24 +176,13 @@
 - (NSInteger)tableView:(UITableView *)tableView
  numberOfRowsInSection:(NSInteger)section
 {
-    return section == 0 ? 2 : 1;
-}
-
-- (NSString *)tableView:(UITableView *)tableView
-titleForHeaderInSection:(NSInteger)section
-{
-    switch (section)
-    {
-        case InformationSection:  return nil;
-    }    
-    return nil;
+    return 2;
 }
 
 - (UITableViewCell *)tableView:(UITableView *)tableView
          cellForRowAtIndexPath:(NSIndexPath *)indexPath
 {
     EditableTableViewCell *cell = nil;
-    NSInteger tag = INT_MIN;
     NSString *text = nil;
     NSString *placeholder = nil;
     UIKeyboardType keyboardType;
@@ -266,7 +198,6 @@ titleForHeaderInSection:(NSInteger)section
             {
                 cell = [self nameCell];
                 text = [self.server serverName];
-                tag = ServerName;
                 placeholder = @"Server Name (optional)";
                 keyboardType = UIKeyboardTypeDefault;
             }
@@ -274,7 +205,6 @@ titleForHeaderInSection:(NSInteger)section
             {
                 cell = [self addrCell];
                 text = [self.server serverAddress];
-                tag = ServerAddr;
                 placeholder = @"IP Address";
                 keyboardType = UIKeyboardTypeNumbersAndPunctuation;
             }
@@ -282,7 +212,6 @@ titleForHeaderInSection:(NSInteger)section
         }
     }
     [cell.textField setPlaceholder:placeholder];
-    [cell setTag:tag];
     [cell.textField setText:text];
     [cell.textField setKeyboardType:keyboardType];
     return cell;
diff --git a/ios/iosremote/iosremote/serverList_vc.m b/ios/iosremote/iosremote/serverList_vc.m
index f6f2cf6..9d15bc8 100644
--- a/ios/iosremote/iosremote/serverList_vc.m
+++ b/ios/iosremote/iosremote/serverList_vc.m
@@ -17,7 +17,7 @@
 @property (nonatomic, weak) NSNotificationCenter* center;
 @property (nonatomic, strong) id slideShowPreviewStartObserver;
 @property (nonatomic, strong) id pinValidationObserver;
- at property (nonatomic, strong) NSIndexPath *lastSpinningCellIndex;
+ at property (atomic, strong) NSIndexPath *lastSpinningCellIndex;
 
 @end
 
@@ -47,7 +47,7 @@
     // 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.lastSpinningCellIndex = [[NSIndexPath alloc] init];
     self.center = [NSNotificationCenter defaultCenter];
     self.comManager = [CommunicationManager sharedComManager];
     self.serverTable.dataSource = self;
@@ -103,8 +103,12 @@
 
 - (void)disableSpinner
 {
-    if ([[self.tableView cellForRowAtIndexPath:self.lastSpinningCellIndex] respondsToSelector:@selector(accessoryView)]) {
-        [self.tableView cellForRowAtIndexPath:self.lastSpinningCellIndex].accessoryView = nil;
+    @synchronized(self.lastSpinningCellIndex){
+        if ([[self.tableView cellForRowAtIndexPath:self.lastSpinningCellIndex] respondsToSelector:@selector(accessoryView)]) {
+            if (self.tableView && [self.tableView cellForRowAtIndexPath:self.lastSpinningCellIndex]) {
+                [[self.tableView cellForRowAtIndexPath:self.lastSpinningCellIndex] setAccessoryView:nil];
+            }
+        }
     }
 }
 
diff --git a/ios/iosremote/iosremote/slideShowPreviewTable_vc.h b/ios/iosremote/iosremote/slideShowPreviewTable_vc.h
index 0b07cc4..46fe904 100644
--- a/ios/iosremote/iosremote/slideShowPreviewTable_vc.h
+++ b/ios/iosremote/iosremote/slideShowPreviewTable_vc.h
@@ -1,10 +1,10 @@
-//
-//  slideShowPreviewTable_vc.h
-//  iosremote
-//
-//  Created by Liu Siqi on 7/4/13.
-//  Copyright (c) 2013 libreoffice. All rights reserved.
-//
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
 
 #import <UIKit/UIKit.h>
 
diff --git a/ios/iosremote/iosremote/slideShowPreviewTable_vc.m b/ios/iosremote/iosremote/slideShowPreviewTable_vc.m
index df8f093..0904ea9 100644
--- a/ios/iosremote/iosremote/slideShowPreviewTable_vc.m
+++ b/ios/iosremote/iosremote/slideShowPreviewTable_vc.m
@@ -1,10 +1,10 @@
-//
-//  slideShowPreviewTable_vc.m
-//  iosremote
-//
-//  Created by Liu Siqi on 7/4/13.
-//  Copyright (c) 2013 libreoffice. All rights reserved.
-//
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
 
 #import "slideShowPreviewTable_vc.h"
 #import "CommunicationManager.h"
@@ -46,7 +46,7 @@
  
     // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
     // self.navigationItem.rightBarButtonItem = self.editButtonItem;
-    self.optionsArray = [NSArray arrayWithObjects:@"Lecturer's Notes", @"Timer", @"Pointer", nil];
+    self.optionsArray = [NSArray arrayWithObjects:@"Timer auto-start", nil];
     self.comManager = [CommunicationManager sharedComManager];
     self.comManager.delegate = self;
     self.slidesRunning = NO;
@@ -57,7 +57,6 @@
                                                                                 usingBlock:^(NSNotification *note) {
                                                                                     self.slidesRunning = YES;
                                                                                 }];
-
     }
 
 - (void) viewDidAppear:(BOOL)animated
@@ -163,7 +162,6 @@
         _startButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
         _startButton.frame = CGRectMake(10.0, 10.0, 300.0, 50.0);
         [_startButton setTitle:@"Start Presentation" forState:UIControlStateNormal];
-        _startButton.backgroundColor = [UIColor clearColor];
         [_startButton addTarget:self action:@selector(startPresentationAction:) forControlEvents:UIControlEventTouchDown];
         
         _startButton.tag = 1;
diff --git a/ios/iosremote/iosremote/slideShowPreview_vc.h b/ios/iosremote/iosremote/slideShowPreview_vc.h
index ffa198b..55cb1f2 100644
--- a/ios/iosremote/iosremote/slideShowPreview_vc.h
+++ b/ios/iosremote/iosremote/slideShowPreview_vc.h
@@ -1,10 +1,10 @@
-//
-//  slideShowPreview_vc.h
-//  iosremote
-//
-//  Created by Liu Siqi on 7/4/13.
-//  Copyright (c) 2013 libreoffice. All rights reserved.
-//
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
 
 #import <UIKit/UIKit.h>
 
diff --git a/ios/iosremote/iosremote/slideShowPreview_vc.m b/ios/iosremote/iosremote/slideShowPreview_vc.m
index fa986e5..bb9578d 100644
--- a/ios/iosremote/iosremote/slideShowPreview_vc.m
+++ b/ios/iosremote/iosremote/slideShowPreview_vc.m
@@ -1,17 +1,17 @@
-//
-//  slideShowPreview_vc.m
-//  iosremote
-//
-//  Created by Liu Siqi on 7/4/13.
-//  Copyright (c) 2013 libreoffice. All rights reserved.
-//
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
 
 #import "slideShowPreview_vc.h"
 #import "SlideShow.h"
 #import "CommandInterpreter.h"
 #import "CommunicationManager.h"
 
- at interface slideShowPreview_vc ()
+ at interface slideShowPreview_vc () <UINavigationControllerDelegate>
 
 @property (nonatomic, strong) CommunicationManager* comManager;
 @property (nonatomic, strong) SlideShow* slideshow;
diff --git a/ios/iosremote/iosremote/slideShowSwipeInList.h b/ios/iosremote/iosremote/slideShowSwipeInList.h
index b614c70..8b10604 100644
--- a/ios/iosremote/iosremote/slideShowSwipeInList.h
+++ b/ios/iosremote/iosremote/slideShowSwipeInList.h
@@ -1,11 +1,10 @@
-//
-//  slideShowSwipeInList.h
-//  iosremote
-//
-//  Created by Liu Siqi on 7/8/13.
-//  Copyright (c) 2013 libreoffice. All rights reserved.
-//
-
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
 #import <UIKit/UIKit.h>
 
 @interface slideShowSwipeInList : UITableViewController <UITableViewDataSource, UITableViewDelegate>
diff --git a/ios/iosremote/iosremote/slideShow_vc.h b/ios/iosremote/iosremote/slideShow_vc.h
index eb6fb06..b60c590 100644
--- a/ios/iosremote/iosremote/slideShow_vc.h
+++ b/ios/iosremote/iosremote/slideShow_vc.h
@@ -1,10 +1,10 @@
-//
-//  slideShow_vc.h
-//  iosremote
-//
-//  Created by Liu Siqi on 7/5/13.
-//  Copyright (c) 2013 libreoffice. All rights reserved.
-//
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
 
 #import <UIKit/UIKit.h>
 
diff --git a/ios/iosremote/iosremote/slideShow_vc.m b/ios/iosremote/iosremote/slideShow_vc.m
index efb2803..840fe86 100644
--- a/ios/iosremote/iosremote/slideShow_vc.m
+++ b/ios/iosremote/iosremote/slideShow_vc.m
@@ -1,11 +1,10 @@
-//
-//  slideShow_vc.m
-//  iosremote
-//
-//  Created by Liu Siqi on 7/5/13.
-//  Copyright (c) 2013 libreoffice. All rights reserved.
-//
-
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
 #import "slideShow_vc.h"
 #import "SlideShow.h"
 #import "CommunicationManager.h"
@@ -160,5 +159,9 @@
 }
 
 - (IBAction)pointerAction:(id)sender {
+    static int i = 0;
+    NSLog(@"i = %u", i);
+    [self.slideshow getContentAtIndex:i forView:self.slideView];
+    i++;
 }
 @end
commit 509eee150a1cf0f87deb21ec9e321f849388f7a4
Author: siqi <me at siqi.fr>
Date:   Tue Jul 9 11:30:54 2013 +0200

    slideshow control pad fix
    
    Change-Id: If497c595ba2ac55058aed825c51815222fe989f1

diff --git a/ios/iosremote/iosremote/slideShowSwipeInList.m b/ios/iosremote/iosremote/slideShowSwipeInList.m
index 55ebdb9..353fc07 100644
--- a/ios/iosremote/iosremote/slideShowSwipeInList.m
+++ b/ios/iosremote/iosremote/slideShowSwipeInList.m
@@ -12,6 +12,7 @@
 #import "SlideShow.h"
 #import "CommandTransmitter.h"
 #import "SWRevealViewController.h"
+#import <QuartzCore/CALayer.h>
 
 #define TIMER_STATE_RUNNING 0
 #define TIMER_STATE_PAUSED 1
diff --git a/ios/iosremote/iosremote/slideShow_vc.m b/ios/iosremote/iosremote/slideShow_vc.m
index e01c3d7..efb2803 100644
--- a/ios/iosremote/iosremote/slideShow_vc.m
+++ b/ios/iosremote/iosremote/slideShow_vc.m
@@ -66,10 +66,11 @@
     [self.slideNumber setText:[NSString stringWithFormat:@"%u/%u", [self.slideshow currentSlide]+1, [self.slideshow size]]];
     
     
-    UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:@"End"
+    UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:@"Stop Presentation"
                                                                    style:UIBarButtonItemStyleBordered
                                                                   target:self
                                                                   action:@selector(handleBack:)];
+    [backButton setTintColor:[UIColor redColor]];
     self.revealViewController.navigationItem.leftBarButtonItem = backButton;
     
     self.revealButtonItem = [[UIBarButtonItem alloc] initWithImage: [UIImage imageNamed:@"more_icon.png"]
commit 6c9db5b3cb4ee900a5d91554efa3835ca8b973c7
Author: siqi <me at siqi.fr>
Date:   Tue Jul 9 08:39:50 2013 +0200

    bug fixes on server connection
    
    Change-Id: Ica940b85cad51dc156ccd5879eaf404dd0ea12d5

diff --git a/ios/iosremote/iosremote.xcodeproj/project.xcworkspace/xcuserdata/siqi.xcuserdatad/UserInterfaceState.xcuserstate b/ios/iosremote/iosremote.xcodeproj/project.xcworkspace/xcuserdata/siqi.xcuserdatad/UserInterfaceState.xcuserstate
index 13fb9f5..b49a1f0 100644
Binary files a/ios/iosremote/iosremote.xcodeproj/project.xcworkspace/xcuserdata/siqi.xcuserdatad/UserInterfaceState.xcuserstate and b/ios/iosremote/iosremote.xcodeproj/project.xcworkspace/xcuserdata/siqi.xcuserdatad/UserInterfaceState.xcuserstate differ
diff --git a/ios/iosremote/iosremote/Communication/Client.m b/ios/iosremote/iosremote/Communication/Client.m
index c3cbb93..42bcd8b 100644
--- a/ios/iosremote/iosremote/Communication/Client.m
+++ b/ios/iosremote/iosremote/Communication/Client.m
@@ -63,9 +63,9 @@ dispatch_queue_t backgroundQueue;
 - (void)startConnectionTimeoutTimer
 {
     [self stopConnectionTimeoutTimer]; // Or make sure any existing timer is stopped before this method is called
-    
+
     NSTimeInterval interval = 3.0; // Measured in seconds, is a double
-    
+
     self.connectionTimeoutTimer = [NSTimer scheduledTimerWithTimeInterval:interval
                                                                    target:self
                                                                  selector:@selector(handleConnectionTimeout)
@@ -99,17 +99,17 @@ dispatch_queue_t backgroundQueue;
 {
     // Look up if there is already a pin code for this client.
     NSUserDefaults * userDefaluts = [NSUserDefaults standardUserDefaults];
-    
+
     if(!userDefaluts)
         NSLog(@"userDefaults nil");
     NSInteger newPin = [userDefaluts integerForKey:self.name];
-    
+
     // If not, generate one.
     if (!newPin) {
         newPin = arc4random() % 9999;
         [userDefaluts setInteger:newPin forKey:self.name];
     }
-    
+
     return newPin;
 }
 
@@ -119,12 +119,12 @@ dispatch_queue_t backgroundQueue;
     CFReadStreamRef readStream;
     CFWriteStreamRef writeStream;
     CFStreamCreatePairWithSocketToHost(kCFAllocatorDefault, (__bridge CFStringRef)ip, portNumber, &readStream, &writeStream);
-    
+
     if(readStream && writeStream)
     {
         CFReadStreamSetProperty(readStream, kCFStreamPropertyShouldCloseNativeSocket, kCFBooleanTrue);
         CFWriteStreamSetProperty(writeStream, kCFStreamPropertyShouldCloseNativeSocket, kCFBooleanTrue);
-        
+
         //Setup mInputStream
         self.inputStream = (__bridge NSInputStream *)readStream;
         [self.inputStream setDelegate:self];
@@ -132,7 +132,7 @@ dispatch_queue_t backgroundQueue;
             [self.inputStream scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
         });
         [self.inputStream open];
-        
+
         //Setup outputstream
         self.outputStream = (__bridge NSOutputStream *)writeStream;
         [self.outputStream setDelegate:self];
@@ -140,10 +140,10 @@ dispatch_queue_t backgroundQueue;
             [self.outputStream scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
         });
         [self.outputStream open];
-        
+
         NSArray *temp = [[NSArray alloc]initWithObjects:@"LO_SERVER_CLIENT_PAIR\n", self.name, @"\n", self.pin, @"\n\n", nil];
         NSString *command = [temp componentsJoinedByString:@""];
-        
+
         [self sendCommand:command];
     }
 }
@@ -153,7 +153,7 @@ dispatch_queue_t backgroundQueue;
     NSLog(@"Sending command %@", aCommand);
     // UTF-8 as speficied in specification
     NSData * data = [aCommand dataUsingEncoding:NSUTF8StringEncoding];
-    
+
     [self.outputStream write:(uint8_t *)[data bytes] maxLength:[data length]];
 }
 
@@ -162,20 +162,21 @@ int count = 0;
 - (void)stream:(NSStream *)stream handleEvent:(NSStreamEvent)eventCode {
     switch(eventCode) {
         case NSStreamEventOpenCompleted:{
-                [self stopConnectionTimeoutTimer];
-                [[NSNotificationCenter defaultCenter]postNotificationName:@"connection.status.connected" object:nil];
-            }
+            [self stopConnectionTimeoutTimer];
+            [[NSNotificationCenter defaultCenter]postNotificationName:@"connection.status.connected" object:nil];
+        }
             break;
         case NSStreamEventErrorOccurred:{
             [self stopConnectionTimeoutTimer];
+            [self disconnect];
             NSLog(@"Connection error occured");
             [[NSNotificationCenter defaultCenter]postNotificationName:@"connection.status.disconnected" object:nil];
-            }
+        }
             break;
         case NSStreamEventHasBytesAvailable:
         {
             NSMutableData* data;
-//            NSLog(@"NSStreamEventHasBytesAvailable");
+            //            NSLog(@"NSStreamEventHasBytesAvailable");
             if(!data) {
                 data = [[NSMutableData alloc] init];
             }
@@ -194,7 +195,7 @@ int count = 0;
                     }
                 }
             }
-            
+
             NSArray *commands = [str componentsSeparatedByString:@"\n"];
             [self.receiver parse:commands];
             data = nil;
@@ -202,9 +203,9 @@ int count = 0;
         } break;
         default:
         {
-            
+
         }
-            
+
     }
 }
 
@@ -214,6 +215,8 @@ int count = 0;
         return;
     [self.inputStream close];
     [self.outputStream close];
+    [self.inputStream removeFromRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
+    [self.outputStream removeFromRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
     self.inputStream = nil;
     self.outputStream = nil;
     self.connected = NO;
diff --git a/ios/iosremote/iosremote/serverList_vc.m b/ios/iosremote/iosremote/serverList_vc.m
index 44853f4..f6f2cf6 100644
--- a/ios/iosremote/iosremote/serverList_vc.m
+++ b/ios/iosremote/iosremote/serverList_vc.m
@@ -103,7 +103,9 @@
 
 - (void)disableSpinner
 {
-    [self.tableView cellForRowAtIndexPath:self.lastSpinningCellIndex].accessoryView = nil;
+    if ([[self.tableView cellForRowAtIndexPath:self.lastSpinningCellIndex] respondsToSelector:@selector(accessoryView)]) {
+        [self.tableView cellForRowAtIndexPath:self.lastSpinningCellIndex].accessoryView = nil;
+    }
 }
 
 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
diff --git a/ios/iosremote/iosremote/slideShowSwipeInList.m b/ios/iosremote/iosremote/slideShowSwipeInList.m
index 7291b26..55ebdb9 100644
--- a/ios/iosremote/iosremote/slideShowSwipeInList.m
+++ b/ios/iosremote/iosremote/slideShowSwipeInList.m
@@ -72,7 +72,8 @@ dispatch_queue_t backgroundQueue;
 
 - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
 {
-    return [self.slideshow size];
+    // +1 for stopwatch
+    return [self.slideshow size]+1;
 }
 
 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath


More information about the Libreoffice-commits mailing list