forked from openlp/openlp
Fix blank screen color
Fix save and cancel of services Fix tool shortcut add a filter to the save dialog - "OpenLP Service Files (*.osz) bzr-revno: 742
This commit is contained in:
commit
ba21b15214
@ -168,8 +168,7 @@ class MainDisplay(DisplayWidget):
|
||||
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())
|
||||
|
@ -419,7 +419,7 @@ class Ui_MainWindow(object):
|
||||
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'))
|
||||
|
@ -477,7 +477,8 @@ class ServiceManager(QtGui.QWidget):
|
||||
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 @@ class ServiceManager(QtGui.QWidget):
|
||||
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 @@ class ServiceManager(QtGui.QWidget):
|
||||
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 @@ class ServiceManager(QtGui.QWidget):
|
||||
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 @@ class ServiceManager(QtGui.QWidget):
|
||||
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]
|
||||
|
Loading…
Reference in New Issue
Block a user