← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~j-corwin/openlp/general into lp:openlp

 

Jonathan Corwin has proposed merging lp:~j-corwin/openlp/general into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)
Related bugs:
  Bug #634771 in OpenLP: "OpenLP 1.9.2+bzr1016-0ubuntu1~lucid1 does not start"
  https://bugs.launchpad.net/openlp/+bug/634771
  Bug #646718 in OpenLP: "Songbook, Number will not loaded, Title will not be saved"
  https://bugs.launchpad.net/openlp/+bug/646718
  Bug #696013 in OpenLP: "song import from powerpoint crashes every second time"
  https://bugs.launchpad.net/openlp/+bug/696013
  Bug #696021 in OpenLP: "presentation loader does not work fine in Windows using Powerpoint Viewer 2007"
  https://bugs.launchpad.net/openlp/+bug/696021
  Bug #696637 in OpenLP: "Alert not positioned correctly in single screen"
  https://bugs.launchpad.net/openlp/+bug/696637
  Bug #727732 in OpenLP: "Openlp 1.9.?? crashes on start"
  https://bugs.launchpad.net/openlp/+bug/727732
  Bug #735039 in OpenLP: "Cannot import PowerPoint Presentations with PowerPoint 2010"
  https://bugs.launchpad.net/openlp/+bug/735039

For more details, see:
https://code.launchpad.net/~j-corwin/openlp/general/+merge/60707

Stage view changes:
When a single verse is split across slides, merge it together and only show verse tag once.
-- 
https://code.launchpad.net/~j-corwin/openlp/general/+merge/60707
Your team OpenLP Core is requested to review the proposed merge of lp:~j-corwin/openlp/general into lp:openlp.
=== modified file 'openlp/core/lib/renderer.py'
--- openlp/core/lib/renderer.py	2011-04-29 19:24:21 +0000
+++ openlp/core/lib/renderer.py	2011-05-11 23:18:31 +0000
@@ -189,10 +189,10 @@
         serviceItem.theme = theme_data
         if self.force_page:
             # make big page for theme edit dialog to get line count
-            serviceItem.add_from_text(u'', VERSE + VERSE + VERSE, FOOTER)
+            serviceItem.add_from_text(u'', VERSE + VERSE + VERSE)
         else:
             self.image_manager.del_image(theme_data.theme_name)
-            serviceItem.add_from_text(u'', VERSE, FOOTER)
+            serviceItem.add_from_text(u'', VERSE)
         serviceItem.renderer = self
         serviceItem.raw_footer = FOOTER
         serviceItem.render(True)

