summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/application.cpp82
-rw-r--r--src/application.h2
-rw-r--r--src/data/CMakeLists.txt2
-rw-r--r--src/data/kget-icon.pngbin743 -> 0 bytes
-rw-r--r--src/data/rss-icon.pngbin794 -> 0 bytes
-rw-r--r--src/data/ssl-icon.pngbin780 -> 0 bytes
-rw-r--r--src/urlbar/lineedit.cpp20
-rw-r--r--src/urlbar/urlbar.cpp3
8 files changed, 63 insertions, 46 deletions
diff --git a/src/application.cpp b/src/application.cpp
index 3405a1b2..48264440 100644
--- a/src/application.cpp
+++ b/src/application.cpp
@@ -289,53 +289,23 @@ void Application::loadUrl(const KUrl& url, const Rekonq::OpenType& type)
if (url.isEmpty())
return;
- // sanitization
- KUrl loadingUrl( url.toEncoded() );
-
- if ( !loadingUrl.isValid() )
+ if ( !url.isValid() )
{
- KMessageBox::error(0, i18n("Malformed URL:\n%1", loadingUrl.url(KUrl::RemoveTrailingSlash)));
+ KMessageBox::error(0, i18n("Malformed URL:\n%1", url.url(KUrl::RemoveTrailingSlash)));
return;
}
- // first, create the webview(s) to not let hangs UI..
- WebTab *tab = 0;
- MainWindow *w = 0;
- w = (type == Rekonq::NewWindow)
- ? newMainWindow()
- : mainWindow();
-
- switch(type)
- {
- case Rekonq::SettingOpenTab:
- tab = w->mainView()->newWebTab(!ReKonfig::openTabsBack(), ReKonfig::openTabsNearCurrent());
- break;
- case Rekonq::NewCurrentTab:
- tab = w->mainView()->newWebTab(true);
- break;
- case Rekonq::NewBackTab:
- tab = w->mainView()->newWebTab(false, ReKonfig::openTabsNearCurrent());
- break;
- case Rekonq::NewWindow:
- case Rekonq::CurrentTab:
- tab = w->mainView()->currentWebTab();
- break;
- };
-
- WebView *view = tab->view();
-
- if (view)
- {
- FilterUrlJob *job = new FilterUrlJob(view, loadingUrl.pathOrUrl(), this);
- Weaver::instance()->enqueue(job);
- }
+ prepareLoading(url.pathOrUrl(), type);
}
void Application::loadUrl(const QString& urlString, const Rekonq::OpenType& type)
-{
- return loadUrl( QUrl::fromUserInput(urlString), type );
+{
+ if(urlString.isEmpty())
+ return;
+
+ prepareLoading(urlString, type);
}
@@ -400,3 +370,39 @@ void Application::newWindow()
loadUrl( KUrl("about:home"), Rekonq::NewWindow );
mainWindow()->mainView()->urlBarWidget()->setFocus();
}
+
+
+void Application::prepareLoading(const QString& urlString, const Rekonq::OpenType& type)
+{
+ // first, create the webview(s) to not let hangs UI..
+ WebTab *tab = 0;
+ MainWindow *w = 0;
+ w = (type == Rekonq::NewWindow)
+ ? newMainWindow()
+ : mainWindow();
+
+ switch(type)
+ {
+ case Rekonq::SettingOpenTab:
+ tab = w->mainView()->newWebTab(!ReKonfig::openTabsBack(), ReKonfig::openTabsNearCurrent());
+ break;
+ case Rekonq::NewCurrentTab:
+ tab = w->mainView()->newWebTab(true);
+ break;
+ case Rekonq::NewBackTab:
+ tab = w->mainView()->newWebTab(false, ReKonfig::openTabsNearCurrent());
+ break;
+ case Rekonq::NewWindow:
+ case Rekonq::CurrentTab:
+ tab = w->mainView()->currentWebTab();
+ break;
+ };
+
+ WebView *view = tab->view();
+
+ if (view)
+ {
+ FilterUrlJob *job = new FilterUrlJob(view, urlString, this);
+ Weaver::instance()->enqueue(job);
+ }
+}
diff --git a/src/application.h b/src/application.h
index 4340b004..760f7943 100644
--- a/src/application.h
+++ b/src/application.h
@@ -141,6 +141,8 @@ private slots:
void loadResolvedUrl(ThreadWeaver::Job *);
private:
+ void prepareLoading(const QString& urlString, const Rekonq::OpenType& type);
+
static QWeakPointer<HistoryManager> s_historyManager;
static QWeakPointer<BookmarkProvider> s_bookmarkProvider;
static QWeakPointer<SessionManager> s_sessionManager;
diff --git a/src/data/CMakeLists.txt b/src/data/CMakeLists.txt
index 481f8cda..6ff3fefd 100644
--- a/src/data/CMakeLists.txt
+++ b/src/data/CMakeLists.txt
@@ -2,7 +2,7 @@ INSTALL(
FILES
bg2.png bg.png tile.gif category.png button.png
busywidget.gif loading.mng
- webkit-icon.png rss-icon.png kget-icon.png ssl-icon.png
+ webkit-icon.png
DESTINATION ${DATA_INSTALL_DIR}/rekonq/pics
)
diff --git a/src/data/kget-icon.png b/src/data/kget-icon.png
deleted file mode 100644
index 367d2bca..00000000
--- a/src/data/kget-icon.png
+++ /dev/null
Binary files differ
diff --git a/src/data/rss-icon.png b/src/data/rss-icon.png
deleted file mode 100644
index 46fe641b..00000000
--- a/src/data/rss-icon.png
+++ /dev/null
Binary files differ
diff --git a/src/data/ssl-icon.png b/src/data/ssl-icon.png
deleted file mode 100644
index 2c71397b..00000000
--- a/src/data/ssl-icon.png
+++ /dev/null
Binary files differ
diff --git a/src/urlbar/lineedit.cpp b/src/urlbar/lineedit.cpp
index 8e689a46..09c158fa 100644
--- a/src/urlbar/lineedit.cpp
+++ b/src/urlbar/lineedit.cpp
@@ -63,10 +63,9 @@ LineEdit::LineEdit(QWidget* parent)
// cosmetic
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
setMinimumWidth(200);
- setMinimumHeight(20);
+ setMinimumHeight(26);
// initial style
- _icon->move(4,6);
setStyleSheet( QString("LineEdit { padding: 0 0 0 %1px;} ").arg(_icon->sizeHint().width()) );
// doesn't show the clear button
@@ -143,13 +142,16 @@ IconButton *LineEdit::addRightIcon(LineEdit::icon ic)
switch(ic)
{
case LineEdit::KGet:
- rightIcon->setIcon( QIcon(KStandardDirs::locate("data", "rekonq/pics/kget-icon.png")) );
+ rightIcon->setIcon( KIcon("download") );
+ rightIcon->setToolTip( i18n("List all links with KGet") );
break;
case LineEdit::RSS:
- rightIcon->setIcon( QIcon(KStandardDirs::locate("data", "rekonq/pics/rss-icon.png")) );
+ rightIcon->setIcon( KIcon("application-rss+xml") );
+ rightIcon->setToolTip( i18n("List all available RSS feeds") );
break;
case LineEdit::SSL:
- rightIcon->setIcon( QIcon(KStandardDirs::locate("data", "rekonq/pics/ssl-icon.png")) );
+ rightIcon->setIcon( KIcon("object-locked") );
+ rightIcon->setToolTip( i18n("Show SSL Infos") );
break;
default:
kDebug() << "ERROR.. default non extant case!!";
@@ -174,7 +176,8 @@ void LineEdit::clearRightIcons()
void LineEdit::resizeEvent(QResizeEvent *event)
{
- KLineEdit::resizeEvent(event);
+ int newHeight = ( height() - 19 )/2;
+ _icon->move(4, newHeight );
int iconsCount = _rightIconsList.count();
int w = width();
@@ -182,6 +185,9 @@ void LineEdit::resizeEvent(QResizeEvent *event)
for(int i = 0; i < iconsCount; ++i)
{
IconButton *bt = _rightIconsList.at(i);
- bt->move( w - 23*(i+1), 6);
+ bt->move( w - 25*(i+1), newHeight );
}
+
+ KLineEdit::resizeEvent(event);
+
}
diff --git a/src/urlbar/urlbar.cpp b/src/urlbar/urlbar.cpp
index c5201a1c..adc011f0 100644
--- a/src/urlbar/urlbar.cpp
+++ b/src/urlbar/urlbar.cpp
@@ -249,7 +249,10 @@ void UrlBar::loadFinished()
return;
if(_tab->url().scheme() == QL1S("about") )
+ {
+ update();
return;
+ }
// show KGet downloads??
if(ReKonfig::kgetList())