Daniel Brötzmann pushed to branch mainwindow at gajim / gajim
Commits:
-
554c27db
by wurstsalat at 2021-03-06T11:05:31+01:00
3 changed files:
Changes:
| ... | ... | @@ -420,7 +420,7 @@ def _on_state_flags_changed(self, _listboxrow, *args): |
| 420 | 420 |
def _on_close_button_clicked(self, _button):
|
| 421 | 421 |
app.window.activate_action(
|
| 422 | 422 |
'remove-chat',
|
| 423 |
- GLib.Variant('as', [self.account, self.jid]))
|
|
| 423 |
+ GLib.Variant('as', [self.account, str(self.jid)]))
|
|
| 424 | 424 |
|
| 425 | 425 |
def set_timestamp(self, timestamp):
|
| 426 | 426 |
self._timestamp = timestamp
|
| ... | ... | @@ -291,6 +291,9 @@ def is_chat_active(self, account, jid): |
| 291 | 291 |
return False
|
| 292 | 292 |
return self._chat_list_stack.is_chat_active(account, jid)
|
| 293 | 293 |
|
| 294 |
+ def show_chats(self):
|
|
| 295 |
+ self._ui.main_stack.set_visible_child_name('chats')
|
|
| 296 |
+ |
|
| 294 | 297 |
def _add_workspace(self, _action, param):
|
| 295 | 298 |
workspace_id = param.get_string()
|
| 296 | 299 |
self.add_workspace(workspace_id)
|
| ... | ... | @@ -197,7 +197,8 @@ def _on_roster_button_press_event(self, treeview, event): |
| 197 | 197 |
self._show_contact_menu(jid, treeview, event)
|
| 198 | 198 |
|
| 199 | 199 |
if event.button == 2: # middle click
|
| 200 |
- self.emit('row-activated', jid)
|
|
| 200 |
+ app.window.add_chat(self._account, jid, 'contact', select=True)
|
|
| 201 |
+ app.window.show_chats()
|
|
| 201 | 202 |
|
| 202 | 203 |
@staticmethod
|
| 203 | 204 |
def _on_focus_out(treeview, _param):
|