diff --git a/src/cutecoin/gui/community_tab.py b/src/cutecoin/gui/community_tab.py index 19d19764e00b6c7d64a7f44c8728be245582b20f..2d5f1ec083dfa5cfbf417b9d884bd39279ddce49 100644 --- a/src/cutecoin/gui/community_tab.py +++ b/src/cutecoin/gui/community_tab.py @@ -41,10 +41,8 @@ class CommunityTabWidget(QWidget, Ui_CommunityTabWidget): self.button_membership.setText("Send membership demand") self.button_leaving.hide() - self.tabs_information.addTab(WotTabWidget(account, community, - password_asker), - QIcon(':/icons/wot_icon'), - "Wot") + self.wot_tab = WotTabWidget(account, community, password_asker) + self.tabs_information.addTab(self.wot_tab, QIcon(':/icons/wot_icon'), "Wot") def member_context_menu(self, point): index = self.list_community_members.indexAt(point) @@ -66,9 +64,15 @@ class CommunityTabWidget(QWidget, Ui_CommunityTabWidget): certify.triggered.connect(self.certify_member) certify.setData(member) + view_wot = QAction("View in WoT", self) + view_wot.triggered.connect(self.view_wot) + view_wot.setData(member) + menu.addAction(add_contact) menu.addAction(send_money) menu.addAction(certify) + menu.addAction(view_wot) + # Show the context menu. menu.exec_(self.list_community_members.mapToGlobal(point)) @@ -95,6 +99,14 @@ class CommunityTabWidget(QWidget, Ui_CommunityTabWidget): dialog.radio_pubkey.setChecked(True) dialog.exec_() + def view_wot(self): + person = self.sender().data() + index_wot_tab = self.tabs_information.indexOf(self.wot_tab) + # redraw WoT with this member selected + self.wot_tab.draw_graph(person.pubkey) + # change page to WoT + self.tabs_information.setCurrentIndex(index_wot_tab) + def send_membership_demand(self): password = self.password_asker.exec_() if self.password_asker.result() == QDialog.Rejected: