mirror of
https://github.com/KDE/latte-dock.git
synced 2025-03-09 00:58:15 +03:00
parent layouts in context menu properly
--there is a chance that this fixes also a memory leak
This commit is contained in:
parent
87ae24dae1
commit
be2ec0a7af
@ -271,7 +271,7 @@ void Menu::populateLayouts()
|
||||
(" " + i18nc("current layout", "(Current)")) : "";
|
||||
QString layoutName = layout + currentText;
|
||||
|
||||
QAction *layoutAction = new QAction(layoutName, m_switchLayoutsMenu);
|
||||
QAction *layoutAction = m_switchLayoutsMenu->addAction(layoutName);
|
||||
|
||||
layoutAction->setCheckable(true);
|
||||
|
||||
@ -288,15 +288,12 @@ void Menu::populateLayouts()
|
||||
font.setBold(true);
|
||||
layoutAction->setFont(font);
|
||||
}
|
||||
|
||||
m_switchLayoutsMenu->addAction(layoutAction);
|
||||
}
|
||||
|
||||
m_switchLayoutsMenu->addSeparator();
|
||||
|
||||
QAction *editLayoutsAction = new QAction(i18n("Manage &Layouts..."), m_switchLayoutsMenu);
|
||||
QAction *editLayoutsAction = m_switchLayoutsMenu->addAction(i18n("Manage &Layouts..."));
|
||||
editLayoutsAction->setData(QStringLiteral(" _show_latte_settings_dialog_"));
|
||||
m_switchLayoutsMenu->addAction(editLayoutsAction);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user