summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/application.cpp10
-rw-r--r--src/mainview.cpp7
-rw-r--r--src/mainwindow.cpp13
-rw-r--r--src/settings_fonts.ui6
-rw-r--r--src/urlbar.cpp4
-rw-r--r--src/urlbar.h4
6 files changed, 25 insertions, 19 deletions
diff --git a/src/application.cpp b/src/application.cpp
index 35d52a23..8e1740fc 100644
--- a/src/application.cpp
+++ b/src/application.cpp
@@ -187,7 +187,15 @@ BookmarkProvider *Application::bookmarkProvider()
KIcon Application::icon(const KUrl &url)
{
- KIcon icon = KIcon(QWebSettings::iconForUrl(url));
+ KIcon icon;
+ if(url.isEmpty())
+ {
+ icon = KIcon("text-html");
+ }
+ else
+ {
+ icon = KIcon(QWebSettings::iconForUrl(url));
+ }
if (icon.isNull())
{
icon = KIcon("text-html");
diff --git a/src/mainview.cpp b/src/mainview.cpp
index 9dfa797d..832a0683 100644
--- a/src/mainview.cpp
+++ b/src/mainview.cpp
@@ -253,12 +253,12 @@ void MainView::slotCurrentChanged(int index)
if (oldWebView)
{
- // disconnecting webview with urlbar
+ // disconnecting webview from urlbar
disconnect(oldWebView, SIGNAL(loadProgress(int)), urlBar(), SLOT(slotUpdateProgress(int)));
disconnect(oldWebView, SIGNAL(loadFinished(bool)), urlBar(), SLOT(slotLoadFinished(bool)));
disconnect(oldWebView, SIGNAL(urlChanged(const QUrl &)), urlBar(), SLOT(setUrl(const QUrl &)));
- disconnect(oldWebView, SIGNAL(iconChanged()), urlBar(), SLOT(slotUpdateUrl()));
+ // disconnecting webpage from mainview
disconnect(oldWebView->page(), SIGNAL(statusBarMessage(const QString&)),
this, SIGNAL(showStatusBarMessage(const QString&)));
disconnect(oldWebView->page(), SIGNAL(linkHovered(const QString&, const QString&, const QString&)),
@@ -269,7 +269,6 @@ void MainView::slotCurrentChanged(int index)
connect(webView, SIGNAL(loadProgress(int)), urlBar(), SLOT(slotUpdateProgress(int)));
connect(webView, SIGNAL(loadFinished(bool)), urlBar(), SLOT(slotLoadFinished(bool)));
connect(webView, SIGNAL(urlChanged(const QUrl &)), urlBar(), SLOT(setUrl(const QUrl &)));
- connect(webView, SIGNAL(iconChanged()), urlBar(), SLOT(slotUpdateUrl()));
connect(webView->page(), SIGNAL(statusBarMessage(const QString&)),
this, SIGNAL(showStatusBarMessage(const QString&)));
@@ -531,6 +530,8 @@ void MainView::webViewIconChanged()
delete movie;
label->setMovie(0);
label->setPixmap(icon.pixmap(16, 16));
+
+ urlBar()->slotUpdateUrl();
}
}
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index b2c1fed1..f18cf1d2 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -159,7 +159,6 @@ SidePanel *MainWindow::sidePanel()
void MainWindow::setupToolbar()
{
KToolBar *mainToolBar = new KToolBar( QString("MainToolBar"), this, Qt::TopToolBarArea);
- mainToolBar->setContextMenuPolicy(Qt::PreventContextMenu);
mainToolBar->setToolButtonStyle(Qt::ToolButtonIconOnly);
mainToolBar->addAction( actionByName("history_back") );
mainToolBar->addAction( actionByName("history_forward") );
@@ -251,7 +250,6 @@ void MainWindow::setupActions()
KStandardAction::home(this, SLOT(slotHome()), actionCollection());
KStandardAction::preferences(this, SLOT(slotPreferences()), actionCollection());
- KStandardAction::showMenubar(this, SLOT(slotShowMenubar(bool)), actionCollection());
// WEB Actions (NO KStandardActions..)
a = KStandardAction::redisplay(m_view, SLOT(slotWebReload()), actionCollection());
@@ -342,7 +340,7 @@ void MainWindow::setupActions()
connect(a, SIGNAL(triggered(bool)), m_view, SLOT(previousTab()));
// clear private data action
- a = new KAction(KIcon("edit-clear"), i18n("Clear Private Data"), this);
+ a = new KAction(KIcon("edit-clear"), i18n("Clear Private Data..."), this);
actionCollection()->addAction(QLatin1String("clear_private_data"), a);
connect(a, SIGNAL(triggered(bool)), this, SLOT(clearPrivateData()));
}
@@ -474,10 +472,9 @@ void MainWindow::slotUpdateConfiguration()
defaultSettings->setAttribute(QWebSettings::OfflineStorageDatabaseEnabled, ReKonfig::offlineStorageDatabaseEnabled());
defaultSettings->setAttribute(QWebSettings::OfflineWebApplicationCacheEnabled, ReKonfig::offlineWebApplicationCacheEnabled());
defaultSettings->setAttribute(QWebSettings::LocalStorageDatabaseEnabled, ReKonfig::localStorageDatabaseEnabled());
- /**
- * Applies user defined CSS to all open webpages. If there no longer is a
- * user defined CSS removes it from all open webpages.
- */
+
+ // Applies user defined CSS to all open webpages. If there no longer is a
+ // user defined CSS removes it from all open webpages.
defaultSettings->setUserStyleSheetUrl(ReKonfig::userCSS());
// ====== load Settings on main classes
@@ -1033,7 +1030,7 @@ void MainWindow::slotAboutToShowBackMenu()
QWebHistoryItem item = history->backItems(history->count()).at(i);
KAction *action = new KAction(this);
action->setData(-1*(historyCount - i - 1));
- QIcon icon = Application::instance()->icon(item.url());
+ QIcon icon = Application::icon(item.url());
action->setIcon(icon);
action->setText(item.title());
m_historyBackMenu->addAction(action);
diff --git a/src/settings_fonts.ui b/src/settings_fonts.ui
index 3a00358d..98efce16 100644
--- a/src/settings_fonts.ui
+++ b/src/settings_fonts.ui
@@ -25,14 +25,14 @@
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
- <string>Standard font</string>
+ <string>Standard font:</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
- <string>Fixed font</string>
+ <string>Fixed font:</string>
</property>
</widget>
</item>
@@ -58,7 +58,7 @@
<item>
<widget class="QLabel" name="label_3">
<property name="text">
- <string>Font size</string>
+ <string>Font size:</string>
</property>
</widget>
</item>
diff --git a/src/urlbar.cpp b/src/urlbar.cpp
index 91c6e1e0..24df96f7 100644
--- a/src/urlbar.cpp
+++ b/src/urlbar.cpp
@@ -84,9 +84,9 @@ UrlBar::UrlBar(QWidget *parent)
QPalette p = view()->palette();
p.setColor(QPalette::Base, palette().color(QPalette::Base));
view()->setPalette(p);
-
+/*
// set empty item with default icon
- slotUpdateUrl();
+ slotUpdateUrl();*/
}
diff --git a/src/urlbar.h b/src/urlbar.h
index 41d7945e..a12c5f62 100644
--- a/src/urlbar.h
+++ b/src/urlbar.h
@@ -70,12 +70,12 @@ signals:
public slots:
void setUrl(const QUrl &url);
void slotUpdateProgress(int progress);
-
+ void slotUpdateUrl();
+
private slots:
void slotActivated(const QString&);
void slotLoadFinished(bool);
void slotCleared();
- void slotUpdateUrl();
protected:
virtual void paintEvent(QPaintEvent *event);