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

Commits:

1 changed file:

Changes:

  • gajim/roster_window.py
    ... ... @@ -2831,19 +2831,35 @@ class RosterWindow:
    2831 2831
                         app.config.set('confirm_block', 'yes')
    
    2832 2832
                 self.get_status_message('offline', on_continue, show_pep=False)
    
    2833 2833
     
    
    2834
    +        # Check if confirmation is needed for blocking
    
    2834 2835
             confirm_block = app.config.get('confirm_block')
    
    2835 2836
             if confirm_block == 'no':
    
    2836 2837
                 _block_it()
    
    2837 2838
                 return
    
    2839
    +
    
    2840
    +        # Set dialog's labels depending on if it is a group or a single contact
    
    2841
    +        if group is None:
    
    2842
    +            title = _('Block Contact')
    
    2843
    +            pritext = _('Really block this contact?')
    
    2844
    +            sectext = _('This contact will see you offline and you will not '
    
    2845
    +                        'receive any messages sent to you by this contact.')
    
    2846
    +            button_text = _('_Block Contact')
    
    2847
    +        else:
    
    2848
    +            title = _('Block Group')
    
    2849
    +            pritext = _('Really block this group?')
    
    2850
    +            sectext = _('All contacts of this group will see you as offline '
    
    2851
    +                        'and you will not receive any messages sent to you '
    
    2852
    +                        'by any one of these contacts.')
    
    2853
    +            button_text = _('_Block Group')
    
    2854
    +
    
    2838 2855
             NewConfirmationCheckDialog(
    
    2839
    -            _('Block Contact'),
    
    2840
    -            _('Really block this contact?'),
    
    2841
    -            _('This contact will see you offline and you will not receive '
    
    2842
    -              'any messages sent to you by this contact.'),
    
    2856
    +            title,
    
    2857
    +            pritext,
    
    2858
    +            sectext,
    
    2843 2859
                 _('_Do not ask me again'),
    
    2844 2860
                 [DialogButton.make('Cancel'),
    
    2845 2861
                  DialogButton.make('Remove',
    
    2846
    -                               text=_('_Block Contact'),
    
    2862
    +                               text=button_text,
    
    2847 2863
                                    callback=_block_it)],
    
    2848 2864
                 modal=False).show()
    
    2849 2865