forked from openlp/openlp
Head893
This commit is contained in:
commit
109ef118c4
@ -1 +1 @@
|
||||
1.9.1-bzr821
|
||||
1.9.2
|
||||
|
@ -63,7 +63,7 @@ class VersionThread(QtCore.QThread):
|
||||
self.parent = parent
|
||||
self.app_version = app_version
|
||||
self.version_splitter = re.compile(
|
||||
r'([0-9]+).([0-9]+).([0-9]+)(?:-bzr([0-9]+))')
|
||||
r'([0-9]+).([0-9]+).([0-9]+)(?:-bzr([0-9]+))?')
|
||||
|
||||
def run(self):
|
||||
"""
|
||||
@ -79,14 +79,14 @@ class VersionThread(QtCore.QThread):
|
||||
remote_version[u'major'] = int(match.group(1))
|
||||
remote_version[u'minor'] = int(match.group(2))
|
||||
remote_version[u'release'] = int(match.group(3))
|
||||
if len(match.groups()) > 3:
|
||||
if len(match.groups()) > 3 and match.group(4):
|
||||
remote_version[u'revision'] = int(match.group(4))
|
||||
match = self.version_splitter.match(self.app_version[u'full'])
|
||||
if match:
|
||||
local_version[u'major'] = int(match.group(1))
|
||||
local_version[u'minor'] = int(match.group(2))
|
||||
local_version[u'release'] = int(match.group(3))
|
||||
if len(match.groups()) > 3:
|
||||
if len(match.groups()) > 3 and match.group(4):
|
||||
local_version[u'revision'] = int(match.group(4))
|
||||
if remote_version[u'major'] > local_version[u'major'] or \
|
||||
remote_version[u'minor'] > local_version[u'minor'] or \
|
||||
|
@ -88,9 +88,13 @@ class ServiceItemEditForm(QtGui.QDialog, Ui_ServiceItemEditDialog):
|
||||
"""
|
||||
items = self.listWidget.selectedItems()
|
||||
for item in items:
|
||||
row = self.listWidget.row(item)
|
||||
row = self.listWidget.row(item)
|
||||
self.itemList.remove(self.itemList[row])
|
||||
self.loadData()
|
||||
if row == self.listWidget.count():
|
||||
self.listWidget.setCurrentRow(row - 1)
|
||||
else:
|
||||
self.listWidget.setCurrentRow(row)
|
||||
|
||||
def onItemUp(self):
|
||||
"""
|
||||
@ -98,7 +102,7 @@ class ServiceItemEditForm(QtGui.QDialog, Ui_ServiceItemEditDialog):
|
||||
"""
|
||||
items = self.listWidget.selectedItems()
|
||||
for item in items:
|
||||
row = self.listWidget.row(item)
|
||||
row = self.listWidget.row(item)
|
||||
if row > 0:
|
||||
temp = self.itemList[row]
|
||||
self.itemList.remove(self.itemList[row])
|
||||
@ -112,7 +116,7 @@ class ServiceItemEditForm(QtGui.QDialog, Ui_ServiceItemEditDialog):
|
||||
"""
|
||||
items = self.listWidget.selectedItems()
|
||||
for item in items:
|
||||
row = self.listWidget.row(item)
|
||||
row = self.listWidget.row(item)
|
||||
if row < len(self.itemList) and row is not -1:
|
||||
temp = self.itemList[row]
|
||||
self.itemList.remove(self.itemList[row])
|
||||
|
@ -41,10 +41,15 @@ from openlp.core.lib import resize_image
|
||||
|
||||
if os.name == u'nt':
|
||||
from win32com.client import Dispatch
|
||||
import pywintypes
|
||||
else:
|
||||
import uno
|
||||
from com.sun.star.beans import PropertyValue
|
||||
|
||||
try:
|
||||
import uno
|
||||
from com.sun.star.beans import PropertyValue
|
||||
uno_available = True
|
||||
except ImportError:
|
||||
uno_available = False
|
||||
|
||||
from PyQt4 import QtCore
|
||||
|
||||
from presentationcontroller import PresentationController, PresentationDocument
|
||||
@ -78,9 +83,7 @@ class ImpressController(PresentationController):
|
||||
if os.name == u'nt':
|
||||
return self.get_com_servicemanager() is not None
|
||||
else:
|
||||
# If not windows, and we've got this far then probably
|
||||
# installed else the import uno would likely have failed
|
||||
return True
|
||||
return uno_available
|
||||
|
||||
def start_process(self):
|
||||
"""
|
||||
@ -322,7 +325,10 @@ class ImpressDocument(PresentationDocument):
|
||||
Returns true if screen is blank
|
||||
"""
|
||||
log.debug(u'is blank OpenOffice')
|
||||
return self.control.isPaused()
|
||||
if self.control:
|
||||
return self.control.isPaused()
|
||||
else:
|
||||
return False
|
||||
|
||||
def stop_presentation(self):
|
||||
log.debug(u'stop presentation OpenOffice')
|
||||
|
@ -396,7 +396,7 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
||||
self.loadBooks()
|
||||
else:
|
||||
return
|
||||
elif item > 1:
|
||||
elif item >= 1:
|
||||
item = int(self.SongbookCombo.currentIndex())
|
||||
self.song.song_book_id = \
|
||||
(self.SongbookCombo.itemData(item)).toInt()[0]
|
||||
|
@ -42,9 +42,14 @@ if os.name == u'nt':
|
||||
PAGE_AFTER = 5
|
||||
PAGE_BOTH = 6
|
||||
else:
|
||||
from com.sun.star.awt.FontWeight import BOLD
|
||||
from com.sun.star.awt.FontSlant import ITALIC
|
||||
from com.sun.star.style.BreakType import PAGE_BEFORE, PAGE_AFTER, PAGE_BOTH
|
||||
try:
|
||||
from com.sun.star.awt.FontWeight import BOLD
|
||||
from com.sun.star.awt.FontSlant import ITALIC
|
||||
from com.sun.star.style.BreakType import PAGE_BEFORE, PAGE_AFTER, \
|
||||
PAGE_BOTH
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
|
||||
class SofImport(OooImport):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user