ios/iosremote/iosremote/Communication/Client.m | 2 ios/iosremote/iosremote/Communication/CommandTransmitter.h | 2 ios/iosremote/iosremote/Communication/CommandTransmitter.m | 5 ios/iosremote/iosremote/Communication/CommunicationManager.m | 28 +++- ios/iosremote/iosremote/en.lproj/iPhone_autoSize.storyboard | 63 ----------- ios/iosremote/iosremote/slideShow_vc.m | 5 sd/source/ui/remotecontrol/Receiver.cxx | 9 + sdext/source/presenter/PresenterController.cxx | 2 8 files changed, 43 insertions(+), 73 deletions(-)
New commits: commit 1bf276ba6e0486bc8ccc74a219dd2db8acfcff03 Author: Siqi LIU <[email protected]> Date: Thu Jul 18 21:45:55 2013 +0200 add pointer in receiver...but don't know how to draw that point Change-Id: I49493e87a0dab66a6b5abeb086afb51f5631b456 diff --git a/sd/source/ui/remotecontrol/Receiver.cxx b/sd/source/ui/remotecontrol/Receiver.cxx index c3fe6fc..b5f06e7 100644 --- a/sd/source/ui/remotecontrol/Receiver.cxx +++ b/sd/source/ui/remotecontrol/Receiver.cxx @@ -119,6 +119,15 @@ void Receiver::executeCommand( const std::vector<OString> &aCommand ) xSlideShowController->blankScreen( aColour ); } } + // pointer_coordination + // x + // y + else if (aCommand[0].equals( "pointer_coordination" )) + { + float x = aCommand[1].toFloat(); + float y = aCommand[2].toFloat(); + std::cerr << "("<<x<<","<<y<<")"<< std::endl; + } else if ( aCommand[0].equals( "presentation_resume" ) ) { if ( xSlideShowController.is() ) commit 0025dd19c997d121c82c54a5af546256de32d413 Author: Siqi LIU <[email protected]> Date: Thu Jul 18 21:41:22 2013 +0200 Ask users to reconnect if connection lost Change-Id: I8b2da585e506e6ff529e0650c27429bb460185c8 diff --git a/ios/iosremote/iosremote/Communication/Client.m b/ios/iosremote/iosremote/Communication/Client.m index 4416986..4ad51f8 100644 --- a/ios/iosremote/iosremote/Communication/Client.m +++ b/ios/iosremote/iosremote/Communication/Client.m @@ -214,9 +214,7 @@ int count = 0; } break; default: { - } - } } diff --git a/ios/iosremote/iosremote/Communication/CommandTransmitter.h b/ios/iosremote/iosremote/Communication/CommandTransmitter.h index 95821c9..f0243b3 100644 --- a/ios/iosremote/iosremote/Communication/CommandTransmitter.h +++ b/ios/iosremote/iosremote/Communication/CommandTransmitter.h @@ -27,4 +27,6 @@ - (void) startPresentation; - (void) stopPresentation; +- (void) pointerCoordination:(CGPoint) aPoint; + @end diff --git a/ios/iosremote/iosremote/Communication/CommandTransmitter.m b/ios/iosremote/iosremote/Communication/CommandTransmitter.m index a359f5e..07cdc9a 100644 --- a/ios/iosremote/iosremote/Communication/CommandTransmitter.m +++ b/ios/iosremote/iosremote/Communication/CommandTransmitter.m @@ -43,6 +43,11 @@ [self.client sendCommand:[NSString stringWithFormat:@"goto_slide\n%u\n\n", slide]]; } +- (void) pointerCoordination:(CGPoint) aPoint +{ + [self.client sendCommand:[NSString stringWithFormat:@"pointer_coordination\n%f\n%f\n\n", aPoint.x, aPoint.y]]; +} + /** * Blank the screen to the default colour (set server-side), which is diff --git a/ios/iosremote/iosremote/Communication/CommunicationManager.m b/ios/iosremote/iosremote/Communication/CommunicationManager.m index 5538736..199f69c 100644 --- a/ios/iosremote/iosremote/Communication/CommunicationManager.m +++ b/ios/iosremote/iosremote/Communication/CommunicationManager.m @@ -59,14 +59,26 @@ if (self.state != DISCONNECTED) { NSLog(@"Connection Failed"); self.state = DISCONNECTED; - dispatch_async(dispatch_get_main_queue(), ^{ - UIAlertView *message = [[UIAlertView alloc] initWithTitle:@"Failed to reach server" - message:@"Please verify your IP address and make sure that LibreOffice Impress is running with impress remote feature enabled. " - delegate:self - cancelButtonTitle:@"OK" - otherButtonTitles:@"Help", nil]; - [message show]; - }); + if ([self.delegate isKindOfClass:[server_list_vc class]]){ + dispatch_async(dispatch_get_main_queue(), ^{ + UIAlertView *message = [[UIAlertView alloc] initWithTitle:@"Failed to reach server" + message:@"Please verify your IP address and make sure that LibreOffice Impress is running with impress remote feature enabled. " + delegate:self + cancelButtonTitle:@"OK" + otherButtonTitles:@"Help", nil]; + [message show]; + }); + } else { + [[self.delegate navigationController] popToRootViewControllerAnimated:YES]; + dispatch_async(dispatch_get_main_queue(), ^{ + UIAlertView *message = [[UIAlertView alloc] initWithTitle:@"Connection Lost" + message:@"Oups, connection lost...Please try to reconnect to your computer. " + delegate:nil + cancelButtonTitle:@"OK" + otherButtonTitles:nil]; + [message show]; + }); + } } } } diff --git a/ios/iosremote/iosremote/en.lproj/iPhone_autoSize.storyboard b/ios/iosremote/iosremote/en.lproj/iPhone_autoSize.storyboard index c43204c..5a17393 100644 --- a/ios/iosremote/iosremote/en.lproj/iPhone_autoSize.storyboard +++ b/ios/iosremote/iosremote/en.lproj/iPhone_autoSize.storyboard @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="2.0" toolsVersion="3084" systemVersion="13A510d" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="qoG-TN-hN0"> +<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> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="2083"/> </dependencies> @@ -555,67 +555,6 @@ <image name="timer_clear_btn.png" width="74" height="74"/> <image name="timer_start_btn.png" width="74" height="74"/> </resources> - <classes> - <class className="EditableTableViewCell" superclassName="UITableViewCell"> - <source key="sourceIdentifier" type="project" relativePath="./Classes/EditableTableViewCell.h"/> - </class> - <class className="SWRevealViewController" superclassName="UIViewController"> - <source key="sourceIdentifier" type="project" relativePath="./Classes/SWRevealViewController.h"/> - </class> - <class className="newServerViewController" superclassName="UITableViewController"> - <source key="sourceIdentifier" type="project" relativePath="./Classes/newServerViewController.h"/> - <relationships> - <relationship kind="action" name="save:"/> - </relationships> - </class> - <class className="pinValidation_vc" superclassName="UIViewController"> - <source key="sourceIdentifier" type="project" relativePath="./Classes/pinValidation_vc.h"/> - <relationships> - <relationship kind="outlet" name="pinLabel" candidateClass="UILabel"/> - <relationship kind="outlet" name="statusLabel" candidateClass="UILabel"/> - </relationships> - </class> - <class className="server_list_vc" superclassName="UITableViewController"> - <source key="sourceIdentifier" type="project" relativePath="./Classes/server_list_vc.h"/> - <relationships> - <relationship kind="outlet" name="serverTable" candidateClass="UITableView"/> - </relationships> - </class> - <class className="slideShowPreviewTable_vc" superclassName="UITableViewController"> - <source key="sourceIdentifier" type="project" relativePath="./Classes/slideShowPreviewTable_vc.h"/> - <relationships> - <relationship kind="outlet" name="optionsTable" candidateClass="UITableView"/> - </relationships> - </class> - <class className="slideShowSwipeInList" superclassName="UITableViewController"> - <source key="sourceIdentifier" type="project" relativePath="./Classes/slideShowSwipeInList.h"/> - <relationships> - <relationship kind="action" name="stopWatchClear:"/> - <relationship kind="action" name="stopWatchStart:"/> - </relationships> - </class> - <class className="slideShow_vc" superclassName="UIViewController"> - <source key="sourceIdentifier" type="project" relativePath="./Classes/slideShow_vc.h"/> - <relationships> - <relationship kind="action" name="accPointerAction:"/> - <relationship kind="action" name="nextSlideAction:"/> - <relationship kind="action" name="pointerAction:"/> - <relationship kind="action" name="previousSlideAction:"/> - <relationship kind="outlet" name="blockingView" candidateClass="UIView"/> - <relationship kind="outlet" name="bottomView" candidateClass="UIView"/> - <relationship kind="outlet" name="lecturer_notes" candidateClass="UIWebView"/> - <relationship kind="outlet" name="movingPointer" candidateClass="UIView"/> - <relationship kind="outlet" name="notesView" candidateClass="UIView"/> - <relationship kind="outlet" name="pointerBtn" candidateClass="UIButton"/> - <relationship kind="outlet" name="revealButtonItem" candidateClass="UIBarButtonItem"/> - <relationship kind="outlet" name="secondarySlideView" candidateClass="UIImageView"/> - <relationship kind="outlet" name="slideNumber" candidateClass="UILabel"/> - <relationship kind="outlet" name="slideView" candidateClass="UIImageView"/> - <relationship kind="outlet" name="touchPointerImage" candidateClass="UIImageView"/> - <relationship kind="outlet" name="touchPointerScrollView" candidateClass="UIScrollView"/> - </relationships> - </class> - </classes> <simulatedMetricsContainer key="defaultSimulatedMetrics"> <simulatedStatusBarMetrics key="statusBar"/> <simulatedOrientationMetrics key="orientation"/> diff --git a/ios/iosremote/iosremote/slideShow_vc.m b/ios/iosremote/iosremote/slideShow_vc.m index c8f58fc..f66e279 100644 --- a/ios/iosremote/iosremote/slideShow_vc.m +++ b/ios/iosremote/iosremote/slideShow_vc.m @@ -214,6 +214,11 @@ if (loc.x >= 0 && loc.x <= self.touchPointerImage.frame.size.width && loc.y >= self.movingPointer.frame.size.height && loc.y <= self.touchPointerImage.frame.size.height - self.movingPointer.frame.size.height) { + CGPoint pointerInPercentage; + pointerInPercentage.x = loc.x / self.touchPointerImage.frame.size.width; + pointerInPercentage.y = loc.y / self.touchPointerImage.frame.size.height; + [self.comManager.transmitter pointerCoordination:pointerInPercentage]; + CGPoint p; p.x = loc.x + self.touchPointerImage.frame.origin.x; p.y = loc.y + self.touchPointerImage.frame.origin.y; commit 7753cd008a4ad0be6b97635f9f6d9c5a8c0acbdb Author: Siqi LIU <[email protected]> Date: Thu Jul 18 15:41:15 2013 +0200 comment out updateCurrentSlide(0) in presentationController constructor as it causes remote control to receive 0 as currentSlide whereas slideshow started from the middle. diff --git a/sdext/source/presenter/PresenterController.cxx b/sdext/source/presenter/PresenterController.cxx index 779f32d..7029b75 100644 --- a/sdext/source/presenter/PresenterController.cxx +++ b/sdext/source/presenter/PresenterController.cxx @@ -176,7 +176,7 @@ PresenterController::PresenterController ( } } - UpdateCurrentSlide(0); + // UpdateCurrentSlide(0); maInstances[mxController->getFrame()] = this; _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
