[Xfce-bugs] [Bug 11921] New: Unintentionally closing window when closing tabs

bugzilla-daemon at xfce.org bugzilla-daemon at xfce.org
Wed May 20 12:35:25 CEST 2015


https://bugzilla.xfce.org/show_bug.cgi?id=11921

            Bug ID: 11921
           Summary: Unintentionally closing window when closing tabs
    Classification: Xfce
           Product: Thunar
           Version: 1.6.9
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: Medium
         Component: general
          Assignee: xfce-bugs at xfce.org
          Reporter: candyangel at electricjungle.org
        QA Contact: nick at xfce.org
                CC: benny at xfce.org, hjudt at xfce.org

Created attachment 6269
  --> https://bugzilla.xfce.org/attachment.cgi?id=6269&action=edit
Patch to add 'Preserve Final Tab' option/behaviour

This is a very minor thing but this catches me out a lot when using Thunar,
even though I know the behaviour (it also catches me out when using the Leo
editor), and I end up closing the Thunar window unintentionally quite often.

Current behaviour is that Thunar will close the window upon closing the last
tab, which is the same behaviour as a lot of other file managers (apparently. I
only use Thunar, so I don't know personally).

In my opinion, "Close Tab" (Ctrl-W) should only close the tab if there is a tab
to be closed (i.e. the tab bar is visible). Otherwise, closing the window is
not what the user requested.

However, this would be a significant change in behaviour and would require
those that wanted to keep the current behaviour to enable the "Always Show
Tabs" (hidden?) option. This would be pretty unreasonable (along with the
additional bug reports that Ctrl-W had suddenly "stopped working").

I've attached a proof-of-concept patch which adds a "Preserve Final Tab"
preference (in "Behaviour"), which prevents Thunar from closing the last tab.
It isn't ideal ("Tabs" frame is actually packed inside the "Middle Click" frame
because vbox gets redefined by the "Middle Click" section..) but demonstrates
the behaviour I want adding and shows I am willing to/can provide a patch to do
so, if it would be acceptable for inclusion.

It may be better to just prompt the user ("Close window? Y/N") if an attempt to
close the last tab is made. I'm okay with coding any solution that would be
acceptable!

Please note that I don't code in C, nor have I ever used GTK, so the code may
be rough and need cleaning up.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Xfce-bugs mailing list