Commit f4f35e9f authored by Tomaz  Canabrava's avatar Tomaz Canabrava
Browse files

Add the possibility to change the Profile from the Toolbar

parent cb04dd4d
......@@ -63,6 +63,6 @@
<Action name="edit_copy" />
<Action name="edit_paste" />
<Action name="edit_find" />
<Action name="file_print" />
<Action name="switch-profile"/>
</ToolBar>
</kpartgui>
......@@ -706,6 +706,7 @@ void SessionController::setupCommonActions()
_switchProfileMenu = new KActionMenu(i18n("Switch Profile"), this);
collection->addAction(QStringLiteral("switch-profile"), _switchProfileMenu);
connect(_switchProfileMenu->menu(), &QMenu::aboutToShow, this, &Konsole::SessionController::prepareSwitchProfileMenu);
_switchProfileMenu->setDelayed(false);
// History
_findAction = KStandardAction::find(this, &SessionController::searchBarEvent, collection);
......@@ -873,6 +874,7 @@ void SessionController::setupExtraActions()
void SessionController::switchProfile(const Profile::Ptr &profile)
{
SessionManager::instance()->setSessionProfile(_sessionDisplayConnection->session(), profile);
_switchProfileMenu->setIcon(QIcon::fromTheme(profile->icon()));
updateFilterList(profile);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment