summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8fa0e6d)
raw | patch | inline | side by side (parent: 8fa0e6d)
author | pjrm <pjrm@users.sourceforge.net> | |
Thu, 21 Jun 2007 09:05:40 +0000 (09:05 +0000) | ||
committer | pjrm <pjrm@users.sourceforge.net> | |
Thu, 21 Jun 2007 09:05:40 +0000 (09:05 +0000) |
src/dialogs/export.cpp | patch | blob | history | |
src/extension/input.cpp | patch | blob | history | |
src/extension/internal/svg.cpp | patch | blob | history | |
src/ui/dialog/filedialog.cpp | patch | blob | history |
diff --git a/src/dialogs/export.cpp b/src/dialogs/export.cpp
index da5a8c541306e6ee7eb6b770b7684d065751a9de..441047a27dcbd0566839e0e652e125b26695a924 100644 (file)
--- a/src/dialogs/export.cpp
+++ b/src/dialogs/export.cpp
#include <gtkmm/image.h>
#include <gtkmm/stockid.h>
#include <gtkmm/stock.h>
+#ifdef WITH_GNOME_VFS
+# include <libgnomevfs/gnome-vfs-init.h> // gnome_vfs_initialized
+#endif
#include <glibmm/i18n.h>
#include "helper/unit-menu.h"
NULL );
#ifdef WITH_GNOME_VFS
- gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER (fs), false);
+ if (gnome_vfs_initialized()) {
+ gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER(fs), false);
+ }
#endif
fe = (GtkWidget *)g_object_get_data (G_OBJECT (dlg), "filename");
index 94b0f6ab4ddd4c14ea11e760b7c529c89a606371..e17c690aa5017acf07d257e5c24b917e49892d9f 100644 (file)
--- a/src/extension/input.cpp
+++ b/src/extension/input.cpp
}
timer->touch();
- SPDocument * doc = NULL;
-
-#ifdef WITH_GNOME_VFS
- doc = imp->open(this, uri);
-#else
- if (Inkscape::IO::file_test(uri, G_FILE_TEST_EXISTS)) {
- doc = imp->open(this, uri);
- }
-#endif
-
+ SPDocument *const doc = imp->open(this, uri);
if (doc != NULL) {
Inkscape::XML::Node * repr = sp_document_repr_root(doc);
bool saved = sp_document_get_undo_sensitive(doc);
index 5d7b38c335192a37d9107c15940331f58d2fe4ef..33cbfe1506229bb25de0384d4a33c56aa33d7843 100644 (file)
#ifdef WITH_GNOME_VFS
#define BUF_SIZE 8192
-gchar *
+static gchar *
_load_uri (const gchar *uri)
{
GnomeVFSHandle *handle = NULL;
Svg::open (Inkscape::Extension::Input *mod, const gchar *uri)
{
#ifdef WITH_GNOME_VFS
- if (gnome_vfs_uri_is_local(gnome_vfs_uri_new(uri))) {
+ if (!gnome_vfs_initialized() || gnome_vfs_uri_is_local(gnome_vfs_uri_new(uri))) {
// Use built-in loader instead of VFS for this
return sp_document_new(uri, TRUE);
}
index b6c35140e5d0eaadfec4f17cd6e9686ffc218190..2a5ededbb475bf88fd9f0f35b722587cb484a9fd 100644 (file)
//Another hack
#include <gtk/gtkentry.h>
#include <gtk/gtkexpander.h>
+#ifdef WITH_GNOME_VFS
+# include <libgnomevfs/gnome-vfs-init.h> // gnome_vfs_initialized
+#endif
Glib::ustring fileName = get_preview_filename();
#ifdef WITH_GNOME_VFS
- if (fileName.length() < 1)
+ if ( fileName.empty() && gnome_vfs_initialized() ) {
fileName = get_preview_uri();
+ }
#endif
- if (fileName.length() < 1)
+ if (fileName.empty()) {
return;
+ }
svgPreview.set(fileName, dialogType);
}
set_select_multiple(true);
#ifdef WITH_GNOME_VFS
- set_local_only(false);
+ if (gnome_vfs_initialized()) {
+ set_local_only(false);
+ }
#endif
/* Initalize to Autodetect */
}
myFilename = get_filename();
#ifdef WITH_GNOME_VFS
- if (myFilename.length() < 1)
+ if (myFilename.empty() && gnome_vfs_initialized())
myFilename = get_uri();
#endif
cleanup( true );
{
std::vector<Glib::ustring> result = get_filenames();
#ifdef WITH_GNOME_VFS
- if (result.empty())
+ if (result.empty() && gnome_vfs_initialized())
result = get_uris();
#endif
return result;
set_select_multiple(false);
#ifdef WITH_GNOME_VFS
- set_local_only(false);
+ if (gnome_vfs_initialized()) {
+ set_local_only(false);
+ }
#endif
/* Initalize to Autodetect */
// Pick up any changes the user has typed in.
Glib::ustring tmp = get_filename();
#ifdef WITH_GNOME_VFS
- if ( tmp.empty() ) {
+ if ( tmp.empty() && gnome_vfs_initialized() ) {
tmp = get_uri();
}
#endif
set_select_multiple(false);
#ifdef WITH_GNOME_VFS
- set_local_only(false);
+ if (gnome_vfs_initialized()) {
+ set_local_only(false);
+ }
#endif
/* Initalize to Autodetect */
}
myFilename = get_filename();
#ifdef WITH_GNOME_VFS
- if (myFilename.length() < 1)
+ if ( myFilename.empty() && gnome_vfs_initialized() ) {
myFilename = get_uri();
+ }
#endif
/*