diff options
| author | Jon Phillips <jon@fabricatorz.com> | 2007-02-11 04:32:58 +0000 |
|---|---|---|
| committer | kidproto <kidproto@users.sourceforge.net> | 2007-02-11 04:32:58 +0000 |
| commit | 6257b095bcec9b0fd153f5d7d7e2e8f013e2e175 (patch) | |
| tree | 54ad50ee4f9e53ae9458d39e6a20bfa49ff18efe /src/ui/dialog/filedialog.cpp | |
| parent | jasper's patch for fast iir blur (diff) | |
| download | inkscape-6257b095bcec9b0fd153f5d7d7e2e8f013e2e175.tar.gz inkscape-6257b095bcec9b0fd153f5d7d7e2e8f013e2e175.zip | |
Added gnome-vfs patch by Ed Catmur so we can save/open/export to non-local
GNOME-VFS URIs. We could do before on commandline, but this allows us to with
the gui! Yeah! This is useful for the plans for webdav and Open Clip Art Library.
(bzr r2357)
Diffstat (limited to 'src/ui/dialog/filedialog.cpp')
| -rw-r--r-- | src/ui/dialog/filedialog.cpp | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/ui/dialog/filedialog.cpp b/src/ui/dialog/filedialog.cpp index 1b3467847..b51793d12 100644 --- a/src/ui/dialog/filedialog.cpp +++ b/src/ui/dialog/filedialog.cpp @@ -802,6 +802,10 @@ private: void FileOpenDialogImpl::updatePreviewCallback() { Glib::ustring fileName = get_preview_filename(); +#ifdef WITH_GNOME_VFS + if (fileName.length() < 1) + fileName = get_preview_uri(); +#endif if (fileName.length() < 1) return; svgPreview.set(fileName, dialogType); @@ -880,6 +884,10 @@ FileOpenDialogImpl::FileOpenDialogImpl(const Glib::ustring &dir, /* And also Multiple Files */ set_select_multiple(true); +#ifdef WITH_GNOME_VFS + set_local_only(false); +#endif + /* Initalize to Autodetect */ extension = NULL; /* No filename to start out with */ @@ -973,6 +981,10 @@ FileOpenDialogImpl::show() extension = extensionMap[gtk_file_filter_get_name(filter)]; } myFilename = get_filename(); +#ifdef WITH_GNOME_VFS + if (myFilename.length() < 1) + myFilename = get_uri(); +#endif return TRUE; } else @@ -1010,6 +1022,10 @@ FileOpenDialogImpl::getFilename (void) std::vector<Glib::ustring>FileOpenDialogImpl::getFilenames() { std::vector<Glib::ustring> result = get_filenames(); +#ifdef WITH_GNOME_VFS + if (result.empty()) + result = get_uris(); +#endif return result; } @@ -1140,6 +1156,10 @@ private: void FileSaveDialogImpl::updatePreviewCallback() { Glib::ustring fileName = get_preview_filename(); +#ifdef WITH_GNOME_VFS + if (fileName.length() < 1) + fileName = get_preview_uri(); +#endif if (!fileName.c_str()) return; bool retval = svgPreview.set(fileName, dialogType); @@ -1255,6 +1275,10 @@ FileSaveDialogImpl::FileSaveDialogImpl(const Glib::ustring &dir, /* One file at a time */ set_select_multiple(false); +#ifdef WITH_GNOME_VFS + set_local_only(false); +#endif + /* Initalize to Autodetect */ extension = NULL; /* No filename to start out with */ @@ -1387,6 +1411,10 @@ FileSaveDialogImpl::show() extension = type.extension; } myFilename = get_filename(); +#ifdef WITH_GNOME_VFS + if (myFilename.length() < 1) + myFilename = get_uri(); +#endif /* @@ -1698,6 +1726,10 @@ private: void FileExportDialogImpl::updatePreviewCallback() { Glib::ustring fileName = get_preview_filename(); +#ifdef WITH_GNOME_VFS + if (fileName.length() < 1) + fileName = get_preview_uri(); +#endif if (!fileName.c_str()) return; bool retval = svgPreview.set(fileName, dialogType); @@ -1820,6 +1852,10 @@ FileExportDialogImpl::FileExportDialogImpl(const Glib::ustring &dir, /* One file at a time */ set_select_multiple(false); +#ifdef WITH_GNOME_VFS + set_local_only(false); +#endif + /* Initalize to Autodetect */ extension = NULL; /* No filename to start out with */ @@ -2035,6 +2071,10 @@ FileExportDialogImpl::show() extension = type.extension; } myFilename = get_filename(); +#ifdef WITH_GNOME_VFS + if (myFilename.length() < 1) + myFilename = get_uri(); +#endif /* |
