diff options
Diffstat (limited to 'src/application.cpp')
-rw-r--r-- | src/application.cpp | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/src/application.cpp b/src/application.cpp index ee38c899..8324d212 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -85,21 +85,36 @@ int Application::newInstance() KCmdLineArgs::setCwd(QDir::currentPath().toUtf8()); KCmdLineArgs* args = KCmdLineArgs::parsedArgs(); - // creating new window - MainWindow *w = newMainWindow(); - if (args->count() > 0) { - loadUrl(args->arg(0)); - - for (int i = 1; i < args->count(); ++i) + // opening links in new tabs in ONE window + if(ReKonfig::externalUrlNewTab()) + { + // creating 1st new window + newMainWindow(); + loadUrl(args->arg(0)); + + for (int i = 1; i < args->count(); ++i) + { + loadUrl(args->arg(i), Rekonq::NewCurrentTab); + } + args->clear(); + + } + else { - loadUrl(args->arg(i), Rekonq::NewCurrentTab); + // opening ONE window for each URL + for (int i = 0; i < args->count(); ++i) + { + loadUrl(args->arg(i), Rekonq::NewWindow); + } + args->clear(); } - args->clear(); } else { + // creating new window + MainWindow *w = newMainWindow(); w->slotHome(); } |