[Git][gajim/gajim][mainwindow] show chat stack page on select=True

2021-03-19 Thread Philipp Hörist


Philipp Hörist pushed to branch mainwindow at gajim / gajim


Commits:
ee41031f by lovetox at 2021-03-19T23:40:51+01:00
show chat stack page on select=True

- - - - -


2 changed files:

- gajim/gtk/main.py
- gajim/gtk/roster.py


Changes:

=
gajim/gtk/main.py
=
@@ -132,7 +132,7 @@ def _add_actions(self):
 ('edit-workspace', None, self._edit_workspace),
 ('remove-workspace', None, self._remove_workspace),
 ('activate-workspace', 's', self._activate_workspace),
-('add-chat', 'as', self._add_chat),
+('add-chat', 'a{sv}', self._add_chat),
 ('add-group-chat', 'as', self._add_group_chat),
 ('remove-chat', 'as', self._remove_chat),
 ('toggle-chat-pinned', 'as', self._toggle_chat_pinned),
@@ -360,8 +360,7 @@ def add_group_chat(self, account, jid, select=False):
 select=select)
 
 def _add_chat(self, _action, param):
-account, jid, type_ = param.unpack()
-self.add_chat(account, jid, type_)
+self.add_chat(**param.unpack())
 
 def add_chat(self, account, jid, type_, select=False):
 workspace_id = self._workspace_side_bar.get_active_workspace()
@@ -389,6 +388,7 @@ def add_chat_for_workspace(self,
 if self.chat_exists(account, jid):
 if select:
 self._chat_list_stack.select_chat(account, jid)
+self.show_chats()
 return
 
 if type_ == 'groupchat':
@@ -407,6 +407,7 @@ def add_chat_for_workspace(self,
 if self._startup_finished:
 if select:
 self._chat_list_stack.select_chat(account, jid)
+self.show_chats()
 self._chat_list_stack.store_open_chats(workspace_id)
 
 def _toggle_chat_pinned(self, _action, param):


=
gajim/gtk/roster.py
=
@@ -276,7 +276,6 @@ def _on_roster_row_activated(self, _treeview, path, 
_column):
 
 jid = self._store[iter_][Column.JID_OR_GROUP]
 app.window.add_chat(self._account, jid, 'contact', select=True)
-app.window.show_chats()
 
 def _on_roster_button_press_event(self, treeview, event):
 if event.button not in (2, 3):
@@ -300,7 +299,6 @@ def _on_roster_button_press_event(self, treeview, event):
 
 if event.button == 2:  # middle click
 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/ee41031f2c1c708995de8b187e48e90900643258

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/ee41031f2c1c708995de8b187e48e90900643258
You're receiving this email because of your account on dev.gajim.org.


___
Commits mailing list
Commits@gajim.org
https://lists.gajim.org/cgi-bin/listinfo/commits


[Git][gajim/gajim][mainwindow] Get correct path

2021-03-19 Thread Philipp Hörist


Philipp Hörist pushed to branch mainwindow at gajim / gajim


Commits:
c10f473f by lovetox at 2021-03-19T14:10:29+01:00
Get correct path

- - - - -


1 changed file:

- gajim/gtk/roster.py


Changes:

=
gajim/gtk/roster.py
=
@@ -268,6 +268,7 @@ def _on_remove_contact(self, _action, param):
 app.window.remove_contact(self._account, param.get_string())
 
 def _on_roster_row_activated(self, _treeview, path, _column):
+path = self._modelfilter.convert_path_to_child_path(path)
 iter_ = self._store.get_iter(path)
 if self._store.iter_parent(iter_) is None:
 # This is a group row
@@ -286,6 +287,7 @@ def _on_roster_button_press_event(self, treeview, event):
 return
 
 path, _, _, _ = pos
+path = self._modelfilter.convert_path_to_child_path(path)
 iter_ = self._store.get_iter(path)
 if self._store.iter_parent(iter_) is None:
 # Group row



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/c10f473ff146c5027476795376a51a7fd4a33f58

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/c10f473ff146c5027476795376a51a7fd4a33f58
You're receiving this email because of your account on dev.gajim.org.


___
Commits mailing list
Commits@gajim.org
https://lists.gajim.org/cgi-bin/listinfo/commits