diff --git a/src/SpectacleCore.h b/src/SpectacleCore.h --- a/src/SpectacleCore.h +++ b/src/SpectacleCore.h @@ -90,6 +90,6 @@ MainWindowPtr mMainWindow; EditorPtr mQuickEditor; bool mIsGuiInited; - bool mCopySaveLocationToClipboard; + bool mCopyToClipboard; bool mCopyImageToClipboard; }; diff --git a/src/SpectacleCore.cpp b/src/SpectacleCore.cpp --- a/src/SpectacleCore.cpp +++ b/src/SpectacleCore.cpp @@ -52,7 +52,7 @@ mPlatform(loadPlatform()), mMainWindow(nullptr), mIsGuiInited(false), - mCopySaveLocationToClipboard(theCopyToClipboard) + mCopyToClipboard(theCopyToClipboard) { auto lConfig = KSharedConfig::openConfig(QStringLiteral("spectaclerc")); KConfigGroup lGuiConfig(lConfig, "GuiConfig"); @@ -246,7 +246,7 @@ connect(lExportManager, &ExportManager::imageSaved, this, &SpectacleCore::doNotify); } - if (mCopySaveLocationToClipboard) { + if (mCopyToClipboard) { lExportManager->doCopyToClipboard(mNotify); } else { QUrl lSavePath = (mStartMode == StartMode::Background && mFileNameUrl.isValid() && mFileNameUrl.isLocalFile()) ? @@ -327,15 +327,15 @@ // a speaking message is prettier than a URL, special case for copy to clipboard and the default pictures location const QString &lSavePath = theSavedAt.adjusted(QUrl::RemoveFilename | QUrl::StripTrailingSlash).path(); - if (mCopySaveLocationToClipboard) { + if (mCopyToClipboard) { lNotify->setText(i18n("A screenshot was saved to your clipboard.")); } else if (lSavePath == QStandardPaths::writableLocation(QStandardPaths::PicturesLocation)) { lNotify->setText(i18nc("Placeholder is filename", "A screenshot was saved as '%1' to your Pictures folder.", theSavedAt.fileName())); } else { lNotify->setText(i18n("A screenshot was saved as '%1' to '%2'.", theSavedAt.fileName(), lSavePath)); } - if (!mCopySaveLocationToClipboard) { + if (!mCopyToClipboard) { lNotify->setUrls({theSavedAt}); lNotify->setDefaultAction(i18nc("Open the screenshot we just saved", "Open")); connect(lNotify, QOverload::of(&KNotification::activated), this, [this, theSavedAt](uint index) {