Repository: Bitmessage/PyBitmessage

Issue:
Error when trying to open settings dialog
OS: Linux Mint 15 with Cinnamon 32-bit fallback mode
Bitmessage Version: PyBitmessage commit 0f5448

After fetching and merging up to commit 0f5448 (the latest commit as of now) I get this error:
Traceback (most recent call last):
  File "/home/amos/bitmessage/PyBitmessage/src/bitmessageqt/**init**.py", line 2029, in click_actionSettings
    self.settingsDialogInstance = settingsDialog(self)
  File "/home/amos/bitmessage/PyBitmessage/src/bitmessageqt/**init**.py", line 3082, in **init**
    self.ui.labelSettingsNote.setText(_translate(
AttributeError: 'Ui_settingsDialog' object has no attribute 'labelSettingsNote'

Before fetching I was on commit 777248 and I didn't get this error.



Discussion:
Commit 4d2ab2 works. Commit aea1d4 doesn't work.

I haven't yet been able to narrow it down further because I run into this error in the commits between:
Traceback (most recent call last):
  File "bitmessagemain.py", line 972, in <module>
    mainprogram.start()
  File "bitmessagemain.py", line 943, in start
    bitmessageqt.run()
  File "/home/amos/bitmessage/PyBitmessage/src/bitmessageqt/**init**.py", line 3418, in run
    user_countrycode = str(shared.config.get('bitmessagesettings', 'userlocale'))
  File "/usr/lib/python2.7/ConfigParser.py", line 618, in get
    raise NoOptionError(option, section)
ConfigParser.NoOptionError: No option 'userlocale' in section: 'bitmessagesettings'

I can confirm I see this error as well.  This was probably @sendulio's pull request for locale #427 

After doing the quick fix where I swallow the NoOptionError, there is another error where I can't open settings:

```
Traceback (most recent call last):
  File "/home/grant/src/PyBitmessage/src/bitmessageqt/__init__.py", line 1934, in click_actionSettings
    self.settingsDialogInstance = settingsDialog(self)
  File "/home/grant/src/PyBitmessage/src/bitmessageqt/__init__.py", line 2864, in __init__
    self.ui.labelSettingsNote.setText(_translate(
AttributeError: 'Ui_settingsDialog' object has no attribute 'labelSettingsNote'
```

I don't have the QT designer set up, but it looks like this will only error out on non-windows platforms.


Resolving patch:
diff --git a/src/bitmessageqt/settings.py b/src/bitmessageqt/settings.py
--- 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 Aug 27 22:23:38 2013
+# Created: Mon Sep 02 16:49:54 2013
 #      by: PyQt4 UI code generator 4.10.2
 #
 # WARNING! All changes made in this file will be lost!
@@ -41,31 +41,34 @@ def setupUi(self, settingsDialog):
         self.tabUserInterface.setObjectName(_fromUtf8("tabUserInterface"))
         self.gridLayout_5 = QtGui.QGridLayout(self.tabUserInterface)
         self.gridLayout_5.setObjectName(_fromUtf8("gridLayout_5"))
+        self.checkBoxStartOnLogon = QtGui.QCheckBox(self.tabUserInterface)
+        self.checkBoxStartOnLogon.setObjectName(_fromUtf8("checkBoxStartOnLogon"))
+        self.gridLayout_5.addWidget(self.checkBoxStartOnLogon, 0, 0, 1, 2)
+        self.checkBoxStartInTray = QtGui.QCheckBox(self.tabUserInterface)
+        self.checkBoxStartInTray.setObjectName(_fromUtf8("checkBoxStartInTray"))
+        self.gridLayout_5.addWidget(self.checkBoxStartInTray, 1, 0, 1, 2)
         self.checkBoxMinimizeToTray = QtGui.QCheckBox(self.tabUserInterface)
         self.checkBoxMinimizeToTray.setChecked(True)
         self.checkBoxMinimizeToTray.setObjectName(_fromUtf8("checkBoxMinimizeToTray"))
         self.gridLayout_5.addWidget(self.checkBoxMinimizeToTray, 2, 0, 1, 1)
-        spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
-        self.gridLayout_5.addItem(spacerItem, 10, 0, 1, 1)
-        self.checkBoxStartOnLogon = QtGui.QCheckBox(self.tabUserInterface)
-        self.checkBoxStartOnLogon.setObjectName(_fromUtf8("checkBoxStartOnLogon"))
-        self.gridLayout_5.addWidget(self.checkBoxStartOnLogon, 0, 0, 1, 1)
         self.checkBoxShowTrayNotifications = QtGui.QCheckBox(self.tabUserInterface)
         self.checkBoxShowTrayNotifications.setObjectName(_fromUtf8("checkBoxShowTrayNotifications"))
-        self.gridLayout_5.addWidget(self.checkBoxShowTrayNotifications, 3, 0, 1, 1)
+        self.gridLayout_5.addWidget(self.checkBoxShowTrayNotifications, 3, 0, 1, 2)
         self.checkBoxPortableMode = QtGui.QCheckBox(self.tabUserInterface)
         self.checkBoxPortableMode.setObjectName(_fromUtf8("checkBoxPortableMode"))
         self.gridLayout_5.addWidget(self.checkBoxPortableMode, 4, 0, 1, 1)
-        self.checkBoxStartInTray = QtGui.QCheckBox(self.tabUserInterface)
-        self.checkBoxStartInTray.setObjectName(_fromUtf8("checkBoxStartInTray"))
-        self.gridLayout_5.addWidget(self.checkBoxStartInTray, 1, 0, 1, 1)
         self.PortableModeDescription = QtGui.QLabel(self.tabUserInterface)
         self.PortableModeDescription.setWordWrap(True)
         self.PortableModeDescription.setObjectName(_fromUtf8("PortableModeDescription"))
-        self.gridLayout_5.addWidget(self.PortableModeDescription, 5, 0, 1, 2)
+        self.gridLayout_5.addWidget(self.PortableModeDescription, 5, 0, 1, 3)
         self.checkBoxWillinglySendToMobile = QtGui.QCheckBox(self.tabUserInterface)
         self.checkBoxWillinglySendToMobile.setObjectName(_fromUtf8("checkBoxWillinglySendToMobile"))
-        self.gridLayout_5.addWidget(self.checkBoxWillinglySendToMobile, 6, 0, 1, 2)
+        self.gridLayout_5.addWidget(self.checkBoxWillinglySendToMobile, 6, 0, 1, 3)
+        self.labelSettingsNote = QtGui.QLabel(self.tabUserInterface)
+        self.labelSettingsNote.setText(_fromUtf8(""))
+        self.labelSettingsNote.setWordWrap(True)
+        self.labelSettingsNote.setObjectName(_fromUtf8("labelSettingsNote"))
+        self.gridLayout_5.addWidget(self.labelSettingsNote, 7, 0, 1, 2)
         self.groupBox = QtGui.QGroupBox(self.tabUserInterface)
         self.groupBox.setObjectName(_fromUtf8("groupBox"))
         self.horizontalLayout_2 = QtGui.QHBoxLayout(self.groupBox)
@@ -83,7 +86,9 @@ def setupUi(self, settingsDialog):
         self.languageComboBox.addItem(_fromUtf8(""))
         self.languageComboBox.addItem(_fromUtf8(""))
         self.horizontalLayout_2.addWidget(self.languageComboBox)
-        self.gridLayout_5.addWidget(self.groupBox, 10, 1, 1, 1)
+        self.gridLayout_5.addWidget(self.groupBox, 7, 2, 2, 1)
+        spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
+        self.gridLayout_5.addItem(spacerItem, 8, 1, 1, 1)
         self.tabWidgetSettings.addTab(self.tabUserInterface, _fromUtf8(""))
         self.tabNetworkSettings = QtGui.QWidget()
         self.tabNetworkSettings.setObjectName(_fromUtf8("tabNetworkSettings"))
@@ -337,11 +342,11 @@ def setupUi(self, settingsDialog):
 
     def retranslateUi(self, settingsDialog):
         settingsDialog.setWindowTitle(_translate("settingsDialog", "Settings", None))
-        self.checkBoxMinimizeToTray.setText(_translate("settingsDialog", "Minimize to tray", None))
         self.checkBoxStartOnLogon.setText(_translate("settingsDialog", "Start Bitmessage on user login", None))
+        self.checkBoxStartInTray.setText(_translate("settingsDialog", "Start Bitmessage in the tray (don\'t show main window)", None))
+        self.checkBoxMinimizeToTray.setText(_translate("settingsDialog", "Minimize to tray", None))
         self.checkBoxShowTrayNotifications.setText(_translate("settingsDialog", "Show notification when message received", None))
         self.checkBoxPortableMode.setText(_translate("settingsDialog", "Run in Portable Mode", None))
-        self.checkBoxStartInTray.setText(_translate("settingsDialog", "Start Bitmessage in the tray (don\'t show main window)", None))
         self.PortableModeDescription.setText(_translate("settingsDialog", "In Portable Mode, messages and config files are stored in the same directory as the program rather than the normal application-data folder. This makes it convenient to run Bitmessage from a USB thumb drive.", None))
         self.checkBoxWillinglySendToMobile.setText(_translate("settingsDialog", "Willingly include unencrypted destination address when sending to a mobile device", None))
         self.groupBox.setTitle(_translate("settingsDialog", "Interface Language", None))


Test patch: