D16482: feat: Don't quit when last tab closes

Andrew Smith noreply at phabricator.kde.org
Sun Oct 28 13:22:41 GMT 2018


EspadaV8 created this revision.
EspadaV8 added a reviewer: Konsole.
EspadaV8 added a project: Konsole.
EspadaV8 requested review of this revision.

REVISION SUMMARY
  I have only recently found out about `--background-mode` while looking into a alternative to Yakuake (due to its issue with panel focusing on show/hide and not respecting the 'open in current folder' option).
  
  Background mode in Konsole works well for me, but there are times when I close the last view (either by mistake or just because I want to 'start fresh'). Currently Konsole will close in this case and then need relaunching.
  
  This PR adds an option call `PersistAfterLastClose` (if you can think of something nicer to call it I'm happy to change it). When this setting is `true`, instead of calling `MainWindow::close` the new method `MainWindow::handleLastTabClosed` is called which checks this setting and will instead instantly create a new session and hide the window (which is what Yakuake will do).
  
  This is my first bit of KDE work and it has been a while since I've done any Qt/C++ so please let me know if anything needs changing.

REPOSITORY
  R319 Konsole

REVISION DETAIL
  https://phabricator.kde.org/D16482

AFFECTED FILES
  src/MainWindow.cpp
  src/MainWindow.h
  src/settings/GeneralSettings.ui
  src/settings/konsole.kcfg

To: EspadaV8, #konsole
Cc: konsole-devel, #konsole, ngraham, maximilianocuria, hindenburg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/konsole-devel/attachments/20181028/7dc0cbfd/attachment.html>


More information about the konsole-devel mailing list