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 | |
| 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')
| -rw-r--r-- | src/dialogs/export.cpp | 4 | ||||
| -rw-r--r-- | src/main.cpp | 6 | ||||
| -rw-r--r-- | src/ui/dialog/filedialog.cpp | 40 |
3 files changed, 50 insertions, 0 deletions
diff --git a/src/dialogs/export.cpp b/src/dialogs/export.cpp index 80aaf9c91..c4bea0e1d 100644 --- a/src/dialogs/export.cpp +++ b/src/dialogs/export.cpp @@ -1164,6 +1164,10 @@ sp_export_browse_clicked (GtkButton *button, gpointer userdata) GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, NULL ); +#ifdef WITH_GNOME_VFS + gtk_file_chooser_set_local_only(GTK_FILE_CHOOSER (fs), false); +#endif + fe = (GtkWidget *)g_object_get_data (G_OBJECT (dlg), "filename"); sp_transientize (fs); diff --git a/src/main.cpp b/src/main.cpp index f7e9cdadc..877f4df9f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -135,6 +135,7 @@ enum { SP_ARG_EXPORT_FONT, SP_ARG_EXPORT_BBOX_PAGE, SP_ARG_EXTENSIONDIR, + SP_ARG_FIT_PAGE_TO_DRAWING, SP_ARG_SLIDESHOW, SP_ARG_QUERY_X, SP_ARG_QUERY_Y, @@ -320,6 +321,11 @@ struct poptOption options[] = { N_("Export files with the bounding box set to the page size (EPS)"), NULL}, + {"fit-page-to-drawing", 'S', + POPT_ARG_NONE, &sp_export_bbox_page, SP_ARG_FIT_PAGE_TO_DRAWING, + N_("Fits page to drawing and saves changes in place"), + NULL}, + {"query-x", 'X', POPT_ARG_NONE, &sp_query_x, SP_ARG_QUERY_X, // TRANSLATORS: "--query-id" is an Inkscape command line option; see "inkscape --help" 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 /* |
