mirror of
https://github.com/KDE/konsole.git
synced 2026-05-03 12:15:33 -04:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user