Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwurstsalat <mailtrash@posteo.de>2022-08-14 18:44:47 +0300
committerPhilipp Hörist <philipp@hoerist.com>2022-08-16 00:13:53 +0300
commit02cf35e7bc163b6b3fc63bced2ea8dc0d1737fb7 (patch)
tree24b4da6d849051994d6a5831874ca288817fc8a7
parentc9fda87faa2b7a34b0717bc46b8bda02d7e6b7d1 (diff)
refactor: Replace chat control plugin extension points
-rw-r--r--gajim/gtk/chat_stack.py3
-rw-r--r--gajim/gtk/message_actions_box.py3
-rw-r--r--gajim/gtk/message_input.py2
3 files changed, 8 insertions, 0 deletions
diff --git a/gajim/gtk/chat_stack.py b/gajim/gtk/chat_stack.py
index 3c1476877..f33f8d6aa 100644
--- a/gajim/gtk/chat_stack.py
+++ b/gajim/gtk/chat_stack.py
@@ -229,6 +229,9 @@ class ChatStack(Gtk.Stack, EventHelper):
self.set_transition_type(Gtk.StackTransitionType.NONE)
self.set_visible_child_name('controls')
+ app.plugin_manager.extension_point(
+ 'switch_contact', self._current_contact)
+
if old_primary_clipboard is not None:
GLib.idle_add(clipboard.set_text, # pyright: ignore
old_primary_clipboard,
diff --git a/gajim/gtk/message_actions_box.py b/gajim/gtk/message_actions_box.py
index 01068aa6d..6d9e71fcf 100644
--- a/gajim/gtk/message_actions_box.py
+++ b/gajim/gtk/message_actions_box.py
@@ -135,6 +135,9 @@ class MessageActionsBox(Gtk.Grid, ged.EventHelper):
('message-sent', ged.GUI2, self._on_message_sent)
])
+ app.plugin_manager.gui_extension_point(
+ 'message_actions_box', self, self._ui.box)
+
def get_current_contact(self) -> ChatContactT:
assert self._contact is not None
return self._contact
diff --git a/gajim/gtk/message_input.py b/gajim/gtk/message_input.py
index 5aff862c1..f77ef632f 100644
--- a/gajim/gtk/message_input.py
+++ b/gajim/gtk/message_input.py
@@ -93,6 +93,8 @@ class MessageInputTextView(Gtk.TextView):
self.connect('destroy', self._on_destroy)
self.connect('populate-popup', self._on_populate_popup)
+ app.plugin_manager.gui_extension_point('message_input', self)
+
def switch_contact(self, contact: ChatContactT) -> None:
if self._contact is not None:
account = self._contact.account