diff options
| author | bulia byak <buliabyak@gmail.com> | 2007-03-30 07:08:29 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2007-03-30 07:08:29 +0000 |
| commit | 226d2b2ba6062227afd9204f00088a7c42dbf50f (patch) | |
| tree | 4ed5f3b6f60f2707a025875355be6da41495af7c | |
| parent | a better and more complete fix for 1690914 (diff) | |
| download | inkscape-226d2b2ba6062227afd9204f00088a7c42dbf50f.tar.gz inkscape-226d2b2ba6062227afd9204f00088a7c42dbf50f.zip | |
allow easy access to our examples folder from Open dialog
(bzr r2786)
| -rw-r--r-- | src/file.cpp | 3 | ||||
| -rw-r--r-- | src/path-prefix.h | 4 |
2 files changed, 7 insertions, 0 deletions
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<Gtk::FileChooser *>(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" |
