summaryrefslogtreecommitdiffstats
path: root/src/help.cpp
diff options
context:
space:
mode:
authorMax Gaukler <development@maxgaukler.de>2019-02-10 14:47:44 +0000
committerPatrick Storz <eduard.braun2@gmx.de>2019-02-16 21:12:41 +0000
commitb928f75a6e40661f9e2dff482d738a536276764a (patch)
tree3b611ae3dcce939a6bfbd79ec100edc1fa08e435 /src/help.cpp
parentRevert to "default.$lang.svg" as name for default templates (diff)
downloadinkscape-b928f75a6e40661f9e2dff482d738a536276764a.tar.gz
inkscape-b928f75a6e40661f9e2dff482d738a536276764a.zip
Show helpful message if tutorials are not installed
Fixes https://bugs.launchpad.net/ubuntu/+source/inkscape/+bug/1803021 (for 1.0-alpha)
Diffstat (limited to 'src/help.cpp')
-rw-r--r--src/help.cpp11
1 files changed, 10 insertions, 1 deletions
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 <glibmm.h>
+#include <glibmm/i18n.h>
#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<gchar const *>(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);
}