Philipp Hörist pushed to branch mainwindow at gajim / gajim
Commits: 71ce5b66 by lovetox at 2021-03-07T13:11:50+01:00 Save workspace order - - - - - 2 changed files: - gajim/gtk/main.py - gajim/gtk/workspace_side_bar.py Changes: ===================================== gajim/gtk/main.py ===================================== @@ -303,6 +303,8 @@ def add_workspace(self, workspace_id): self._chat_list_stack.add_chat_list(workspace_id) self._workspace_side_bar.activate_workspace(workspace_id) self._chat_list_stack.show_chat_list(workspace_id) + if self._startup_finished: + self._workspace_side_bar.store_workspace_order() def _edit_workspace(self, _action, _param): workspace_id = self.get_active_workspace() ===================================== gajim/gtk/workspace_side_bar.py ===================================== @@ -104,6 +104,7 @@ def _on_drag_data_received(self, _widget, _drag_context, _x_coord, pos = len(self.get_children()) - 1 self.insert(row, pos) + self.store_workspace_order() app.window.activate_workspace(workspace_id) def _on_drag_leave(self, _widget, _drag_context, _time): @@ -147,6 +148,11 @@ def add_workspace(self, workspace_id): # Insert row before AddWorkspace row self.insert(row, len(self.get_children()) - 1) + def store_workspace_order(self): + order = [row.workspace_id for row in self.get_children()] + order.remove('add') + app.settings.set_app_setting('workspace_order', order) + def remove_workspace(self, workspace_id): if len(self._workspaces) == 1: return False View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/71ce5b66e19326941d652db18f1227aec7b06722 -- View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/71ce5b66e19326941d652db18f1227aec7b06722 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