Bug 397101

Summary: Option to make ctrl+w (quit tab operation) exit dolphin
Product: [Applications] dolphin Reporter: Shreyansh Jain <mr.shreyanshk>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist CC: a.saoutkin, bernie, elvis.angelaccio, mail, nate
Priority: NOR Keywords: junior-jobs, usability
Version: 18.08.1   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 18.12.0
Sentry Crash Report:

Description Shreyansh Jain 2018-08-02 18:20:13 UTC
Currently in non-tab mode of dolphin, shortcut assigned to "close tab" (default: ctrl+w) event wont quit the last tab and close the window. The last tab on the window would only close on "quit" (default: ctrl+q) event.

Please consider making this act more like firefox/chrome where ctrl+w also closes the window too with last tab.
Or, at least provide a setting where such behaviour could be enabled.
Comment 1 Julian Steinmann 2018-08-03 12:05:31 UTC
Seems reasonable, will discuss with others whether this should be the standard behavior or if we need an option for this.
Comment 2 Nate Graham 2018-08-09 20:33:21 UTC
+1, I agree. One wrinkle is that it should only quit Dolphin when there's only one tab visible (i.e. when the tab bar isn't visible).

I support adding this behavior to all KDE apps that use tabs, but as far as I can tell, it would need to be done for each app individually. So let's keep this for Dolphin.
Comment 3 a.saoutkin 2018-09-03 22:38:17 UTC
Currently trying to add this feature. Seems to me that specifically ctrl-w is not emitting a call to close the tab when there is only one of them. However if you don't hide the tab bar, you can close the window (if you call quit() within it) by pressing the close tab button as the closeTab function is called but I ctrl-w doesn't do anything specifically when there is only one tab. But I can't seem to figure out why that is. Might possibly be related to how shortcuts are done in KStandardAction.
Comment 4 Nate Graham 2018-10-10 02:31:10 UTC
There's a patch: https://phabricator.kde.org/D15278
Comment 5 Elvis Angelaccio 2018-10-27 09:27:58 UTC
Git commit ac118ae1c236bee756593dea91efda6cde6fa634 by Elvis Angelaccio, on behalf of Alexander Saoutkin.
Committed on 27/10/2018 at 09:24.
Pushed by elvisangelaccio into branch 'master'.

Close Dolphin if last tab closed

Summary:
Allows closing of last tab via shortcut or menubar (File->Close Tab), which then results in closing dolphin.

Test Plan: [Manual] Check closing tab closes dolphin via shortcut and menubar.

Reviewers: #dolphin, ngraham, #vdg, elvisangelaccio

Reviewed By: #dolphin, ngraham, #vdg, elvisangelaccio

Subscribers: thsurrel, svenmauch, abetts, elvisangelaccio, ngraham, #dolphin, kfm-devel

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D15278

M  +0    -2    src/dolphinmainwindow.cpp
M  +2    -1    src/dolphintabwidget.cpp

https://commits.kde.org/dolphin/ac118ae1c236bee756593dea91efda6cde6fa634