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


Commits:
24520a68 by wurstsalat at 2024-07-17T21:19:02+02:00
imprv: ChatCommands: Improve styling and add hint for double slash usage

- - - - -


3 changed files:

- gajim/common/commands.py
- gajim/data/style/gajim.css
- gajim/gtk/chat_stack.py


Changes:

=====================================
gajim/common/commands.py
=====================================
@@ -135,8 +135,10 @@ def parse(self, type_: str, arg_string: str) -> bool:
         command_name = arg_list[0]
         command = self._commands.get(command_name)
         if command is None or type_ not in command[0]:
+            unknown_command = _('Unknown command: %s') % command_name
+            hint = _('Use "//" to start a message with a slash "/".')
             self.notify('command-not-found',
-                        _('Unknown command: %s') % command_name)
+                        f'{unknown_command}\n{hint}')
             raise CommandFailed
 
         try:


=====================================
gajim/data/style/gajim.css
=====================================
@@ -601,7 +601,8 @@ .conversation-date-row {
 }
 
 /* CommandRow */
-.conversation-command-row label {
+.conversation-command-row .gajim-command-error,
+.conversation-command-row .gajim-command-output {
     font-weight: 600;
     border-radius: 6px;
     padding: 12px;


=====================================
gajim/gtk/chat_stack.py
=====================================
@@ -877,7 +877,7 @@ def clear(self) -> None:
         self._chat_control.clear()
 
     def _on_command_signal(self,
-                           chat_commands: ChatCommands,
+                           _chat_commands: ChatCommands,
                            signal_name: str,
                            text: str
                            ) -> None:



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/24520a68ce8443c216925dcbd600146e847df04c

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/24520a68ce8443c216925dcbd600146e847df04c
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