Philipp Hörist pushed to branch mainwindow at gajim / gajim
Commits:
-
683e442b
by lovetox at 2021-02-07T16:08:20+01:00
2 changed files:
Changes:
| ... | ... | @@ -189,6 +189,7 @@ class _ACCOUNT_DEFAULT: |
| 189 | 189 |
'always_ask_for_status_message': False,
|
| 190 | 190 |
'show_send_message_button': False,
|
| 191 | 191 |
'workspace_order': [],
|
| 192 |
+ 'chat_handle_position': 350,
|
|
| 192 | 193 |
}
|
| 193 | 194 |
|
| 194 | 195 |
ACCOUNT_SETTINGS = {
|
| ... | ... | @@ -65,6 +65,9 @@ def __init__(self): |
| 65 | 65 |
'clicked', self._on_start_chat_clicked)
|
| 66 | 66 |
self._ui.connect_signals(self)
|
| 67 | 67 |
|
| 68 |
+ self._ui.paned.set_position(app.settings.get('chat_handle_position'))
|
|
| 69 |
+ self._ui.paned.connect('button-release-event', self._on_button_release)
|
|
| 70 |
+ |
|
| 68 | 71 |
# pylint: disable=line-too-long
|
| 69 | 72 |
self.register_events([
|
| 70 | 73 |
('presence-received', ged.GUI1, self._on_event),
|
| ... | ... | @@ -115,6 +118,13 @@ def __init__(self): |
| 115 | 118 |
self._add_accounts()
|
| 116 | 119 |
self._add_actions()
|
| 117 | 120 |
|
| 121 |
+ @staticmethod
|
|
| 122 |
+ def _on_button_release(paned, event):
|
|
| 123 |
+ if event.window != paned.get_handle_window():
|
|
| 124 |
+ return
|
|
| 125 |
+ position = paned.get_position()
|
|
| 126 |
+ app.settings.set('chat_handle_position', position)
|
|
| 127 |
+ |
|
| 118 | 128 |
def _add_actions(self):
|
| 119 | 129 |
actions = [
|
| 120 | 130 |
('add-workspace', 's', self._add_workspace),
|