feature1_v4
This commit is contained in:
parent
5fb08efe00
commit
44bd876a40
|
@ -2031,21 +2031,19 @@ class MyForm(QtGui.QMainWindow):
|
||||||
if ((self.settingsDialogInstance.ui.lineEditHours.text()=='') and (self.settingsDialogInstance.ui.lineEditDays.text()=='') and (self.settingsDialogInstance.ui.lineEditMonths.text()=='')):
|
if ((self.settingsDialogInstance.ui.lineEditHours.text()=='') and (self.settingsDialogInstance.ui.lineEditDays.text()=='') and (self.settingsDialogInstance.ui.lineEditMonths.text()=='')):
|
||||||
if (((shared.config.get('bitmessagesettings', 'hours')) != str(self.settingsDialogInstance.ui.lineEditHours.text())) or #if we update the time period from one time period(f.e 1/0/0) to default -/-/,inform the user that restart is needed in order his changes to take effect.AQWA
|
if (((shared.config.get('bitmessagesettings', 'hours')) != str(self.settingsDialogInstance.ui.lineEditHours.text())) or #if we update the time period from one time period(f.e 1/0/0) to default -/-/,inform the user that restart is needed in order his changes to take effect.AQWA
|
||||||
((shared.config.get('bitmessagesettings', 'days')) != str(self.settingsDialogInstance.ui.lineEditDays.text())) or
|
((shared.config.get('bitmessagesettings', 'days')) != str(self.settingsDialogInstance.ui.lineEditDays.text())) or
|
||||||
((shared.config.get('bitmessagesettings', 'months')) != str(self.settingsDialogInstance.ui.lineEditMonths.text()))) :
|
((shared.config.get('bitmessagesettings', 'months')) != str(self.settingsDialogInstance.ui.lineEditMonths.text()))):
|
||||||
QMessageBox.about(self, _translate("MainWindow", "Restart"), _translate(
|
QMessageBox.about(self, _translate("MainWindow", "Restart"), _translate(
|
||||||
"MainWindow", "You must restart Bitmessage for the time period change to take effect."))
|
"MainWindow", "You must restart Bitmessage for the time period change to take effect."))
|
||||||
|
|
||||||
shared.config.set('bitmessagesettings', 'hours', '')#give default values to fields..this default situation is special and thats why its needs special treatment ;).AQWA
|
shared.config.set('bitmessagesettings', 'hours', '')#give default values to fields..this default situation is special and thats why its needs special treatment ;).AQWA
|
||||||
shared.config.set('bitmessagesettings', 'days', '')#these commands update each field in the keys.dat file.AQWA
|
shared.config.set('bitmessagesettings', 'days', '')#these commands update each field in the keys.dat file.AQWA
|
||||||
shared.config.set('bitmessagesettings', 'months', '')
|
shared.config.set('bitmessagesettings', 'months', '')
|
||||||
shared.config.set('bitmessagesettings', 'timeperiod', '-1')
|
shared.config.set('bitmessagesettings', 'timeperiod', '-1')
|
||||||
else:#So,if all time period fields(hours,months,days) have valid values(valid values---> 0/0/0, 0/3/2, -/-/-, no valid--> -/0/5, 5/-/-), you can calculate the time period
|
else:#So,if all time period fields(hours,months,days) have valid values(valid values---> 0/0/0, 0/3/2, -/-/-, no valid--> -/0/5, 5/-/-), you can calculate the time period
|
||||||
shared.config.set('bitmessagesettings', 'timeperiod', str(int(str(self.settingsDialogInstance.ui.lineEditHours.text())) * 60 * 60 + int(str(self.settingsDialogInstance.ui.lineEditDays.text())) * 24 * 60 * 60 +
|
if (int(str(self.settingsDialogInstance.ui.lineEditHours.text())) >=0 and int(str(self.settingsDialogInstance.ui.lineEditDays.text())) >=0 and
|
||||||
int(str(self.settingsDialogInstance.ui.lineEditMonths.text())) * (60 * 60 * 24 *365)/12))
|
int(str(self.settingsDialogInstance.ui.lineEditMonths.text())) >=0):
|
||||||
|
if (((shared.config.get('bitmessagesettings', 'hours')) != str(self.settingsDialogInstance.ui.lineEditHours.text())) or #if we update the time period from one time period(f.e 1/0/0) to default -/-/,inform the user that restart is needed in order his changes to take effect.AQWA
|
||||||
if (((shared.config.get('bitmessagesettings', 'hours')) != str(self.settingsDialogInstance.ui.lineEditHours.text())) or#inform user tha he needs to restart bitmessage in order his changes to take effect.AQWA
|
|
||||||
((shared.config.get('bitmessagesettings', 'days')) != str(self.settingsDialogInstance.ui.lineEditDays.text())) or
|
((shared.config.get('bitmessagesettings', 'days')) != str(self.settingsDialogInstance.ui.lineEditDays.text())) or
|
||||||
((shared.config.get('bitmessagesettings', 'months')) != str(self.settingsDialogInstance.ui.lineEditMonths.text()))) :
|
((shared.config.get('bitmessagesettings', 'months')) != str(self.settingsDialogInstance.ui.lineEditMonths.text()))):
|
||||||
QMessageBox.about(self, _translate("MainWindow", "Restart"), _translate(
|
QMessageBox.about(self, _translate("MainWindow", "Restart"), _translate(
|
||||||
"MainWindow", "You must restart Bitmessage for the time period change to take effect."))
|
"MainWindow", "You must restart Bitmessage for the time period change to take effect."))
|
||||||
shared.config.set('bitmessagesettings', 'hours', str(#this three commands update the fields of this new setting in keys.dat file.AQWA
|
shared.config.set('bitmessagesettings', 'hours', str(#this three commands update the fields of this new setting in keys.dat file.AQWA
|
||||||
|
@ -2054,7 +2052,9 @@ class MyForm(QtGui.QMainWindow):
|
||||||
self.settingsDialogInstance.ui.lineEditDays.text()))
|
self.settingsDialogInstance.ui.lineEditDays.text()))
|
||||||
shared.config.set('bitmessagesettings', 'months', str(
|
shared.config.set('bitmessagesettings', 'months', str(
|
||||||
self.settingsDialogInstance.ui.lineEditMonths.text()))
|
self.settingsDialogInstance.ui.lineEditMonths.text()))
|
||||||
#my implementation stops here, there is a line.AQWA
|
shared.config.set('bitmessagesettings', 'timeperiod', str(int(str(self.settingsDialogInstance.ui.lineEditHours.text())) * 60 * 60 + int(str(self.settingsDialogInstance.ui.lineEditDays.text())) * 24 * 60 * 60 +
|
||||||
|
int(str(self.settingsDialogInstance.ui.lineEditMonths.text())) * (60 * 60 * 24 *365)/12))
|
||||||
|
#my implementation stops here, it was a line.AQWA
|
||||||
|
|
||||||
# if str(self.settingsDialogInstance.ui.comboBoxMaxCores.currentText()) == 'All':
|
# if str(self.settingsDialogInstance.ui.comboBoxMaxCores.currentText()) == 'All':
|
||||||
# shared.config.set('bitmessagesettings', 'maxcores', '99999')
|
# shared.config.set('bitmessagesettings', 'maxcores', '99999')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user