Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 9930b493 authored by Nathaniel Graham's avatar Nathaniel Graham

Make "Save As" the default save mode

Summary:
BUG: 389614

Yet more anecdotal evidence from bug triaging suggests that many would prefer "Save As" to be the default save mode in Spectacle. This patch accomplishes that.

I am planning a larger rewrite of the buttons sometime in the coming weeks that should hopefully end squabbles over button settings, but until then, I believe this will be a welcome improvement.

Test Plan:
Tested in KDE Neon
- Removed ~/.config/spectaclerc; "Save As" is now the default save mode
- Clicked "Save As" button: correct save operation is performed; button stays in "Save As" mode
- Changed the button to other save modes; same thing
- Quit Spectacle and re-opened when the button was in each save mode; it opened in the correct mode

{F5684691}

Reviewers: #spectacle, rkflx, rkron

Reviewed By: rkron

Differential Revision: https://phabricator.kde.org/D10198
parent 9753b02d
......@@ -201,18 +201,18 @@ void KSMainWindow::buildSaveMenu()
// put the actions in order
switch (switchState) {
case 0:
default:
mSaveButton->setDefaultAction(actionSaveAs);
mSaveMenu->addAction(actionSaveExit);
mSaveMenu->addAction(actionSave);
break;
case 1:
mSaveButton->setDefaultAction(actionSave);
mSaveMenu->addAction(actionSaveExit);
mSaveMenu->addAction(actionSaveAs);
break;
case 2:
mSaveButton->setDefaultAction(actionSaveAs);
mSaveMenu->addAction(actionSaveExit);
mSaveMenu->addAction(actionSave);
break;
case 0:
default:
mSaveButton->setDefaultAction(actionSaveExit);
mSaveMenu->addAction(actionSave);
mSaveMenu->addAction(actionSaveAs);
......@@ -323,14 +323,14 @@ void KSMainWindow::save()
void KSMainWindow::saveAs()
{
SpectacleConfig::instance()->setLastUsedSaveMode(2);
SpectacleConfig::instance()->setLastUsedSaveMode(0);
buildSaveMenu();
ExportManager::instance()->doSaveAs(this);
}
void KSMainWindow::saveAndExit()
{
SpectacleConfig::instance()->setLastUsedSaveMode(0);
SpectacleConfig::instance()->setLastUsedSaveMode(2);
qApp->setQuitOnLastWindowClosed(false);
ExportManager::instance()->doSave(QUrl(), true);
hide();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment