mirror of
https://github.com/KDE/konsole.git
synced 2026-05-02 03:36:34 -04:00
Add --new-tab command line option which starts new instance in a new tab rather than creating a new window.
svn path=/trunk/KDE/kdebase/apps/konsole/; revision=700656
This commit is contained in:
@@ -120,8 +120,25 @@ int Application::newInstance()
|
||||
return 0;
|
||||
}
|
||||
|
||||
// create a new window and session to run in it
|
||||
MainWindow* window = newMainWindow();
|
||||
// create a new window or use an existing one
|
||||
MainWindow* window = 0;
|
||||
|
||||
if ( args->isSet("new-tab") )
|
||||
{
|
||||
QListIterator<QWidget*> iter(topLevelWidgets());
|
||||
iter.toBack();
|
||||
while ( iter.hasPrevious() )
|
||||
{
|
||||
window = qobject_cast<MainWindow*>(iter.previous());
|
||||
if ( window != 0 )
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( window == 0 )
|
||||
{
|
||||
window = newMainWindow();
|
||||
}
|
||||
|
||||
if ( args->isSet("profile") )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user