Remove close buttons on individual tabs and replace with a single close button on the

right of the tab bar when the "Show 'New Tab' and 'Close Tab' buttons on tab bar" option
is enabled - which brings tab management back to the way it was in KDE 3.    

Several users (esp. those working with laptop trackpads) were having problems with
accidentally closing tabs.  It seems KTabBar's close buttons need some refinements before
they can be used in the terminal.

CCMAIL: wstephenson@kde.org


svn path=/trunk/KDE/kdebase/apps/konsole/; revision=809838
This commit is contained in:
Robert Knight
2008-05-19 16:19:05 +00:00
parent ec34f15889
commit 730281a5c8
7 changed files with 51 additions and 18 deletions

View File

@@ -584,7 +584,6 @@ ViewContainer* ViewManager::createContainer(const Profile::Ptr info)
default:
container = new StackedViewContainer(_viewSplitter);
}
container->setFeatures(ViewContainer::QuickCloseView);
// connect signals and slots
connect( container , SIGNAL(viewAdded(QWidget*,ViewProperties*)) , _containerSignalMapper ,
@@ -715,7 +714,7 @@ void ViewManager::applyProfile(TerminalDisplay* view , const Profile::Ptr info,
ViewContainer* container = _viewSplitter->activeContainer();
int tabBarMode = info->property<int>(Profile::TabBarMode);
int tabBarPosition = info->property<int>(Profile::TabBarPosition);
bool showNewTabButton = info->property<int>(Profile::ShowNewTabButton);
bool showNewCloseButtons = info->property<int>(Profile::ShowNewAndCloseTabButtons);
if ( tabBarMode == Profile::AlwaysHideTabBar )
container->setNavigationDisplayMode(ViewContainer::AlwaysHideNavigation);
@@ -734,14 +733,15 @@ void ViewManager::applyProfile(TerminalDisplay* view , const Profile::Ptr info,
if ( container->supportedNavigationPositions().contains(position) )
container->setNavigationPosition(position);
if (showNewTabButton &&
(container->supportedFeatures() & ViewContainer::QuickNewView))
if (showNewCloseButtons)
{
container->setFeatures(container->features() | ViewContainer::QuickNewView);
container->setFeatures(container->features()
| ViewContainer::QuickNewView | ViewContainer::QuickCloseView);
container->setNewViewMenu(createNewViewMenu());
}
else
container->setFeatures(container->features() & ~ViewContainer::QuickNewView);
container->setFeatures(container->features()
& ~ViewContainer::QuickNewView & ~ViewContainer::QuickCloseView);
}
// load colour scheme