Bug 88428 - When only one tab on konsole, disable the "close tab" button, as in Konqueror
Summary: When only one tab on konsole, disable the "close tab" button, as in Konqueror
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 1.4
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-30 10:09 UTC by David Martin
Modified: 2004-09-21 20:43 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Martin 2004-08-30 10:09:24 UTC
Version:           1.4 (using KDE 3.3.0,  (3.1))
Compiler:          gcc version 3.3.4 (Debian 1:3.3.4-9)
OS:                Linux (i686) release 2.6.7

As in the subject, when we have only a tab on Konsole, the "close tab" button ("X") at the right of the tabs bar, would be disabled.

It would be nice imitating Konqueror's behaviuor.
Comment 1 Stephan Binner 2004-09-14 21:02:32 UTC
CVS commit by binner: 

Bug 88428: When only one tab on konsole, disable the "close tab" button, as in Konqueror (wishlist)
CCMAIL: 88428-done@bugs.kde.org


  M +3 -0      konsole.cpp   1.472.2.3


--- kdebase/konsole/konsole/konsole.cpp  #1.472.2.2:1.472.2.3
@@ -886,4 +886,5 @@ void Konsole::makeTabWidget()
     m_removeSessionButton->setIconSet( SmallIcon( "tab_remove" ) );
     m_removeSessionButton->adjustSize();
+    m_removeSessionButton->setEnabled(false);
     connect(m_removeSessionButton, SIGNAL(clicked()), SLOT(confirmCloseCurrentSession()));
     tabwidget->setCornerWidget( m_removeSessionButton, BottomRight );
@@ -2397,4 +2398,5 @@ void Konsole::addSession(TESession* s)
       enableMasterModeConnections();
     }
+    m_removeSessionButton->setEnabled(tabwidget->count()>1);
 }
 
@@ -2838,4 +2840,5 @@ void Konsole::doneSession(TESession* s)
     }
     delete s->widget();
+    m_removeSessionButton->setEnabled(tabwidget->count()>1);
   }
   session2action.remove(s);


Comment 2 Mario Tanev 2004-09-19 05:44:38 UTC
Actually, I am, and there might be other people unhappy about this. Since I am using mouse gestures which map uniquely to a keyboard shortcut, it is impossible to consistently close a Konqueror tab. One gesture will be needed when more than one tab is present, and another when only one tab is present. I use close tab gestures in konsole right now and this would worsen my experience. Mabe KDE should obtain a tab management KCM that would allow people to configure such things?

Thanks!
Comment 3 Kurt Hindenburg 2004-09-19 20:18:44 UTC
I agree with comment #2;  I'm not sure blindly following Konq is correct.
I would say we need a way to configure this option.
Comment 4 Stephan Binner 2004-09-21 20:43:00 UTC
The style guide says that the close tab action shouldn't close the application.