Merge branch '1148' into upstream-v0.6
This commit is contained in:
commit
50ccb897fc
|
@ -799,19 +799,16 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
|
|
||||||
self.initSettings()
|
self.initSettings()
|
||||||
|
|
||||||
# Check to see whether we can connect to namecoin. Hide the 'Fetch Namecoin ID' button if we can't.
|
self.namecoin = namecoinConnection()
|
||||||
try:
|
|
||||||
options = {}
|
# Check to see whether we can connect to namecoin.
|
||||||
options["type"] = BMConfigParser().get('bitmessagesettings', 'namecoinrpctype')
|
# Hide the 'Fetch Namecoin ID' button if we can't.
|
||||||
options["host"] = BMConfigParser().get('bitmessagesettings', 'namecoinrpchost')
|
if BMConfigParser().safeGetBoolean(
|
||||||
options["port"] = BMConfigParser().get('bitmessagesettings', 'namecoinrpcport')
|
'bitmessagesettings', 'dontconnect'
|
||||||
options["user"] = BMConfigParser().get('bitmessagesettings', 'namecoinrpcuser')
|
) or self.namecoin.test()[0] == 'failed':
|
||||||
options["password"] = BMConfigParser().get('bitmessagesettings', 'namecoinrpcpassword')
|
logger.warning(
|
||||||
nc = namecoinConnection(options)
|
'There was a problem testing for a Namecoin daemon. Hiding the'
|
||||||
if nc.test()[0] == 'failed':
|
' Fetch Namecoin ID button')
|
||||||
self.ui.pushButtonFetchNamecoinID.hide()
|
|
||||||
except:
|
|
||||||
logger.error('There was a problem testing for a Namecoin daemon. Hiding the Fetch Namecoin ID button')
|
|
||||||
self.ui.pushButtonFetchNamecoinID.hide()
|
self.ui.pushButtonFetchNamecoinID.hide()
|
||||||
|
|
||||||
def updateTTL(self, sliderPosition):
|
def updateTTL(self, sliderPosition):
|
||||||
|
@ -2691,6 +2688,10 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
BMConfigParser().save()
|
BMConfigParser().save()
|
||||||
self.ui.updateNetworkSwitchMenuLabel(dontconnect_option)
|
self.ui.updateNetworkSwitchMenuLabel(dontconnect_option)
|
||||||
|
|
||||||
|
self.ui.pushButtonFetchNamecoinID.setHidden(
|
||||||
|
dontconnect_option or self.namecoin.test()[0] == 'failed'
|
||||||
|
)
|
||||||
|
|
||||||
# Quit selected from menu or application indicator
|
# Quit selected from menu or application indicator
|
||||||
def quit(self):
|
def quit(self):
|
||||||
'''quit_msg = "Are you sure you want to exit Bitmessage?"
|
'''quit_msg = "Are you sure you want to exit Bitmessage?"
|
||||||
|
|
Reference in New Issue
Block a user