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


Commits:
9b63a7b5 by wurstsalat at 2022-10-27T23:31:18+02:00
imprv: Preferences: Add send_on_ctrl_enter setting

Since this setting is opaque now, automatically setting it when changing
show_send_message_button should not be necessary anymore.

Fixes #11242

- - - - -


1 changed file:

- gajim/gtk/preferences.py


Changes:

=====================================
gajim/gtk/preferences.py
=====================================
@@ -277,8 +277,12 @@ def __init__(self, *args: Any) -> None:
             Setting(SettingKind.SWITCH,
                     _('Show Send Message Button'),
                     SettingType.CONFIG,
-                    'show_send_message_button',
-                    callback=self._on_show_send_message_button),
+                    'show_send_message_button'),
+
+            Setting(SettingKind.SWITCH,
+                    _('Send Messages with Control+Enter'),
+                    SettingType.CONFIG,
+                    'send_on_ctrl_enter'),
 
             Setting(SettingKind.SWITCH,
                     _('Spell Checking'),
@@ -300,12 +304,6 @@ def __init__(self, *args: Any) -> None:
     def _speller_available() -> bool:
         return app.is_installed('GSPELL')
 
-    @staticmethod
-    def _on_show_send_message_button(show_button: bool, *args: Any) -> None:
-        # Bind to send_on_ctrl_enter to make this setting user-friendly
-        # This way, users can press Enter to insert a new line, then click Send
-        app.settings.set('send_on_ctrl_enter', show_button)
-
 
 class Chats(PreferenceBox):
     def __init__(self, *args: Any) -> None:



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/9b63a7b5720b60f32956aa317fcd2cceabbaf5c4

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/9b63a7b5720b60f32956aa317fcd2cceabbaf5c4
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to