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

Siqi LIU me at siqi.fr
Wed Nov 20 16:03:27 PST 2013


 ios/iosremote/Settings.bundle/Root.plist                             |    6 +
 ios/iosremote/Settings.bundle/en.lproj/Root.strings                  |binary
 ios/iosremote/Settings.bundle/fr.lproj/Root.strings                  |binary
 ios/iosremote/iosremote/Classes/ServerListViewController.m           |    2 
 ios/iosremote/iosremote/Classes/ServerListViewController~ipad.h      |   15 +++
 ios/iosremote/iosremote/Classes/ServerListViewController~ipad.m      |   46 ++++++++++
 ios/iosremote/iosremote/Classes/WalkThroughContainerViewController.m |    4 
 ios/iosremote/iosremote/Classes/WalkThroughPageViewController.m      |   14 +--
 ios/iosremote/iosremote/Communication/Client.m                       |    2 
 ios/iosremote/iosremote/Communication/CommandInterpreter.m           |   14 ++-
 ios/iosremote/iosremote/en.lproj/Localizable.strings                 |binary
 11 files changed, 89 insertions(+), 14 deletions(-)

New commits:
commit 631d6a8e1520393d3a7b7d74236f1e4b9fcf8226
Author: Siqi LIU <me at siqi.fr>
Date:   Thu Nov 21 00:59:34 2013 +0100

    regenerated complete localizable.strings in English, to be translated
    
    Change-Id: I267c79dc1e5c48006901354e1d32647096a893d7

diff --git a/ios/iosremote/iosremote/en.lproj/Localizable.strings b/ios/iosremote/iosremote/en.lproj/Localizable.strings
index 037830d..6f4e09f 100644
Binary files a/ios/iosremote/iosremote/en.lproj/Localizable.strings and b/ios/iosremote/iosremote/en.lproj/Localizable.strings differ
commit da126099281331309caff0f6e65b3dca6ae979db
Author: Siqi LIU <me at siqi.fr>
Date:   Thu Nov 21 00:59:00 2013 +0100

    app setting localization experiment
    
    Change-Id: I862b93cd9f3a60fbf8249985bab0008325e4f68a

diff --git a/ios/iosremote/Settings.bundle/Root.plist b/ios/iosremote/Settings.bundle/Root.plist
index 12eb920..368da38 100644
--- a/ios/iosremote/Settings.bundle/Root.plist
+++ b/ios/iosremote/Settings.bundle/Root.plist
@@ -62,6 +62,9 @@
 				<integer>20</integer>
 				<integer>30</integer>
 				<integer>40</integer>
+				<integer>45</integer>
+				<integer>50</integer>
+				<integer>60</integer>
 			</array>
 			<key>Titles</key>
 			<array>
@@ -72,6 +75,9 @@
 				<string>20</string>
 				<string>30</string>
 				<string>40</string>
+				<string>45</string>
+				<string>50</string>
+				<string>60</string>
 			</array>
 			<key>Type</key>
 			<string>PSMultiValueSpecifier</string>
diff --git a/ios/iosremote/Settings.bundle/en.lproj/Root.strings b/ios/iosremote/Settings.bundle/en.lproj/Root.strings
index 8cd87b9..e55eb4a 100644
Binary files a/ios/iosremote/Settings.bundle/en.lproj/Root.strings and b/ios/iosremote/Settings.bundle/en.lproj/Root.strings differ
diff --git a/ios/iosremote/Settings.bundle/fr.lproj/Root.strings b/ios/iosremote/Settings.bundle/fr.lproj/Root.strings
new file mode 100644
index 0000000..5209730
Binary files /dev/null and b/ios/iosremote/Settings.bundle/fr.lproj/Root.strings differ
commit 8232dfd5206da20546780ec0a2d3e7ea490fdb07
Author: Siqi LIU <me at siqi.fr>
Date:   Thu Nov 21 00:58:10 2013 +0100

    plain strings in in-app tuto to localized strings
    
    Change-Id: I20cf3a3095015a72a8db46248a196c70f399f84f

