[Openlp-core] Linting: Passed

2019-09-13 Thread Raoul Snyman
Linting passed!
-- 
https://code.launchpad.net/~raoul-snyman/openlp/animated-alerts/+merge/372792
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] macOS Test Results: Passed

2019-09-13 Thread Raoul Snyman
macOS tests passed!
-- 
https://code.launchpad.net/~raoul-snyman/openlp/animated-alerts/+merge/372792
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] Linux Test Results: Passed

2019-09-13 Thread Raoul Snyman
Linux tests passed!
-- 
https://code.launchpad.net/~raoul-snyman/openlp/animated-alerts/+merge/372792
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] JavaScript Test Results: Passed

2019-09-13 Thread Raoul Snyman
JavaScript tests passed!
-- 
https://code.launchpad.net/~raoul-snyman/openlp/animated-alerts/+merge/372792
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Merge] lp:~raoul-snyman/openlp/animated-alerts into lp:openlp

2019-09-13 Thread Raoul Snyman
Raoul Snyman has proposed merging lp:~raoul-snyman/openlp/animated-alerts into 
lp:openlp.

Commit message:
Based on ic90's code, this just simplifies some of the code, and streamlines 
how things work, plus a couple of CSS fixes.

Requested reviews:
  Tim Bentley (trb143)

For more details, see:
https://code.launchpad.net/~raoul-snyman/openlp/animated-alerts/+merge/372792

Based on ic90's code, this just simplifies some of the code, and streamlines 
how things work, plus a couple of CSS fixes.
-- 
Your team OpenLP Core is subscribed to branch lp:openlp.
=== added file 'openlp/core/display/html/display.css'
--- openlp/core/display/html/display.css	1970-01-01 00:00:00 +
+++ openlp/core/display/html/display.css	2019-09-13 21:35:24 +
@@ -0,0 +1,90 @@
+@keyframes alert-scrolling-text {
+  0% {
+opacity: 1;
+transform: translateX(100%);
+  }
+  99% {
+opacity: 1;
+  }
+  100% {
+opacity: 0;
+transform: translateX(-101%);
+  }
+}
+
+body {
+  background: transparent !important;
+  color: rgb(255, 255, 255) !important;
+}
+
+sup {
+  vertical-align: super !important;
+  font-size: smaller !important;
+}
+
+.reveal .slides > section,
+.reveal .slides > section > section {
+  padding: 0;
+}
+
+.reveal > .backgrounds > .present {
+  visibility: hidden !important;
+}
+
+#global-background {
+  display: block;
+  visibility: visible;
+  z-index: -1;
+}
+
+.alert-container {
+  position: absolute;
+  display: flex;
+  flex-direction: row;
+  height: 100vh;
+  width: 100vw;
+}
+
+.hide {
+  opacity: 0 !important;
+  transition: opacity 0.5s ease;
+}
+
+.show {
+  opacity: 1 !important;
+  transition: opacity 0.5s ease;
+}
+
+.middle {
+  align-items: center;
+}
+
+.top {
+  align-items: flex-start;
+}
+
+.bottom {
+  align-items: flex-end;
+}
+
+#alert-background {
+  left: 0;
+  margin: 0;
+  opacity: 0;
+  overflow: hidden;
+  padding: 0.5em 0;
+  position: absolute;
+  transition: opacity 0.5s ease;
+  white-space: nowrap;
+  width: 100%;
+  z-index: 11;
+}
+
+#alert-text {
+  margin: 0 0.5em;
+  opacity: 0;
+  overflow: visible;
+  padding: 0;
+  transition: opacity 0.5s linear;
+  z-index: 100;
+}

=== modified file 'openlp/core/display/html/display.html'
--- openlp/core/display/html/display.html	2019-03-17 10:36:12 +
+++ openlp/core/display/html/display.html	2019-09-13 21:35:24 +
@@ -2,34 +2,16 @@
 
   
 Display Window
-
-
-body {
-  background: transparent !important;
-  color: rgb(255, 255, 255) !important;
-}
-sup {
-  vertical-align: super !important;
-  font-size: smaller !important;
-}
-.reveal .slides > section,
-.reveal .slides > section > section {
-  padding: 0;
-}
-.reveal > .backgrounds > .present {
-  visibility: hidden !important;
-}
-#global-background {
-  display: block;
-  visibility: visible;
-  z-index: -1;
-}
-
+
+
 
 
 
   
   
+
+  Testing alerts
+
 
   
   

