From b928f75a6e40661f9e2dff482d738a536276764a Mon Sep 17 00:00:00 2001 From: Max Gaukler Date: Sun, 10 Feb 2019 15:47:44 +0100 Subject: Show helpful message if tutorials are not installed Fixes https://bugs.launchpad.net/ubuntu/+source/inkscape/+bug/1803021 (for 1.0-alpha) --- src/help.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/help.cpp') diff --git a/src/help.cpp b/src/help.cpp index a9f1fe9aa..3c76797c0 100644 --- a/src/help.cpp +++ b/src/help.cpp @@ -13,11 +13,14 @@ */ #include +#include #include "file.h" #include "help.h" +#include "io/sys.h" #include "path-prefix.h" #include "ui/dialog/aboutbox.h" +#include "ui/interface.h" void sp_help_about() { @@ -28,7 +31,13 @@ void sp_help_open_tutorial(GtkMenuItem *, void* data) { gchar const *name = static_cast(data); gchar *c = g_build_filename(INKSCAPE_TUTORIALSDIR, name, NULL); - sp_file_open(c, nullptr, false, false); + if (Inkscape::IO::file_test(c, G_FILE_TEST_EXISTS)) { + sp_file_open(c, nullptr, false, false); + } else { + sp_ui_error_dialog(_("The tutorial files are not installed.\nFor Linux, you may need to install " + "'inkscape-tutorials'; for Windows, please re-run the setup and select 'Tutorials'.\nThe " + "tutorials can also be found online at https://inkscape.org/learn/tutorials/")); + } g_free(c); } -- cgit v1.2.3