Code

allow easy access to our examples folder from Open dialog
authorbuliabyak <buliabyak@users.sourceforge.net>
Fri, 30 Mar 2007 07:08:29 +0000 (07:08 +0000)
committerbuliabyak <buliabyak@users.sourceforge.net>
Fri, 30 Mar 2007 07:08:29 +0000 (07:08 +0000)
src/file.cpp
src/path-prefix.h

index 639ba3913e5080112eeb924dc7f2a761f0d10257..efbada33253b0717ed81bb011f85b58b06ffcdd8 100644 (file)
@@ -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)
index 50895ef7b3822f5f6085ef1456e91f21cb9d2c64..ad7a14ef9f5c22cb9f3c1037e95f61b947b3e6a4 100644 (file)
@@ -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"