Changeset View
Changeset View
Standalone View
Standalone View
src/SpectacleCore.cpp
Show All 19 Lines | |||||
20 | #include "SpectacleCore.h" | 20 | #include "SpectacleCore.h" | ||
21 | #include "spectacle_core_debug.h" | 21 | #include "spectacle_core_debug.h" | ||
22 | 22 | | |||
23 | #include "Config.h" | 23 | #include "Config.h" | ||
24 | 24 | | |||
25 | #include <KGlobalAccel> | 25 | #include <KGlobalAccel> | ||
26 | #include <KLocalizedString> | 26 | #include <KLocalizedString> | ||
27 | #include <KMessageBox> | 27 | #include <KMessageBox> | ||
28 | #include <KMessageWidget> | | |||
29 | #include <KNotification> | 28 | #include <KNotification> | ||
30 | #include <KRun> | 29 | #include <KRun> | ||
31 | #include <KWindowSystem> | 30 | #include <KWindowSystem> | ||
32 | 31 | | |||
33 | #include <QApplication> | 32 | #include <QApplication> | ||
34 | #include <QClipboard> | 33 | #include <QClipboard> | ||
35 | #include <QDir> | 34 | #include <QDir> | ||
36 | #include <QDrag> | 35 | #include <QDrag> | ||
▲ Show 20 Lines • Show All 231 Lines • ▼ Show 20 Line(s) | 263 | case StartMode::Gui: | |||
268 | bool copyImageToClipboard = SpectacleConfig::instance()->copyImageToClipboard(); | 267 | bool copyImageToClipboard = SpectacleConfig::instance()->copyImageToClipboard(); | ||
269 | 268 | | |||
270 | if (autoSaveImage && copyImageToClipboard) { | 269 | if (autoSaveImage && copyImageToClipboard) { | ||
271 | lExportManager->doSaveAndCopy(); | 270 | lExportManager->doSaveAndCopy(); | ||
272 | } else if (autoSaveImage) { | 271 | } else if (autoSaveImage) { | ||
273 | lExportManager->doSave(); | 272 | lExportManager->doSave(); | ||
274 | } else if (copyImageToClipboard) { | 273 | } else if (copyImageToClipboard) { | ||
275 | lExportManager->doCopyToClipboard(false); | 274 | lExportManager->doCopyToClipboard(false); | ||
276 | mMainWindow->showInlineMessage(i18n("The screenshot has been copied to the clipboard."), | | |||
277 | KMessageWidget::Information); | | |||
278 | } | 275 | } | ||
279 | } | 276 | } | ||
280 | } | 277 | } | ||
281 | 278 | | |||
282 | void SpectacleCore::screenshotFailed() | 279 | void SpectacleCore::screenshotFailed() | ||
283 | { | 280 | { | ||
284 | if (ExportManager::instance()->captureMode() == Spectacle::CaptureMode::RectangularRegion && mQuickEditor) { | 281 | if (ExportManager::instance()->captureMode() == Spectacle::CaptureMode::RectangularRegion && mQuickEditor) { | ||
285 | mQuickEditor->hide(); | 282 | mQuickEditor->hide(); | ||
▲ Show 20 Lines • Show All 140 Lines • Show Last 20 Lines |