Daniel Brötzmann pushed to branch contactpopover at gajim / gajim
Commits:
f4e5ac47 by wurstsalat at 2025-08-31T11:18:04+02:00
add link handler; align icons
- - - - -
2 changed files:
- gajim/data/gui/contact_popover_info_row.ui
- gajim/gtk/contact_popover.py
Changes:
=====================================
gajim/data/gui/contact_popover_info_row.ui
=====================================
@@ -16,9 +16,11 @@
<child>
<object class="GtkLabel" id="_label">
<property name="halign">start</property>
+ <property name="valign">center</property>
<property name="ellipsize">end</property>
<property name="single-line-mode">1</property>
<property name="max-width-chars">30</property>
+ <signal name="activate-link" handler="_on_activate_link"/>
</object>
</child>
</object>
=====================================
gajim/gtk/contact_popover.py
=====================================
@@ -4,6 +4,8 @@
from __future__ import annotations
+from typing import Any
+
import datetime as dt
from zoneinfo import ZoneInfo
@@ -25,6 +27,7 @@
from gajim.common.iana import get_zone_data
from gajim.common.modules.contacts import BareContact
from gajim.common.util.status import get_uf_show
+from gajim.common.util.uri import open_uri
from gajim.gtk.avatar import get_show_circle
from gajim.gtk.structs import AccountJidParam
@@ -228,3 +231,8 @@ def set_label(self, text: str, link_scheme: str | None =
None) -> None:
if len(text) > 30:
self._label.set_tooltip_text(text)
+
+ @Gtk.Template.Callback()
+ def _on_activate_link(self, label: Gtk.Label, *args: Any) -> int:
+ open_uri(label.get_current_uri() or label.get_text())
+ return Gdk.EVENT_STOP
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/f4e5ac47b84d3b2d07c184b3f9230a1c06fce872
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/f4e5ac47b84d3b2d07c184b3f9230a1c06fce872
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]