diff options
| author | Andrea Diamantini <adjam7@gmail.com> | 2010-02-19 02:20:18 +0100 | 
|---|---|---|
| committer | Andrea Diamantini <adjam7@gmail.com> | 2010-02-19 02:20:18 +0100 | 
| commit | eaeb2fd551b212eff656b65169ce98ca20485370 (patch) | |
| tree | 3f6f553359a5c40a271c93c7a5c79d67767d0336 /src | |
| parent | Fix settings webkit UI (broken on the krazy fix from (diff) | |
| download | rekonq-eaeb2fd551b212eff656b65169ce98ca20485370.tar.xz | |
Set rekonq page (and fix focus) on new window creation.
BUG: 226851
Diffstat (limited to 'src')
| -rw-r--r-- | src/application.cpp | 7 | ||||
| -rw-r--r-- | src/application.h | 4 | ||||
| -rw-r--r-- | src/mainwindow.cpp | 2 | 
3 files changed, 10 insertions, 3 deletions
| diff --git a/src/application.cpp b/src/application.cpp index a5b4e759..e5b76745 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -396,3 +396,10 @@ void Application::loadResolvedUrl(ThreadWeaver::Job *job)              historyManager()->addHistoryEntry( url.prettyUrl() );      }  } + + +void Application::newWindow() +{ +    loadUrl( KUrl("about:home"), Rekonq::NewWindow ); +    mainWindow()->mainView()->urlBar()->setFocus(); +} diff --git a/src/application.h b/src/application.h index f20f537b..30ec4839 100644 --- a/src/application.h +++ b/src/application.h @@ -100,6 +100,7 @@ public:      static Application *instance();      MainWindow *mainWindow(); +    MainWindow *newMainWindow();      MainWindowList mainWindowList();      static KIcon icon(const KUrl &url); @@ -117,8 +118,6 @@ public slots:       */      void saveConfiguration() const; -    MainWindow *newMainWindow(); -      void loadUrl( const KUrl& url,                    const Rekonq::OpenType& type = Rekonq::CurrentTab                  ); @@ -127,6 +126,7 @@ public slots:                    const Rekonq::OpenType& type = Rekonq::CurrentTab                  );     +    void newWindow();      void removeMainWindow(MainWindow *window);  private slots: diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index a4df5756..4c24440c 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -265,7 +265,7 @@ void MainWindow::setupActions()      a = new KAction(KIcon("window-new"), i18n("&New Window"), this);      a->setShortcut(KShortcut(Qt::CTRL | Qt::Key_N));      actionCollection()->addAction(QLatin1String("new_window"), a); -    connect(a, SIGNAL(triggered(bool)), Application::instance(), SLOT(newMainWindow())); +    connect(a, SIGNAL(triggered(bool)), Application::instance(), SLOT(newWindow()));      // Standard Actions      KStandardAction::open(this, SLOT(fileOpen()), actionCollection()); | 
