From 8fd531a3bc4ab3456f5ede60d8f8c4e1686a215e Mon Sep 17 00:00:00 2001 From: mrvladus Date: Fri, 10 May 2024 18:59:27 +0300 Subject: [PATCH] add info button to url entry --- errands/widgets/preferences.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/errands/widgets/preferences.py b/errands/widgets/preferences.py index 73921854..54ec3e2c 100644 --- a/errands/widgets/preferences.py +++ b/errands/widgets/preferences.py @@ -121,6 +121,26 @@ def _build_ui(self) -> None: title=_("Server URL"), ) GSettings.bind("sync-url", self.sync_url, "text") + self.sync_url.add_suffix( + Gtk.MenuButton( + valign=Gtk.Align.CENTER, + icon_name="errands-info-symbolic", + tooltip_text=_("Info"), + css_classes=["flat"], + popover=Gtk.Popover( + child=Gtk.Label( + label=_( + "URL needs to include protocol, like http:// or https://. If you have problems with connection - try to change protocol first." + ), + use_markup=True, + lines=5, + wrap_mode=0, + wrap=True, + max_width_chars=30, + ) + ), + ) + ) sync_group.add(self.sync_url) # Username self.sync_username = Adw.EntryRow(