commit 033a5c6c91b79cbf60da9ce85198d8ae76521a3a
parent b5338006f073b01ee5d563f47f8c5374622ee92d
Author: ThomasV <thomasv@electrum.org>
Date: Tue, 8 Aug 2017 10:50:08 +0200
network_dialog updates for python3
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/gui/qt/network_dialog.py b/gui/qt/network_dialog.py
@@ -77,13 +77,13 @@ class NodesListWidget(QTreeWidget):
item = self.currentItem()
if not item:
return
- is_server = not bool(item.data(0, Qt.UserRole).toInt()[0])
+ is_server = not bool(item.data(0, Qt.UserRole))
menu = QMenu()
if is_server:
- server = unicode(item.data(1, Qt.UserRole).toString())
+ server = item.data(1, Qt.UserRole)
menu.addAction(_("Use as server"), lambda: self.parent.follow_server(server))
else:
- index = item.data(1, Qt.UserRole).toInt()[0]
+ index = item.data(1, Qt.UserRole)
menu.addAction(_("Follow this branch"), lambda: self.parent.follow_branch(index))
menu.exec_(self.viewport().mapToGlobal(position))
@@ -143,7 +143,7 @@ class ServerListWidget(QTreeWidget):
if not item:
return
menu = QMenu()
- server = unicode(item.data(1, Qt.UserRole).toString())
+ server = item.data(1, Qt.UserRole)
menu.addAction(_("Use as server"), lambda: self.set_server(server))
menu.exec_(self.viewport().mapToGlobal(position))