summaryrefslogtreecommitdiff
path: root/src/application.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-09-06 11:04:03 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-09-06 11:04:03 +0200
commit42e6065c5519a0cc78e9d66345d6786d5ad15874 (patch)
treeb412a328f341c93bd07ccfc833b9befb5838e0af /src/application.cpp
parentSimplified CookieJar management (diff)
downloadrekonq-42e6065c5519a0cc78e9d66345d6786d5ad15874.tar.xz
Fixing rekonq Multi Windows behaviour and
Added options about tabbed (or not) browsing..
Diffstat (limited to 'src/application.cpp')
-rw-r--r--src/application.cpp31
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();
}