Members of the KDE Community are recommended to subscribe to the kde-community mailing list at to allow them to participate in important discussions and receive other important announcements

Commit 2c31ae4a authored by Nathaniel Graham's avatar Nathaniel Graham

(1/3) Remove unnecessary Discard/Quit button

Part 1 of 3 for {T7841}

CCBUG: 386163
FIXED-IN: 18.04

Spectacle's main window doesn't need a discard/quit button, because there's already a user-visible way of closing the window: the titlebar's close button. The escape key does it, too. This button duplicates existing functionality and takes up room that could be used for a "Configure..." button, and has led to user confusion in the past as well (see

Test Plan:
Tested in KDE Neon:
- Can still quit with the Escape key
- Quitting automatically discards the current screenshot if it has not been saved yet
- There's now more room in the button bar so we can add a visible "Configure..." button


Reviewers: #spectacle, alexeymin

Reviewed By: #spectacle, alexeymin

Subscribers: alexeymin

Differential Revision:
parent c3f89d5b
......@@ -217,12 +217,6 @@
<para>Additionally, if you click the arrow on the right side of the button, a drop-down menu allows you to simply <guilabel>Save</guilabel> the image, save the image with a different filename, location and format (<guilabel>Save As...</guilabel>), <guilabel>Print</guilabel> the image, and configure the default <guimenuitem>Preferences</guimenuitem>, such as application preferences and where to save the image by default and what filename to save it as.</para>
<para>Discards the screenshot and immediately exits the application.</para>
......@@ -123,7 +123,7 @@ void KSMainWindow::init()
// the Button Bar
mDialogButtonBox->setStandardButtons(QDialogButtonBox::Help | QDialogButtonBox::Discard);
KGuiItem::assign(mSendToButton, KGuiItem(i18n("Export Image...")));
......@@ -142,10 +142,6 @@ void KSMainWindow::init()
mDialogButtonBox->addButton(mSaveButton, QDialogButtonBox::ActionRole);
QShortcut *shortcut = new QShortcut(QKeySequence(Qt::Key_Escape), mDialogButtonBox->button(QDialogButtonBox::Discard));
connect(shortcut, &QShortcut::activated, qApp, &QApplication::quit);
connect(mDialogButtonBox->button(QDialogButtonBox::Discard), &QPushButton::clicked, qApp, &QApplication::quit);
// the help menu
KHelpMenu *helpMenu = new KHelpMenu(this, KAboutData::applicationData(), true);
......@@ -255,7 +251,6 @@ void KSMainWindow::setScreenshotAndShow(const QPixmap &pixmap)
setWindowTitle(i18nc("Unsaved Screenshot", "Unsaved[*]"));
KGuiItem::assign(mDialogButtonBox->button(QDialogButtonBox::Discard), KStandardGuiItem::discard());
......@@ -311,7 +306,6 @@ void KSMainWindow::setScreenshotWindowTitle(QUrl location)
KGuiItem::assign(mDialogButtonBox->button(QDialogButtonBox::Discard), KStandardGuiItem::quit());
void KSMainWindow::save()
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