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


Commits:
923573b2 by Philipp Hörist at 2026-01-04T22:56:17+01:00
cq: Fix typo in gajim-macos-helper.sh

- - - - -
e8264464 by Philipp Hörist at 2026-01-04T22:56:25+01:00
fix: AdHoc: Fix label wrapping of notes in rare cases

Label wrapping in GtkGrids seems very broken at the moment. It would request a 
huge size. Use a GtkBox instead.

- - - - -


2 changed files:

- gajim/gtk/adhoc.py
- mac/gajim-macos-helper.sh


Changes:

=====================================
gajim/gtk/adhoc.py
=====================================
@@ -39,7 +39,6 @@
 from gajim.gtk.dataform import DataFormWidget
 from gajim.gtk.util.misc import container_remove_all
 from gajim.gtk.util.misc import ensure_not_destroyed
-from gajim.gtk.widgets import MultiLineLabel
 
 log = logging.getLogger("gajim.gtk.adhoc")
 
@@ -395,16 +394,8 @@ def __init__(self) -> None:
         self._icon_text.append(self._label)
         self.append(self._icon_text)
 
-        self._notes = Gtk.Grid(row_spacing=6, column_spacing=12)
-        self._notes.insert_column(0)
-        self._notes.insert_column(1)
-        self._notes.set_vexpand(False)
-        self._notes.set_hexpand(True)
-        notes_box = Gtk.Box()
-        notes_box.set_halign(Gtk.Align.CENTER)
-        notes_box.set_vexpand(False)
-        notes_box.append(self._notes)
-        self.append(notes_box)
+        self._notes = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=6)
+        self.append(self._notes)
 
     def process_stage(self, stage_data: AdHocCommand) -> None:
         self._reset_severity()
@@ -449,18 +440,23 @@ def _show_notes(self, notes: list[AdHocCommandNote] | 
None) -> None:
         if notes is None:
             return
 
-        for i, note in enumerate(notes):
+        for note in notes:
+            box = Gtk.Box(margin_start=24, spacing=24)
             if len(notes) > 1:
-                icon = SeverityIcon(note.type)
-                icon.set_visible(True)
-                self._notes.attach(icon, 0, i, 1, 1)
+                box.append(SeverityIcon(note.type))
+            else:
+                box.set_halign(Gtk.Align.CENTER)
 
-            label = MultiLineLabel(label=process_non_spacing_marks(note.text))
-            label.set_justify(Gtk.Justification.CENTER)
-            label.set_vexpand(False)
-            label.set_visible(True)
-            self._notes.attach(label, 1, i, 1, 1)
+            label = Gtk.Label(
+                label=process_non_spacing_marks(note.text),
+                natural_wrap_mode=Gtk.NaturalWrapMode.WORD,
+                selectable=True,
+                wrap=True,
+                wrap_mode=Pango.WrapMode.WORD_CHAR,
+            )
+            box.append(label)
 
+            self._notes.append(box)
             self._bump_severity(note.type)
 
     def _show_icon(self, show: bool):


=====================================
mac/gajim-macos-helper.sh
=====================================
@@ -245,8 +245,8 @@ function usage()
                start                   Start Gajim
                clean                   Delete omemo-dr, nbxmpp and Gajim 
virtual environments
 
-               build ci [version]      Build omemo-dr, nbxmpp and Gajim system 
side in CI (optionnal: with a specific version of Gajim)
-               create-dmg ci [version] Create Gajim dmg installer system side 
in CI (optionnal: with a specific version of Gajim)
+               build ci [version]      Build omemo-dr, nbxmpp and Gajim system 
side in CI (optional: with a specific version of Gajim)
+               create-dmg ci [version] Create Gajim dmg installer system side 
in CI (optional: with a specific version of Gajim)
        EOS
 }
 



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/compare/19cd2cfa7177ec2ca9b83f1ec92ae055c656e6bd...e8264464a47af4e28f80de88ca872acf95e46b5e

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/compare/19cd2cfa7177ec2ca9b83f1ec92ae055c656e6bd...e8264464a47af4e28f80de88ca872acf95e46b5e
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