diff --git a/src/cutecoin/gui/community_view.py b/src/cutecoin/gui/community_view.py index 84965adeb930e5af54b5b4c76148d315e754593a..f3843685f992e21ec1368b76276bd68d795d1935 100644 --- a/src/cutecoin/gui/community_view.py +++ b/src/cutecoin/gui/community_view.py @@ -58,6 +58,8 @@ class CommunityWidget(QWidget, Ui_CommunityWidget): self.tab_network = NetworkTabWidget(self.app) self.tab_identities.view_in_wot.connect(self.tab_wot.draw_graph) self.tab_identities.view_in_wot.connect(lambda: self.tabs.setCurrentWidget(self.tab_wot)) + self.tab_history.view_in_wot.connect(self.tab_wot.draw_graph) + self.tab_history.view_in_wot.connect(lambda: self.tabs.setCurrentWidget(self.tab_wot)) self.tabs.addTab(self.tab_history, QIcon(':/icons/tx_icon'), diff --git a/src/cutecoin/gui/identities_tab.py b/src/cutecoin/gui/identities_tab.py index 603e738353714de4298556e74d095d1c0fee6af8..b5b7d7c03317356b9d77b0f443e0c23ec20bf1d2 100644 --- a/src/cutecoin/gui/identities_tab.py +++ b/src/cutecoin/gui/identities_tab.py @@ -75,12 +75,6 @@ class IdentitiesTabWidget(QWidget, Ui_IdentitiesTab): @asyncify @asyncio.coroutine def identity_context_menu(self, point): - def exec_menu(menu): - future = asyncio.Future() - menu.triggered.connect(future.set_result(True)) - menu.popup(QCursor.pos()) - return future - index = self.table_identities.indexAt(point) model = self.table_identities.model() if index.row() < model.rowCount(): @@ -118,7 +112,7 @@ class IdentitiesTabWidget(QWidget, Ui_IdentitiesTab): menu.addAction(view_wot) # Show the context menu. - yield from exec_menu(menu) + menu.popup(QCursor.pos()) def menu_informations(self): person = self.sender().data() diff --git a/src/cutecoin/gui/transactions_tab.py b/src/cutecoin/gui/transactions_tab.py index 96b5213ea634e52d52f5416a52b686ba311d363e..e64532561771a8401cf7703d45275388634c53ec 100644 --- a/src/cutecoin/gui/transactions_tab.py +++ b/src/cutecoin/gui/transactions_tab.py @@ -129,6 +129,8 @@ class TransactionsTabWidget(QWidget, Ui_transactionsTabWidget): ) ) + @asyncify + @asyncio.coroutine def history_context_menu(self, point): index = self.table_history.indexAt(point) model = self.table_history.model() @@ -141,9 +143,11 @@ class TransactionsTabWidget(QWidget, Ui_transactionsTabWidget): state_data = model.sourceModel().data(state_index, Qt.DisplayRole) pubkey_col = model.sourceModel().columns_types.index('pubkey') - identity_index = model.sourceModel().index(source_index.row(), + pubkey_index = model.sourceModel().index(source_index.row(), pubkey_col) - identity = model.sourceModel().data(identity_index, Qt.DisplayRole) + pubkey = model.sourceModel().data(pubkey_index, Qt.DisplayRole) + identity = yield from self.app.identities_registry.future_find(pubkey, self.community) + transfer = model.sourceModel().transfers[source_index.row()] if state_data == Transfer.REFUSED or state_data == Transfer.TO_SEND: send_back = QAction(self.tr("Send again"), self) @@ -184,7 +188,7 @@ class TransactionsTabWidget(QWidget, Ui_transactionsTabWidget): menu.addAction(copy_pubkey) # Show the context menu. - menu.exec_(QCursor.pos()) + menu.popup(QCursor.pos()) def copy_pubkey_to_clipboard(self): data = self.sender().data()