From 7d0ce1c2cfd9a7abba80ec8acac9dabf728ded3b Mon Sep 17 00:00:00 2001 From: Patrick Storz Date: Mon, 29 Jul 2019 21:35:57 +0200 Subject: Verbs: Disable SP_VERB_DIALOG_SPELLCHECK when compiling without Aspell Also avoids showing menu items that have no function. (see also https://gitlab.com/inkscape/inkscape/issues/354) --- src/verbs.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/verbs.cpp') diff --git a/src/verbs.cpp b/src/verbs.cpp index 2574ef784..065b7e10c 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -23,6 +23,10 @@ * Released under GNU GPL v2+, read the file 'COPYING' for more information. */ +#ifdef HAVE_CONFIG_H +# include "config.h" // only include where actually required! +#endif + #include #include @@ -2189,9 +2193,11 @@ void DialogVerb::perform(SPAction *action, void *data) case SP_VERB_DIALOG_FIND: dt->_dlg_mgr->showDialog("Find"); break; +#if HAVE_ASPELL case SP_VERB_DIALOG_SPELLCHECK: dt->_dlg_mgr->showDialog("SpellCheck"); break; +#endif case SP_VERB_DIALOG_DEBUG: dt->_dlg_mgr->showDialog("Messages"); break; @@ -3110,8 +3116,10 @@ Verb *Verb::_base_verbs[] = { N_("View and edit selections and CSS styles"), INKSCAPE_ICON("dialog-selectors")), new DialogVerb(SP_VERB_DIALOG_FIND, "DialogFind", N_("_Find/Replace..."), N_("Find objects in document"), INKSCAPE_ICON("edit-find")), +#if HAVE_ASPELL new DialogVerb(SP_VERB_DIALOG_SPELLCHECK, "DialogSpellcheck", N_("Check Spellin_g..."), N_("Check spelling of text in document"), INKSCAPE_ICON("tools-check-spelling")), +#endif new DialogVerb(SP_VERB_DIALOG_DEBUG, "DialogDebug", N_("_Messages..."), N_("View debug messages"), INKSCAPE_ICON("dialog-messages")), new DialogVerb(SP_VERB_DIALOG_TOGGLE, "DialogsToggle", N_("Show/Hide D_ialogs"), -- cgit v1.2.3