summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-04-10 00:35:01 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-04-10 00:35:01 +0200
commit23d65a3a5c1e6c0e2501d41ae0660c89085dbb84 (patch)
tree1050cbef7b0213ceefa4041e453ae04b71295928
parentMerge commit 'refs/merge-requests/120' of git://gitorious.org/rekonq/mainline... (diff)
downloadrekonq-23d65a3a5c1e6c0e2501d41ae0660c89085dbb84.tar.xz
Fix focus problems and trim search strings (fix encodings problems, step 1)
-rw-r--r--src/mainview.cpp10
-rw-r--r--src/urlbar/urlbar.cpp2
2 files changed, 9 insertions, 3 deletions
diff --git a/src/mainview.cpp b/src/mainview.cpp
index d5c552f2..a5eaa748 100644
--- a/src/mainview.cpp
+++ b/src/mainview.cpp
@@ -61,6 +61,9 @@
#include <QWidget>
#include <QVBoxLayout>
+// Defines
+#define QL1S(x) QLatin1String(x)
+
MainView::MainView(MainWindow *parent)
: KTabWidget(parent)
@@ -300,7 +303,10 @@ void MainView::currentChanged(int index)
Application::instance()->mainWindow()->setZoomSliderFactor(tab->view()->zoomFactor());
// set focus to the current webview
- tab->view()->setFocus();
+ if(tab->url().scheme() == QL1S("about"))
+ _bars->currentWidget()->setFocus();
+ else
+ tab->view()->setFocus();
}
@@ -374,7 +380,7 @@ void MainView::newTab()
default:
break;
}
- urlBarWidget()->setFocus();
+ _bars->currentWidget()->setFocus();
}
diff --git a/src/urlbar/urlbar.cpp b/src/urlbar/urlbar.cpp
index adc011f0..6f916482 100644
--- a/src/urlbar/urlbar.cpp
+++ b/src/urlbar/urlbar.cpp
@@ -112,7 +112,7 @@ void UrlBar::activated(const QString& urlString, Rekonq::OpenType type)
clearFocus();
setText(urlString);
- Application::instance()->loadUrl(urlString, type);
+ Application::instance()->loadUrl(urlString.trimmed(), type);
}