=== modified file 'openlp/core/lib/serviceitem.py'
--- openlp/core/lib/serviceitem.py	2011-05-04 07:29:16 +0000
+++ openlp/core/lib/serviceitem.py	2011-05-11 23:18:31 +0000
@@ -219,6 +219,8 @@
         ``raw_slide``
             The raw text of the slide.
         """
+        if verse_tag:
+            verse_tag = verse_tag.upper()
         self.service_item_type = ServiceItemType.Text
         title = title.split(u'\n')[0]
         self._raw_frames.append(

=== modified file 'openlp/core/ui/slidecontroller.py'
--- openlp/core/ui/slidecontroller.py	2011-04-29 18:43:29 +0000
+++ openlp/core/ui/slidecontroller.py	2011-05-11 23:18:31 +0000
@@ -616,7 +616,7 @@
                 if frame[u'verseTag']:
                     # These tags are already translated.
                     verse_def = frame[u'verseTag']
-                    verse_def = u'%s%s' % (verse_def[0].upper(), verse_def[1:])
+                    verse_def = u'%s%s' % (verse_def[0], verse_def[1:])
                     two_line_def = u'%s\n%s' % (verse_def[0], verse_def[1:])
                     row = two_line_def
                     if self.isLive:

=== modified file 'openlp/plugins/remotes/html/stage.css'
--- openlp/plugins/remotes/html/stage.css	2011-05-07 08:54:06 +0000
+++ openlp/plugins/remotes/html/stage.css	2011-05-11 23:18:31 +0000
@@ -30,12 +30,14 @@
 #currentslide {
   font-size: 40pt;
   color: white;
+  padding-bottom: 0px;
 }
 
 #nextslide {
-  font-size: 30pt;
+  font-size: 40pt;
   color: grey;
-  padding-top: 25px;
+  padding-top: 0px;
+  padding-bottom: 0px;
 }
 
 #right {

=== modified file 'openlp/plugins/remotes/html/stage.js'
--- openlp/plugins/remotes/html/stage.js	2011-05-08 19:26:32 +0000
+++ openlp/plugins/remotes/html/stage.js	2011-05-11 23:18:31 +0000
@@ -46,15 +46,21 @@
       function (data, status) {
         OpenLP.currentSlides = data.results.slides;
         OpenLP.currentSlide = 0;
+        OpenLP.currentTags = Array();
         var div = $("#verseorder");
         div.html("");
+        var tag = "";
+        var tags = 0;
         for (idx in data.results.slides) {
           idx = parseInt(idx, 10);
-          div.append("&nbsp;<span>");
-          var tag = data.results.slides[idx]["tag"];
-          if (tag == 'None')
-            tag = idx;
-          $("#verseorder span").last().attr("id", "tag" + idx).text(tag);
+          var prevtag = tag;
+          tag = data.results.slides[idx]["tag"];
+          if (tag != prevtag) {
+            tags = tags + 1;
+            div.append("&nbsp;<span>");       
+            $("#verseorder span").last().attr("id", "tag" + tags).text(tag);
+          }
+          OpenLP.currentTags[idx] = tags;
           if (data.results.slides[idx]["selected"]) 
             OpenLP.currentSlide = idx;
         }
@@ -64,17 +70,30 @@
   },
   updateSlide: function() {
     $("#verseorder span").removeClass("currenttag");
-    $("#tag" + OpenLP.currentSlide).addClass("currenttag");
-    var text = OpenLP.currentSlides[OpenLP.currentSlide]["text"];
+    $("#tag" + OpenLP.currentTags[OpenLP.currentSlide]).addClass("currenttag");
+    var slide = OpenLP.currentSlides[OpenLP.currentSlide];
+    var text = slide["text"];
     text = text.replace(/\n/g, '<br />');
     $("#currentslide").html(text);
+    text = "";
     if (OpenLP.currentSlide < OpenLP.currentSlides.length - 1) {
-      text = OpenLP.currentSlides[OpenLP.currentSlide + 1]["text"];
+      for (var idx = OpenLP.currentSlide + 1; idx < OpenLP.currentSlides.length; idx++) {
+        var prevslide = slide;
+        slide = OpenLP.currentSlides[idx];
+        if (slide["tag"] != prevslide["tag"])
+            text = text + '<p class="nextslide">';
+        text = text + slide["text"]; 
+        if (slide["tag"] != prevslide["tag"])
+            text = text + '</p>';
+        else
+            text = text + '<br />';
+      }
       text = text.replace(/\n/g, '<br />');
       $("#nextslide").html(text);
     }
     else
-      $("#nextslide").html("Next: " + OpenLP.nextSong);
+      text = '<p class="nextslide">Next: ' + OpenLP.nextSong + '</p>';
+      $("#nextslide").html(text);
   },
   updateClock: function() {
     var div = $("#clock");

=== modified file 'openlp/plugins/remotes/lib/httpserver.py'
--- openlp/plugins/remotes/lib/httpserver.py	2011-05-08 19:26:32 +0000
+++ openlp/plugins/remotes/lib/httpserver.py	2011-05-11 23:18:31 +0000
@@ -115,7 +115,6 @@
 import urlparse
 import re
 from pprint import pformat
-from lxml import html
 
 try:
     import json
@@ -402,12 +401,14 @@
                 for index, frame in enumerate(current_item.get_frames()):
                     item = {}
                     if current_item.is_text():
-                        item[u'tag'] = unicode(frame[u'verseTag'])
-                        text = unicode(frame[u'html'].replace('<br>', '\n'))
-                        item[u'text'] = html.fromstring(text).text_content()
+                        if frame[u'verseTag']:
+                            item[u'tag'] = unicode(frame[u'verseTag'])
+                        else:
+                            item[u'tag'] = unicode(index + 1)
+                        item[u'text'] = unicode(frame[u'text'])
                         item[u'html'] = unicode(frame[u'html'])
                     else:
-                        item[u'tag'] = unicode(index)
+                        item[u'tag'] = unicode(index + 1)
                         item[u'text'] = u''
                         item[u'html'] = u''
                     item[u'selected'] = (self.parent.current_slide == index)


Follow ups