From 4655fb0affb4753eade7d6c92bb699e9d7dd3fb5 Mon Sep 17 00:00:00 2001 From: Eike Hein Date: Mon, 5 Nov 2012 23:06:26 +0100 Subject: [PATCH] Add an option for keeping the window open after the last session closes. BUG:308850 --- app/config/behaviorsettings.ui | 107 ++++++++++++++++++++++++----------------- app/config/yakuake.kcfg | 5 ++ app/mainwindow.cpp | 2 +- 3 files changed, 68 insertions(+), 46 deletions(-) diff --git a/app/config/behaviorsettings.ui b/app/config/behaviorsettings.ui index 2fce1c7..3759f7b 100644 --- a/app/config/behaviorsettings.ui +++ b/app/config/behaviorsettings.ui @@ -6,8 +6,8 @@ 0 0 - 364 - 308 + 356 + 289 @@ -20,31 +20,49 @@ General - - + + - Open window after program start + Focus terminals when the mouse pointer is moved over them - - + + + + false + + + + 0 + 0 + + - If this option is enabled, the window will automatically open when the mouse pointer is moved to the same edge of the screen that it would open on when using the shortcut. + If this option is enabled, the shortcut normally used to open and retract the window will give it focus, rather than close it, if it has previously lost focus. Unless the window is set to show on all virtual desktops, this may cause the window manager to switch to the virtual desktop it currently resides on. - Open window when the mouse pointer touches the screen edge + Use Open/Retract action to focus window - - + + + + false + + + + 0 + 0 + + - Keep window open when it loses focus + Keep window above other windows - + Qt::Horizontal @@ -60,23 +78,31 @@ - - - - false + + + + Open window after program start - - - 0 - 0 - + + + + + + If this option is enabled, the window will automatically open when the mouse pointer is moved to the same edge of the screen that it would open on when using the shortcut. - Keep window above other windows + Open window when the mouse pointer touches the screen edge - + + + + Keep window open when it loses focus + + + + Qt::Horizontal @@ -92,29 +118,10 @@ - - - - false - - - - 0 - 0 - - - - If this option is enabled, the shortcut normally used to open and retract the window will give it focus, rather than close it, if it has previously lost focus. Unless the window is set to show on all virtual desktops, this may cause the window manager to switch to the virtual desktop it currently resides on. - - - Use Open/Retract action to focus window - - - - + - Focus terminals when the mouse pointer is moved over them + Keep window open after the last session is closed @@ -152,6 +159,16 @@ + + kcfg_OpenAfterStart + kcfg_PollMouse + kcfg_KeepOpen + kcfg_KeepAbove + kcfg_ToggleToFocus + kcg_KeepOpenAfterLastSessionCloses + kcfg_FocusFollowsMouse + kcfg_ConfirmQuit + diff --git a/app/config/yakuake.kcfg b/app/config/yakuake.kcfg index e70418b..a71e9b3 100644 --- a/app/config/yakuake.kcfg +++ b/app/config/yakuake.kcfg @@ -41,6 +41,11 @@ Whether to keep the application window open when it loses focus. true + + + Whether to keep the application window open after the last session is closed. + false + Whether the open/retract keyboard shortcut can be used to focus the application window when it is already open. diff --git a/app/mainwindow.cpp b/app/mainwindow.cpp index 3f51911..22b374d 100644 --- a/app/mainwindow.cpp +++ b/app/mainwindow.cpp @@ -538,7 +538,7 @@ void MainWindow::handleTerminalSilence(Terminal* terminal) void MainWindow::handleLastTabClosed() { - if (isVisible()) + if (isVisible() && !Settings::keepOpenAfterLastSessionCloses()) toggleWindowState(); } -- 1.8.1.5