This commit is contained in:
Tim Bentley 2010-06-28 17:48:36 +01:00
commit 109ef118c4
6 changed files with 33 additions and 18 deletions

View File

@ -1 +1 @@
1.9.1-bzr821
1.9.2

View File

@ -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 \

View File

@ -91,6 +91,10 @@ class ServiceItemEditForm(QtGui.QDialog, Ui_ServiceItemEditDialog):
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):
"""

View File

@ -41,9 +41,14 @@ from openlp.core.lib import resize_image
if os.name == u'nt':
from win32com.client import Dispatch
import pywintypes
else:
try:
import uno
from com.sun.star.beans import PropertyValue
uno_available = True
except ImportError:
uno_available = False
from PyQt4 import QtCore
@ -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')
if self.control:
return self.control.isPaused()
else:
return False
def stop_presentation(self):
log.debug(u'stop presentation OpenOffice')

View File

@ -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]

View File

@ -42,9 +42,14 @@ if os.name == u'nt':
PAGE_AFTER = 5
PAGE_BOTH = 6
else:
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
from com.sun.star.style.BreakType import PAGE_BEFORE, PAGE_AFTER, \
PAGE_BOTH
except ImportError:
pass
class SofImport(OooImport):
"""