diff --git a/doc/index.docbook b/doc/index.docbook --- a/doc/index.docbook +++ b/doc/index.docbook @@ -113,7 +113,7 @@ The image can be saved to a location of your choice by clicking on the Save As button or typing &Ctrl;&Shift;S. This opens the standard save dialog, where you can choose the filename, the folder location, and the format that your screenshot will be saved in. You may edit the filename to anything you wish, including the name of a previously saved screenshot. - To save a screenshot to the default location, click on the arrow portion of the Save As... button and press the Save (&Ctrl;S) button. The new save mode will be remembered for next time; this behavior can be configured in Spectacle's settings. The default save location and filename can also be configured there, as described later. + To save a screenshot to the default location, click on the arrow portion of the Save As... button and press the Save (&Ctrl;S) button. The new save mode will be remembered for next time. The default save location and filename can be configured, as described later. To quickly save the image and quit &spectacle;, click on the checkbox beside Quit after Save or Copy, then click the arrow portion of the Save As... button and press the Save (&Ctrl;S) item. This saves the image as a PNG file in your default Pictures folder, and exits the application immediately. As above, this new save mode will be remembered. @@ -255,12 +255,6 @@ - - Remember last used Save mode - - The default behavior of the save button is to display Save As. Choosing another save mode by clicking on the arrow portion of the button will make that save mode the default one. Disable this option to make the button stop remembering the last used save mode - - Copy save location to clipboard diff --git a/src/Gui/KSMainWindow.h b/src/Gui/KSMainWindow.h --- a/src/Gui/KSMainWindow.h +++ b/src/Gui/KSMainWindow.h @@ -44,10 +44,6 @@ explicit KSMainWindow(bool onClickAvailable, QWidget *parent = 0); ~KSMainWindow(); - private: - - SaveMode saveButtonMode() const; - private slots: void captureScreenshot(ImageGrabber::GrabMode mode, int timeout, bool includePointer, bool includeDecorations); diff --git a/src/Gui/KSMainWindow.cpp b/src/Gui/KSMainWindow.cpp --- a/src/Gui/KSMainWindow.cpp +++ b/src/Gui/KSMainWindow.cpp @@ -111,12 +111,6 @@ KSMainWindow::~KSMainWindow() {} -SaveMode KSMainWindow::saveButtonMode() const -{ - const SpectacleConfig *cfgManager = SpectacleConfig::instance(); - return cfgManager->useDynamicSaveButton() ? cfgManager->lastUsedSaveMode() : SaveMode::SaveAs; -} - // GUI init void KSMainWindow::init() @@ -246,7 +240,7 @@ void KSMainWindow::setDefaultSaveAction() { - switch (saveButtonMode()) { + switch (SpectacleConfig::instance()->lastUsedSaveMode()) { case SaveMode::SaveAs: mSaveButton->setDefaultAction(mSaveAsAction); break; @@ -307,7 +301,7 @@ // or open default directory as determined by save button QUrl location = ExportManager::instance()->lastSavePath(); if (!ExportManager::instance()->isFileExists(location)) { - switch(saveButtonMode()) { + switch(SpectacleConfig::instance()->lastUsedSaveMode()) { case SaveMode::Save: location = QUrl::fromLocalFile(ExportManager::instance()->saveLocation() + QStringLiteral("/")); break; diff --git a/src/Gui/SettingsDialog/GeneralOptionsPage.h b/src/Gui/SettingsDialog/GeneralOptionsPage.h --- a/src/Gui/SettingsDialog/GeneralOptionsPage.h +++ b/src/Gui/SettingsDialog/GeneralOptionsPage.h @@ -43,7 +43,6 @@ private: - QCheckBox *mUseLastSaveAction; QCheckBox *mRememberRect; QCheckBox *mUseLightBackground; QCheckBox *mCopyPathToClipboard; diff --git a/src/Gui/SettingsDialog/GeneralOptionsPage.cpp b/src/Gui/SettingsDialog/GeneralOptionsPage.cpp --- a/src/Gui/SettingsDialog/GeneralOptionsPage.cpp +++ b/src/Gui/SettingsDialog/GeneralOptionsPage.cpp @@ -35,19 +35,12 @@ QVBoxLayout *mainLayout = new QVBoxLayout(this); - // dynamic save button - - mUseLastSaveAction = new QCheckBox(i18n("Remember last used Save mode"), this); - connect(mUseLastSaveAction, &QCheckBox::toggled, this, &GeneralOptionsPage::markDirty); - mainLayout->addWidget(mUseLastSaveAction, 1); - // copy save path to clipboard mCopyPathToClipboard = new QCheckBox(i18n("Copy save location to the clipboard"), this); connect(mCopyPathToClipboard, &QCheckBox::toggled, this, &GeneralOptionsPage::markDirty); mainLayout->addWidget(mCopyPathToClipboard, 1); - // Rectangular Region settings QGroupBox *rrGroup = new QGroupBox(i18n("Rectangular Region")); @@ -92,7 +85,6 @@ { SpectacleConfig *cfgManager = SpectacleConfig::instance(); - cfgManager->setUseDynamicSaveButton(mUseLastSaveAction->checkState() == Qt::Checked); cfgManager->setUseLightRegionMaskColour(mUseLightBackground->checkState() == Qt::Checked); cfgManager->setRememberLastRectangularRegion(mRememberRect->checkState() == Qt::Checked); cfgManager->setCopySaveLocationToClipboard(mCopyPathToClipboard->checkState() == Qt::Checked); @@ -104,7 +96,6 @@ { SpectacleConfig *cfgManager = SpectacleConfig::instance(); - mUseLastSaveAction->setChecked(cfgManager->useDynamicSaveButton()); mUseLightBackground->setChecked(cfgManager->useLightRegionMaskColour()); mRememberRect->setChecked(cfgManager->rememberLastRectangularRegion()); mCopyPathToClipboard->setChecked(cfgManager->copySaveLocationToClipboard()); diff --git a/src/SpectacleConfig.h b/src/SpectacleConfig.h --- a/src/SpectacleConfig.h +++ b/src/SpectacleConfig.h @@ -81,9 +81,6 @@ int captureMode() const; void setCaptureMode(int index); - bool useDynamicSaveButton() const; - void setUseDynamicSaveButton(bool enabled); - bool rememberLastRectangularRegion() const; void setRememberLastRectangularRegion(bool enabled); diff --git a/src/SpectacleConfig.cpp b/src/SpectacleConfig.cpp --- a/src/SpectacleConfig.cpp +++ b/src/SpectacleConfig.cpp @@ -156,19 +156,6 @@ mGuiConfig.sync(); } -// dynamic save button - -bool SpectacleConfig::useDynamicSaveButton() const -{ - return mGuiConfig.readEntry(QStringLiteral("dynamicSaveButton"), true); -} - -void SpectacleConfig::setUseDynamicSaveButton(bool enabled) -{ - mGuiConfig.writeEntry(QStringLiteral("dynamicSaveButton"), enabled); - mGuiConfig.sync(); -} - // remember last rectangular region bool SpectacleConfig::rememberLastRectangularRegion() const