From 167c9c556147cc70ea0ccc8d1095903be52d4630 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sun, 15 Jan 2012 11:07:18 +0100 Subject: Rework on load/stop/reload action Also clean up API, giving proper names to method updateActions --> updateHistoryActions browserTabLoading(bool) --> currentTabStateChanged() ... also workaround problem that m_progress is (yet) 0 or 100 when load started REVIEW:103651 --- src/urlbar/urlbar.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'src/urlbar/urlbar.cpp') diff --git a/src/urlbar/urlbar.cpp b/src/urlbar/urlbar.cpp index 83684922..f8fb7d0c 100644 --- a/src/urlbar/urlbar.cpp +++ b/src/urlbar/urlbar.cpp @@ -2,7 +2,7 @@ * * This file is a part of the rekonq project * -* Copyright (C) 2008-2011 by Andrea Diamantini +* Copyright (C) 2008-2012 by Andrea Diamantini * Copyright (C) 2009 by Domrachev Alexandr * Copyright (C) 2009 by Paweł Prażak * Copyright (C) 2009-2011 by Lionel Chauvin @@ -177,6 +177,21 @@ void UrlBar::loadRequestedUrl(const KUrl& url, Rekonq::OpenType type) } +void UrlBar::loadDigitedUrl() +{ + UrlResolver res(text()); + UrlSearchList list = res.orderedSearchItems(); + if (list.isEmpty()) + { + loadRequestedUrl(KUrl(text())); + } + else + { + loadRequestedUrl(list.first().url); + } +} + + void UrlBar::paintEvent(QPaintEvent *event) { KColorScheme colorScheme(palette().currentColorGroup()); @@ -304,6 +319,7 @@ void UrlBar::keyPressEvent(QKeyEvent *event) void UrlBar::focusInEvent(QFocusEvent *event) { activateSuggestions(true); + rApp->mainWindow()->updateTabActions(); KLineEdit::focusInEvent(event); } -- cgit v1.2.1