rename some global shortcuts texts

--protect also the Layout::lastConfigViewFor,
dont sent a view that is no longer available
pull/6/head
Michail Vourlakos 6 years ago
parent 96b86f4c49
commit 61e9e629c5

@ -318,8 +318,13 @@ Latte::View *GenericLayout::highestPriorityView()
return (views.count() > 0 ? views[0] : nullptr);
}
Latte::View *GenericLayout::lastConfigViewFor() const
Latte::View *GenericLayout::lastConfigViewFor()
{
if (!latteViews().contains(m_lastConfigViewFor)) {
m_lastConfigViewFor = nullptr;
return nullptr;
}
return m_lastConfigViewFor;
}

@ -106,7 +106,7 @@ public:
void unlock(); //! make it writable which it should be the default
virtual void setLastConfigViewFor(Latte::View *view);
virtual Latte::View *lastConfigViewFor() const;
virtual Latte::View *lastConfigViewFor();
//! this function needs the layout to have first set the corona through initToCorona() function
virtual void addView(Plasma::Containment *containment, bool forceOnPrimary = false, int explicitScreen = -1, Layout::ViewsMap *occupied = nullptr);

@ -249,7 +249,7 @@ void SharedLayout::setLastConfigViewFor(Latte::View *view)
return GenericLayout::setLastConfigViewFor(view);
}
Latte::View *SharedLayout::lastConfigViewFor() const
Latte::View *SharedLayout::lastConfigViewFor()
{
CentralLayout *current = currentCentralLayout();

@ -61,7 +61,7 @@ public:
Layout::Type type() const override;
void setLastConfigViewFor(Latte::View *view) override;
Latte::View *lastConfigViewFor() const override;
Latte::View *lastConfigViewFor() override;
//! Available edges for specific view in that screen
QList<Plasma::Types::Location> availableEdgesForView(QScreen *scr, Latte::View *forView) const override;

@ -96,7 +96,7 @@ void GlobalShortcuts::init()
//show-hide the main view in the primary screen
QAction *showAction = generalActions->addAction(QStringLiteral("show latte view"));
showAction->setText(i18n("Show Latte View"));
showAction->setText(i18n("Show Latte Dock/Panel"));
showAction->setShortcut(QKeySequence(Qt::META + '`'));
KGlobalAccel::setGlobalShortcut(showAction, QKeySequence(Qt::META + '`'));
connect(showAction, &QAction::triggered, this, [this]() {
@ -105,7 +105,7 @@ void GlobalShortcuts::init()
//show-cycle between Latte settings windows
QAction *settingsAction = generalActions->addAction(QStringLiteral("show view settings"));
settingsAction->setText(i18n("Show Latte Dock/Panel Settings"));
settingsAction->setText(i18n("Cycle Through Dock/Panel Settings Windows"));
KGlobalAccel::setGlobalShortcut(settingsAction, QKeySequence(Qt::META + Qt::Key_A));
connect(settingsAction, &QAction::triggered, this, [this] {
m_modifierTracker->cancelMetaPressed();

Loading…
Cancel
Save