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

Commits:

2 changed files:

Changes:

  • gajim/gtk/const.py
    ... ... @@ -22,7 +22,7 @@ from enum import unique
    22 22
     Filter = namedtuple('Filter', 'name pattern default')
    
    23 23
     
    
    24 24
     Setting = namedtuple('Setting', 'kind label type value name callback data desc '
    
    25
    -                                'bind inverted enabled_func props')
    
    25
    +                                'bind inverted enabled_func context props')
    
    26 26
     Setting.__new__.__defaults__ = (None,) * len(Setting._fields)  # type: ignore
    
    27 27
     
    
    28 28
     @unique
    

  • gajim/gtk/settings.py
    ... ... @@ -73,12 +73,11 @@ class SettingsDialog(Gtk.ApplicationWindow):
    73 73
     
    
    74 74
     
    
    75 75
     class SettingsBox(Gtk.ListBox):
    
    76
    -    def __init__(self, account=None, jid=None, context=None, extend=None):
    
    76
    +    def __init__(self, account=None, jid=None, extend=None):
    
    77 77
             Gtk.ListBox.__init__(self)
    
    78 78
             self.get_style_context().add_class('settings-box')
    
    79 79
             self.account = account
    
    80 80
             self.jid = jid
    
    81
    -        self.context = context
    
    82 81
             self.named_settings = {}
    
    83 82
     
    
    84 83
             self.map = {
    
    ... ... @@ -116,13 +115,11 @@ class SettingsBox(Gtk.ListBox):
    116 115
                 if setting.props is not None:
    
    117 116
                     listitem = self.map[setting.kind](self.account,
    
    118 117
                                                       self.jid,
    
    119
    -                                                  self.context,
    
    120 118
                                                       *setting[1:-1],
    
    121 119
                                                       **setting.props)
    
    122 120
                 else:
    
    123 121
                     listitem = self.map[setting.kind](self.account,
    
    124 122
                                                       self.jid,
    
    125
    -                                                  self.context,
    
    126 123
                                                       *setting[1:-1])
    
    127 124
     
    
    128 125
             if setting.name is not None:
    
    ... ... @@ -141,7 +138,6 @@ class GenericSetting(Gtk.ListBoxRow):
    141 138
         def __init__(self,
    
    142 139
                      account,
    
    143 140
                      jid,
    
    144
    -                 context,
    
    145 141
                      label,
    
    146 142
                      type_,
    
    147 143
                      value,
    
    ... ... @@ -151,7 +147,9 @@ class GenericSetting(Gtk.ListBoxRow):
    151 147
                      desc,
    
    152 148
                      bind,
    
    153 149
                      inverted,
    
    154
    -                 enabled_func):
    
    150
    +                 enabled_func,
    
    151
    +                 context):
    
    152
    +
    
    155 153
             Gtk.ListBoxRow.__init__(self)
    
    156 154
             self._grid = Gtk.Grid()
    
    157 155
             self._grid.set_size_request(-1, 30)