diff options
| author | Yoann Laissus <yoann.laissus@gmail.com> | 2011-11-28 23:45:25 +0100 | 
|---|---|---|
| committer | Yoann Laissus <yoann.laissus@gmail.com> | 2011-11-28 23:45:25 +0100 | 
| commit | aadf1ccd77d413375d66a33967e0960f156e7355 (patch) | |
| tree | 1d42d7c59287db54882be9e925bd899cc0aea9bc /src | |
| parent | GCI Task : Improve tooltips of the history panel items (diff) | |
| download | rekonq-aadf1ccd77d413375d66a33967e0960f156e7355.tar.xz | |
GCI Task : Don't open useless tabs or windows for actions in the new tab page
Patch by Hüseyin Zengin. Thanks !
REVIEW: 103257
Diffstat (limited to 'src')
| -rw-r--r-- | src/application.cpp | 11 | 
1 files changed, 9 insertions, 2 deletions
| diff --git a/src/application.cpp b/src/application.cpp index 14e34686..27dca44f 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -414,18 +414,25 @@ void Application::loadUrl(const KUrl& url, const Rekonq::OpenType& type)          return;      } +    Rekonq::OpenType newType = type; +    // Don't open useless tabs or windows for actions in about: pages +    if(url.url().contains("about:") && url.url().contains("/")) +        newType = Rekonq::CurrentTab; +      // first, create the webview(s) to not let hangs UI..      WebTab *tab = 0;      MainWindow *w = 0; -    w = (type == Rekonq::NewWindow) +    w = (newType == Rekonq::NewWindow)          ? newMainWindow()          : mainWindow(); -    switch (type) +    switch (newType)      {      case Rekonq::NewTab:          if (ReKonfig::openTabNoWindow()) +        {              tab = w->mainView()->newWebTab(!ReKonfig::openTabsBack()); +        }          else          {              w = newMainWindow(); | 
