summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/home.html12
-rw-r--r--src/homepage.cpp6
-rw-r--r--src/lineedit.cpp13
-rw-r--r--src/lineedit.h2
-rw-r--r--src/previewimage.cpp12
-rw-r--r--src/previewimage.h1
-rw-r--r--src/urlbar.cpp7
7 files changed, 32 insertions, 21 deletions
diff --git a/data/home.html b/data/home.html
index eddc080a..8b5cf296 100644
--- a/data/home.html
+++ b/data/home.html
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
-<title>rekonq home page</title>
+<title>%1 - rekonq</title>
<style type="text/css">
@@ -16,7 +16,7 @@ border:0;
}
body{
-background: url(%1/tile.gif) repeat-x #fff;
+background: url(%2/tile.gif) repeat-x #fff;
font-family: sans-serif;
font-size: 90%;
text-align: center;
@@ -38,7 +38,7 @@ margin-top: 2em;
}
h3{
-background: url(%1/category.png) no-repeat;
+background: url(%2/category.png) no-repeat;
padding: 0.2em;
margin-top: 1em;
margin-bottom: 0.5em;
@@ -112,7 +112,7 @@ margin-bottom: 3%;
}
.thumbnail object{
-background: url(%1/bg.png) no-repeat;
+background: url(%2/bg.png) no-repeat;
text-align: center;
padding: 14px 16px;
-webkit-background-size: 100% 100%;
@@ -143,9 +143,9 @@ margin-bottom: 0.5em;
<div id="container">
<div id="navigation">
-%2
+%3
</div>
-<div id="content">%3</div>
+<div id="content">%4</div>
</div>
</body>
diff --git a/src/homepage.cpp b/src/homepage.cpp
index 98304877..4735315a 100644
--- a/src/homepage.cpp
+++ b/src/homepage.cpp
@@ -74,24 +74,30 @@ QString HomePage::rekonqHomePage(const KUrl &url)
QString menu = homePageMenu(url);
QString speed;
+ QString title;
if(url == KUrl("rekonq:allTabs"))
{
speed = fillAllTabs();
+ title = i18n("All Tabs");
}
if(url == KUrl("rekonq:history"))
{
speed = fillHistory();
+ title = i18n("History");
}
if(url == KUrl("rekonq:bookmarks"))
{
speed = fillBookmarks();
+ title = i18n("Bookmarks");
}
if(url == KUrl("rekonq:home") || url == KUrl("rekonq:favorites"))
{
speed = fillFavorites();
+ title = i18n("Favorites");
}
QString html = QString(QLatin1String(file.readAll()))
+ .arg(title)
.arg(imagesPath)
.arg(menu)
.arg(speed)
diff --git a/src/lineedit.cpp b/src/lineedit.cpp
index b691e090..fe8095ab 100644
--- a/src/lineedit.cpp
+++ b/src/lineedit.cpp
@@ -66,19 +66,6 @@ void LineEdit::keyPressEvent(QKeyEvent *event)
}
-void LineEdit::contextMenuEvent(QContextMenuEvent *event)
-{
- KLineEdit::contextMenuEvent(event);
-}
-
-
-void LineEdit::focusInEvent(QFocusEvent *event)
-{
- selectAll();
-
- KLineEdit::focusInEvent(event);
-}
-
void LineEdit::mouseDoubleClickEvent(QMouseEvent *)
{
selectAll();
diff --git a/src/lineedit.h b/src/lineedit.h
index 40e8d6d4..67ded052 100644
--- a/src/lineedit.h
+++ b/src/lineedit.h
@@ -49,8 +49,6 @@ public:
protected:
virtual void keyPressEvent(QKeyEvent*);
- virtual void contextMenuEvent(QContextMenuEvent*);
- virtual void focusInEvent(QFocusEvent*);
virtual void mouseDoubleClickEvent(QMouseEvent *);
};
diff --git a/src/previewimage.cpp b/src/previewimage.cpp
index e4bcb339..03741770 100644
--- a/src/previewimage.cpp
+++ b/src/previewimage.cpp
@@ -216,6 +216,10 @@ void PreviewImage::contextMenuEvent(QContextMenuEvent* event)
a = new KAction(KIcon("edit-delete"), i18n("Remove Thumbnail"), this);
connect(a, SIGNAL(triggered(bool)), this, SLOT(removeMe()));
menu.addAction(a);
+
+ a = new KAction(KIcon("view-refresh"), i18n("Refresh Thumbnail"), &menu);
+ connect(a, SIGNAL(triggered(bool)), this, SLOT(refreshPreview()));
+ menu.addAction(a);
}
menu.addAction(historyMenu());
@@ -287,6 +291,14 @@ void PreviewImage::setUrlFromAction()
}
+void PreviewImage::refreshPreview()
+{
+ QString path = KStandardDirs::locateLocal("cache", QString("thumbs/") + guessNameFromUrl(m_url) + ".png", true);
+ QFile::remove(path);
+ loadUrlPreview(m_url);
+}
+
+
QString PreviewImage::guessNameFromUrl(QUrl url)
{
QString name = url.toString( QUrl::RemoveScheme | QUrl::RemoveUserInfo | QUrl::StripTrailingSlash );
diff --git a/src/previewimage.h b/src/previewimage.h
index 99e278f1..5568dd29 100644
--- a/src/previewimage.h
+++ b/src/previewimage.h
@@ -53,6 +53,7 @@ public slots:
void snapFinished();
void removeMe();
void setUrlFromAction();
+ void refreshPreview();
protected:
void contextMenuEvent(QContextMenuEvent *event);
diff --git a/src/urlbar.cpp b/src/urlbar.cpp
index 5ad8314e..12691519 100644
--- a/src/urlbar.cpp
+++ b/src/urlbar.cpp
@@ -154,6 +154,13 @@ void UrlBar::setProgress(int progress)
void UrlBar::slotUpdateUrl()
{
+ // Don't change my typed url...
+ if(hasFocus())
+ {
+ kDebug() << "Don't change my typed url...";
+ return;
+ }
+
if (count())
{
changeUrl(0, Application::icon(m_currentUrl), m_currentUrl);