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