Home
Phabricator
Search
Log In
Paste
P645
Masterwork From Distant Lands
Active
Public
Actions
Authored by
davidedmundson
on Nov 23 2020, 1:06 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Subscribers
None
commit bf9377208d0e19d8ba529cc3c08e94524ecd6d18
Author: Michał Ziąbkowski <mziab@o2.pl>
Date: Sun Oct 25 16:01:31 2020 +0100
Fixed Toggle Night Color global shortcut, which used i18n in object name, leading to erratic behavior e.g. when system locale or translations changed.
BUG: 428024
diff --git a/colorcorrection/manager.cpp b/colorcorrection/manager.cpp
index 8f64fa4d2..d2c968fd1 100644
--- a/colorcorrection/manager.cpp
+++ b/colorcorrection/manager.cpp
@@ -224,9 +224,17 @@ qint64 Manager::scheduledTransitionDuration() const
void Manager::initShortcuts()
{
+ // legacy shortcut with localized key (to avoid breaking existing config)
+ if (i18n("Toggle Night Color") != QStringLiteral("Toggle Night Color")) {
+ QAction toggleActionLegacy;
+ toggleActionLegacy.setProperty("componentName", QStringLiteral(KWIN_NAME));
+ toggleActionLegacy.setObjectName(i18n("Toggle Night Color"));
+ KGlobalAccel::self()->removeAllShortcuts(&toggleActionLegacy);
+ }
+
QAction *toggleAction = new QAction(this);
toggleAction->setProperty("componentName", QStringLiteral(KWIN_NAME));
- toggleAction->setObjectName(i18n("Toggle Night Color"));
+ toggleAction->setObjectName(QStringLiteral("Toggle Night Color"));
toggleAction->setText(i18n("Toggle Night Color"));
KGlobalAccel::setGlobalShortcut(toggleAction, QList<QKeySequence>());
input()->registerShortcut(QKeySequence(), toggleAction, this, &Manager::toggle);
davidedmundson
edited the content of this paste.
(Show Details)
Nov 23 2020, 1:06 PM
davidedmundson
changed the title of this paste from untitled to
Masterwork From Distant Lands
.
davidedmundson
edited the content of this paste.
(Show Details)
Nov 23 2020, 1:11 PM
Log In to Comment