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

Commits:

1 changed file:

Changes:

  • gajim/gtk/preferences.py
    ... ... @@ -270,7 +270,8 @@ def __init__(self, *args: Any) -> None:
    270 270
                 Setting(SettingKind.SWITCH,
    
    271 271
                         _('Show Send Message Button'),
    
    272 272
                         SettingType.CONFIG,
    
    273
    -                    'show_send_message_button'),
    
    273
    +                    'show_send_message_button',
    
    274
    +                    callback=self._on_show_send_message_button),
    
    274 275
     
    
    275 276
                 Setting(SettingKind.SWITCH,
    
    276 277
                         _('Show Status Changes'),
    
    ... ... @@ -307,6 +308,12 @@ def _on_use_speller(value: bool, *args: Any) -> None:
    307 308
             for ctrl in app.window.get_controls():
    
    308 309
                 ctrl.set_speller()
    
    309 310
     
    
    311
    +    @staticmethod
    
    312
    +    def _on_show_send_message_button(show_button: bool, *args: Any) -> None:
    
    313
    +        # Bind to send_on_ctrl_enter to make this setting user-friendly
    
    314
    +        # This way, users can press Enter to insert a new line, then click Send
    
    315
    +        app.settings.set('send_on_ctrl_enter', show_button)
    
    316
    +
    
    310 317
     
    
    311 318
     class GroupChats(PreferenceBox):
    
    312 319
         def __init__(self, *args: Any) -> None: