Philipp Hörist pushed to branch newcontrol at gajim / gajim
Commits:
66e6169d by lovetox at 2022-08-05T23:02:58+02:00
chore: Rename commit prefix
- - - - -
5a256fa5 by Daniel Brötzmann at 2022-08-05T23:10:42+02:00
refactor: Add type annotations
- - - - -
513333cf by lovetox at 2022-08-05T23:10:51+02:00
refactor: GroupchatState: Use contact state-changed signal
refactor: Update GroupchatState on creation
- - - - -
f56ba920 by Daniel Brötzmann at 2022-08-05T23:10:54+02:00
refactor: Contacts: Add is_irc()
- - - - -
3087d404 by Daniel Brötzmann at 2022-08-05T23:10:58+02:00
imprv: Refactor ChatWidgets so they are only created once
Previously all ChatWidgets were created per Chat, now we create them only once and load data into them when we switch chat. This should have a positive impact on memory and performance all around.
- - - - -
ae0f5f69 by Daniel Brötzmann at 2022-08-05T23:11:11+02:00
fix: Make nick completion test pass
- - - - -
c09f41d4 by lovetox at 2022-08-05T23:11:14+02:00
chore: Update pyrightconfig.json
- - - - -
9553fb39 by lovetox at 2022-08-05T23:11:14+02:00
chore: Update pylintrc
- - - - -
20 changed files:
- .githooks/update
- CONTRIBUTING.md
- gajim/command_system/implementation/middleware.py
- gajim/common/const.py
- gajim/common/events.py
- gajim/common/helpers.py
- gajim/common/modules/contacts.py
- gajim/common/modules/httpupload.py
- gajim/common/modules/muc.py
- gajim/common/setting_values.py
- gajim/common/settings.py
- gajim/common/storage/archive.py
- gajim/common/structs.py
- gajim/common/types.py
- + gajim/data/gui/chat_banner.ui
- gajim/data/gui/chat_control.ui
- gajim/data/gui/chat_paned.ui
- − gajim/data/gui/groupchat_control.ui
- gajim/data/gui/main.ui
- + gajim/data/gui/message_actions_box.ui
The diff was not included because it is too large.
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/compare/59060b3ca663dd4a680e69a9f772fde…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/compare/59060b3ca663dd4a680e69a9f772fde…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
66e6169d by lovetox at 2022-08-05T23:02:58+02:00
chore: Rename commit prefix
- - - - -
2 changed files:
- .githooks/update
- CONTRIBUTING.md
Changes:
=====================================
.githooks/update
=====================================
@@ -11,7 +11,7 @@ import subprocess
ALLOWED_TAGS = [
'ci',
- 'cs',
+ 'cq',
'feat',
'fix',
'perf',
=====================================
CONTRIBUTING.md
=====================================
@@ -35,7 +35,7 @@ # Commit Messages
Every commit message must be prefixed with one of the following tags:
- ci (ci related changes)
-- cs (code style changes)
+- cq (code quality changes e.g. formatting, typing, codestyle)
- feat (a new feature was added)
- fix (something was fixed)
- perf (performance related changes)
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/66e6169d670bc0591f1a352ebcb3e87b…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/66e6169d670bc0591f1a352ebcb3e87b…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch newcontrol at gajim / gajim
Commits:
0bed9e67 by lovetox at 2022-08-05T23:00:45+02:00
refactor: Add type annotations
- - - - -
c1390c3f by lovetox at 2022-08-05T23:00:45+02:00
refactor: GroupchatState: Use contact state-changed signal
refactor: Update GroupchatState on creation
- - - - -
823a5537 by lovetox at 2022-08-05T23:00:45+02:00
refactor: Contacts: Add is_irc()
- - - - -
8ddb923e by lovetox at 2022-08-05T23:00:45+02:00
imprv: Refactor ChatWidgets so they are only created once
Previously all ChatWidgets were created per Chat, now we create them only once and load data into them when we switch chat. This should have a positive impact on memory and performance all around.
- - - - -
899eccd6 by lovetox at 2022-08-05T23:00:45+02:00
fix: Make nick completion test pass
- - - - -
77a354c3 by lovetox at 2022-08-05T23:00:45+02:00
chore: Update pyrightconfig.json
- - - - -
59060b3c by lovetox at 2022-08-05T23:00:45+02:00
chore: Update pylintrc
- - - - -
19 changed files:
- gajim/command_system/implementation/middleware.py
- gajim/common/const.py
- gajim/common/events.py
- gajim/common/helpers.py
- gajim/common/modules/contacts.py
- gajim/common/modules/httpupload.py
- gajim/common/modules/muc.py
- gajim/common/setting_values.py
- gajim/common/settings.py
- gajim/common/storage/archive.py
- gajim/common/structs.py
- gajim/common/types.py
- + gajim/data/gui/chat_banner.ui
- gajim/data/gui/chat_control.ui
- gajim/data/gui/chat_paned.ui
- − gajim/data/gui/groupchat_control.ui
- gajim/data/gui/main.ui
- + gajim/data/gui/message_actions_box.ui
- gajim/data/gui/shortcuts_window.ui
The diff was not included because it is too large.
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/compare/534a03dfbfb7eec5d5aae8dc432b5dd…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/compare/534a03dfbfb7eec5d5aae8dc432b5dd…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch newcontrol at gajim / gajim
Commits:
534a03df by lovetox at 2022-08-04T23:09:06+02:00
cs: Update pylintrc
- - - - -
1 changed file:
- pylintrc
Changes:
=====================================
pylintrc
=====================================
@@ -101,6 +101,7 @@ confidence=
# C0111 missing-docstring
# C0209 use-f-string
# C0302 too-many-lines
+# C0413 wrong-import-position
# R0801 duplicat-code
# R0904 too-many-public-methods
# R0913 too-many-arguments
@@ -113,7 +114,7 @@ confidence=
# W1404 implicit-str-concat
# W1406 redundant-u-string-prefix
-disable=E0401,E1101,E1102,E1111,E1120,E1121,E1123,E1124,E1125,E1126,E1127,E1128,E1129,E1130,E1131,E1132,E1133,E1134,E1135,E1136,E1137,E1138,E1139,E1140,E1141,E1142,I1101,W0212,W1113,W1114,W1115,W1116,C0301,C0303,C0304,C0321,W0301,W0311,W0611,C0111,C0209,C0302,R0801,R0904,R0913,R0915,R1725,R1732,W0237,W0311,W0511,W0707,W1404,W1406
+disable=E0401,E1101,E1102,E1111,E1120,E1121,E1123,E1124,E1125,E1126,E1127,E1128,E1129,E1130,E1131,E1132,E1133,E1134,E1135,E1136,E1137,E1138,E1139,E1140,E1141,E1142,I1101,W0212,W1113,W1114,W1115,W1116,C0301,C0303,C0304,C0321,C0413,W0301,W0311,W0611,C0111,C0209,C0302,R0801,R0904,R0913,R0915,R1725,R1732,W0237,W0311,W0511,W0707,W1404,W1406
# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/534a03dfbfb7eec5d5aae8dc432b5dda…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/534a03dfbfb7eec5d5aae8dc432b5dda…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch newcontrol at gajim / gajim
Commits:
c6691245 by lovetox at 2022-08-04T22:31:33+02:00
refactor: Remove dead code
- - - - -
4eaa66c3 by lovetox at 2022-08-04T22:34:18+02:00
cs: fix double quotes
- - - - -
4 changed files:
- gajim/common/storage/archive.py
- gajim/gtk/chat_list_stack.py
- gajim/gtk/controls/base.py
- gajim/gtk/controls/chat.py
Changes:
=====================================
gajim/common/storage/archive.py
=====================================
@@ -998,10 +998,10 @@ def get_last_correctable_message(self,
jid: JID,
message_id: str
) -> Optional[LastConversationRow]:
- """
+ '''
Load the last correctable message of a conversation by message_id.
Conditions: max 5 min old
- """
+ '''
jids = [jid]
account_id = self.get_account_id(account)
min_time = time.time() - 5 * 60
=====================================
gajim/gtk/chat_list_stack.py
=====================================
@@ -269,7 +269,7 @@ def _leave(is_checked: bool) -> None:
_('Leave Group Chat'),
_('Are you sure you want to leave this group chat?'),
_('If you close this chat, you will leave '
- '\'%s\'.') % contact.name,
+ '"%s".') % contact.name,
_('_Do not ask me again'),
[DialogButton.make('Cancel'),
DialogButton.make('Accept',
=====================================
gajim/gtk/controls/base.py
=====================================
@@ -36,7 +36,6 @@
import uuid
from gi.repository import Gtk
-from gi.repository import Gdk
from gi.repository import GLib
from nbxmpp import JID
@@ -60,9 +59,6 @@
from gajim.gui.conversation.view import ConversationView
from gajim.gui.conversation.scrolled import ScrolledView
from gajim.gui.conversation.jump_to_end_button import JumpToEndButton
-from gajim.gui.util import get_copy_modifier
-from gajim.gui.util import get_copy_modifier_keys
-from gajim.gui.util import get_hardware_key_codes
from gajim.gui.builder import get_builder
from gajim.gui.util import set_urgency_hint
from gajim.gui.const import ControlType
@@ -77,22 +73,14 @@
from gajim.command_system.implementation import standard # noqa: F401
from gajim.command_system.implementation import execute # noqa: F401
-# This is needed so copying text from the conversation textview
-# works with different language layouts. Pressing the key c on a russian
-# layout yields another keyval than with the english layout.
-# So we match hardware keycodes instead of keyvals.
-# Multiple hardware keycodes can trigger a keyval like Gdk.KEY_c.
-KEYCODES_KEY_C = get_hardware_key_codes(Gdk.KEY_c)
-COPY_MODIFIER = get_copy_modifier()
-COPY_MODIFIER_KEYS = get_copy_modifier_keys()
log = logging.getLogger('gajim.gui.controls.base')
class BaseControl(ChatCommandProcessor, CommandTools, EventHelper):
- """
+ '''
A base class containing a banner, ConversationView, MessageInputTextView
- """
+ '''
_type: Optional[ControlType] = None
@@ -118,10 +106,6 @@ def __init__(self, widget_name: str, account: str, jid: JID) -> None:
# Create ConversationView and connect signals
self.conversation_view = ConversationView(self.account, self.contact)
- id_ = self.conversation_view.connect(
- 'key-press-event', self._on_conversation_view_key_press)
- self.handlers[id_] = self.conversation_view
-
self._scrolled_view = ScrolledView()
self._scrolled_view.add(self.conversation_view)
self._scrolled_view.set_focus_vadjustment(Gtk.Adjustment())
@@ -239,40 +223,6 @@ def _on_message_moderated(self, event: events.MessageModerated) -> None:
self.conversation_view.show_message_retraction(
event.moderation.stanza_id, text)
- def _on_conversation_view_key_press(self,
- _listbox: ConversationView,
- event: Gdk.EventKey
- ) -> int:
- if event.get_state() & Gdk.ModifierType.SHIFT_MASK:
- if event.keyval in (Gdk.KEY_Page_Down, Gdk.KEY_Page_Up):
- return Gdk.EVENT_PROPAGATE
-
- if event.keyval in COPY_MODIFIER_KEYS:
- # Don’t route modifier keys for copy action to the Message Input
- # otherwise pressing CTRL/META + c (the next event after that)
- # will not reach the textview (because the Message Input would get
- # focused).
- return Gdk.EVENT_PROPAGATE
-
- # if event.get_state() & COPY_MODIFIER:
- # TODO
- # # Don’t reroute the event if it is META + c and the
- # # textview has a selection
- # if event.hardware_keycode in KEYCODES_KEY_C:
- # if textview.get_buffer().props.has_selection:
- # return Gdk.EVENT_PROPAGATE
-
- # if not self.msg_textview.get_sensitive():
- # # If the input textview is not sensitive it can’t get the focus.
- # # In that case propagate_key_event() would send the event again
- # # to the conversation textview. This would mean a recursion.
- # return Gdk.EVENT_PROPAGATE
-
- # # Focus the Message Input and resend the event
- # self.msg_textview.grab_focus()
- # self.msg_textview.get_toplevel().propagate_key_event(event)
- return Gdk.EVENT_STOP
-
@property
def type(self) -> ControlType:
assert self._type is not None
=====================================
gajim/gtk/controls/chat.py
=====================================
@@ -52,9 +52,9 @@
class ChatControl(BaseControl):
- """
+ '''
A control for standard 1-1 chat
- """
+ '''
_type = ControlType.CHAT
# Set a command host to bound to. Every command given through a chat will be
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/compare/d6950498025c9b0d9b0ea271fb0ae02…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/compare/d6950498025c9b0d9b0ea271fb0ae02…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch newcontrol at gajim / gajim
Commits:
f77737b0 by wurstsalat at 2022-07-31T20:59:02+02:00
chore: Settings: Add type annotations for Contact settings
- - - - -
4587ceae by wurstsalat at 2022-07-31T21:27:51+02:00
chore: Settings: Use correct type for set_contact_settings
- - - - -
426cc3ee by wurstsalat at 2022-07-31T21:28:18+02:00
chore: ConversationView: Add type annotations
- - - - -
a4008f77 by Daniel Brötzmann at 2022-08-01T13:12:05+00:00
chore: Update DOAP file
- - - - -
8a7583ae by wurstsalat at 2022-08-02T21:34:06+02:00
fix: Preview: Make sure the widget is not being destroyed while updating
Fixes #10920
- - - - -
7508f8b7 by wurstsalat at 2022-08-03T14:30:48+02:00
fix: Preview: Store last_save_dir with Save As
- - - - -
5888a75e by lovetox at 2022-08-04T00:10:20+02:00
cs: Add type annotations
- - - - -
1841553a by lovetox at 2022-08-04T00:10:20+02:00
refactor: GroupchatState: Use contact state-changed signal
- - - - -
c563c2f6 by lovetox at 2022-08-04T00:10:20+02:00
refactor: Contacts: Add is_irc()
- - - - -
44b05ad2 by lovetox at 2022-08-04T00:10:20+02:00
feat: New control
- - - - -
44b21f26 by lovetox at 2022-08-04T00:10:20+02:00
refactor: Fix nick completion test
- - - - -
6e0c9be2 by lovetox at 2022-08-04T00:10:20+02:00
cs: Update pyrightconfig.json
- - - - -
118c7db4 by wurstsalat at 2022-08-04T00:10:20+02:00
fix: MessageActionBox: Show quick invite button for group chats only
- - - - -
3b5a02b8 by wurstsalat at 2022-08-04T00:10:20+02:00
Control/View: Cleanup scroll to end and unused methods
- - - - -
bf39c017 by wurstsalat at 2022-08-04T00:10:20+02:00
refactor: Controls: Handle more events in BaseControl
- - - - -
279a7f08 by wurstsalat at 2022-08-04T00:10:20+02:00
Controls: Cleanup UI files
- - - - -
85ecb206 by wurstsalat at 2022-08-04T00:10:20+02:00
refactor: Controls: Unify UI files
- - - - -
568022ed by wurstsalat at 2022-08-04T00:10:20+02:00
fix: BaseControl: Fix displaying received GcMessage events
- - - - -
019968b9 by wurstsalat at 2022-08-04T00:10:20+02:00
refactor: Control: Move drag and drop handling to ChatStack
- - - - -
80a431f0 by wurstsalat at 2022-08-04T00:10:20+02:00
refactor: Move getting copy modifiers into separate methods
- - - - -
b9995de5 by wurstsalat at 2022-08-04T00:10:20+02:00
fix: MessageRow: Accept CommonError for message errors
- - - - -
03ab560c by wurstsalat at 2022-08-04T00:10:20+02:00
refactor: BaseControl: Get room name directly for private chats
- - - - -
44b19a56 by lovetox at 2022-08-04T00:10:20+02:00
fix: Unregister signals when chatstack is cleared
- - - - -
a78b30a5 by wurstsalat at 2022-08-04T00:10:20+02:00
chore: Control: Remove obsolete overlay from UI file
- - - - -
07c2121d by wurstsalat at 2022-08-04T00:10:20+02:00
fix: GroupchatRoster: Hide revealer initially
- - - - -
7196d84f by wurstsalat at 2022-08-04T00:10:20+02:00
chore: MessageActionBox: Add asserts
- - - - -
df0491f8 by wurstsalat at 2022-08-04T00:10:20+02:00
chore: Main: Adapt _on_window_motion_notify
- - - - -
677d12e0 by lovetox at 2022-08-04T00:10:20+02:00
refactor: Update GroupchatState on creation
- - - - -
51d3b365 by lovetox at 2022-08-04T00:10:20+02:00
cs: Fix quotes
- - - - -
15c852c1 by lovetox at 2022-08-04T00:10:20+02:00
fix: Make Roster menu actions work again
- - - - -
cd1b5996 by lovetox at 2022-08-04T00:10:20+02:00
cs: fix pyright error
- - - - -
2d1e1795 by lovetox at 2022-08-04T00:10:20+02:00
refactor: Remove send-chatstate and send-marker actions
We have no widget who use these actions anymore
- - - - -
02f463ca by wurstsalat at 2022-08-04T00:10:20+02:00
imprv: MessageInputTextView: Improve draft storage
- - - - -
d6950498 by lovetox at 2022-08-04T00:10:20+02:00
fix: Fix encryption action and dialogs
- - - - -
19 changed files:
- data/gajim.doap
- gajim/command_system/implementation/middleware.py
- gajim/common/const.py
- gajim/common/events.py
- gajim/common/helpers.py
- gajim/common/modules/contacts.py
- gajim/common/modules/httpupload.py
- gajim/common/modules/muc.py
- gajim/common/preview.py
- gajim/common/setting_values.py
- gajim/common/settings.py
- gajim/common/storage/archive.py
- gajim/common/structs.py
- gajim/common/types.py
- + gajim/data/gui/chat_banner.ui
- gajim/data/gui/chat_control.ui
- gajim/data/gui/chat_paned.ui
- − gajim/data/gui/groupchat_control.ui
- gajim/data/gui/main.ui
The diff was not included because it is too large.
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/compare/81288b2dc0aabbb522d3085bf699671…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/compare/81288b2dc0aabbb522d3085bf699671…
You're receiving this email because of your account on dev.gajim.org.