Bug 382718 - Dragging snapshot to a mail client generate wrong filename
Summary: Dragging snapshot to a mail client generate wrong filename
Status: RESOLVED FIXED
Alias: None
Product: Spectacle
Classification: Applications
Component: General (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Boudhayan Gupta
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-25 16:54 UTC by Jonatan Cloutier
Modified: 2017-09-22 17:19 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 17.08.02
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonatan Cloutier 2017-07-25 16:54:39 UTC
I use spectacle a lot to send screenshot by email and with any mail client I've done it (gmail, outlook365, zimbra in both chrome and firefox and Thunderbirds), the attachment gets named like "Spectacle.U22108.png"

The "save as" setting should be used to name the file when doing drag and drop, or simply to name the temporary file directly from this setting.
Comment 1 Friedrich W. H. Kossebau 2017-09-22 17:19:52 UTC
Git commit cedfdb40b80aa3ad042b6ef6918ddd3500d84df0 by Friedrich W. H. Kossebau.
Committed on 22/09/2017 at 17:19.
Pushed by kossebau into branch 'Applications/17.08'.

Fix: use autosaveFilename format also for files exported via DnD or menu

Summary:
When exporting the current screenshot directly to applications via a
temporary file holding a copy of the screenshot, the very filename of the
temporary file is then picked up in those programs, e.g. when displaying
the file or creating a local copy. Additionally that name is also passed
in the x-kde-suggestedfilename property on DnD.
With the usage of QTemporaryFile this filename holds some random part, which
makes it less useful.
Switching to a QTemporaryDir instead for getting a non-conflicting
namespace in the temp dirs, and using a normal file with the configured
autosaveFilename format in that dir results in the expected naming of
screenshot files also on export to apps via menu or DnD.
FIXED-IN: 17.08.02

Reviewers: bgupta, alexeymin

Reviewed By: alexeymin

Subscribers: alexeymin, #kde_applications, #plasma

Differential Revision: https://phabricator.kde.org/D7725

M  +40   -17   src/ExportManager.cpp
M  +9    -2    src/ExportManager.h

https://commits.kde.org/spectacle/cedfdb40b80aa3ad042b6ef6918ddd3500d84df0