forked from openlp/openlp
Head 964
This commit is contained in:
commit
3801a80d7d
@ -39,18 +39,22 @@ from openlp.core.utils import check_latest_version, AppLocation, add_actions, \
|
|||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
MEDIA_MANAGER_STYLE = """
|
MEDIA_MANAGER_STYLE = """
|
||||||
|
QToolBox {
|
||||||
|
padding-bottom: 2px;
|
||||||
|
}
|
||||||
QToolBox::tab {
|
QToolBox::tab {
|
||||||
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
|
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
|
||||||
stop: 0 palette(button), stop: 1.0 palette(dark));
|
stop: 0 palette(button), stop: 0.5 palette(button),
|
||||||
border-width: 1px;
|
stop: 1.0 palette(mid));
|
||||||
border-style: outset;
|
border: 1px groove palette(mid);
|
||||||
border-color: palette(dark);
|
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
}
|
}
|
||||||
QToolBox::tab:selected {
|
QToolBox::tab:selected {
|
||||||
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
|
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
|
||||||
stop: 0 palette(light), stop: 1.0 palette(button));
|
stop: 0 palette(light), stop: 0.5 palette(midlight),
|
||||||
border-color: palette(button);
|
stop: 1.0 palette(dark));
|
||||||
|
border: 1px groove palette(dark);
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
class VersionThread(QtCore.QThread):
|
class VersionThread(QtCore.QThread):
|
||||||
|
@ -532,12 +532,12 @@ class SlideController(QtGui.QWidget):
|
|||||||
self.onMediaStop()
|
self.onMediaStop()
|
||||||
if serviceItem.is_media():
|
if serviceItem.is_media():
|
||||||
self.onMediaStart(serviceItem)
|
self.onMediaStart(serviceItem)
|
||||||
# if self.isLive:
|
if self.isLive:
|
||||||
# blanked = self.blankButton.isChecked()
|
blanked = self.BlankScreen.isChecked()
|
||||||
# else:
|
else:
|
||||||
# blanked = False
|
blanked = False
|
||||||
Receiver.send_message(u'%s_start' % serviceItem.name.lower(),
|
Receiver.send_message(u'%s_start' % serviceItem.name.lower(),
|
||||||
[serviceItem, self.isLive, True, slideno])
|
[serviceItem, self.isLive, blanked, slideno])
|
||||||
self.slideList = {}
|
self.slideList = {}
|
||||||
width = self.parent.ControlSplitter.sizes()[self.split]
|
width = self.parent.ControlSplitter.sizes()[self.split]
|
||||||
#Set pointing cursor when we have somthing to point at
|
#Set pointing cursor when we have somthing to point at
|
||||||
|
@ -24,10 +24,11 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import urllib2
|
|
||||||
import os
|
import os
|
||||||
import sqlite3
|
|
||||||
import re
|
import re
|
||||||
|
import sqlite3
|
||||||
|
import urllib
|
||||||
|
import urllib2
|
||||||
|
|
||||||
from BeautifulSoup import BeautifulSoup, Tag, NavigableString
|
from BeautifulSoup import BeautifulSoup, Tag, NavigableString
|
||||||
|
|
||||||
@ -197,12 +198,14 @@ class BGExtract(BibleCommon):
|
|||||||
Chapter number
|
Chapter number
|
||||||
"""
|
"""
|
||||||
log.debug(u'get_bible_chapter %s, %s, %s', version, bookname, chapter)
|
log.debug(u'get_bible_chapter %s, %s, %s', version, bookname, chapter)
|
||||||
urlstring = u'http://www.biblegateway.com/passage/?search=%s+%s' \
|
url_params = urllib.urlencode(
|
||||||
u'&version=%s' % (bookname, chapter, version)
|
{u'search': u'%s %s' % (bookname, chapter),
|
||||||
log.debug(u'BibleGateway url = %s' % urlstring)
|
u'version': u'%s' % version})
|
||||||
# Let's get the page, and then open it in BeautifulSoup, so as to
|
# Let's get the page, and then open it in BeautifulSoup, so as to
|
||||||
# attempt to make "easy" work of bad HTML.
|
# attempt to make "easy" work of bad HTML.
|
||||||
page = urllib2.urlopen(urlstring)
|
page = urllib2.urlopen(
|
||||||
|
u'http://www.biblegateway.com/passage/?%s' % url_params)
|
||||||
|
log.debug(u'BibleGateway url = %s' % page.geturl())
|
||||||
Receiver.send_message(u'openlp_process_events')
|
Receiver.send_message(u'openlp_process_events')
|
||||||
soup = BeautifulSoup(page)
|
soup = BeautifulSoup(page)
|
||||||
Receiver.send_message(u'openlp_process_events')
|
Receiver.send_message(u'openlp_process_events')
|
||||||
|
@ -81,6 +81,9 @@ class PresentationMediaItem(MediaManagerItem):
|
|||||||
self.buildFileMaskString()
|
self.buildFileMaskString()
|
||||||
|
|
||||||
def buildFileMaskString(self):
|
def buildFileMaskString(self):
|
||||||
|
"""
|
||||||
|
Build the list of file extensions to be used in the Open file dialog
|
||||||
|
"""
|
||||||
fileType = u''
|
fileType = u''
|
||||||
for controller in self.controllers:
|
for controller in self.controllers:
|
||||||
if self.controllers[controller].enabled():
|
if self.controllers[controller].enabled():
|
||||||
@ -139,10 +142,18 @@ class PresentationMediaItem(MediaManagerItem):
|
|||||||
self.populateDisplayTypes()
|
self.populateDisplayTypes()
|
||||||
|
|
||||||
def rebuild(self):
|
def rebuild(self):
|
||||||
|
"""
|
||||||
|
Rebuild the tab in the media manager when changes are made in
|
||||||
|
the settings
|
||||||
|
"""
|
||||||
self.populateDisplayTypes()
|
self.populateDisplayTypes()
|
||||||
self.buildFileMaskString()
|
self.buildFileMaskString()
|
||||||
|
|
||||||
def populateDisplayTypes(self):
|
def populateDisplayTypes(self):
|
||||||
|
"""
|
||||||
|
Load the combobox with the enabled presentation controllers,
|
||||||
|
allowing user to select a specific app if settings allow
|
||||||
|
"""
|
||||||
self.DisplayTypeComboBox.clear()
|
self.DisplayTypeComboBox.clear()
|
||||||
for item in self.controllers:
|
for item in self.controllers:
|
||||||
#load the drop down selection
|
#load the drop down selection
|
||||||
|
@ -22,7 +22,10 @@
|
|||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
"""
|
||||||
|
The :mod:`presentationplugin` module provides the ability for OpenLP to display
|
||||||
|
presentations from a variety of document formats.
|
||||||
|
"""
|
||||||
import os
|
import os
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
@ -70,11 +70,18 @@ class OldTopic(BaseModel):
|
|||||||
|
|
||||||
class OpenLPSongImport(object):
|
class OpenLPSongImport(object):
|
||||||
"""
|
"""
|
||||||
|
The :class:`OpenLPSongImport` class provides OpenLP with the ability to
|
||||||
|
import song databases from other installations of OpenLP.
|
||||||
"""
|
"""
|
||||||
def __init__(self, master_manager, source_db):
|
def __init__(self, master_manager, source_db):
|
||||||
"""
|
"""
|
||||||
|
Initialise the import.
|
||||||
|
|
||||||
|
``master_manager``
|
||||||
|
The song manager for the running OpenLP installation.
|
||||||
|
|
||||||
|
``source_db``
|
||||||
|
The database providing the data to import.
|
||||||
"""
|
"""
|
||||||
self.master_manager = master_manager
|
self.master_manager = master_manager
|
||||||
self.import_source = source_db
|
self.import_source = source_db
|
||||||
@ -82,7 +89,7 @@ class OpenLPSongImport(object):
|
|||||||
|
|
||||||
def import_source_v2_db(self):
|
def import_source_v2_db(self):
|
||||||
"""
|
"""
|
||||||
|
Run the import for an OpenLP version 2 song database.
|
||||||
"""
|
"""
|
||||||
engine = create_engine(self.import_source)
|
engine = create_engine(self.import_source)
|
||||||
source_meta = MetaData()
|
source_meta = MetaData()
|
||||||
|
Loading…
Reference in New Issue
Block a user