Browse Source

network_dialog updates for python3

seed_v14
ThomasV 7 years ago
parent
commit
033a5c6c91
  1. 8
      gui/qt/network_dialog.py

8
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))

Loading…
Cancel
Save