diff options
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r-- | src/mainwindow.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 83ff514b..73ec3d6d 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -89,8 +89,8 @@ MainWindow::MainWindow() : KXmlGuiWindow() , m_view(new MainView(this)) - , m_findBar(new FindBar(this)) , m_searchBar(new SearchBar(this)) + , m_findBar(new FindBar(this)) , m_sidePanel(0) { // updating rekonq configuration @@ -143,6 +143,12 @@ MainWindow::~MainWindow() } +SidePanel *MainWindow::sidePanel() +{ + return m_sidePanel; +} + + void MainWindow::postLaunch() { // setup history menu: this has to be done AFTER setupGUI!! @@ -153,11 +159,6 @@ void MainWindow::postLaunch() connect(m_view, SIGNAL(loadProgress(int)), this, SLOT(slotLoadProgress(int))); connect(m_view, SIGNAL(printRequested(QWebFrame *)), this, SLOT(printRequested(QWebFrame *))); - // FIXME: these slots will be commented out until rekonq will have just ONE mainwindow -// connect(m_view, SIGNAL(geometryChangeRequested(const QRect &)), this, SLOT(geometryChangeRequested(const QRect &))); -// connect(m_view, SIGNAL(menuBarVisibilityChangeRequested(bool)), menuBar(), SLOT(setVisible(bool))); -// connect(m_view, SIGNAL(statusBarVisibilityChangeRequested(bool)), statusBar(), SLOT(setVisible(bool))); - // status bar messages connect(m_view, SIGNAL(showStatusBarMessage(const QString&)), statusBar(), SLOT(showMessage(const QString&))); connect(m_view, SIGNAL(linkHovered(const QString&)), statusBar(), SLOT(showMessage(const QString&))); @@ -221,13 +222,13 @@ void MainWindow::setupActions() KStandardAction::printPreview(this, SLOT(slotFilePrintPreview()), actionCollection()); KStandardAction::print(this, SLOT(slotFilePrint()), actionCollection()); KStandardAction::quit(this , SLOT(close()), actionCollection()); - KStandardAction::find(this, SLOT(slotViewFindBar()) , actionCollection()); + KStandardAction::find(m_findBar, SLOT(show()) , actionCollection()); KStandardAction::findNext(this, SLOT(slotFindNext()) , actionCollection()); KStandardAction::findPrev(this, SLOT(slotFindPrevious()) , actionCollection()); // we all like "short" shortcuts.. ;) a = KStandardAction::fullScreen(this, SLOT(slotViewFullScreen(bool)), this, actionCollection()); - a->setShortcut(KShortcut(Qt::Key_F11)); + a->setShortcut(KShortcut(Qt::Key_F11, Qt::CTRL + Qt::SHIFT + Qt::Key_F)); KStandardAction::home(this, SLOT(slotHome()), actionCollection()); KStandardAction::preferences(this, SLOT(slotPreferences()), actionCollection()); @@ -572,7 +573,7 @@ void MainWindow::printRequested(QWebFrame *frame) QPrinter printer; QPointer<QPrintDialog> dialog = KdePrint::createPrintDialog(&printer, this); - if (dialog->exec() == QDialog::Accepted) + if (dialog->exec() == KDialog::Ok) { frame->print(&printer); } @@ -614,6 +615,7 @@ void MainWindow::slotPrivateBrowsing(bool enable) } } + void MainWindow::slotFind(const QString & search) { if (!currentTab()) @@ -623,12 +625,6 @@ void MainWindow::slotFind(const QString & search) } -void MainWindow::slotViewFindBar() -{ - m_findBar->showFindBar(); -} - - void MainWindow::slotFindNext() { if (!currentTab() && m_lastSearch.isEmpty()) @@ -780,10 +776,10 @@ void MainWindow::slotToggleInspector(bool enable) if (enable) { int result = KMessageBox::questionYesNo(this, - i18n("The web inspector will only work correctly for pages that were loaded after enabling.\n" - "Do you want to reload all pages?"), - i18n("Web Inspector") - ); + i18n("The web inspector will only work correctly for pages that were loaded after enabling.\n" + "Do you want to reload all pages?"), + i18n("Web Inspector") + ); if (result == KMessageBox::Yes) { @@ -884,7 +880,7 @@ void MainWindow::slotOpenNext() } -// FIXME: this change will be there until rekonq'll have ONE mainwindow +// WARNING: this change will be there until rekonq'll have ONE mainwindow // (probably forever..) void MainWindow::geometryChangeRequested(const QRect &geometry) { @@ -910,12 +906,16 @@ bool MainWindow::queryClose() int answer = KMessageBox::questionYesNoCancel( this, - i18np("Are you sure you want to close the window?\n" "You have 1 tab open","Are you sure you want to close the window?\n" "You have %1 tabs open" , m_view->count()), - i18n("Are you sure you want to close the window?"), - KStandardGuiItem::quit(), - KGuiItem(i18n("C&lose Current Tab"), KIcon("tab-close")), - KStandardGuiItem::cancel(), - "confirmClosingMultipleTabs" + i18np( "Are you sure you want to close the window?\n" + "You have 1 tab open", + "Are you sure you want to close the window?\n" + "You have %1 tabs open", + m_view->count()), + i18n("Are you sure you want to close the window?"), + KStandardGuiItem::quit(), + KGuiItem(i18n("C&lose Current Tab"), KIcon("tab-close")), + KStandardGuiItem::cancel(), + "confirmClosingMultipleTabs" ); switch (answer) |