From: buliabyak Date: Fri, 30 Mar 2007 07:08:29 +0000 (+0000) Subject: allow easy access to our examples folder from Open dialog X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=636ed5d539723cc233fe274e320c36d00a430431;p=inkscape.git allow easy access to our examples folder from Open dialog --- diff --git a/src/file.cpp b/src/file.cpp index 639ba3913..efbada332 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -388,8 +388,11 @@ sp_file_open_dialog(gpointer object, gpointer data) open_path, Inkscape::UI::Dialog::SVG_TYPES, (char const *)_("Select file to open")); + // allow easy access to our examples folder + dynamic_cast(openDialogInstance)->add_shortcut_folder(INKSCAPE_EXAMPLESDIR); } + //# Show the dialog bool const success = openDialogInstance->show(); if (!success) diff --git a/src/path-prefix.h b/src/path-prefix.h index 50895ef7b..ad7a14ef9 100644 --- a/src/path-prefix.h +++ b/src/path-prefix.h @@ -22,6 +22,7 @@ extern "C" { #ifdef ENABLE_BINRELOC # define INKSCAPE_APPICONDIR BR_DATADIR( "/pixmaps" ) +# define INKSCAPE_EXAMPLESDIR BR_DATADIR( "/inkscape/examples" ) # define INKSCAPE_EXTENSIONDIR BR_DATADIR( "/inkscape/extensions" ) # define INKSCAPE_GRADIENTSDIR BR_DATADIR( "/inkscape/gradients" ) # define INKSCAPE_KEYSDIR BR_DATADIR( "/inkscape/keys" ) @@ -41,6 +42,7 @@ extern "C" { #else # ifdef WIN32 # define INKSCAPE_APPICONDIR "pixmaps" +# define INKSCAPE_EXAMPLESDIR "share\\examples" # define INKSCAPE_EXTENSIONDIR "share\\extensions" # define INKSCAPE_GRADIENTSDIR "share\\gradients" # define INKSCAPE_KEYSDIR "share\\keys" @@ -59,6 +61,7 @@ extern "C" { # define CREATE_PATTERNSDIR INKSCAPE_DATADIR "create\\patterns\\vector" # elif defined ENABLE_OSX_APP_LOCATIONS # define INKSCAPE_APPICONDIR "Contents/Resources/pixmaps" +# define INKSCAPE_EXAMPLESDIR "Contents/Resources/examples" # define INKSCAPE_EXTENSIONDIR "Contents/Resources/extensions" # define INKSCAPE_GRADIENTSDIR "Contents/Resources/gradients" # define INKSCAPE_KEYSDIR "Contents/Resources/keys" @@ -77,6 +80,7 @@ extern "C" { # define CREATE_PATTERNSDIR "/Library/Application Support/create/patterns/vector" # else # define INKSCAPE_APPICONDIR INKSCAPE_DATADIR "/pixmaps" +# define INKSCAPE_EXAMPLESDIR INKSCAPE_DATADIR "/inkscape/examples" # define INKSCAPE_EXTENSIONDIR INKSCAPE_DATADIR "/inkscape/extensions" # define INKSCAPE_GRADIENTSDIR INKSCAPE_DATADIR "/inkscape/gradients" # define INKSCAPE_KEYSDIR INKSCAPE_DATADIR "/inkscape/keys"