forked from openlp/openlp
Head r1405
This commit is contained in:
commit
05c136dd34
@ -117,7 +117,8 @@ class SlideController(QtGui.QWidget):
|
|||||||
self.previewListWidget.setColumnWidth(0, self.controller.width())
|
self.previewListWidget.setColumnWidth(0, self.controller.width())
|
||||||
self.previewListWidget.isLive = self.isLive
|
self.previewListWidget.isLive = self.isLive
|
||||||
self.previewListWidget.setObjectName(u'PreviewListWidget')
|
self.previewListWidget.setObjectName(u'PreviewListWidget')
|
||||||
self.previewListWidget.setSelectionBehavior(1)
|
self.previewListWidget.setSelectionBehavior(
|
||||||
|
QtGui.QAbstractItemView.SelectRows)
|
||||||
self.previewListWidget.setSelectionMode(
|
self.previewListWidget.setSelectionMode(
|
||||||
QtGui.QAbstractItemView.SingleSelection)
|
QtGui.QAbstractItemView.SingleSelection)
|
||||||
self.previewListWidget.setEditTriggers(
|
self.previewListWidget.setEditTriggers(
|
||||||
|
@ -220,10 +220,7 @@ class EditCustomForm(QtGui.QDialog, Ui_CustomEditDialog):
|
|||||||
Removes the current row from the list.
|
Removes the current row from the list.
|
||||||
"""
|
"""
|
||||||
self.slideListView.takeItem(self.slideListView.currentRow())
|
self.slideListView.takeItem(self.slideListView.currentRow())
|
||||||
if self.slideListView.currentRow() == 0:
|
self.onCurrentRowChanged(self.slideListView.currentRow())
|
||||||
self.upButton.setEnabled(False)
|
|
||||||
if self.slideListView.currentRow() == self.slideListView.count():
|
|
||||||
self.downButton.setEnabled(False)
|
|
||||||
|
|
||||||
def onCurrentRowChanged(self, row):
|
def onCurrentRowChanged(self, row):
|
||||||
"""
|
"""
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
from datetime import datetime
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
|
||||||
@ -138,11 +139,16 @@ class MediaMediaItem(MediaManagerItem):
|
|||||||
file_size = os.path.getsize(filename)
|
file_size = os.path.getsize(filename)
|
||||||
# File too big for processing
|
# File too big for processing
|
||||||
if file_size <= 52428800: # 50MiB
|
if file_size <= 52428800: # 50MiB
|
||||||
|
start = datetime.now()
|
||||||
while not self.mediaState:
|
while not self.mediaState:
|
||||||
Receiver.send_message(u'openlp_process_events')
|
Receiver.send_message(u'openlp_process_events')
|
||||||
service_item.media_length = self.mediaLength
|
tme = datetime.now() - start
|
||||||
service_item.add_capability(
|
if tme.seconds > 5:
|
||||||
ItemCapabilities.AllowsVariableStartTime)
|
break
|
||||||
|
if self.mediaState:
|
||||||
|
service_item.media_length = self.mediaLength
|
||||||
|
service_item.add_capability(
|
||||||
|
ItemCapabilities.AllowsVariableStartTime)
|
||||||
service_item.add_from_command(path, name, frame)
|
service_item.add_from_command(path, name, frame)
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
@ -188,4 +194,4 @@ class MediaMediaItem(MediaManagerItem):
|
|||||||
if newState == Phonon.PlayingState:
|
if newState == Phonon.PlayingState:
|
||||||
self.mediaState = newState
|
self.mediaState = newState
|
||||||
self.mediaLength = self.mediaObject.totalTime()/1000
|
self.mediaLength = self.mediaObject.totalTime()/1000
|
||||||
self.mediaObject.stop()
|
self.mediaObject.stop()
|
||||||
|
@ -71,6 +71,8 @@ class Ui_EditSongDialog(object):
|
|||||||
self.verseListWidget.setColumnCount(1)
|
self.verseListWidget.setColumnCount(1)
|
||||||
self.verseListWidget.setSelectionBehavior(
|
self.verseListWidget.setSelectionBehavior(
|
||||||
QtGui.QAbstractItemView.SelectRows)
|
QtGui.QAbstractItemView.SelectRows)
|
||||||
|
self.verseListWidget.setSelectionMode(
|
||||||
|
QtGui.QAbstractItemView.SingleSelection)
|
||||||
self.verseListWidget.setEditTriggers(
|
self.verseListWidget.setEditTriggers(
|
||||||
QtGui.QAbstractItemView.NoEditTriggers)
|
QtGui.QAbstractItemView.NoEditTriggers)
|
||||||
self.verseListWidget.setObjectName(u'verseListWidget')
|
self.verseListWidget.setObjectName(u'verseListWidget')
|
||||||
|
@ -543,8 +543,9 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
|||||||
|
|
||||||
def onVerseDeleteButtonClicked(self):
|
def onVerseDeleteButtonClicked(self):
|
||||||
self.verseListWidget.removeRow(self.verseListWidget.currentRow())
|
self.verseListWidget.removeRow(self.verseListWidget.currentRow())
|
||||||
self.verseEditButton.setEnabled(False)
|
if not self.verseListWidget.selectedItems():
|
||||||
self.verseDeleteButton.setEnabled(False)
|
self.verseEditButton.setEnabled(False)
|
||||||
|
self.verseDeleteButton.setEnabled(False)
|
||||||
|
|
||||||
def _validate_song(self):
|
def _validate_song(self):
|
||||||
"""
|
"""
|
||||||
|
@ -271,6 +271,18 @@ def clean_song(manager, song):
|
|||||||
verses = SongXML().get_verses(song.lyrics)
|
verses = SongXML().get_verses(song.lyrics)
|
||||||
lyrics = u' '.join([whitespace.sub(u' ', verse[1]) for verse in verses])
|
lyrics = u' '.join([whitespace.sub(u' ', verse[1]) for verse in verses])
|
||||||
song.search_lyrics = lyrics.lower()
|
song.search_lyrics = lyrics.lower()
|
||||||
|
# We need a new and clean SongXML instance.
|
||||||
|
sxml = SongXML()
|
||||||
|
# Rebuild the song's verses, to remove any wrong verse names (for example
|
||||||
|
# translated ones), which might have been added prior to 1.9.5.
|
||||||
|
for verse in verses:
|
||||||
|
sxml.add_verse_to_lyrics(
|
||||||
|
VerseType.Tags[VerseType.from_loose_input(verse[0][u'type'])],
|
||||||
|
verse[0][u'label'],
|
||||||
|
verse[1],
|
||||||
|
verse[0][u'lang'] if verse[0].has_key(u'lang') else None
|
||||||
|
)
|
||||||
|
song.lyrics = unicode(sxml.extract_xml(), u'utf-8')
|
||||||
# The song does not have any author, add one.
|
# The song does not have any author, add one.
|
||||||
if not song.authors:
|
if not song.authors:
|
||||||
name = SongStrings.AuthorUnknown
|
name = SongStrings.AuthorUnknown
|
||||||
|
@ -34,31 +34,32 @@ import os
|
|||||||
import re
|
import re
|
||||||
|
|
||||||
from openlp.core.ui.wizard import WizardStrings
|
from openlp.core.ui.wizard import WizardStrings
|
||||||
|
from openlp.plugins.songs.lib import VerseType
|
||||||
from openlp.plugins.songs.lib.songimport import SongImport
|
from openlp.plugins.songs.lib.songimport import SongImport
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
class SongBeamerTypes(object):
|
class SongBeamerTypes(object):
|
||||||
MarkTypes = {
|
MarkTypes = {
|
||||||
u'Refrain': u'C',
|
u'Refrain': VerseType.Tags[VerseType.Chorus],
|
||||||
u'Chorus': u'C',
|
u'Chorus': VerseType.Tags[VerseType.Chorus],
|
||||||
u'Vers': u'V',
|
u'Vers': VerseType.Tags[VerseType.Verse],
|
||||||
u'Verse': u'V',
|
u'Verse': VerseType.Tags[VerseType.Verse],
|
||||||
u'Strophe': u'V',
|
u'Strophe': VerseType.Tags[VerseType.Verse],
|
||||||
u'Intro': u'I',
|
u'Intro': VerseType.Tags[VerseType.Intro],
|
||||||
u'Coda': u'E',
|
u'Coda': VerseType.Tags[VerseType.Ending],
|
||||||
u'Ending': u'E',
|
u'Ending': VerseType.Tags[VerseType.Ending],
|
||||||
u'Bridge': u'B',
|
u'Bridge': VerseType.Tags[VerseType.Bridge],
|
||||||
u'Interlude': u'B',
|
u'Interlude': VerseType.Tags[VerseType.Bridge],
|
||||||
u'Zwischenspiel': u'B',
|
u'Zwischenspiel': VerseType.Tags[VerseType.Bridge],
|
||||||
u'Pre-Chorus': u'P',
|
u'Pre-Chorus': VerseType.Tags[VerseType.PreChorus],
|
||||||
u'Pre-Refrain': u'P',
|
u'Pre-Refrain': VerseType.Tags[VerseType.PreChorus],
|
||||||
u'Pre-Bridge': u'O',
|
u'Pre-Bridge': VerseType.Tags[VerseType.Other],
|
||||||
u'Pre-Coda': u'O',
|
u'Pre-Coda': VerseType.Tags[VerseType.Other],
|
||||||
u'Unbekannt': u'O',
|
u'Unbekannt': VerseType.Tags[VerseType.Other],
|
||||||
u'Unknown': u'O',
|
u'Unknown': VerseType.Tags[VerseType.Other],
|
||||||
u'Unbenannt': u'O'
|
u'Unbenannt': VerseType.Tags[VerseType.Other]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class SongBeamerImport(SongImport):
|
class SongBeamerImport(SongImport):
|
||||||
@ -84,7 +85,7 @@ class SongBeamerImport(SongImport):
|
|||||||
# TODO: check that it is a valid SongBeamer file
|
# TODO: check that it is a valid SongBeamer file
|
||||||
self.set_defaults()
|
self.set_defaults()
|
||||||
self.current_verse = u''
|
self.current_verse = u''
|
||||||
self.current_verse_type = u'V'
|
self.current_verse_type = VerseType.Tags[VerseType.Verse]
|
||||||
read_verses = False
|
read_verses = False
|
||||||
file_name = os.path.split(file)[1]
|
file_name = os.path.split(file)[1]
|
||||||
self.import_wizard.incrementProgressBar(
|
self.import_wizard.incrementProgressBar(
|
||||||
@ -111,7 +112,7 @@ class SongBeamerImport(SongImport):
|
|||||||
self.add_verse(self.current_verse,
|
self.add_verse(self.current_verse,
|
||||||
self.current_verse_type)
|
self.current_verse_type)
|
||||||
self.current_verse = u''
|
self.current_verse = u''
|
||||||
self.current_verse_type = u'V'
|
self.current_verse_type = VerseType.Tags[VerseType.Verse]
|
||||||
read_verses = True
|
read_verses = True
|
||||||
verse_start = True
|
verse_start = True
|
||||||
elif read_verses:
|
elif read_verses:
|
||||||
@ -157,7 +158,7 @@ class SongBeamerImport(SongImport):
|
|||||||
(u'<[/]?c.*?>', u''),
|
(u'<[/]?c.*?>', u''),
|
||||||
(u'<align.*?>', u''),
|
(u'<align.*?>', u''),
|
||||||
(u'<valign.*?>', u'')
|
(u'<valign.*?>', u'')
|
||||||
]
|
]
|
||||||
for pair in tag_pairs:
|
for pair in tag_pairs:
|
||||||
self.current_verse = re.compile(pair[0]).sub(pair[1],
|
self.current_verse = re.compile(pair[0]).sub(pair[1],
|
||||||
self.current_verse)
|
self.current_verse)
|
||||||
|
@ -31,7 +31,7 @@ The basic XML for storing the lyrics in the song database looks like this::
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<song version="1.0">
|
<song version="1.0">
|
||||||
<lyrics>
|
<lyrics>
|
||||||
<verse type="Chorus" label="1" lang="en">
|
<verse type="c" label="1" lang="en">
|
||||||
<![CDATA[ ... ]]>
|
<![CDATA[ ... ]]>
|
||||||
</verse>
|
</verse>
|
||||||
</lyrics>
|
</lyrics>
|
||||||
|
@ -31,9 +31,9 @@ OutputDir=..\..\dist
|
|||||||
OutputBaseFilename=OpenLP-{#RealVersion}-setup
|
OutputBaseFilename=OpenLP-{#RealVersion}-setup
|
||||||
Compression=lzma
|
Compression=lzma
|
||||||
SolidCompression=true
|
SolidCompression=true
|
||||||
SetupIconFile=C:\Program Files\Inno Setup 5\Examples\Setup.ico
|
SetupIconFile=OpenLP.ico
|
||||||
WizardImageFile=C:\Program Files\Inno Setup 5\WizModernImage-IS.bmp
|
WizardImageFile=WizImageBig.bmp
|
||||||
WizardSmallImageFile=C:\Program Files\Inno Setup 5\WizModernSmallImage-IS.bmp
|
WizardSmallImageFile=WizImageSmall.bmp
|
||||||
|
|
||||||
[Languages]
|
[Languages]
|
||||||
Name: english; MessagesFile: compiler:Default.isl
|
Name: english; MessagesFile: compiler:Default.isl
|
||||||
@ -78,15 +78,6 @@ Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\{#AppName}; Filenam
|
|||||||
Filename: {app}\{#AppExeName}; Description: {cm:LaunchProgram,{#AppName}}; Flags: nowait postinstall skipifsilent
|
Filename: {app}\{#AppExeName}; Description: {cm:LaunchProgram,{#AppName}}; Flags: nowait postinstall skipifsilent
|
||||||
|
|
||||||
[Registry]
|
[Registry]
|
||||||
Root: HKCU; SubKey: Software\OpenLP\OpenLP\alerts; ValueType: dword; ValueName: status; ValueData: $00000001
|
|
||||||
Root: HKCU; SubKey: Software\OpenLP\OpenLP\bibles; ValueType: dword; ValueName: status; ValueData: $00000001
|
|
||||||
Root: HKCU; SubKey: Software\OpenLP\OpenLP\custom; ValueType: dword; ValueName: status; ValueData: $00000001
|
|
||||||
Root: HKCU; SubKey: Software\OpenLP\OpenLP\images; ValueType: dword; ValueName: status; ValueData: $00000001
|
|
||||||
Root: HKCU; SubKey: Software\OpenLP\OpenLP\media; ValueType: dword; ValueName: status; ValueData: $00000001
|
|
||||||
Root: HKCU; SubKey: Software\OpenLP\OpenLP\presentations; ValueType: dword; ValueName: status; ValueData: $00000001
|
|
||||||
Root: HKCU; SubKey: Software\OpenLP\OpenLP\remotes; ValueType: dword; ValueName: status; ValueData: $00000000
|
|
||||||
Root: HKCU; SubKey: Software\OpenLP\OpenLP\songs; ValueType: dword; ValueName: status; ValueData: $00000001
|
|
||||||
Root: HKCU; SubKey: Software\OpenLP\OpenLP\songusage; ValueType: dword; ValueName: status; ValueData: $00000001
|
|
||||||
|
|
||||||
[Code]
|
[Code]
|
||||||
function GetUninstallString(): String;
|
function GetUninstallString(): String;
|
||||||
|
BIN
resources/windows/WizImageBig.bmp
Normal file
BIN
resources/windows/WizImageBig.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 151 KiB |
BIN
resources/windows/WizImageSmall.bmp
Normal file
BIN
resources/windows/WizImageSmall.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.1 KiB |
@ -116,8 +116,15 @@ dist_path = os.path.join(branch_path, u'dist', u'OpenLP')
|
|||||||
enchant_path = os.path.join(site_packages, u'enchant')
|
enchant_path = os.path.join(site_packages, u'enchant')
|
||||||
|
|
||||||
def update_code():
|
def update_code():
|
||||||
print u'Updating the code...'
|
|
||||||
os.chdir(branch_path)
|
os.chdir(branch_path)
|
||||||
|
print u'Reverting any changes to the code...'
|
||||||
|
bzr = Popen((u'bzr', u'revert'), stdout=PIPE)
|
||||||
|
output, error = bzr.communicate()
|
||||||
|
code = bzr.wait()
|
||||||
|
if code != 0:
|
||||||
|
print output
|
||||||
|
raise Exception(u'Error reverting the code')
|
||||||
|
print u'Updating the code...'
|
||||||
bzr = Popen((u'bzr', u'update'), stdout=PIPE)
|
bzr = Popen((u'bzr', u'update'), stdout=PIPE)
|
||||||
output, error = bzr.communicate()
|
output, error = bzr.communicate()
|
||||||
code = bzr.wait()
|
code = bzr.wait()
|
||||||
|
Loading…
Reference in New Issue
Block a user