Kaydet (Commit) 839c5df8 authored tarafından Siqi LIU's avatar Siqi LIU

ad-hoc bug fixes to handle different notes format on Linux/OSX

Change-Id: Ie7a229464fc51242291a87bf4a79c1c999a50124
üst 2e60a634
......@@ -648,9 +648,7 @@
<class className="BasePresentationViewController" superclassName="UIViewController">
<source key="sourceIdentifier" type="project" relativePath="./Classes/BasePresentationViewController.h"/>
<relationships>
<relationship kind="action" name="nextSlideAction:"/>
<relationship kind="action" name="popOverUp:"/>
<relationship kind="action" name="previousSlideAction:"/>
<relationship kind="outlet" name="NoteWebView" candidateClass="UIWebView"/>
<relationship kind="outlet" name="NotesView" candidateClass="UIView"/>
<relationship kind="outlet" name="clearButton" candidateClass="UIButton"/>
......
......@@ -1197,7 +1197,7 @@
57C6E417175E06E800E8BC5F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "iPhone Distribution";
CODE_SIGN_IDENTITY = "iPhone Distribution: Siqi Liu (ECNT5P5MTW)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Siqi Liu (ECNT5P5MTW)";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "iosremote/iosremote-Prefix.pch";
......@@ -1209,8 +1209,8 @@
"\"$(SRCROOT)/TestFlightSDK1.2.6\"",
);
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "475E6C52-939A-4B08-B811-6E62C19FE6A1";
PROVISIONING_PROFILE = "AC7C4315-5B31-4056-8955-9B861DCF5F75";
"PROVISIONING_PROFILE[sdk=iphoneos*]" = "AC7C4315-5B31-4056-8955-9B861DCF5F75";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
WRAPPER_EXTENSION = app;
......
......@@ -69,7 +69,7 @@ blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]
kCountDownTimerAutoStart = [[NSUserDefaults standardUserDefaults] boolForKey:@"TIMER_AUTO_START"];
kCountDownTimerVibration = [[NSUserDefaults standardUserDefaults] boolForKey:@"TIMER_VIBRATION"];
NSLog(@"Setting kDefaultTimerWidget to %d", kDefaultTimerWidget);
NSLog(@"Setting kCountDownTimerDefaultDuration to %d", kCountDownTimerDefaultDuration);
}
- (void)applicationWillResignActive:(UIApplication *)application
......
......@@ -207,6 +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);
[self.receiver parse:commands];
});
data = nil;
......@@ -223,9 +224,7 @@ int count = 0;
if(self.inputStream == nil && self.outputStream == nil)
return;
[self stopConnectionTimeoutTimer];
// NSLog(@"stream status i:%u o:%u", self.inputStream.streamStatus, self.outputStream.streamStatus);
if ([self.inputStream streamStatus] != NSStreamStatusClosed) {
// NSLog(@"ci");
[self.inputStream close];
} else
[self.inputStream removeFromRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
......
......@@ -35,6 +35,7 @@ dispatch_queue_t backgroundQueue;
// Received a set of instructions from server.
- (void) parse:(NSArray*)command{
// NSLog(@"Command : %@", command);
uint marker = 0;
if ([command count] == 0) {
return;
......@@ -47,7 +48,6 @@ dispatch_queue_t backgroundQueue;
marker = 2;
}
else if ([instruction isEqualToString:STATUS_PAIRING_PAIRED]){
// NSLog(@"Paired command: %@", command);
[[NSNotificationCenter defaultCenter] postNotificationName:STATUS_PAIRING_PAIRED
object:nil];
marker = 2;
......@@ -86,7 +86,6 @@ dispatch_queue_t backgroundQueue;
[[NSNotificationCenter defaultCenter] postNotificationName:MSG_SLIDE_CHANGED object:nil];
marker = 3;
} else if ([instruction isEqualToString:@"slide_preview"]){
// NSLog(@"Interpreter: slide_preview");
backgroundQueue = dispatch_queue_create("com.libreoffice.iosremote", NULL);
dispatch_async(backgroundQueue, ^(void) {
uint slideNumber = [[command objectAtIndex:1] integerValue];
......@@ -96,13 +95,12 @@ dispatch_queue_t backgroundQueue;
});
marker = 4;
} else if ([instruction isEqualToString:@"slide_notes"]){
// NSLog(@"Interpreter: slide_notes");
backgroundQueue = dispatch_queue_create("com.libreoffice.iosremote", NULL);
uint slideNumber = [[command objectAtIndex:1] integerValue];
NSMutableString *notes = [[NSMutableString alloc] init];
for (int i = 2; i<command.count; ++i) {
[notes appendString:[command objectAtIndex:i]];
if ([notes hasSuffix:@"</body>"]) {
if ([notes hasSuffix:@"</html>"] || [notes hasSuffix:@"</body>"]) {
marker = i+2;
break;
}
......
......@@ -147,7 +147,6 @@ NSString *sTitle;
}
- (void) putNotes: (NSString *)notes AtIndex: (uint) index{
// NSLog(@"Put note into %u", index);
[self.notesDictionary setObject:notes forKey:[NSNumber numberWithUnsignedInt:index]];
[[NSNotificationCenter defaultCenter] postNotificationName:@"storage_update_ready"
object:nil
......
......@@ -37,6 +37,7 @@ int vibrationCount;
self.state = TIMER_STATE_CLEARED;
self.set = NO;
secondsLeft = kCountDownTimerDefaultDuration * 60;
initSecondsLeft = secondsLeft;
return self;
}
......@@ -54,6 +55,7 @@ int vibrationCount;
self.timeLabel = timeLabel;
[self setupActions];
[self clear];
return self;
}
......@@ -63,8 +65,9 @@ int vibrationCount;
self.clearButton = (UIButton *)[[cell viewWithTag:9] viewWithTag:3];
self.setTimeButton = (UIButton *)[[cell viewWithTag:9] viewWithTag:4];
self.timeLabel = (UILabel *)[[cell viewWithTag:9] viewWithTag:1];
[self setupActions];
[self clear];
}
- (void) setupActions
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="2.0" toolsVersion="3084" systemVersion="12E55" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="qoG-TN-hN0">
<dependencies>
<deployment version="1552" defaultVersion="1552" identifier="iOS"/>
<deployment version="1552" identifier="iOS"/>
<development version="4600" identifier="xcode"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="2083"/>
</dependencies>
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="2.0" toolsVersion="3084" systemVersion="12E55" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="qoG-TN-hN0">
<dependencies>
<deployment version="1552" defaultVersion="1552" identifier="iOS"/>
<deployment version="1552" identifier="iOS"/>
<development version="4600" identifier="xcode"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="2083"/>
</dependencies>
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="2.0" toolsVersion="3084" systemVersion="12E55" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="qoG-TN-hN0">
<dependencies>
<deployment version="1552" defaultVersion="1552" identifier="iOS"/>
<deployment version="1552" identifier="iOS"/>
<development version="4600" identifier="xcode"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="2083"/>
</dependencies>
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="2.0" toolsVersion="3084" systemVersion="12E55" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="qoG-TN-hN0">
<dependencies>
<deployment version="1552" defaultVersion="1552" identifier="iOS"/>
<deployment version="1552" identifier="iOS"/>
<development version="4600" identifier="xcode"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="2083"/>
</dependencies>
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="2.0" toolsVersion="3084" systemVersion="12E55" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="qoG-TN-hN0">
<dependencies>
<deployment version="1552" defaultVersion="1552" identifier="iOS"/>
<deployment version="1552" identifier="iOS"/>
<development version="4600" identifier="xcode"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="2083"/>
</dependencies>
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="2.0" toolsVersion="3084" systemVersion="12E55" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="qoG-TN-hN0">
<dependencies>
<deployment version="1552" defaultVersion="1552" identifier="iOS"/>
<deployment version="1552" identifier="iOS"/>
<development version="4600" identifier="xcode"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="2083"/>
</dependencies>
......
Markdown is supported
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