forked from openlp/openlp
Correct path building and sort line break issues
This commit is contained in:
parent
b865c8ab7f
commit
a6f6ad498b
@ -101,14 +101,17 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
# Create the top toolbar
|
# Create the top toolbar
|
||||||
self.Toolbar = OpenLPToolbar(self)
|
self.Toolbar = OpenLPToolbar(self)
|
||||||
self.Toolbar.addToolbarButton(u'New Service',
|
self.Toolbar.addToolbarButton(u'New Service',
|
||||||
u':/services/service_new.png', translate(u'ServiceManager',
|
u':/services/service_new.png',
|
||||||
u'Create a new service'), self.onNewService)
|
translate(u'ServiceManager', u'Create a new service'),
|
||||||
|
self.onNewService)
|
||||||
self.Toolbar.addToolbarButton(u'Open Service',
|
self.Toolbar.addToolbarButton(u'Open Service',
|
||||||
u':/services/service_open.png', translate(u'ServiceManager',
|
u':/services/service_open.png',
|
||||||
u'Load an existing service'), self.onLoadService)
|
translate(u'ServiceManager', u'Load an existing service'),
|
||||||
|
self.onLoadService)
|
||||||
self.Toolbar.addToolbarButton(u'Save Service',
|
self.Toolbar.addToolbarButton(u'Save Service',
|
||||||
u':/services/service_save.png', translate(u'ServiceManager',
|
u':/services/service_save.png',
|
||||||
u'Save this service'), self.onSaveService)
|
translate(u'ServiceManager', u'Save this service'),
|
||||||
|
self.onSaveService)
|
||||||
self.Toolbar.addSeparator()
|
self.Toolbar.addSeparator()
|
||||||
self.ThemeLabel = QtGui.QLabel(translate(u'ServiceManager', u'Theme:'),
|
self.ThemeLabel = QtGui.QLabel(translate(u'ServiceManager', u'Theme:'),
|
||||||
self)
|
self)
|
||||||
@ -373,8 +376,8 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
if item[u'data'].service_item_type == ServiceType.Image or \
|
if item[u'data'].service_item_type == ServiceType.Image or \
|
||||||
item[u'data'].service_item_type == ServiceType.Command:
|
item[u'data'].service_item_type == ServiceType.Command:
|
||||||
for frame in item[u'data'].frames:
|
for frame in item[u'data'].frames:
|
||||||
path_from = unicode(item[u'data'].service_item_path + \
|
path_from = unicode(os.path.join(
|
||||||
u'/' + frame[u'title'])
|
item[u'data'].service_item_path, frame[u'title']))
|
||||||
zip.write(path_from)
|
zip.write(path_from)
|
||||||
file = open(servicefile, u'wb')
|
file = open(servicefile, u'wb')
|
||||||
cPickle.dump(service, file)
|
cPickle.dump(service, file)
|
||||||
@ -458,8 +461,8 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
Service Item to be added
|
Service Item to be added
|
||||||
|
|
||||||
"""
|
"""
|
||||||
self.serviceItems.append({u'data': item, u'order': len(
|
self.serviceItems.append({u'data': item,
|
||||||
self.serviceItems)+1, u'expanded':True})
|
u'order': len(self.serviceItems)+1, u'expanded':True})
|
||||||
treewidgetitem = QtGui.QTreeWidgetItem(self.ServiceManagerList)
|
treewidgetitem = QtGui.QTreeWidgetItem(self.ServiceManagerList)
|
||||||
treewidgetitem.setText(0,item.title)
|
treewidgetitem.setText(0,item.title)
|
||||||
treewidgetitem.setIcon(0,item.iconic_representation)
|
treewidgetitem.setIcon(0,item.iconic_representation)
|
||||||
|
Loading…
Reference in New Issue
Block a user