Code

Relocated the code that adds a link to the example folder inside from file.cpp to...
authorjoelholdsworth <joelholdsworth@users.sourceforge.net>
Sun, 19 Aug 2007 13:25:39 +0000 (13:25 +0000)
committerjoelholdsworth <joelholdsworth@users.sourceforge.net>
Sun, 19 Aug 2007 13:25:39 +0000 (13:25 +0000)
src/file.cpp
src/ui/dialog/filedialogimpl-gtkmm.cpp

index 3e469b00b2dac3b0c6f60628a7c1acb738d2dca1..9e8e3723ca347110c61af88e630b92907ca37492 100644 (file)
@@ -395,10 +395,6 @@ sp_file_open_dialog(Gtk::Window &parentWindow, gpointer object, gpointer data)
                  open_path,
                  Inkscape::UI::Dialog::SVG_TYPES,
                  (char const *)_("Select file to open"));
-        // allow easy access to our examples folder             
-        if (Inkscape::IO::file_test(INKSCAPE_EXAMPLESDIR, (GFileTest)(G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR))) {
-            dynamic_cast<Gtk::FileChooser *>(openDialogInstance)->add_shortcut_folder(INKSCAPE_EXAMPLESDIR);
-        }
     }
 
 
index d3016e0f3513abbf15f5444f54e90a9541655b95..0550b802192f71919e7bc36a5322388a1d8d8ba0 100644 (file)
@@ -22,6 +22,8 @@
 #include "filedialogimpl-gtkmm.h"\r
 #include "dialogs/dialog-events.h"\r
 #include "interface.h"\r
+#include "io/sys.h"\r
+#include "path-prefix.h"\r
 \r
 #ifdef WITH_GNOME_VFS\r
 # include <libgnomevfs/gnome-vfs.h>\r
@@ -73,7 +75,8 @@ fileDialogExtensionToPattern(Glib::ustring &pattern,
         }\r
 }\r
 \r
-\rvoid\r
+\r
+void\r
 findEntryWidgets(Gtk::Container *parent,\r
                  std::vector<Gtk::Entry *> &result)\r
 {\r
@@ -711,9 +714,15 @@ FileOpenDialogImplGtk::FileOpenDialogImplGtk(Gtk::Window& parentWindow,
     //###### Add the file types menu\r
     createFilterMenu();\r
 \r
-\r
     add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);\r
     set_default(*add_button(Gtk::Stock::OPEN,   Gtk::RESPONSE_OK));\r
+       \r
+       //###### Allow easy access to our examples folder                \r
+    if(Inkscape::IO::file_test(INKSCAPE_EXAMPLESDIR,\r
+               (GFileTest)(G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR)))\r
+       {\r
+        add_shortcut_folder(INKSCAPE_EXAMPLESDIR);\r
+    }\r
 }\r
 \r
 /**\r
@@ -1597,7 +1606,8 @@ FileExportDialogImpl::getFilename()
 {\r
     return myFilename;\r
 }\r
-\r\r
+\r
+\r
 } //namespace Dialog\r
 } //namespace UI\r
 } //namespace Inkscape\r