From dccbc65fc98e3227ebb5e03f90bdeb7e5ca1ade2 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 17 Jan 2011 21:50:00 -0700 Subject: [PATCH] ... --- src/calibre/gui2/preferences/plugins.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/calibre/gui2/preferences/plugins.py b/src/calibre/gui2/preferences/plugins.py index c53c634ab4..b00a485566 100644 --- a/src/calibre/gui2/preferences/plugins.py +++ b/src/calibre/gui2/preferences/plugins.py @@ -196,6 +196,12 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form): def modify_plugin(self, op=''): index = self.plugin_view.currentIndex() if index.isValid(): + if not index.parent().isValid(): + name = unicode(index.data().toString()) + return error_dialog(self, _('Error'), '

'+ + _('Select an actual plugin under %s to customize')%name, + show=True, show_copy_button=False) + plugin = self._plugin_model.index_to_plugin(index) if op == 'toggle': if not plugin.can_be_disabled: