openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #01182
[Merge] lp:~trb143/openlp/futures into lp:openlp
Tim Bentley has proposed merging lp:~trb143/openlp/futures into lp:openlp.
Requested reviews:
Raoul Snyman (raoul-snyman)
Fix blank screen color
Fix save and cancel of services
Fix tool shortcut.
--
https://code.launchpad.net/~trb143/openlp/futures/+merge/21331
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/ui/maindisplay.py'
--- openlp/core/ui/maindisplay.py 2010-03-05 21:54:29 +0000
+++ openlp/core/ui/maindisplay.py 2010-03-14 17:55:21 +0000
@@ -168,8 +168,7 @@
self.screen[u'size'].height(),
QtGui.QImage.Format_ARGB32_Premultiplied)
painter.begin(self.blankFrame)
- #TODO make black when testing finished
- painter.fillRect(self.blankFrame.rect(), QtCore.Qt.red)
+ painter.fillRect(self.blankFrame.rect(), QtCore.Qt.black)
#build a blank transparent image
self.transparent = QtGui.QPixmap(self.screen[u'size'].width(),
self.screen[u'size'].height())
=== modified file 'openlp/core/ui/mainwindow.py'
--- openlp/core/ui/mainwindow.py 2010-03-13 15:11:31 +0000
+++ openlp/core/ui/mainwindow.py 2010-03-14 17:55:21 +0000
@@ -419,7 +419,7 @@
self.LanguageEnglishItem.setText(self.trUtf8('English'))
self.LanguageEnglishItem.setStatusTip(
self.trUtf8('Set the interface language to English'))
- self.ToolsAddToolItem.setText(self.trUtf8('&Add Tool...'))
+ self.ToolsAddToolItem.setText(self.trUtf8('Add &Tool...'))
self.ToolsAddToolItem.setStatusTip(
self.trUtf8('Add an application to the list of tools'))
self.action_Preview_Panel.setText(self.trUtf8('&Preview Pane'))
=== modified file 'openlp/core/ui/servicemanager.py'
--- openlp/core/ui/servicemanager.py 2010-03-14 07:56:39 +0000
+++ openlp/core/ui/servicemanager.py 2010-03-14 17:55:21 +0000
@@ -477,7 +477,8 @@
log.debug(u'onSaveService')
if not quick or self.isNew:
filename = QtGui.QFileDialog.getSaveFileName(self,
- u'Save Service', self.config.get_last_dir())
+ self.trUtf8(u'Save Service'), self.config.get_last_dir(),
+ self.trUtf8(u'OpenLP Service Files (*.osz)'))
else:
filename = self.config.get_last_dir()
if filename:
@@ -516,9 +517,9 @@
os.remove(servicefile)
except:
pass #if not present do not worry
- name = filename.split(os.path.sep)
- self.serviceName = name[-1]
- self.parent.serviceChanged(True, self.serviceName)
+ name = filename.split(os.path.sep)
+ self.serviceName = name[-1]
+ self.parent.serviceChanged(True, self.serviceName)
def onQuickSaveService(self):
self.onSaveService(True)
@@ -741,12 +742,7 @@
if item is None:
endpos = len(self.serviceItems)
else:
- parentitem = item.parent()
- if parentitem is None:
- endpos = item.data(0, QtCore.Qt.UserRole).toInt()[0]
- else:
- endpos = parentitem.data(0, QtCore.Qt.UserRole).toInt()[0]
- endpos -= 1
+ endpos = self._getParentItemData(item) - 1
if endpos < startpos:
newpos = endpos
else:
@@ -759,11 +755,7 @@
if item == None:
self.droppos = len(self.serviceItems)
else:
- parentitem = item.parent()
- if parentitem is None:
- self.droppos = item.data(0, QtCore.Qt.UserRole).toInt()[0]
- else:
- self.droppos = parentitem.data(0, QtCore.Qt.UserRole).toInt()[0]
+ self.droppos = self._getParentItemData(item)
Receiver.send_message(u'%s_add_service_item' % plugin)
def updateThemeList(self, theme_list):
@@ -798,3 +790,10 @@
item, count = self.findServiceItem()
self.serviceItems[item][u'service_item'].theme = theme
self.regenerateServiceItems()
+
+ def _getParentItemData(self, item):
+ parentitem = item.parent()
+ if parentitem is None:
+ return item.data(0, QtCore.Qt.UserRole).toInt()[0]
+ else:
+ return parentitem.data(0, QtCore.Qt.UserRole).toInt()[0]
Follow ups