Philipp Hörist pushed to branch master at gajim / gajim


Commits:
ff137107 by Philipp Hörist at 2026-04-12T14:42:51+02:00
other: Document optional `distro` dependency

- - - - -
1f7ad109 by Philipp Hörist at 2026-04-12T14:43:28+02:00
refactor: VCard4: Remove obsolete code

- - - - -


4 changed files:

- README.md
- gajim/common/modules/vcard4.py
- gajim/gtk/activity_page.py
- pyproject.toml


Changes:

=====================================
README.md
=====================================
@@ -50,6 +50,7 @@ ### Optional Runtime Requirements
 - [GUPnP-IGD](https://gitlab.gnome.org/GNOME/gupnp) for better NAT traversing
 - 
[NetworkManager](https://gitlab.freedesktop.org/NetworkManager/NetworkManager) 
for network lose detection
 - [GeoClue](https://gitlab.freedesktop.org/geoclue/geoclue) for sharing your 
location
+- [distro](https://pypi.org/project/distro/) to get accurate information about 
the used operating system (name, version)
 
 #### Rich Previews (Images and Voice Messages)
 


=====================================
gajim/common/modules/vcard4.py
=====================================
@@ -44,7 +44,6 @@ class VCard4(BaseModule):
     def __init__(self, con: types.Client) -> None:
         BaseModule.__init__(self, con)
         self._vcard_cache: dict[JID, tuple[dt.datetime, VCard]] = {}
-        self._ignore_timezone_change = False
         self._own_vcard: VCard = VCard()
         self._register_pubsub_handler(self._vcard_event_received)
 
@@ -81,9 +80,6 @@ def _check_for_timezone_change(self) -> None:
         if not app.settings.get_account_setting(self._account, 
"update_timezone"):
             return
 
-        if self._ignore_timezone_change:
-            return
-
         vcard_timezone = get_timezone_from_vcard(self._own_vcard)
         local_timezone = get_local_timezone()
         if local_timezone is None:
@@ -118,9 +114,6 @@ def update_timezone(self) -> None:
         self._log.info("Update timezone to: %s", local_timezone)
         self.set_vcard(self._own_vcard)
 
-    def ignore_timezone_change(self) -> None:
-        self._ignore_timezone_change = True
-
     def is_timezone_published(self) -> bool:
         return get_timezone_from_vcard(self._own_vcard) is not None
 


=====================================
gajim/gtk/activity_page.py
=====================================
@@ -411,7 +411,6 @@ def _on_update(self, _button: Gtk.Button) -> None:
         self.emit("request-remove")
 
     def _on_disable(self, _button: Gtk.Button) -> None:
-        self._client.get_module("VCard4").ignore_timezone_change()
         app.settings.set_account_setting(self._event.account, 
"update_timezone", False)
         self.emit("request-remove")
 


=====================================
pyproject.toml
=====================================
@@ -60,13 +60,14 @@ gajim = "gajim.main:run"
 
 [dependency-groups]
 dev = [
-  "pygobject>=3.56.1",
   "codespell==2.4.2",
   "cryptography@git+https://github.com/pyca/cryptography.git";,
+  "distro",
   "nbxmpp@git+https://dev.gajim.org/gajim/python-nbxmpp.git";,
   "omemo-dr@git+https://dev.gajim.org/gajim/omemo-dr.git";,
   "pre-commit",
   "pygobject-stubs==2.17.0",
+  "pygobject>=3.56.1",
   "pytest>=9.0.2",
   "python-gitlab",
   "ruamel.yaml",



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/compare/b1f2d0e4f9d5cfd36cbbcf3e7abe3e60a962d3d0...1f7ad109acbead6c8c7ddb8c7da1370e7fa26ae8

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/compare/b1f2d0e4f9d5cfd36cbbcf3e7abe3e60a962d3d0...1f7ad109acbead6c8c7ddb8c7da1370e7fa26ae8
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to