Daniel Brötzmann pushed to branch mainwindow at gajim / gajim
Commits:
-
24cca18a
by wurstsalat at 2021-05-30T12:52:49+02:00
-
7439d476
by wurstsalat at 2021-05-30T13:08:39+02:00
2 changed files:
Changes:
| ... | ... | @@ -821,7 +821,6 @@ def _on_message_textview_key_press_event(self, textview, event): |
| 821 | 821 |
|
| 822 | 822 |
if event.keyval in (Gdk.KEY_Page_Down, Gdk.KEY_Page_Up):
|
| 823 | 823 |
self.conversation_view.event(event)
|
| 824 |
- self._on_scroll(None, event.keyval)
|
|
| 825 | 824 |
return True
|
| 826 | 825 |
|
| 827 | 826 |
if event.get_state() & Gdk.ModifierType.CONTROL_MASK:
|
| ... | ... | @@ -868,14 +867,14 @@ def _on_message_textview_key_press_event(self, textview, event): |
| 868 | 867 |
self.last_key_tabs = False
|
| 869 | 868 |
if event.keyval == Gdk.KEY_Up:
|
| 870 | 869 |
if event_state & Gdk.ModifierType.CONTROL_MASK:
|
| 871 |
- if event_state & Gdk.ModifierType.SHIFT_MASK: # Ctrl+Shift+UP
|
|
| 870 |
+ if event_state & Gdk.ModifierType.SHIFT_MASK: # Ctrl+Shift+UP
|
|
| 872 | 871 |
self.scroll_messages('up', message_buffer, 'received')
|
| 873 | 872 |
else: # Ctrl+UP
|
| 874 | 873 |
self.scroll_messages('up', message_buffer, 'sent')
|
| 875 | 874 |
return True
|
| 876 | 875 |
elif event.keyval == Gdk.KEY_Down:
|
| 877 | 876 |
if event_state & Gdk.ModifierType.CONTROL_MASK:
|
| 878 |
- if event_state & Gdk.ModifierType.SHIFT_MASK: # Ctrl+Shift+Down
|
|
| 877 |
+ if event_state & Gdk.ModifierType.SHIFT_MASK: # Ctrl+Shift+Down
|
|
| 879 | 878 |
self.scroll_messages('down', message_buffer, 'received')
|
| 880 | 879 |
else: # Ctrl+Down
|
| 881 | 880 |
self.scroll_messages('down', message_buffer, 'sent')
|
| ... | ... | @@ -26,17 +26,16 @@ |
| 26 | 26 |
from gajim.common.helpers import to_user_string
|
| 27 | 27 |
from gajim.common.helpers import get_start_of_day
|
| 28 | 28 |
|
| 29 |
-from .util import scroll_to_end
|
|
| 30 |
-from .conversation.rows.read_marker import ReadMarkerRow
|
|
| 31 |
-from .conversation.rows.scroll_hint import ScrollHintRow
|
|
| 32 |
-from .conversation.rows.message import MessageRow
|
|
| 33 |
-from .conversation.rows.info import InfoMessage
|
|
| 34 |
-from .conversation.rows.date import DateRow
|
|
| 35 |
-from .conversation.rows.file_transfer import FileTransferRow
|
|
| 36 |
-from .conversation.rows.muc_subject import MUCSubject
|
|
| 37 |
-from .conversation.rows.muc_join_left import MUCJoinLeft
|
|
| 38 |
-from .conversation.rows.muc_user_status import MUCUserStatus
|
|
| 39 |
- |
|
| 29 |
+from .rows.read_marker import ReadMarkerRow
|
|
| 30 |
+from .rows.scroll_hint import ScrollHintRow
|
|
| 31 |
+from .rows.message import MessageRow
|
|
| 32 |
+from .rows.info import InfoMessage
|
|
| 33 |
+from .rows.date import DateRow
|
|
| 34 |
+from .rows.file_transfer import FileTransferRow
|
|
| 35 |
+from .rows.muc_subject import MUCSubject
|
|
| 36 |
+from .rows.muc_join_left import MUCJoinLeft
|
|
| 37 |
+from .rows.muc_user_status import MUCUserStatus
|
|
| 38 |
+from ..util import scroll_to_end
|
|
| 40 | 39 |
|
| 41 | 40 |
log = logging.getLogger('gajim.gui.conversation_view')
|
| 42 | 41 |
|
| ... | ... | @@ -115,7 +114,8 @@ def _reset_conversation_view(self): |
| 115 | 114 |
self._row_count = 0
|
| 116 | 115 |
self.clearing = False
|
| 117 | 116 |
|
| 118 |
- def _sort_func(self, row1, row2):
|
|
| 117 |
+ @staticmethod
|
|
| 118 |
+ def _sort_func(row1, row2):
|
|
| 119 | 119 |
if row1.timestamp == row2.timestamp:
|
| 120 | 120 |
return 0
|
| 121 | 121 |
return -1 if row1.timestamp < row2.timestamp else 1
|