From 4a038afb67a4f4245b3c7c559574d1d2a769e893 Mon Sep 17 00:00:00 2001 From: Jonathan Warren Date: Wed, 27 Feb 2013 00:04:25 -0500 Subject: [PATCH 1/2] adjust Settings window UI so that it looks appropriate on Linux --- addresses.py | 1 + settings.py | 30 +++++++++++++++--------------- settings.ui | 34 +++++++++++++++++----------------- 3 files changed, 33 insertions(+), 32 deletions(-) diff --git a/addresses.py b/addresses.py index 97d1ab95..ce7aa4ff 100644 --- a/addresses.py +++ b/addresses.py @@ -275,6 +275,7 @@ if __name__ == "__main__": print 'addressVersionNumber', addressVersionNumber print 'streamNumber', streamNumber print 'length of data(the ripe hash):', len(data) + print 'ripe data:', data.encode('hex') print '\n\nNow let us try making an address with given 2048-bit n and e values.' testn = 16691381808213609635656612695328489234826227577985206736118595570304213887605602327717776979169783795560145663031146864154748634207927153095849203939039346778471192284119479329875655789428795925773927040539038073349089996911318012189546542694411685389074592231210678771416758973061752125295462189928432307067746658691146428088703129795340914596189054255127032271420140641112277113597275245807890920656563056790943850440012709593297328230145129809419550219898595770524436575484115680960823105256137731976622290028349172297572826751147335728017861413787053794003722218722212196385625462088929496952843002425059308041193 diff --git a/settings.py b/settings.py index 378cd305..097ad033 100644 --- a/settings.py +++ b/settings.py @@ -2,8 +2,8 @@ # Form implementation generated from reading ui file 'settings.ui' # -# Created: Tue Feb 26 13:33:44 2013 -# by: PyQt4 UI code generator 4.9.4 +# Created: Wed Feb 27 00:00:12 2013 +# by: PyQt4 UI code generator 4.9.5 # # WARNING! All changes made in this file will be lost! @@ -30,35 +30,35 @@ class Ui_settingsDialog(object): self.tabUserInterface = QtGui.QWidget() self.tabUserInterface.setEnabled(True) self.tabUserInterface.setObjectName(_fromUtf8("tabUserInterface")) - self.formLayout = QtGui.QFormLayout(self.tabUserInterface) - self.formLayout.setObjectName(_fromUtf8("formLayout")) + 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.formLayout.setWidget(0, QtGui.QFormLayout.SpanningRole, self.checkBoxStartOnLogon) + self.gridLayout_5.addWidget(self.checkBoxStartOnLogon, 0, 0, 1, 1) self.checkBoxStartInTray = QtGui.QCheckBox(self.tabUserInterface) self.checkBoxStartInTray.setObjectName(_fromUtf8("checkBoxStartInTray")) - self.formLayout.setWidget(1, QtGui.QFormLayout.SpanningRole, self.checkBoxStartInTray) + self.gridLayout_5.addWidget(self.checkBoxStartInTray, 1, 0, 1, 1) self.checkBoxMinimizeToTray = QtGui.QCheckBox(self.tabUserInterface) self.checkBoxMinimizeToTray.setChecked(True) self.checkBoxMinimizeToTray.setObjectName(_fromUtf8("checkBoxMinimizeToTray")) - self.formLayout.setWidget(2, QtGui.QFormLayout.SpanningRole, self.checkBoxMinimizeToTray) + self.gridLayout_5.addWidget(self.checkBoxMinimizeToTray, 2, 0, 1, 1) self.checkBoxShowTrayNotifications = QtGui.QCheckBox(self.tabUserInterface) self.checkBoxShowTrayNotifications.setObjectName(_fromUtf8("checkBoxShowTrayNotifications")) - self.formLayout.setWidget(3, QtGui.QFormLayout.SpanningRole, self.checkBoxShowTrayNotifications) + self.gridLayout_5.addWidget(self.checkBoxShowTrayNotifications, 3, 0, 1, 1) self.checkBoxPortableMode = QtGui.QCheckBox(self.tabUserInterface) self.checkBoxPortableMode.setObjectName(_fromUtf8("checkBoxPortableMode")) - self.formLayout.setWidget(4, QtGui.QFormLayout.SpanningRole, self.checkBoxPortableMode) + self.gridLayout_5.addWidget(self.checkBoxPortableMode, 4, 0, 1, 1) + self.label_7 = QtGui.QLabel(self.tabUserInterface) + self.label_7.setWordWrap(True) + self.label_7.setObjectName(_fromUtf8("label_7")) + self.gridLayout_5.addWidget(self.label_7, 5, 0, 1, 1) self.labelSettingsNote = QtGui.QLabel(self.tabUserInterface) self.labelSettingsNote.setText(_fromUtf8("")) self.labelSettingsNote.setWordWrap(True) self.labelSettingsNote.setObjectName(_fromUtf8("labelSettingsNote")) - self.formLayout.setWidget(5, QtGui.QFormLayout.LabelRole, self.labelSettingsNote) - self.label_7 = QtGui.QLabel(self.tabUserInterface) - self.label_7.setWordWrap(True) - self.label_7.setObjectName(_fromUtf8("label_7")) - self.formLayout.setWidget(5, QtGui.QFormLayout.FieldRole, self.label_7) + self.gridLayout_5.addWidget(self.labelSettingsNote, 6, 0, 1, 1) spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) - self.formLayout.setItem(6, QtGui.QFormLayout.SpanningRole, spacerItem) + self.gridLayout_5.addItem(spacerItem, 7, 0, 1, 1) self.tabWidgetSettings.addTab(self.tabUserInterface, _fromUtf8("")) self.tabNetworkSettings = QtGui.QWidget() self.tabNetworkSettings.setObjectName(_fromUtf8("tabNetworkSettings")) diff --git a/settings.ui b/settings.ui index 6fa0ad9c..bf569277 100644 --- a/settings.ui +++ b/settings.ui @@ -36,22 +36,22 @@ User Interface - - + + Start Bitmessage on user login - + Start Bitmessage in the tray (don't show main window) - + Minimize to tray @@ -61,14 +61,14 @@ - + Show notification when message received and minimzed to tray - + Run in Portable Mode @@ -76,16 +76,6 @@ - - - - - - true - - - - 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. @@ -95,7 +85,17 @@ - + + + + + + + true + + + + Qt::Vertical From 2c15dc5a1389d3ca27c8af7735ccd1b937ab79b9 Mon Sep 17 00:00:00 2001 From: Jonathan Warren Date: Wed, 27 Feb 2013 00:11:04 -0500 Subject: [PATCH 2/2] resize settings dialog box to fit contents --- bitmessagemain.py | 1 + 1 file changed, 1 insertion(+) diff --git a/bitmessagemain.py b/bitmessagemain.py index 2092fabd..ad8aae07 100755 --- a/bitmessagemain.py +++ b/bitmessagemain.py @@ -3150,6 +3150,7 @@ class settingsDialog(QtGui.QDialog): self.ui.lineEditSocksUsername.setText(str(config.get('bitmessagesettings', 'socksusername'))) self.ui.lineEditSocksPassword.setText(str(config.get('bitmessagesettings', 'sockspassword'))) QtCore.QObject.connect(self.ui.comboBoxProxyType, QtCore.SIGNAL("currentIndexChanged(int)"), self.comboBoxProxyTypeChanged) + QtGui.QWidget.resize(self,QtGui.QWidget.sizeHint(self)) def comboBoxProxyTypeChanged(self,comboBoxIndex): if comboBoxIndex == 0: