From 5c3063637d71802a43d52add816a9db133c37d02 Mon Sep 17 00:00:00 2001 From: Patrick Storz Date: Tue, 15 Oct 2019 23:55:27 +0200 Subject: Extensions: Disable effects that failed to load Instead of removing them from the menu, they're now shown as inactive (greyed out), so users have a chance to know they even exists, without having to know about extension-errors.log Unfortunately tooltips seem to be hidden for insensitive menuitems as well, so we currently have no way of informing the user directly in the UI about the problem. Fixes https://gitlab.com/inkscape/inkscape/issues/470 --- src/extension/effect.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/extension/effect.cpp') diff --git a/src/extension/effect.cpp b/src/extension/effect.cpp index 1a84e3df1..a380c9710 100644 --- a/src/extension/effect.cpp +++ b/src/extension/effect.cpp @@ -224,11 +224,8 @@ bool Effect::check () { if (!Extension::check()) { - /** \todo Check to see if parent has this as its only child, - if so, delete it too */ - if (_menu_node != nullptr) - sp_repr_unparent(_menu_node); - _menu_node = nullptr; + _verb.sensitive(nullptr, false); + _verb.set_tip(Extension::getErrorReason().c_str()); // TODO: insensitive menuitems don't show a tooltip return false; } return true; -- cgit v1.2.3