=== modified file 'openlp/core/display/html/display.js'
--- openlp/core/display/html/display.js	2019-08-22 16:40:45 +
+++ openlp/core/display/html/display.js	2019-09-13 21:35:24 +
@@ -53,6 +53,50 @@
 };
 
 /**
+ * Transition state enumeration
+ */
+var TransitionState = {
+  EntranceTransition: "entranceTransition",
+  NoTransition: "noTransition",
+  ExitTransition: "exitTransition"
+};
+
+/**
+ * Animation state enumeration
+ */
+var AnimationState = {
+  NoAnimation: "noAnimation",
+  ScrollingText: "scrollingText",
+  NonScrollingText: "noScrollingText"
+};
+
+/**
+ * Alert location enumeration
+ */
+var AlertLocation = {
+  Top: 0,
+  Middle: 1,
+  Bottom: 2
+};
+
+/**
+ * Alert state enumeration
+ */
+var AlertState = {
+  Displaying: "displaying",
+  NotDisplaying: "notDisplaying"
+}
+
+/**
+ * Alert delay enumeration
+ */
+var AlertDelay = {
+  FiftyMilliseconds: 50,
+  OneSecond: 1000,
+  OnePointFiveSeconds: 1500
+}
+
+/**
  * Return an array of elements based on the selector query
  * @param {string} selector - The selector to find elements
  * @returns {array} An array of matching elements
@@ -118,6 +162,50 @@
 }
 
 /**
+ * Change a camelCaseString to a camel-case-string
+ * @private
+ * @param {string} text
+ * @returns {string} the Un-camel-case-ified string
+ */
+function _fromCamelCase(text) {
+  return text.replace(/([A-Z])/g, function (match, submatch) {
+return '-' + submatch.toLowerCase();
+  });
+}
+
+/**
+ * Create a CSS style
+ * @private
+ * @param {string} selector - The selector for this style
+ * @param {Object} rules - The rules to apply to the style
+ */
+function _createStyle(selector, rules) {
+  var id = selector.replace("#", "").replace(" .", "-").replace(".", "-").replace(" ", "_");
+  if ($("style#" + id).length != 0) {
+var style = $("style#" + id)[0];
+  }
+  else {
+var style = document.createElement("style");
+document.getElementsByTagName("head")[0].appendChild(style);
+style.type = "text/css";
+ 

[Openlp-core] [Merge] lp:~raoul-snyman/openlp/animated-alerts into lp:openlp

2019-09-13 Thread Raoul Snyman
The proposal to merge lp:~raoul-snyman/openlp/animated-alerts into lp:openlp 
has been updated.

Status: Needs review => Superseded

For more details, see:
https://code.launchpad.net/~raoul-snyman/openlp/animated-alerts/+merge/372736
-- 
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Merge] lp:~john+ubuntu-g/openlp/singingthefaith into lp:openlp

2019-09-13 Thread Raoul Snyman
The proposal to merge lp:~john+ubuntu-g/openlp/singingthefaith into lp:openlp 
has been updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~john+ubuntu-g/openlp/singingthefaith/+merge/372277
-- 
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


Re: [Openlp-core] [Merge] lp:~john+ubuntu-g/openlp/singingthefaith into lp:openlp

2019-09-13 Thread Raoul Snyman
Review: Approve


-- 
https://code.launchpad.net/~john+ubuntu-g/openlp/singingthefaith/+merge/372277
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


Re: [Openlp-core] [Merge] lp:~raoul-snyman/openlp/pyro4-maclo into lp:openlp

2019-09-13 Thread Tim Bentley
Review: Approve


-- 
https://code.launchpad.net/~raoul-snyman/openlp/pyro4-maclo/+merge/372748
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] Linting: Passed

2019-09-13 Thread Raoul Snyman
Linting passed!
-- 
https://code.launchpad.net/~raoul-snyman/openlp/pyro4-maclo/+merge/372748
Your team OpenLP Core is requested to review the proposed merge of 
lp:~raoul-snyman/openlp/pyro4-maclo into lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] macOS Test Results: Passed

2019-09-13 Thread Raoul Snyman
macOS tests passed!
-- 
https://code.launchpad.net/~raoul-snyman/openlp/pyro4-maclo/+merge/372748
Your team OpenLP Core is requested to review the proposed merge of 
lp:~raoul-snyman/openlp/pyro4-maclo into lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] Linux Test Results: Passed

2019-09-13 Thread Raoul Snyman
Linux tests passed!
-- 
https://code.launchpad.net/~raoul-snyman/openlp/pyro4-maclo/+merge/372748
Your team OpenLP Core is requested to review the proposed merge of 
lp:~raoul-snyman/openlp/pyro4-maclo into lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] JavaScript Test Results: Passed

2019-09-13 Thread Raoul Snyman
JavaScript tests passed!
-- 
https://code.launchpad.net/~raoul-snyman/openlp/pyro4-maclo/+merge/372748
Your team OpenLP Core is requested to review the proposed merge of 
lp:~raoul-snyman/openlp/pyro4-maclo into lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Merge] lp:~raoul-snyman/openlp/pyro4-maclo into lp:openlp

