From 8840e87d38b6d731ea1b02816fe9f3532fbc146b Mon Sep 17 00:00:00 2001 From: Nicolas Dufour Date: Mon, 28 Apr 2014 18:04:16 +0200 Subject: Extensions. Fix for Bug #1307554 (Don't show the Export > win32 vector print extension on Platforms that don't support it). Fixed bugs: - https://launchpad.net/bugs/1307554 (bzr r13316) --- src/extension/extension.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/extension/extension.cpp') diff --git a/src/extension/extension.cpp b/src/extension/extension.cpp index d63ec7485..588efb521 100644 --- a/src/extension/extension.cpp +++ b/src/extension/extension.cpp @@ -262,6 +262,18 @@ Extension::check (void) const char * inx_failure = _(" This is caused by an improper .inx file for this extension." " An improper .inx file could have been caused by a faulty installation of Inkscape."); + + // No need to include Windows only extensions + // See LP bug #1307554 for details - https://bugs.launchpad.net/inkscape/+bug/1307554 +#ifndef WIN32 + const char* win_ext[] = {"com.vaxxine.print.win32"}; + std::vector v (win_ext, win_ext + sizeof(win_ext)/sizeof(win_ext[0])); + std::string ext_id(id); + if (std::find(v.begin(), v.end(), ext_id) != v.end()) { + printFailure(Glib::ustring(_("the extension is designed for Windows only.")) + inx_failure); + retval = false; + } +#endif if (id == NULL) { printFailure(Glib::ustring(_("an ID was not defined for it.")) + inx_failure); retval = false; -- cgit v1.2.3