diff --git a/ios/iosremote/iosremote/Classes/ServerListViewController.m b/ios/iosremote/iosremote/Classes/ServerListViewController.m
index 0012921..15bdf86 100644
--- a/ios/iosremote/iosremote/Classes/ServerListViewController.m
+++ b/ios/iosremote/iosremote/Classes/ServerListViewController.m
@@ -484,7 +484,7 @@
     
     if (indexPath.section == 0){
         if ([self.comManager.autoDiscoveryServers count] == 0){
-            cell.textLabel.text = NSLocalizedString(self.searchStateText, nil);
+            cell.textLabel.text = self.searchStateText;
             cell.textLabel.lineBreakMode = UILineBreakModeClip;
             cell.selectionStyle = self.style;
             
diff --git a/ios/iosremote/iosremote/Classes/WalkThroughContainerViewController.m b/ios/iosremote/iosremote/Classes/WalkThroughContainerViewController.m
index 49c7c03..6bc9f9d 100644
--- a/ios/iosremote/iosremote/Classes/WalkThroughContainerViewController.m
+++ b/ios/iosremote/iosremote/Classes/WalkThroughContainerViewController.m
@@ -40,11 +40,11 @@
     [[self view] addSubview:self.pageController.view];
     [self.pageController didMoveToParentViewController:self];
     
-    UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Ok, thanks", nil) style:UIBarButtonItemStyleBordered target:self action:@selector(handleBack)];
+    UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Ok, thanks", @"backButton for Tutorial") style:UIBarButtonItemStyleBordered target:self action:@selector(handleBack)];
     [backButton setBackgroundImage:[UIImage imageNamed:@"backButton"] forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
     self.navigationItem.leftBarButtonItem = backButton;
     
-    [self setTitle:NSLocalizedString(@"How-to", nil)];
+    [self setTitle:NSLocalizedString(@"How-to", @"In app How-to title")];
     
     self.navigationController.navigationBar.translucent = NO;
 }
diff --git a/ios/iosremote/iosremote/Classes/WalkThroughPageViewController.m b/ios/iosremote/iosremote/Classes/WalkThroughPageViewController.m
index a53ccf5..f7b4c77 100644
--- a/ios/iosremote/iosremote/Classes/WalkThroughPageViewController.m
+++ b/ios/iosremote/iosremote/Classes/WalkThroughPageViewController.m
@@ -31,16 +31,16 @@
     switch (self.index) {
         case 0:
             [self.image setImage:[UIImage imageNamed:@"WTconnection"]];
-            self.instructionText.text = @"Connect your devices to the same WiFi network.";
-            self.instructionHint.text = @"Create a personal hotspot on your iPhone if needed.";
-            self.instructionTitle.text = @"Connection";
+            self.instructionText.text = NSLocalizedString(@"Connect your devices to the same WiFi network.", @"connect instructions");
+            self.instructionHint.text = NSLocalizedString(@"Create a personal hotspot on your iPhone if needed.", @"connect instructions");
+            self.instructionTitle.text = NSLocalizedString(@"Connection", @"instruction page title");
             [self.hintImage setImage:[UIImage imageNamed:@"WTConnectionHotspot"]];
             break;
         case 1:
             [self.image setImage:[UIImage imageNamed:@"WTconnecting"]];
-            self.instructionText.text = @"Launch Impress & select your computer.";
-            self.instructionHint.text = @"Enter the PIN code in SlideShow - Impress Remote";
-            self.instructionTitle.text = @"Pairing";
+            self.instructionText.text = NSLocalizedString(@"Launch Impress & select your computer.", @"Pairing instruction text");
+            self.instructionHint.text = NSLocalizedString(@"Enter the PIN code in SlideShow - Impress Remote", @"Pairing instruction text");
+            self.instructionTitle.text = NSLocalizedString(@"Pairing", @"Pairing instruction title");
             [self.hintImage setImage:[UIImage imageNamed:@"WTPairing"]];
             break;
         case 2:{
@@ -49,7 +49,7 @@
             else
                 [self.image setImage:[UIImage imageNamed:@"WTcontrol~ipad"]];
 //            self.instructionText.text = @"Control your presentation at your fingertips!";
-            self.instructionTitle.text = @"Control";
+            self.instructionTitle.text = NSLocalizedString(@"Control", @"Control instruction title");
             UIImage *backgroundImage = [UIImage imageNamed:@"buttonBackground"];
             UIEdgeInsets insets = UIEdgeInsetsMake(20, 7, 20, 7);
             UIImage *stretchableBackgroundImage = [backgroundImage resizableImageWithCapInsets:insets];
commit e7fcb3f02092f1ac136344a54298e87798428860
Author: Siqi LIU <me at siqi.fr>
Date:   Thu Nov 21 00:56:48 2013 +0100

    backward compatible with older serverend impl, ie without vers info
    
    Change-Id: I7b6597269778c20b8ed27d3eab6b4c80257b4ead

diff --git a/ios/iosremote/iosremote/Communication/Client.m b/ios/iosremote/iosremote/Communication/Client.m
index f675349..d85cf57 100644
--- a/ios/iosremote/iosremote/Communication/Client.m
+++ b/ios/iosremote/iosremote/Communication/Client.m
@@ -207,7 +207,7 @@ int count = 0;
             backgroundQueue = dispatch_queue_create("com.libreoffice.iosremote", DISPATCH_QUEUE_CONCURRENT);
             dispatch_async(backgroundQueue, ^(void) {
                 NSArray *commands = [str componentsSeparatedByString:@"\n"];
-                NSLog(@"Commands: %@", commands);
+//                NSLog(@"Commands: %@", commands);
                 [self.receiver parse:commands];
             });
             data = nil;
diff --git a/ios/iosremote/iosremote/Communication/CommandInterpreter.m b/ios/iosremote/iosremote/Communication/CommandInterpreter.m
index 7dadfda..af9902f 100644
--- a/ios/iosremote/iosremote/Communication/CommandInterpreter.m
+++ b/ios/iosremote/iosremote/Communication/CommandInterpreter.m
@@ -52,9 +52,17 @@ dispatch_queue_t backgroundQueue;
     else if ([instruction isEqualToString:STATUS_PAIRING_PAIRED]){
         [[NSNotificationCenter defaultCenter] postNotificationName:STATUS_PAIRING_PAIRED
                                                             object:nil];
-        [[[[CommunicationManager sharedComManager] client] server] setServerVersion:[command objectAtIndex:3]];
+        // if LibO sends its remote server version, than this command should contain more than 3 items, we retrieve the version code and save it as a property of the server
+        if ([command count] > 3 && ![[command objectAtIndex:3] isEqualToString:@""]){
+            [[[[CommunicationManager sharedComManager] client] server] setServerVersion:[command objectAtIndex:3]];
+            marker = 4;
+        } else {
+            // Otherwise, we mark 3 as the end of this command (i.e. there is no version code sent to the client.
+            [[[[CommunicationManager sharedComManager] client] server] setServerVersion:@"Unspecified"];
+            marker = 3;
+        }
+        // print out server info with server version / or unspecified if didn't receive it from the server
         NSLog(@"Connected to %@", [[[CommunicationManager sharedComManager] client] server].description);
-        marker = 4;
     }
     else if([instruction isEqualToString:@"slideshow_started"]){
         uint slideLength = [[command objectAtIndex:1] integerValue];
@@ -115,7 +123,7 @@ dispatch_queue_t backgroundQueue;
         }
 
     }
-    if ([command objectAtIndex:marker] && ![[command objectAtIndex:marker] isEqualToString:@""])
+    if ([command count] > marker && ![[command objectAtIndex:marker] isEqualToString:@""])
     {
         NSRange range;
         range.location = marker;
commit ec11f022cc1bb2857b20ff96af1f37ca49b73b00
Author: Siqi LIU <me at siqi.fr>
Date:   Thu Nov 21 00:54:19 2013 +0100

    move ServerListViewController to appropriate place
    
    Change-Id: I0f66efe7c306ef8110361495eee0a3f1dbde1013

diff --git a/ios/iosremote/iosremote/Classes/ServerListViewController~ipad.h b/ios/iosremote/iosremote/Classes/ServerListViewController~ipad.h
new file mode 100644
index 0000000..06dbbe3
--- /dev/null
+++ b/ios/iosremote/iosremote/Classes/ServerListViewController~ipad.h
@@ -0,0 +1,15 @@
+// -*- Mode: ObjC; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+//
+// 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 "ServerListViewController.h"
+
+ at interface ServerListViewController_ipad : ServerListViewController
+
+- (IBAction)cancelModalView:(id)sender;
+
+ at end
diff --git a/ios/iosremote/iosremote/Classes/ServerListViewController~ipad.m b/ios/iosremote/iosremote/Classes/ServerListViewController~ipad.m
new file mode 100644
index 0000000..e1ee94b
--- /dev/null
+++ b/ios/iosremote/iosremote/Classes/ServerListViewController~ipad.m
@@ -0,0 +1,46 @@
+// -*- Mode: ObjC; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+//
+// 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 "ServerListViewController~ipad.h"
+
+ at interface ServerListViewController_ipad ()
+
+ at end
+
+ at implementation ServerListViewController_ipad
+
+- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
+{
+    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
+    if (self) {
+        // Custom initialization
+    }
+    return self;
+}
+
+- (void)viewDidLoad
+{
+    [super viewDidLoad];
+	// Do any additional setup after loading the view.
+}
+
+- (void)didReceiveMemoryWarning
+{
+    [super didReceiveMemoryWarning];
+    // Dispose of any resources that can be recreated.
+}
+
+- (void)viewDidUnload {
+    [super viewDidUnload];
+}
+
+#pragma mark - Actions
+- (IBAction)cancelModalView:(id)sender {
+    [self.presentingViewController dismissModalViewControllerAnimated:YES];
+}
+ at end


More information about the Libreoffice-commits mailing list