mirror of
https://github.com/KDE/latte-dock.git
synced 2025-01-01 13:17:44 +03:00
drop Meta+E that is used from Dolphin
This commit is contained in:
parent
844dc8096c
commit
f89b110a36
@ -418,18 +418,22 @@ void Manager::importPreset(int presetNo, bool newInstanceIfPresent)
|
||||
|
||||
void Manager::showLatteSettingsDialog(int page)
|
||||
{
|
||||
bool created{false};
|
||||
|
||||
if (!m_latteSettingsDialog) {
|
||||
m_latteSettingsDialog = new SettingsDialog(nullptr, m_corona);
|
||||
created = true;
|
||||
}
|
||||
|
||||
m_latteSettingsDialog->show();
|
||||
|
||||
if (m_latteSettingsDialog->isMinimized()) {
|
||||
m_latteSettingsDialog->showNormal();
|
||||
}
|
||||
|
||||
Types::LatteConfigPage configPage = static_cast<Types::LatteConfigPage>(page);
|
||||
m_latteSettingsDialog->setCurrentPage(configPage);
|
||||
if (!created) {
|
||||
Types::LatteConfigPage configPage = static_cast<Types::LatteConfigPage>(page);
|
||||
m_latteSettingsDialog->toggleCurrentPage();
|
||||
}
|
||||
|
||||
m_latteSettingsDialog->activateWindow();
|
||||
}
|
||||
|
@ -329,12 +329,12 @@ QStringList SettingsDialog::availableSharesFor(int row)
|
||||
return availables;
|
||||
}
|
||||
|
||||
void SettingsDialog::setCurrentPage(Types::LatteConfigPage page)
|
||||
void SettingsDialog::toggleCurrentPage()
|
||||
{
|
||||
if (page == Types::LayoutPage) {
|
||||
ui->tabWidget->setCurrentIndex(0);
|
||||
} else if (page == Types::PreferencesPage) {
|
||||
if (ui->tabWidget->currentIndex() == 0) {
|
||||
ui->tabWidget->setCurrentIndex(1);
|
||||
} else {
|
||||
ui->tabWidget->setCurrentIndex(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ public:
|
||||
SettingsDialog(QWidget *parent, Latte::Corona *corona);
|
||||
~SettingsDialog();
|
||||
|
||||
void setCurrentPage(Types::LatteConfigPage page);
|
||||
void toggleCurrentPage();
|
||||
|
||||
void addActivityInCurrent(const QString &activityId);
|
||||
void removeActivityFromCurrent(const QString &activityId);
|
||||
|
@ -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 View Settings"));
|
||||
settingsAction->setText(i18n("Show Latte Dock/Panel Settings"));
|
||||
KGlobalAccel::setGlobalShortcut(settingsAction, QKeySequence(Qt::META + Qt::Key_A));
|
||||
connect(settingsAction, &QAction::triggered, this, [this] {
|
||||
m_modifierTracker->cancelMetaPressed();
|
||||
@ -113,8 +113,8 @@ void GlobalShortcuts::init()
|
||||
});
|
||||
|
||||
//show the layouts editor
|
||||
QAction *layoutsAction = generalActions->addAction(QStringLiteral("show layout settings"));
|
||||
layoutsAction->setText(i18n("Show Layout Settings"));
|
||||
QAction *layoutsAction = generalActions->addAction(QStringLiteral("show latte global settings"));
|
||||
layoutsAction->setText(i18n("Show Latte Global Settings"));
|
||||
layoutsAction->setShortcut(QKeySequence(Qt::META + Qt::Key_W));
|
||||
KGlobalAccel::setGlobalShortcut(layoutsAction, QKeySequence(Qt::META + Qt::Key_W));
|
||||
connect(layoutsAction, &QAction::triggered, this, [this]() {
|
||||
@ -122,16 +122,6 @@ void GlobalShortcuts::init()
|
||||
m_corona->layoutsManager()->showLatteSettingsDialog(Types::LayoutPage);
|
||||
});
|
||||
|
||||
//show the latter universal settings
|
||||
QAction *universalSettingsAction = generalActions->addAction(QStringLiteral("show latte universal settings"));
|
||||
universalSettingsAction->setText(i18n("Show Latte Settings"));
|
||||
universalSettingsAction->setShortcut(QKeySequence(Qt::META + Qt::Key_E));
|
||||
KGlobalAccel::setGlobalShortcut(universalSettingsAction, QKeySequence(Qt::META + Qt::Key_E));
|
||||
connect(universalSettingsAction, &QAction::triggered, this, [this]() {
|
||||
m_modifierTracker->cancelMetaPressed();
|
||||
m_corona->layoutsManager()->showLatteSettingsDialog(Types::PreferencesPage);
|
||||
});
|
||||
|
||||
KActionCollection *taskbarActions = new KActionCollection(m_corona);
|
||||
|
||||
//activate actions [1-9]
|
||||
|
Loading…
Reference in New Issue
Block a user