diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2018-08-21 16:03:35 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marc@jeanmougin.fr> | 2018-08-21 16:03:35 +0000 |
| commit | 0830f5baa6eb3506a3eae862a345834e4486b3ab (patch) | |
| tree | 6a5021e8ad83c09cf1ba87b3b7580794d7d38624 /src | |
| parent | Added OARS (diff) | |
| download | inkscape-0830f5baa6eb3506a3eae862a345834e4486b3ab.tar.gz inkscape-0830f5baa6eb3506a3eae862a345834e4486b3ab.zip | |
use user-specific cache dir for clipboard temp file
Diffstat (limited to 'src')
| -rw-r--r-- | src/ui/clipboard.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ui/clipboard.cpp b/src/ui/clipboard.cpp index 66f9be7a1..2f0cc2bbb 100644 --- a/src/ui/clipboard.cpp +++ b/src/ui/clipboard.cpp @@ -1015,7 +1015,7 @@ bool ClipboardManagerImpl::_pasteImage(SPDocument *doc) prefs->setBool("/dialogs/import/ask", false); png->set_gui(false); - gchar *filename = g_build_filename( g_get_tmp_dir(), "inkscape-clipboard-import", NULL ); + gchar *filename = g_build_filename( g_get_user_cache_dir(), "inkscape-clipboard-import", NULL ); img->save(filename, "png"); file_import(doc, filename, png); g_free(filename); @@ -1143,7 +1143,7 @@ SPDocument *ClipboardManagerImpl::_retrieveClipboard(Glib::ustring required_targ // FIXME: Temporary hack until we add memory input. // Save the clipboard contents to some file, then read it - gchar *filename = g_build_filename( g_get_tmp_dir(), "inkscape-clipboard-import", NULL ); + gchar *filename = g_build_filename( g_get_user_cache_dir(), "inkscape-clipboard-import", NULL ); bool file_saved = false; Glib::ustring target = best_target; @@ -1244,7 +1244,7 @@ void ClipboardManagerImpl::_onGet(Gtk::SelectionData &sel, guint /*info*/) // FIXME: Temporary hack until we add support for memory output. // Save to a temporary file, read it back and then set the clipboard contents - gchar *filename = g_build_filename( g_get_tmp_dir(), "inkscape-clipboard-export", NULL ); + gchar *filename = g_build_filename( g_get_user_cache_dir(), "inkscape-clipboard-export", NULL ); gsize len; gchar *data; try { @@ -1486,7 +1486,7 @@ void ClipboardManagerImpl::_setClipboardTargets() if ( out != outlist.end() ) { // FIXME: Temporary hack until we add support for memory output. // Save to a temporary file, read it back and then set the clipboard contents - gchar *filename = g_build_filename( g_get_tmp_dir(), "inkscape-clipboard-export.emf", NULL ); + gchar *filename = g_build_filename( g_get_user_cache_dir(), "inkscape-clipboard-export.emf", NULL ); try { (*out)->save(_clipboardSPDoc, filename); |
