diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py
index cfcc0b80..ccd158d9 100644
--- a/src/bitmessageqt/__init__.py
+++ b/src/bitmessageqt/__init__.py
@@ -3412,7 +3412,7 @@ class settingsDialog(QtGui.QDialog):
shared.safeConfigGetBoolean('bitmessagesettings', 'replybelow'))
global languages
- languages = ['system','en','eo','fr','de','es','ru','no','ar','zh_cn','ja','nl','en_pirate','cs','other']
+ languages = ['system','en','eo','fr','de','es','ru','no','ar','zh_cn','ja','nl','cs','en_pirate','other']
user_countrycode = str(shared.config.get('bitmessagesettings', 'userlocale'))
if user_countrycode in languages:
curr_index = languages.index(user_countrycode)
diff --git a/src/bitmessageqt/settings.py b/src/bitmessageqt/settings.py
index dbd2e521..6d854773 100644
--- a/src/bitmessageqt/settings.py
+++ b/src/bitmessageqt/settings.py
@@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'settings.ui'
#
-# Created: Tue Sep 09 15:13:28 2014
+# Created: Thu Dec 25 23:21:20 2014
# by: PyQt4 UI code generator 4.10.3
#
# WARNING! All changes made in this file will be lost!
@@ -106,8 +106,8 @@ class Ui_settingsDialog(object):
self.languageComboBox.addItem(_fromUtf8(""))
self.languageComboBox.setItemText(11, _fromUtf8("Nederlands"))
self.languageComboBox.addItem(_fromUtf8(""))
+ self.languageComboBox.setItemText(12, _fromUtf8("Česky"))
self.languageComboBox.addItem(_fromUtf8(""))
- self.languageComboBox.setItemText(13, _fromUtf8("Česky"))
self.languageComboBox.addItem(_fromUtf8(""))
self.formLayout_2.setWidget(0, QtGui.QFormLayout.LabelRole, self.languageComboBox)
self.formLayout.setWidget(9, QtGui.QFormLayout.FieldRole, self.groupBox)
@@ -444,7 +444,7 @@ class Ui_settingsDialog(object):
self.checkBoxReplyBelow.setText(_translate("settingsDialog", "Reply below Quote", None))
self.groupBox.setTitle(_translate("settingsDialog", "Interface Language", None))
self.languageComboBox.setItemText(0, _translate("settingsDialog", "System Settings", "system"))
- self.languageComboBox.setItemText(12, _translate("settingsDialog", "Pirate English", "en_pirate"))
+ self.languageComboBox.setItemText(13, _translate("settingsDialog", "Pirate English", "en_pirate"))
self.languageComboBox.setItemText(14, _translate("settingsDialog", "Other (set in keys.dat)", "other"))
self.tabWidgetSettings.setTabText(self.tabWidgetSettings.indexOf(self.tabUserInterface), _translate("settingsDialog", "User Interface", None))
self.groupBox1.setTitle(_translate("settingsDialog", "Listening port", None))
diff --git a/src/bitmessageqt/settings.ui b/src/bitmessageqt/settings.ui
index 14749d5e..a41d7e4e 100644
--- a/src/bitmessageqt/settings.ui
+++ b/src/bitmessageqt/settings.ui
@@ -186,6 +186,11 @@
Nederlands
+ -
+
+ Česky
+
+
-
Pirate English
diff --git a/src/shared.py b/src/shared.py
index 8f4be2ff..1de8708f 100644
--- a/src/shared.py
+++ b/src/shared.py
@@ -852,15 +852,16 @@ def writeKeysFile():
# create a backup copy to prevent the accidental loss due to the disk write failure
try:
shutil.copyfile(fileName, fileNameBak)
- # The backup succeeded. This can fail if the file didn't exist before.
- existingFileNameExisted = True
+ # The backup succeeded.
+ fileNameExisted = True
except:
- existingFileNameExisted = False
+ # The backup failed. This can happen if the file didn't exist before.
+ fileNameExisted = False
# write the file
with open(fileName, 'wb') as configfile:
shared.config.write(configfile)
- # delete a backup
- if existingFileNameExisted:
+ # delete the backup
+ if fileNameExisted:
os.remove(fileNameBak)
from debug import logger