2019-09-13 Thread Raoul Snyman
Raoul Snyman has proposed merging lp:~raoul-snyman/openlp/pyro4-maclo into 
lp:openlp.

Commit message:
Skip the Mac LO tests on non-Mac platforms; Make detection work for a missing 
Pyro4 as well

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~raoul-snyman/openlp/pyro4-maclo/+merge/372748

Skip the Mac LO tests on non-Mac platforms; Make detection work for a missing 
Pyro4 as well
-- 
Your team OpenLP Core is requested to review the proposed merge of 
lp:~raoul-snyman/openlp/pyro4-maclo into lp:openlp.
=== modified file 'openlp/.version'
--- openlp/.version	2019-01-27 14:42:23 +
+++ openlp/.version	2019-09-13 06:52:20 +
@@ -1,1 +1,1 @@
-2.5.dev2856
\ No newline at end of file
+2.5.dev2899
\ No newline at end of file

=== modified file 'openlp/plugins/presentations/lib/maclocontroller.py'
--- openlp/plugins/presentations/lib/maclocontroller.py	2019-08-30 11:28:10 +
+++ openlp/plugins/presentations/lib/maclocontroller.py	2019-09-13 06:52:20 +
@@ -23,29 +23,35 @@
 import logging
 from subprocess import Popen
 
-from Pyro4 import Proxy
-
 from openlp.core.common import delete_file, is_macosx
 from openlp.core.common.applocation import AppLocation
 from openlp.core.common.mixins import LogMixin
 from openlp.core.common.path import Path
 from openlp.core.common.registry import Registry
 from openlp.core.display.screens import ScreenList
-from openlp.plugins.presentations.lib.serializers import register_classes
 from openlp.plugins.presentations.lib.presentationcontroller import PresentationController, PresentationDocument
 
 
 LIBREOFFICE_PATH = Path('/Applications/LibreOffice.app')
 LIBREOFFICE_PYTHON = LIBREOFFICE_PATH / 'Contents' / 'Resources' / 'python'
 
-if is_macosx() and LIBREOFFICE_PATH.exists():
-macuno_available = True
-else:
+try:
+from Pyro4 import Proxy
+if is_macosx() and LIBREOFFICE_PATH.exists():
+macuno_available = True
+else:
+macuno_available = False
+except ImportError:
 macuno_available = False
 
 
+if macuno_available:
+# If this controller is good to go, register the serializer classes with Pyro4
+from openlp.plugins.presentations.lib.serializers import register_classes
+register_classes()
+
+
 log = logging.getLogger(__name__)
-register_classes()
 
 
 class MacLOController(PresentationController, LogMixin):

=== modified file 'tests/functional/openlp_plugins/presentations/test_libreofficeserver.py'
--- tests/functional/openlp_plugins/presentations/test_libreofficeserver.py	2019-06-05 04:57:26 +
+++ tests/functional/openlp_plugins/presentations/test_libreofficeserver.py	2019-09-13 06:52:20 +
@@ -22,8 +22,18 @@
 """
 Functional tests to test the LibreOffice Pyro server
 """
+from unittest import SkipTest
 from unittest.mock import MagicMock, patch, call
 
+from openlp.core.common import is_macosx
+
+try:
+import Pyro4# noqa: F401
+except ImportError:
+raise SkipTest('Pyro4 is not installed, skipping testing the LibreOffice server')
+if not is_macosx():
+raise SkipTest('Not on macOS, skipping testing the LibreOffice server')
+
 from openlp.plugins.presentations.lib.libreofficeserver import LibreOfficeServer, TextType, main
 
 

=== modified file 'tests/functional/openlp_plugins/presentations/test_maclocontroller.py'
--- tests/functional/openlp_plugins/presentations/test_maclocontroller.py	2019-06-05 04:57:26 +
+++ tests/functional/openlp_plugins/presentations/test_maclocontroller.py	2019-09-13 06:52:20 +
@@ -24,9 +24,10 @@
 """
 import shutil
 from tempfile import mkdtemp
-from unittest import TestCase
+from unittest import TestCase, SkipTest
 from unittest.mock import MagicMock, patch, call
 
+from openlp.core.common import is_macosx
 from openlp.core.common.settings import Settings
 from openlp.core.common.path import Path
 from openlp.plugins.presentations.lib.maclocontroller import MacLOController, MacLODocument
@@ -35,6 +36,13 @@
 from tests.helpers.testmixin import TestMixin
 from tests.utils.constants import TEST_RESOURCES_PATH
 
+try:
+import Pyro4# noqa: F401
+except ImportError:
+raise SkipTest('Pyro4 is not installed, skipping testing the Mac LibreOffice controller')
+if not is_macosx():
+raise SkipTest('Not on macOS, skipping testing the Mac LibreOffice controller')
+
 
 class TestMacLOController(TestCase, TestMixin):
 """

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp