From: joelholdsworth Date: Sun, 19 Aug 2007 13:25:39 +0000 (+0000) Subject: Relocated the code that adds a link to the example folder inside from file.cpp to... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9f1a03c94fe1489d6d4b39d6e077259a2c2375ed;p=inkscape.git Relocated the code that adds a link to the example folder inside from file.cpp to filedialogimpl-gtkmm.cpp --- diff --git a/src/file.cpp b/src/file.cpp index 3e469b00b..9e8e3723c 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -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(openDialogInstance)->add_shortcut_folder(INKSCAPE_EXAMPLESDIR); - } } diff --git a/src/ui/dialog/filedialogimpl-gtkmm.cpp b/src/ui/dialog/filedialogimpl-gtkmm.cpp index d3016e0f3..0550b8021 100644 --- a/src/ui/dialog/filedialogimpl-gtkmm.cpp +++ b/src/ui/dialog/filedialogimpl-gtkmm.cpp @@ -22,6 +22,8 @@ #include "filedialogimpl-gtkmm.h" #include "dialogs/dialog-events.h" #include "interface.h" +#include "io/sys.h" +#include "path-prefix.h" #ifdef WITH_GNOME_VFS # include @@ -73,7 +75,8 @@ fileDialogExtensionToPattern(Glib::ustring &pattern, } } - void + +void findEntryWidgets(Gtk::Container *parent, std::vector &result) { @@ -711,9 +714,15 @@ FileOpenDialogImplGtk::FileOpenDialogImplGtk(Gtk::Window& parentWindow, //###### Add the file types menu createFilterMenu(); - add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL); set_default(*add_button(Gtk::Stock::OPEN, Gtk::RESPONSE_OK)); + + //###### Allow easy access to our examples folder + if(Inkscape::IO::file_test(INKSCAPE_EXAMPLESDIR, + (GFileTest)(G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR))) + { + add_shortcut_folder(INKSCAPE_EXAMPLESDIR); + } } /** @@ -1597,7 +1606,8 @@ FileExportDialogImpl::getFilename() { return myFilename; } - + + } //namespace Dialog } //namespace UI } //namespace Inkscape