Commit 28f065ca authored by Eike Hein's avatar Eike Hein
Browse files

* Move updating the toggle actions in the tab bar context menu

  to a separate method from that used to update the tab move
  actions states, and add sanity-checking for an invalid index.
* Remove default shortcut from the Prevent Closing toggle action.
* Changelog updates.
* Assorted cleanup (string fixes, line length).

svn path=/trunk/extragear/utils/yakuake/; revision=945565
parent 0ae4464a
......@@ -13,7 +13,8 @@ Changes since 2.9.5:
* Rewrote the translucency support not to use X11-specific code on Qt 4.5
or higher and KDE 4.3 or higher.
* Added a feature to disable keyboard input for a session (via a user-con-
figured shortcut or the context menu).
figured shortcut or the context menu), including D-Bus calls to get/set
this state bit.
* On KDE 4.2 and higher, the first-run dialog now no longer allows setting
a multi-key shortcut to open/close the window, consistent with the short-
cut configuration dialog (the required API is new in 4.2). The reason
......@@ -23,9 +24,9 @@ Changes since 2.9.5:
* Fixed the 'removeTerminal(int terminalId)' D-Bus call always closing the
active terminal of the session containing the target terminal, rather than
the target terminal.
* Added a feature to prevent a session from being closed (set through keyboard
shortcut or context menu). This lock only works if the session is closed
through either Close Session or Close Active Terminal.
* Added a feature to prevent a session from being closed (toggled via a user-
configured shortcut or the context menu) by way of Yakuake's own shortcuts
and actions, including D-Bus calls to get/set this state bit.
* Started fix for Disable Keyboard Input and Prevent Session Closing context
menus states being carried over to all sessions even if other sessions are
not really affected (still needs some more fixing though).
......@@ -296,8 +296,8 @@ void MainWindow::setupActions()
connect(action, SIGNAL(toggled(bool)), this, SLOT(handleContextDependentToggleAction(bool)));
m_contextDependentActions << action;
action = actionCollection()->addAction("toggle-session-closable");
action->setText(i18nc("@action", "Prevent Session Closing"));
action = actionCollection()->addAction("toggle-prevent-closing");
action->setText(i18nc("@action", "Prevent Closing"));
action->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_P));
connect(action, SIGNAL(toggled(bool)), this, SLOT(handleContextDependentToggleAction(bool)));
......@@ -141,7 +141,6 @@ void TabBar::readySessionMenu()
void TabBar::updateMoveActions(int index)
if (index == -1) return;
int sessionId = sessionAtTab(index);
......@@ -151,10 +150,17 @@ void TabBar::updateMoveActions(int index)
if (index != m_tabs.indexOf(m_tabs.last()))
void TabBar::updateToggleActions(int index)
int sessionId = sessionAtTab(index);
if (sessionId == -1) return;
KActionCollection* actionCollection = m_mainWindow->actionCollection();
void TabBar::contextMenuEvent(QContextMenuEvent* event)
......@@ -168,6 +174,7 @@ void TabBar::contextMenuEvent(QContextMenuEvent* event)
......@@ -184,6 +191,7 @@ void TabBar::contextMenuEvent(QContextMenuEvent* event)
......@@ -107,6 +107,7 @@ class TabBar : public QWidget
int tabAt(int x);
void updateMoveActions(int index);
void updateToggleActions(int index);
int drawButton(int x, int y, int index, QPainter& painter);
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