From 48b25611c94d380b40948a3de0bfab5678668e1d Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Wed, 25 Mar 2009 00:47:24 +0100 Subject: Huge update. Fixed quite all of the settings troubles.. From now on, we (mainly) go on WebView bugfixing.. --- src/mainwindow.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index df596bdd..e286cc36 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -309,7 +309,7 @@ void MainWindow::slotUpdateConf() { // ============== General ================== m_homePage = ReKonfig::homePage(); - + mainView()->showTabBar(); // =========== Fonts ============== QWebSettings *defaultSettings = QWebSettings::globalSettings(); @@ -320,33 +320,29 @@ void MainWindow::slotUpdateConf() defaultSettings->setFontFamily(QWebSettings::StandardFont, standardFont.family()); defaultSettings->setFontSize(QWebSettings::DefaultFontSize, fnSize); - QFont fixedFont = ReKonfig::fixedFont(); defaultSettings->setFontFamily(QWebSettings::FixedFont, fixedFont.family()); defaultSettings->setFontSize(QWebSettings::DefaultFixedFontSize, fnSize); - // =========== Privacy ============== - bool arePluginsEnabled = ReKonfig::enablePlugins(); bool isJavascriptEnabled = ReKonfig::enableJavascript(); defaultSettings->setAttribute(QWebSettings::PluginsEnabled, arePluginsEnabled); defaultSettings->setAttribute(QWebSettings::JavascriptEnabled, isJavascriptEnabled); - // load Settings on main classes + // ====== load Settings on main classes Application::networkAccessManager()->loadSettings(); Application::cookieJar()->loadSettings(); Application::historyManager()->loadSettings(); - // ============ Proxy ================ } void MainWindow::slotUpdateBrowser() { slotUpdateConf(); - tabWidget()->reloadAllTabs(); + mainView()->reloadAllTabs(); } @@ -435,7 +431,7 @@ void MainWindow::slotPreferences() { // an instance the dialog could be already created and could be cached, // in which case you want to display the cached dialog - if ( SettingsDialog::showDialog( "settings" ) ) + if ( SettingsDialog::showDialog( "rekonfig" ) ) return; // we didn't find an instance of this dialog, so lets create it @@ -546,7 +542,7 @@ void MainWindow::slotPrivateBrowsing() MainWindow* win = Application::instance()->mainWindow(); win->m_lastSearch = QString::null; - win->tabWidget()->clear(); + win->mainView()->clear(); } } @@ -688,7 +684,7 @@ void MainWindow::slotToggleInspector(bool enable) // } -MainView *MainWindow::tabWidget() const +MainView *MainWindow::mainView() const { return m_view; } -- cgit v1.2.1