Daniel Brötzmann pushed to branch mainwindow at gajim / gajim
Commits:
554c27db by wurstsalat at 2021-03-06T11:05:31+01:00
Roster: Implement middle mouse click
- - - - -
3 changed files:
- gajim/gtk/chat_list.py
- gajim/gtk/main.py
- gajim/gtk/roster.py
Changes:
=====================================
gajim/gtk/chat_list.py
=====================================
@@ -420,7 +420,7 @@ def _on_state_flags_changed(self, _listboxrow, *args):
def _on_close_button_clicked(self, _button):
app.window.activate_action(
'remove-chat',
- GLib.Variant('as', [self.account, self.jid]))
+ GLib.Variant('as', [self.account, str(self.jid)]))
def set_timestamp(self, timestamp):
self._timestamp = timestamp
=====================================
gajim/gtk/main.py
=====================================
@@ -291,6 +291,9 @@ def is_chat_active(self, account, jid):
return False
return self._chat_list_stack.is_chat_active(account, jid)
+ def show_chats(self):
+ self._ui.main_stack.set_visible_child_name('chats')
+
def _add_workspace(self, _action, param):
workspace_id = param.get_string()
self.add_workspace(workspace_id)
=====================================
gajim/gtk/roster.py
=====================================
@@ -197,7 +197,8 @@ def _on_roster_button_press_event(self, treeview, event):
self._show_contact_menu(jid, treeview, event)
if event.button == 2: # middle click
- self.emit('row-activated', jid)
+ app.window.add_chat(self._account, jid, 'contact', select=True)
+ app.window.show_chats()
@staticmethod
def _on_focus_out(treeview, _param):
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/554c27dbed504d70a779b6e2975bf4c7c46b4045
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/554c27dbed504d70a779b6e2975bf4c7c46b4045
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits