V0.6 #852

Merged
Atheros1 merged 399 commits from v0.6 into master 2016-05-03 01:58:38 +02:00
Showing only changes of commit 4763fb1238 - Show all commits

View File

@ -677,6 +677,22 @@ class MyForm(QtGui.QMainWindow):
print 'There was a problem testing for a Namecoin daemon. Hiding the Fetch Namecoin ID button'
#self.ui.pushButtonFetchNamecoinID.hide()
def updateTTL(self, sliderPosition):
TTL = int(sliderPosition ** 3.199 + 3600)
self.updateHumanFriendlyTTLDescription(TTL)
shared.config.set('bitmessagesettings', 'ttl', str(TTL))
shared.writeKeysFile()
def updateHumanFriendlyTTLDescription(self, TTL):
numberOfHours = int(round(TTL / (60*60)))
if numberOfHours < 48:
if numberOfHours == 1:
self.ui.labelHumanFriendlyTTLDescription.setText(_translate("MainWindow", "1 hour"))
else:
self.ui.labelHumanFriendlyTTLDescription.setText(_translate("MainWindow", "%1 hours").arg(numberOfHours))
else:
numberOfDays = int(round(TTL / (24*60*60)))
self.ui.labelHumanFriendlyTTLDescription.setText(_translate("MainWindow", "%1 days").arg(numberOfDays))
# Show or hide the application window after clicking an item within the
# tray icon or, on Windows, the try icon itself.