Bug 206845 - Hiding Terminal on closing last shell
Summary: Hiding Terminal on closing last shell
Status: RESOLVED FIXED
Alias: None
Product: yakuake
Classification: Unclassified
Component: general (show other bugs)
Version: 2.9.6
Platform: unspecified All
: NOR wishlist (vote)
Target Milestone: ---
Assignee: Eike Hein
URL:
Keywords:
: 227330 256844 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-09-09 11:43 UTC by m2j
Modified: 2011-12-05 21:47 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
patch to minimize yakuake on closing last tab (1.45 KB, patch)
2011-12-02 13:16 UTC, A JANARDHAN REDDY
Details
corrected patch (2.13 KB, patch)
2011-12-05 09:38 UTC, A JANARDHAN REDDY
Details

Note You need to log in before you can comment on or make changes to this bug.
Description m2j 2009-09-09 11:43:57 UTC
I think it would make sense to hide Yakuake on the event of closing all Terminals. Now a new instance is opened automatically. This would also behave also same as Konsole does. I don't see why someone should want to use 'exit' to get a new shell, as 'clear' would do all required it in most cases.
Comment 1 Eike Hein 2009-09-09 19:43:07 UTC
Well, the two are basically unrelated - even if Yakuake is hidden as you close the last shell, a new shell must be instanciated anyway, since you expect there to be one when you open the window again.
Comment 2 m2j 2009-09-10 01:36:21 UTC
I expected that this are two unrelated things.
My experience is, that it's more natural to close the terminal with typing exit than with searching for F12, another shortcut or even the mouse. Also all other terminal emulators I know are disappearing on closing the last shell (see Konsole, Dolphin (F4), XTerm, name it).
So my suggestion is to retract Yakuake at the event of closing the last shell. That there has to be opened a new shell, which can be used at the next opening of Yakuake is right, but it's not of interest for the user as he don't have to notice it.
So the retracting is just a additional action on the event of closing the last shell.
Comment 3 Eike Hein 2009-09-10 01:54:22 UTC
Yep, your suggestion to retract on exiting the last shell holds merit, and I'm likely to change the behavior for the next release. The first comment was just adding some tech detail :-).

Yakuake development has slowed of late as I was distracted with work and Konversation, but as Konversation is now winding down the 1.2 release cycle and I have a bunch of nice plans for Yakuake in the drawer, I expect it to pick up again more or less soon.
Comment 4 Eike Hein 2010-02-17 10:29:37 UTC
*** Bug 227330 has been marked as a duplicate of this bug. ***
Comment 5 Eike Hein 2010-11-14 10:28:58 UTC
*** Bug 256844 has been marked as a duplicate of this bug. ***
Comment 6 A JANARDHAN REDDY 2011-12-02 13:16:25 UTC
Created attachment 66306 [details]
patch to minimize yakuake on closing last tab

ON closing last tab, a new tab is created and minimized.
Comment 7 Eike Hein 2011-12-04 03:44:09 UTC
Thank you for your patch, but it won't work that way: There's no guarantee the window is already open when the last tab closes. The process in the terminal (which may not even be a shell depending on the profile) might quit on its own, or the tab might be closed via D-Bus, both while the window is closed. Your patch will then actually cause the window to open.

Also, you disable creating a new tab when the last one closes - which means that when the user reopens Yakuake they have to first manually create a new tab, which breaks the "quick access" nature of Yakuake.

If those are solved I'll happily apply it :).
Comment 8 A JANARDHAN REDDY 2011-12-05 09:38:42 UTC
Created attachment 66394 [details]
corrected patch

I haven't disabled creating a new tab when last tab closes, i have connected my custom signal to emit newTabRequested signal(check the patch once).

Now i have created a custom slot handleLastTabClosed to toggle window state only when it is visible. if a tab is closed when it is not visible, then nothing will happen
Comment 9 Eike Hein 2011-12-05 09:57:03 UTC
Right, read the original diff too hastily, sorry :). New patch looks good, except for a small indentation issue in the new slot. I'll correct that and commit it soon, once I get back to a box with my ssh key on it. Thanks!
Comment 10 m2j 2011-12-05 15:28:22 UTC
Thanks to both of you.
Comment 11 Eike Hein 2011-12-05 21:47:53 UTC
Git commit ebe9b2b30716c02e0d3e5f008465897093d453ac by Eike Hein.
Committed on 05/12/2011 at 22:38.
Pushed by hein into branch 'master'.

Retract after last tab closes.

Patch by A Janardhan Reddy, with minor cleanup by me.

BUG:206845

M  +1    -0    ChangeLog
M  +8    -0    app/mainwindow.cpp
M  +1    -0    app/mainwindow.h
M  +1    -1    app/tabbar.cpp
M  +1    -0    app/tabbar.h

http://commits.kde.org/yakuake/ebe9b2b30716c02e0d3e5f008465897093d453ac