forked from openlp/openlp
Save Theme import directory
This commit is contained in:
parent
290dc5d775
commit
0f54bb81e7
@ -426,8 +426,10 @@ class ServiceManager(QtGui.QWidget):
|
|||||||
files retrieved from the zip file are placed in a temporary directory
|
files retrieved from the zip file are placed in a temporary directory
|
||||||
and will only be used for this service.
|
and will only be used for this service.
|
||||||
"""
|
"""
|
||||||
filename = QtGui.QFileDialog.getOpenFileName(self, u'Open Service',
|
filename = QtGui.QFileDialog.getOpenFileName(self,
|
||||||
self.config.get_last_dir(), u'Services (*.osz)')
|
translate(u'ThemeManager', u'Open Service'),
|
||||||
|
self.config.get_last_dir(),
|
||||||
|
u'Services (*.osz)')
|
||||||
filename = unicode(filename)
|
filename = unicode(filename)
|
||||||
name = filename.split(os.path.sep)
|
name = filename.split(os.path.sep)
|
||||||
if filename != u'':
|
if filename != u'':
|
||||||
|
@ -224,13 +224,14 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
zip.close()
|
zip.close()
|
||||||
|
|
||||||
def onImportTheme(self):
|
def onImportTheme(self):
|
||||||
files = QtGui.QFileDialog.getOpenFileNames(None,
|
files = QtGui.QFileDialog.getOpenFileNames(self,
|
||||||
translate(u'ThemeManager',
|
translate(u'ThemeManager', u'Select Theme Import File'),
|
||||||
u'Select Theme Import File'),
|
self.config.get_last_dir(),
|
||||||
self.path, u'Theme (*.*)')
|
u'Theme (*.*)')
|
||||||
log.info(u'New Themes %s', unicode(files))
|
log.info(u'New Themes %s', unicode(files))
|
||||||
if len(files) > 0:
|
if len(files) > 0:
|
||||||
for file in files:
|
for file in files:
|
||||||
|
self.config.set_last_dir(filename)
|
||||||
self.unzipTheme(file, self.path)
|
self.unzipTheme(file, self.path)
|
||||||
self.loadThemes()
|
self.loadThemes()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user