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