diff options
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r-- | src/mainwindow.cpp | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 07d0e763..7a3d165f 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -191,7 +191,7 @@ void MainWindow::postLaunch() // --------- connect signals and slots connect(m_view, SIGNAL(setCurrentTitle(const QString &)), this, SLOT(slotUpdateWindowTitle(const QString &))); connect(m_view, SIGNAL(printRequested(QWebFrame *)), this, SLOT(printRequested(QWebFrame *))); - + // update toolbar actions signals connect(m_view, SIGNAL(tabsChanged()), this, SLOT(slotUpdateActions())); connect(m_view, SIGNAL(currentChanged(int)), this, SLOT(slotUpdateActions())); @@ -208,11 +208,6 @@ void MainWindow::postLaunch() // accept d'n'd setAcceptDrops(true); - - // set CookieJar window Id - const qlonglong winId = window()->winId(); - Application::cookieJar()->setWindowId(winId); - Application::networkAccessManager()->metaData().insert("window-id", QString::number(winId)); } @@ -239,7 +234,6 @@ void MainWindow::setupActions() // location bar a = new KAction(i18n("Location Bar"), this); - a->setShortcut(KShortcut(Qt::Key_F6)); a->setDefaultWidget(m_view->urlBar()); actionCollection()->addAction(QLatin1String("url_bar"), a); @@ -281,6 +275,12 @@ void MainWindow::setupActions() connect(m_view, SIGNAL(browserTabLoading(bool)), this, SLOT(slotBrowserLoading(bool))); slotBrowserLoading(false); //first init for blank start page + a = new KAction(this); + a->setShortcut(Qt::CTRL + Qt::Key_L); + actionCollection()->addAction(QLatin1String("open_location"), a); + connect(a, SIGNAL(triggered(bool)) , this, SLOT(slotOpenLocation())); + + // ============== Zoom Actions a = new KAction(KIcon("zoom-in"), i18n("&Enlarge Font"), this); a->setShortcut(KShortcut(Qt::CTRL | Qt::Key_Plus)); @@ -486,6 +486,13 @@ void MainWindow::slotUpdateBrowser() } +void MainWindow::slotOpenLocation() +{ + m_view->urlBar()->selectAll(); + m_view->urlBar()->setFocus(); +} + + void MainWindow::slotFileSaveAs() { KUrl srcUrl = currentTab()->url(); @@ -821,16 +828,6 @@ void MainWindow::slotOpenNext() } -// WARNING: this change will be there until rekonq'll have ONE mainwindow -// (probably forever..) -void MainWindow::geometryChangeRequested(const QRect &geometry) -{ - Q_UNUSED(geometry) -// setGeometry(geometry); - kDebug() << "No geometry change allowed"; -} - - bool MainWindow::queryClose() { if (m_view->count() > 1) |