Commit 8376fb60 authored by Ivan Čukić's avatar Ivan Čukić 👁
Browse files

Backported: Lancelot is toggled with the keyboard shortcut

BUG:292503
parent 5219798e
......@@ -253,6 +253,13 @@ void LancelotWindow::lancelotShow(int x, int y)
showWindow(x, y);
}
void LancelotWindow::lancelotToggleCentered()
{
if (isVisible()) {
hide();
} else lancelotShowCentered();
}
void LancelotWindow::lancelotShowCentered()
{
m_showingFull = true;
......@@ -891,7 +898,7 @@ void LancelotWindow::setupActions()
a->setIcon(KIcon("lancelot"));
connect(
a, SIGNAL(triggered(bool)),
this, SLOT(lancelotShowCentered())
this, SLOT(lancelotToggleCentered())
);
}
......
......@@ -63,6 +63,11 @@ public Q_SLOTS:
*/
void lancelotShowCentered();
/**
* Shows full window centered on the screen.
*/
void lancelotToggleCentered();
/**
* Shows full window.
* @param x x coordinate of the mouse
......
......@@ -295,7 +295,7 @@ void LancelotApplet::init()
);
connect(
this, SIGNAL(activate()),
this, SLOT(showLancelot())
this, SLOT(toggleLancelot())
);
KGlobal::locale()->insertCatalog("lancelot");
......
Supports Markdown
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