Philipp Hörist pushed to branch master at gajim / python-nbxmpp
Commits:
e0ceb1d8 by Philipp Hörist at 2022-10-26T21:30:55+02:00
fix: MUC: Check correctly for muc subject
The subject can be an empty string
- - - - -
1 changed file:
- nbxmpp/modules/muc/muc.py
Changes:
=====================================
nbxmpp/modules/muc/muc.py
=====================================
@@ -228,7 +228,7 @@ class MUC(BaseModule):
properties.muc_ofrom = JID.from_string(address.getAttr('jid'))
def _process_message_after_decryption(self, _client, _stanza, properties):
- if properties.body is None and properties.subject:
+ if properties.body is None and properties.subject is not None:
properties.muc_subject = MucSubject(
text=properties.subject,
author=properties.muc_nickname,
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/-/commit/e0ceb1d8ac6085666740a6dd…
--
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/-/commit/e0ceb1d8ac6085666740a6dd…
You're receiving this email because of your account on dev.gajim.org.
Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
6786feb7 by Daniel Brötzmann at 2022-10-26T11:59:03+00:00
fix: PluginsWindow: Fix typo in plugin tooltip
- - - - -
1 changed file:
- gajim/gtk/plugins.py
Changes:
=====================================
gajim/gtk/plugins.py
=====================================
@@ -152,7 +152,7 @@ def _on_query_tooltip(self,
return True
if row[Column.RESTART]:
- tooltip.set_text(_('Restart Gajim for changes to take affect'))
+ tooltip.set_text(_('Restart Gajim for changes to take effect'))
return True
if row[Column.HAS_ERROR]:
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/6786feb77189d384eeac159e63b33522…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/6786feb77189d384eeac159e63b33522…
You're receiving this email because of your account on dev.gajim.org.
Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
3148bb80 by wurstsalat at 2022-10-25T23:52:32+02:00
fix: PluginManager: Block plugins which have been integrated into Gajim
Fixes #11244
- - - - -
1 changed file:
- gajim/plugins/pluginmanager.py
Changes:
=====================================
gajim/plugins/pluginmanager.py
=====================================
@@ -52,7 +52,12 @@
log = logging.getLogger('gajim.p.manager')
-BLOCKED_PLUGINS = []
+BLOCKED_PLUGINS = [
+ 'appindicator_integration',
+ 'plugin_installer',
+ 'syntax_highlight',
+ 'url_image_preview'
+]
FIELDS = ('name',
'short_name',
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/3148bb8049453b36cb5628feab2ec428…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/3148bb8049453b36cb5628feab2ec428…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
8cd29729 by Philipp Hörist at 2022-10-25T22:37:55+02:00
imprv: StartChat: Recognize input of xmpp uris
- - - - -
1 changed file:
- gajim/gtk/start_chat.py
Changes:
=====================================
gajim/gtk/start_chat.py
=====================================
@@ -549,6 +549,12 @@ def _on_search_changed(self, search_entry: Gtk.SearchEntry) -> None:
return
search_text = search_entry.get_text()
+ if search_text.startswith('xmpp:'):
+ search_text = search_text.removeprefix('xmpp:')
+ search_text = search_text.removesuffix('?join')
+ search_entry.set_text(search_text)
+ return
+
if '@' in search_text:
try:
validate_jid(search_text)
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/8cd2972934d8af3cd65061cddf0012b1…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/8cd2972934d8af3cd65061cddf0012b1…
You're receiving this email because of your account on dev.gajim.org.
Philipp Hörist pushed to branch master at gajim / gajim
Commits:
920f55b8 by Philipp Hörist at 2022-10-24T23:54:12+02:00
new: Add global draft storage
- - - - -
4 changed files:
- gajim/common/app.py
- gajim/common/application.py
- + gajim/common/storage/draft.py
- gajim/gtk/message_input.py
Changes:
=====================================
gajim/common/app.py
=====================================
@@ -60,6 +60,7 @@
from gajim.common.storage.cache import CacheStorage
from gajim.common.storage.archive import MessageArchiveStorage
from gajim.common.storage.events import EventStorage
+ from gajim.common.storage.draft import DraftStorage
from gajim.common.cert_store import CertificateStore
from gajim.common.call_manager import CallManager
from gajim.common.preview import PreviewManager
@@ -90,6 +91,7 @@ def __init__(self):
self.cache: CacheStorage = None
self.archive: MessageArchiveStorage = None
self.events: EventStorage = None
+ self.drafts: DraftStorage = None
storage = Storage()
=====================================
gajim/common/application.py
=====================================
@@ -55,6 +55,7 @@
from gajim.common.settings import LegacyConfig
from gajim.common.cert_store import CertificateStore
from gajim.common.storage.cache import CacheStorage
+from gajim.common.storage.draft import DraftStorage
from gajim.common.storage.archive import MessageArchiveStorage
@@ -86,6 +87,8 @@ def _init_core(self) -> None:
app.storage.archive = MessageArchiveStorage()
app.storage.archive.init()
+ app.storage.drafts = DraftStorage()
+
app.cert_store = CertificateStore()
app.task_manager = TaskManager()
=====================================
gajim/common/storage/draft.py
=====================================
@@ -0,0 +1,42 @@
+# This file is part of Gajim.
+#
+# Gajim is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published
+# by the Free Software Foundation; version 3 only.
+#
+# Gajim is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Gajim. If not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import annotations
+
+from typing import Optional
+
+from gajim.common import types
+from gajim.common.helpers import Observable
+
+
+class DraftStorage(Observable):
+ def __init__(self) -> None:
+ Observable.__init__(self)
+
+ self._drafts: dict[types.ChatContactT, str] = {}
+
+ def set(self, contact: types.ChatContactT, text: str) -> None:
+ if not text:
+ self.remove(contact)
+ return
+
+ self._drafts[contact] = text
+ self.notify('draft-update', contact, text)
+
+ def get(self, contact: types.ChatContactT) -> Optional[str]:
+ return self._drafts.get(contact)
+
+ def remove(self, contact: types.ChatContactT) -> None:
+ self._drafts.pop(contact, None)
+ self.notify('draft-update', contact, None)
=====================================
gajim/gtk/message_input.py
=====================================
@@ -30,8 +30,6 @@
from gi.repository import GLib
from gi.repository import Pango
-from nbxmpp.protocol import JID
-
from gajim.common import app
from gajim.common.i18n import LANG
from gajim.common.i18n import _
@@ -78,7 +76,6 @@ def __init__(self) -> None:
self.undo_pressed: bool = False
self._contact: Optional[ChatContactT] = None
- self._drafts: dict[tuple[str, JID], str] = {}
self._chat_action_processor = ChatActionProcessor(self)
@@ -156,15 +153,10 @@ def _on_language_changed(self,
def switch_contact(self, contact: ChatContactT) -> None:
if self._contact is not None:
- account = self._contact.account
- jid = self._contact.jid
- if self.has_text:
- self._drafts[(account, jid)] = self.get_text()
- else:
- self._drafts.pop((account, jid), None)
+ app.storage.drafts.set(self._contact, self.get_text())
self.clear()
- draft = self._drafts.get((contact.account, contact.jid))
+ draft = app.storage.drafts.get(contact)
if draft is not None:
self.insert_text(draft)
@@ -266,9 +258,6 @@ def get_text(self) -> str:
text = self.get_buffer().get_text(start, end, True)
return text
- def get_draft(self, account: str, jid: JID) -> Optional[str]:
- return self._drafts.get((account, jid))
-
def _on_toggle_spell_check(self, *args: Any) -> None:
if not app.is_installed('GSPELL'):
return
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/920f55b8946b8973540aec715f97f8e6…
--
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/920f55b8946b8973540aec715f97f8e6…
You're receiving this email because of your account on dev.gajim.org.