Daniel Brötzmann pushed to branch gtk4 at gajim / gajim


Commits:
81dc5ad3 by wurstsalat at 2024-10-31T11:01:09+01:00
cfix: CommandsCompletion: Ignore double slash

- - - - -
229e212a by wurstsalat at 2024-10-31T11:03:59+01:00
refactor: Adapt icon size for CommandRow and EncryptionInfoRow

- - - - -


3 changed files:

- gajim/gtk/completion/commands.py
- gajim/gtk/conversation/rows/command_output.py
- gajim/gtk/conversation/rows/encryption_info.py


Changes:

=====================================
gajim/gtk/completion/commands.py
=====================================
@@ -102,8 +102,12 @@ def get_model(self) -> tuple[Gio.ListModel, 
Type[CommandsCompletionViewItem]]:
         return self._model, CommandsCompletionViewItem
 
     def check(self, candidate: str, start_iter: Gtk.TextIter) -> bool:
-        if not candidate.startswith(self.trigger_char):
+        if not candidate.startswith(self.trigger_char) or candidate.startswith(
+            self.trigger_char, 1, 2
+        ):
+            # Check for '/' at the beginning, but ignore '//'
             return False
+
         return start_iter.get_offset() == 0
 
     def populate(self, candidate: str, contact: Any) -> bool:


=====================================
gajim/gtk/conversation/rows/command_output.py
=====================================
@@ -27,7 +27,8 @@ def __init__(self, account: str, text: str, is_error: bool) 
-> None:
         avatar_placeholder = Gtk.Box()
         avatar_placeholder.set_size_request(AvatarSize.ROSTER, -1)
         icon = Gtk.Image.new_from_icon_name('utilities-terminal-symbolic')
-        icon.get_style_context().add_class('dim-label')
+        icon.set_pixel_size(32)
+        icon.add_css_class('dim-label')
         avatar_placeholder.append(icon)
         self.grid.attach(avatar_placeholder, 0, 0, 1, 1)
 


=====================================
gajim/gtk/conversation/rows/encryption_info.py
=====================================
@@ -30,7 +30,8 @@ def __init__(self, event: EncryptionInfo) -> None:
         avatar_placeholder.set_size_request(AvatarSize.ROSTER, -1)
 
         icon = Gtk.Image.new_from_icon_name('channel-secure-symbolic')
-        icon.get_style_context().add_class('dim-label')
+        icon.set_pixel_size(AvatarSize.ROSTER)
+        icon.add_css_class('dim-label')
         avatar_placeholder.append(icon)
         self.grid.attach(avatar_placeholder, 0, 0, 1, 1)
 



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/compare/972d318eb24197960eb7bc0016bd04bb991ed285...229e212a04ff92efbc592a3520fb2ddfc2d87554

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/compare/972d318eb24197960eb7bc0016bd04bb991ed285...229e212a04ff92efbc592a3520fb2ddfc2d87554
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