Fwd: [kate/Applications/16.04] kate: Close document: use icon document-close instead of window-close

Dominik Haumann dhaumann at kde.org
Sat Apr 30 21:11:13 UTC 2016


Hi all,

I wonder, whether the correct fix would be to change the default icon
for KStandardAction::Close from "window-close" to "document-close"?

Cheers,
Dominik

---------- Forwarded message ----------
From: Dominik Haumann <dhaumann at kde.org>
Date: Sat, Apr 30, 2016 at 11:02 PM
Subject: [kate/Applications/16.04] kate: Close document: use icon
document-close instead of window-close
To: kde-commits at kde.org


Git commit 72cb3b9c71fd0a300ca163b8a644bc51e7b80eaf by Dominik Haumann.
Committed on 30/04/2016 at 21:02.
Pushed by dhaumann into branch 'Applications/16.04'.

Close document: use icon document-close instead of window-close

BUG: 362447

M  +3    -2    kate/katemainwindow.cpp

http://commits.kde.org/kate/72cb3b9c71fd0a300ca163b8a644bc51e7b80eaf

diff --git a/kate/katemainwindow.cpp b/kate/katemainwindow.cpp
index f630e28..4e7e907 100644
--- a/kate/katemainwindow.cpp
+++ b/kate/katemainwindow.cpp
@@ -306,8 +306,9 @@ void KateMainWindow::setupActions()
     connect(a, SIGNAL(triggered()),
KateApp::self()->documentManager(), SLOT(closeOrphaned()));
     a->setWhatsThis(i18n("Close all documents in the file list that
could not be reopened, because they are not accessible anymore."));

-    actionCollection()->addAction(KStandardAction::Close,
QStringLiteral("file_close"), m_viewManager,
SLOT(slotDocumentClose()))
-    ->setWhatsThis(i18n("Close the current document."));
+    a = actionCollection()->addAction(KStandardAction::Close,
QStringLiteral("file_close"), m_viewManager,
SLOT(slotDocumentClose()));
+    a->setIcon(QIcon::fromTheme(QStringLiteral("document-close")));
+    a->setWhatsThis(i18n("Close the current document."));

     a = actionCollection()->addAction(QStringLiteral("file_close_other"));
     a->setText(i18n("Close Other"));


More information about the Kde-frameworks-devel mailing list