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

Commits:

2 changed files:

Changes:

  • gajim/options_dialog.py
    ... ... @@ -35,6 +35,11 @@ class OptionsDialog(Gtk.ApplicationWindow):
    35 35
     
    
    36 36
             self.show_all()
    
    37 37
             self.listbox.connect('row-activated', self.on_row_activated)
    
    38
    +        self.connect('key-press-event', self.on_key_press)
    
    39
    +
    
    40
    +    def on_key_press(self, widget, event):
    
    41
    +        if event.keyval == Gdk.KEY_Escape:
    
    42
    +            self.destroy()
    
    38 43
     
    
    39 44
         @staticmethod
    
    40 45
         def on_row_activated(listbox, row):
    

  • gajim/plugins/gui.py
    ... ... @@ -135,9 +135,6 @@ class PluginsWindow(object):
    135 135
             model, iter = treeview_selection.get_selected()
    
    136 136
             if iter:
    
    137 137
                 plugin = model.get_value(iter, Column.PLUGIN)
    
    138
    -            plugin_name = model.get_value(iter, Column.NAME)
    
    139
    -            is_active = model.get_value(iter, Column.ACTIVE)
    
    140
    -
    
    141 138
                 self._display_installed_plugin_info(plugin)
    
    142 139
             else:
    
    143 140
                 self._clear_installed_plugin_info()
    
    ... ... @@ -236,11 +233,11 @@ class PluginsWindow(object):
    236 233
             model, iter = selection.get_selected()
    
    237 234
             if iter:
    
    238 235
                 plugin = model.get_value(iter, Column.PLUGIN)
    
    239
    -            plugin_name = model.get_value(iter, Column.NAME)
    
    240
    -            is_active = model.get_value(iter, Column.ACTIVE)
    
    241
    -
    
    242 236
     
    
    243
    -            result = plugin.config_dialog.run(self.window)
    
    237
    +            if isinstance(plugin.config_dialog, GajimPluginConfigDialog):
    
    238
    +                plugin.config_dialog.run(self.window)
    
    239
    +            else:
    
    240
    +                plugin.config_dialog(self.window)
    
    244 241
     
    
    245 242
             else:
    
    246 243
                 # No plugin selected. this should never be reached. As configure
    
    ... ... @@ -254,8 +251,6 @@ class PluginsWindow(object):
    254 251
             model, iter = selection.get_selected()
    
    255 252
             if iter:
    
    256 253
                 plugin = model.get_value(iter, Column.PLUGIN)
    
    257
    -            plugin_name = model.get_value(iter, Column.NAME)
    
    258
    -            is_active = model.get_value(iter, Column.ACTIVE)
    
    259 254
                 try:
    
    260 255
                     app.plugin_manager.remove_plugin(plugin)
    
    261 256
                 except PluginsystemError as e: