From cce8556b45baacd75a8ae4266a50982a320b882d Mon Sep 17 00:00:00 2001 From: Jonathan Corwin Date: Wed, 4 May 2011 23:34:43 +0100 Subject: [PATCH 1/5] remote browser: detect change of song, and Android browser ajax cache issue --- openlp/plugins/remotes/html/openlp.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/openlp/plugins/remotes/html/openlp.js b/openlp/plugins/remotes/html/openlp.js index cff36b42c..a553dd805 100644 --- a/openlp/plugins/remotes/html/openlp.js +++ b/openlp/plugins/remotes/html/openlp.js @@ -112,6 +112,7 @@ window.OpenLP = { $.getJSON( "/api/poll", function (data, status) { + var prevItem = OpenLP.currentItem; OpenLP.currentSlide = data.results.slide; OpenLP.currentItem = data.results.item; if ($("#service-manager").is(":visible")) { @@ -125,10 +126,14 @@ window.OpenLP = { item.attr("data-theme", "e").removeClass("ui-btn-up-c").addClass("ui-btn-up-e"); return false; } - }); + }); $("#service-manager div[data-role=content] ul[data-role=listview]").listview("refresh"); } if ($("#slide-controller").is(":visible")) { + if(prevItem != OpenLP.currentItem) { + OpenLP.loadController(); + return; + } var idx = 0; $("#slide-controller div[data-role=content] ul[data-role=listview] li").attr("data-theme", "c").removeClass("ui-btn-up-e").addClass("ui-btn-up-c"); $("#slide-controller div[data-role=content] ul[data-role=listview] li a").each(function () { @@ -200,5 +205,6 @@ $("#controller-unblank").live("click", OpenLP.unblankDisplay); // Alerts $("#alert-submit").live("click", OpenLP.showAlert); // Poll the server twice a second to get any updates. +$.ajaxSetup({ cache: false }); setInterval("OpenLP.pollServer();", 500); OpenLP.pollServer(); From 9388055376c12676a5ed6329f52b487bc1967221 Mon Sep 17 00:00:00 2001 From: Jonathan Corwin Date: Wed, 4 May 2011 23:42:35 +0100 Subject: [PATCH 2/5] where did that space come from? --- openlp/plugins/remotes/html/openlp.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openlp/plugins/remotes/html/openlp.js b/openlp/plugins/remotes/html/openlp.js index a553dd805..6105fbb21 100644 --- a/openlp/plugins/remotes/html/openlp.js +++ b/openlp/plugins/remotes/html/openlp.js @@ -126,7 +126,7 @@ window.OpenLP = { item.attr("data-theme", "e").removeClass("ui-btn-up-c").addClass("ui-btn-up-e"); return false; } - }); + }); $("#service-manager div[data-role=content] ul[data-role=listview]").listview("refresh"); } if ($("#slide-controller").is(":visible")) { From de9754caf1ff494c01ddb7c95512919e4da2afb1 Mon Sep 17 00:00:00 2001 From: Jonathan Corwin Date: Thu, 5 May 2011 19:48:11 +0100 Subject: [PATCH 3/5] Well one standard learnt. Probably a few more to go... --- openlp/plugins/remotes/html/openlp.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openlp/plugins/remotes/html/openlp.js b/openlp/plugins/remotes/html/openlp.js index 6105fbb21..e6efbb2c5 100644 --- a/openlp/plugins/remotes/html/openlp.js +++ b/openlp/plugins/remotes/html/openlp.js @@ -130,7 +130,7 @@ window.OpenLP = { $("#service-manager div[data-role=content] ul[data-role=listview]").listview("refresh"); } if ($("#slide-controller").is(":visible")) { - if(prevItem != OpenLP.currentItem) { + if (prevItem != OpenLP.currentItem) { OpenLP.loadController(); return; } From 68c1236a2aba94458882f7400c26ab74022a2337 Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Fri, 6 May 2011 07:17:13 +0200 Subject: [PATCH 4/5] --- openlp/core/ui/servicemanager.py | 6 +++--- openlp/plugins/bibles/bibleplugin.py | 17 +++++++++-------- openlp/plugins/custom/customplugin.py | 16 ++++++++-------- openlp/plugins/images/imageplugin.py | 12 ++++++------ openlp/plugins/media/mediaplugin.py | 14 +++++++------- .../plugins/presentations/presentationplugin.py | 11 ++++++----- openlp/plugins/songs/lib/mediaitem.py | 2 +- openlp/plugins/songs/songsplugin.py | 12 ++++++------ 8 files changed, 46 insertions(+), 44 deletions(-) diff --git a/openlp/core/ui/servicemanager.py b/openlp/core/ui/servicemanager.py index 45e2412aa..d39c4ec6f 100644 --- a/openlp/core/ui/servicemanager.py +++ b/openlp/core/ui/servicemanager.py @@ -115,11 +115,11 @@ class ServiceManager(QtGui.QWidget): UiStrings().CreateService, self.onNewServiceClicked) self.toolbar.addToolbarButton( UiStrings().OpenService, u':/general/general_open.png', - translate('OpenLP.ServiceManager', 'Load an existing service'), + translate('OpenLP.ServiceManager', 'Load an existing service.'), self.onLoadServiceClicked) self.toolbar.addToolbarButton( UiStrings().SaveService, u':/general/general_save.png', - translate('OpenLP.ServiceManager', 'Save this service'), + translate('OpenLP.ServiceManager', 'Save this service.'), self.saveFile) self.toolbar.addSeparator() self.themeLabel = QtGui.QLabel(u'%s:' % UiStrings().Theme, self) @@ -128,7 +128,7 @@ class ServiceManager(QtGui.QWidget): self.toolbar.addToolbarWidget(u'ThemeLabel', self.themeLabel) self.themeComboBox = QtGui.QComboBox(self.toolbar) self.themeComboBox.setToolTip(translate('OpenLP.ServiceManager', - 'Select a theme for the service')) + 'Select a theme for the service.')) self.themeComboBox.setSizeAdjustPolicy( QtGui.QComboBox.AdjustToMinimumContentsLength) self.themeComboBox.setSizePolicy( diff --git a/openlp/plugins/bibles/bibleplugin.py b/openlp/plugins/bibles/bibleplugin.py index 5a631bf00..176b8749c 100644 --- a/openlp/plugins/bibles/bibleplugin.py +++ b/openlp/plugins/bibles/bibleplugin.py @@ -137,13 +137,14 @@ class BiblePlugin(Plugin): # Middle Header Bar tooltips = { u'load': u'', - u'import': translate('BiblesPlugin', 'Import a Bible'), - u'new': translate('BiblesPlugin', 'Add a new Bible'), - u'edit': translate('BiblesPlugin', 'Edit the selected Bible'), - u'delete': translate('BiblesPlugin', 'Delete the selected Bible'), - u'preview': translate('BiblesPlugin', 'Preview the selected Bible'), - u'live': translate('BiblesPlugin', 'Send the selected Bible live'), + u'import': translate('BiblesPlugin', 'Import a Bible.'), + u'new': translate('BiblesPlugin', 'Add a new Bible.'), + u'edit': translate('BiblesPlugin', 'Edit the selected Bible.'), + u'delete': translate('BiblesPlugin', 'Delete the selected Bible.'), + u'preview': translate('BiblesPlugin', + 'Preview the selected Bible.'), + u'live': translate('BiblesPlugin', 'Send the selected Bible live.'), u'service': translate('BiblesPlugin', - 'Add the selected Bible to the service') + 'Add the selected Bible to the service.') } - self.setPluginUiTextStrings(tooltips) \ No newline at end of file + self.setPluginUiTextStrings(tooltips) diff --git a/openlp/plugins/custom/customplugin.py b/openlp/plugins/custom/customplugin.py index 0e88202ca..24c23e16e 100644 --- a/openlp/plugins/custom/customplugin.py +++ b/openlp/plugins/custom/customplugin.py @@ -106,17 +106,17 @@ class CustomPlugin(Plugin): } # Middle Header Bar tooltips = { - u'load': translate('CustomsPlugin', 'Load a new Custom'), - u'import': translate('CustomsPlugin', 'Import a Custom'), - u'new': translate('CustomsPlugin', 'Add a new Custom'), - u'edit': translate('CustomsPlugin', 'Edit the selected Custom'), - u'delete': translate('CustomsPlugin', 'Delete the selected Custom'), + u'load': translate('CustomsPlugin', 'Load a new Custom.'), + u'import': translate('CustomsPlugin', 'Import a Custom.'), + u'new': translate('CustomsPlugin', 'Add a new Custom.'), + u'edit': translate('CustomsPlugin', 'Edit the selected Custom.'), + u'delete': translate('CustomsPlugin', 'Delete the selected Custom.'), u'preview': translate('CustomsPlugin', - 'Preview the selected Custom'), + 'Preview the selected Custom.'), u'live': translate('CustomsPlugin', - 'Send the selected Custom live'), + 'Send the selected Custom live.'), u'service': translate('CustomsPlugin', - 'Add the selected Custom to the service') + 'Add the selected Custom to the service.') } self.setPluginUiTextStrings(tooltips) diff --git a/openlp/plugins/images/imageplugin.py b/openlp/plugins/images/imageplugin.py index 5d009ad65..bbf50e8c2 100644 --- a/openlp/plugins/images/imageplugin.py +++ b/openlp/plugins/images/imageplugin.py @@ -71,12 +71,12 @@ class ImagePlugin(Plugin): tooltips = { u'load': translate('ImagePlugin', 'Load a new Image'), u'import': u'', - u'new': translate('ImagePlugin', 'Add a new Image'), - u'edit': translate('ImagePlugin', 'Edit the selected Image'), - u'delete': translate('ImagePlugin', 'Delete the selected Image'), - u'preview': translate('ImagePlugin', 'Preview the selected Image'), - u'live': translate('ImagePlugin', 'Send the selected Image live'), + u'new': translate('ImagePlugin', 'Add a new Image.'), + u'edit': translate('ImagePlugin', 'Edit the selected Image.'), + u'delete': translate('ImagePlugin', 'Delete the selected Image.'), + u'preview': translate('ImagePlugin', 'Preview the selected Image.'), + u'live': translate('ImagePlugin', 'Send the selected Image live.'), u'service': translate('ImagePlugin', - 'Add the selected Image to the service') + 'Add the selected Image to the service.') } self.setPluginUiTextStrings(tooltips) diff --git a/openlp/plugins/media/mediaplugin.py b/openlp/plugins/media/mediaplugin.py index e01e6846d..82d87455a 100644 --- a/openlp/plugins/media/mediaplugin.py +++ b/openlp/plugins/media/mediaplugin.py @@ -111,14 +111,14 @@ class MediaPlugin(Plugin): } # Middle Header Bar tooltips = { - u'load': translate('MediaPlugin', 'Load a new Media'), + u'load': translate('MediaPlugin', 'Load a new Media.'), u'import': u'', - u'new': translate('MediaPlugin', 'Add a new Media'), - u'edit': translate('MediaPlugin', 'Edit the selected Media'), - u'delete': translate('MediaPlugin', 'Delete the selected Media'), - u'preview': translate('MediaPlugin', 'Preview the selected Media'), - u'live': translate('MediaPlugin', 'Send the selected Media live'), + u'new': translate('MediaPlugin', 'Add a new Media.'), + u'edit': translate('MediaPlugin', 'Edit the selected Media.'), + u'delete': translate('MediaPlugin', 'Delete the selected Media.'), + u'preview': translate('MediaPlugin', 'Preview the selected Media.'), + u'live': translate('MediaPlugin', 'Send the selected Media live.'), u'service': translate('MediaPlugin', - 'Add the selected Media to the service') + 'Add the selected Media to the service.') } self.setPluginUiTextStrings(tooltips) diff --git a/openlp/plugins/presentations/presentationplugin.py b/openlp/plugins/presentations/presentationplugin.py index f217e6023..ec3aff440 100644 --- a/openlp/plugins/presentations/presentationplugin.py +++ b/openlp/plugins/presentations/presentationplugin.py @@ -167,17 +167,18 @@ class PresentationPlugin(Plugin): } # Middle Header Bar tooltips = { - u'load': translate('PresentationPlugin', 'Load a new Presentation'), + u'load': translate('PresentationPlugin', + 'Load a new Presentation.'), u'import': u'', u'new': u'', u'edit': u'', u'delete': translate('PresentationPlugin', - 'Delete the selected Presentation'), + 'Delete the selected Presentation.'), u'preview': translate('PresentationPlugin', - 'Preview the selected Presentation'), + 'Preview the selected Presentation.'), u'live': translate('PresentationPlugin', - 'Send the selected Presentation live'), + 'Send the selected Presentation live.'), u'service': translate('PresentationPlugin', - 'Add the selected Presentation to the service') + 'Add the selected Presentation to the service.') } self.setPluginUiTextStrings(tooltips) diff --git a/openlp/plugins/songs/lib/mediaitem.py b/openlp/plugins/songs/lib/mediaitem.py index 15fa774ad..a3015d422 100644 --- a/openlp/plugins/songs/lib/mediaitem.py +++ b/openlp/plugins/songs/lib/mediaitem.py @@ -141,7 +141,7 @@ class SongMediaItem(MediaManagerItem): self.searchTextButton.setText(UiStrings().Search) self.maintenanceAction.setText(SongStrings.SongMaintenance) self.maintenanceAction.setToolTip(translate('SongsPlugin.MediaItem', - 'Maintain the lists of authors, topics and books')) + 'Maintain the lists of authors, topics and books.')) def initialise(self): self.searchTextEdit.setSearchTypes([ diff --git a/openlp/plugins/songs/songsplugin.py b/openlp/plugins/songs/songsplugin.py index 85294dee2..853caef0e 100644 --- a/openlp/plugins/songs/songsplugin.py +++ b/openlp/plugins/songs/songsplugin.py @@ -214,13 +214,13 @@ class SongsPlugin(Plugin): tooltips = { u'load': u'', u'import': u'', - u'new': translate('SongsPlugin', 'Add a new Song'), - u'edit': translate('SongsPlugin', 'Edit the selected Song'), - u'delete': translate('SongsPlugin', 'Delete the selected Song'), - u'preview': translate('SongsPlugin', 'Preview the selected Song'), - u'live': translate('SongsPlugin', 'Send the selected Song live'), + u'new': translate('SongsPlugin', 'Add a new Song.'), + u'edit': translate('SongsPlugin', 'Edit the selected Song.'), + u'delete': translate('SongsPlugin', 'Delete the selected Song.'), + u'preview': translate('SongsPlugin', 'Preview the selected Song.'), + u'live': translate('SongsPlugin', 'Send the selected Song live.'), u'service': translate('SongsPlugin', - 'Add the selected Song to the service') + 'Add the selected Song to the service.') } self.setPluginUiTextStrings(tooltips) From 7854c664e8ff71b2fdadec3f932974ddc5b9c1ec Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Fri, 6 May 2011 09:41:29 +0200 Subject: [PATCH 5/5] added blank lines --- openlp/core/ui/printservicedialog.py | 1 + openlp/plugins/bibles/bibleplugin.py | 1 + 2 files changed, 2 insertions(+) diff --git a/openlp/core/ui/printservicedialog.py b/openlp/core/ui/printservicedialog.py index fdf4ffa6d..f9d1163d0 100644 --- a/openlp/core/ui/printservicedialog.py +++ b/openlp/core/ui/printservicedialog.py @@ -165,3 +165,4 @@ class Ui_PrintServiceDialog(object): self.zoomComboBox.addItem(ZoomSize.Sizes[ZoomSize.SeventyFive]) self.zoomComboBox.addItem(ZoomSize.Sizes[ZoomSize.Fifty]) self.zoomComboBox.addItem(ZoomSize.Sizes[ZoomSize.TwentyFive]) + diff --git a/openlp/plugins/bibles/bibleplugin.py b/openlp/plugins/bibles/bibleplugin.py index 176b8749c..de7ce144e 100644 --- a/openlp/plugins/bibles/bibleplugin.py +++ b/openlp/plugins/bibles/bibleplugin.py @@ -148,3 +148,4 @@ class BiblePlugin(Plugin): 'Add the selected Bible to the service.') } self.setPluginUiTextStrings(tooltips) +