┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWeng Xuetian <[email protected]>2012-12-29 12:49:51 -0500
committerWeng Xuetian <[email protected]>2012-12-29 12:49:51 -0500
commit2af331b42c0514f4fdf848d0cc22f02717f7bec0 (patch)
tree4cab675c2d464ae5c4ef55a69d340fdffe692a53 /src
parent73af993dbf58880b3453b0fc94a02e1c6fc48d1e (diff)
Automatically set url location bar to non-editable when focus out
BUG: 157593 REVIEW: 107748
Diffstat (limited to 'src')
-rw-r--r--src/dolphinviewcontainer.cpp11
-rw-r--r--src/dolphinviewcontainer.h2
2 files changed, 13 insertions, 0 deletions
diff --git a/src/dolphinviewcontainer.cpp b/src/dolphinviewcontainer.cpp
index 8800a1732..26a6803ae 100644
--- a/src/dolphinviewcontainer.cpp
+++ b/src/dolphinviewcontainer.cpp
@@ -128,6 +128,8 @@ DolphinViewContainer::DolphinViewContainer(const KUrl& url, QWidget* parent) :
this, SLOT(slotUrlNavigatorLocationChanged(KUrl)));
connect(m_urlNavigator, SIGNAL(historyChanged()),
this, SLOT(slotHistoryChanged()));
+ connect(m_urlNavigator, SIGNAL(returnPressed()),
+ this, SLOT(slotReturnPressed()));
// Initialize status bar
m_statusBar = new DolphinStatusBar(this);
@@ -574,6 +576,8 @@ void DolphinViewContainer::slotUrlNavigatorLocationAboutToBeChanged(const KUrl&
void DolphinViewContainer::slotUrlNavigatorLocationChanged(const KUrl& url)
{
+ slotReturnPressed();
+
if (KProtocolManager::supportsListing(url)) {
setSearchModeEnabled(isSearchUrl(url));
m_view->setUrl(url);
@@ -657,6 +661,13 @@ void DolphinViewContainer::slotHistoryChanged()
}
}
+void DolphinViewContainer::slotReturnPressed()
+{
+ if (!GeneralSettings::editableUrl()) {
+ m_urlNavigator->setUrlEditable(false);
+ }
+}
+
void DolphinViewContainer::startSearching()
{
const KUrl url = m_searchBox->urlForSearching();
diff --git a/src/dolphinviewcontainer.h b/src/dolphinviewcontainer.h
index e2d1b1875..bc58531a2 100644
--- a/src/dolphinviewcontainer.h
+++ b/src/dolphinviewcontainer.h
@@ -282,6 +282,8 @@ private slots:
void slotHistoryChanged();
+ void slotReturnPressed();
+
/**
* Gets the search URL from the searchbox and starts searching.
*/