forked from openlp/openlp
Hook up dialog and get working
This commit is contained in:
parent
a10ad04254
commit
b34726e790
@ -287,7 +287,7 @@ def main():
|
|||||||
FirstTimeForm().exec_()
|
FirstTimeForm().exec_()
|
||||||
if not options.no_error_form:
|
if not options.no_error_form:
|
||||||
sys.excepthook = app.hookException
|
sys.excepthook = app.hookException
|
||||||
sys.exit()#(app.run())
|
sys.exit(app.run())
|
||||||
|
|
||||||
if __name__ == u'__main__':
|
if __name__ == u'__main__':
|
||||||
"""
|
"""
|
||||||
|
@ -39,6 +39,7 @@ class FirstTimeLanguageForm(QtGui.QDialog, Ui_FirstTimeLanguageDialog):
|
|||||||
QtGui.QDialog.__init__(self, parent)
|
QtGui.QDialog.__init__(self, parent)
|
||||||
self.setupUi(self)
|
self.setupUi(self)
|
||||||
self.qmList = LanguageManager.get_qm_list()
|
self.qmList = LanguageManager.get_qm_list()
|
||||||
|
self.LanguageComboBox.addItem(u'Automatic')
|
||||||
for key in sorted(self.qmList.keys()):
|
for key in sorted(self.qmList.keys()):
|
||||||
self.LanguageComboBox.addItem(key)
|
self.LanguageComboBox.addItem(key)
|
||||||
|
|
||||||
@ -49,19 +50,18 @@ class FirstTimeLanguageForm(QtGui.QDialog, Ui_FirstTimeLanguageDialog):
|
|||||||
return QtGui.QDialog.exec_(self)
|
return QtGui.QDialog.exec_(self)
|
||||||
|
|
||||||
def accept(self):
|
def accept(self):
|
||||||
print "Accept"
|
# It's the first row so must be Automatic
|
||||||
# if self.autoLanguageCheckBox.checkState() == QtCore.Qt.Checked:
|
if self.LanguageComboBox.currentIndex() == 0:
|
||||||
# LanguageManager.auto_language = True
|
LanguageManager.auto_language = True
|
||||||
# LanguageManager.set_language(False, False)
|
LanguageManager.set_language(False, False)
|
||||||
# else:
|
else:
|
||||||
# LanguageManager.auto_language = False
|
LanguageManager.auto_language = False
|
||||||
# action = QtGui.QAction(None)
|
action = QtGui.QAction(None)
|
||||||
# action.setObjectName(unicode(self.LanguageComboBox.currentText()))
|
action.setObjectName(unicode(self.LanguageComboBox.currentText()))
|
||||||
# LanguageManager.set_language(action, False)
|
LanguageManager.set_language(action, False)
|
||||||
return QtGui.QDialog.accept(self)
|
return QtGui.QDialog.accept(self)
|
||||||
|
|
||||||
def reject(self):
|
def reject(self):
|
||||||
print "Reject"
|
|
||||||
LanguageManager.auto_language = True
|
LanguageManager.auto_language = True
|
||||||
LanguageManager.set_language(False, False)
|
LanguageManager.set_language(False, False)
|
||||||
return QtGui.QDialog.reject(self)
|
return QtGui.QDialog.reject(self)
|
||||||
|
Loading…
Reference in New Issue
Block a user