diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2012-01-15 11:07:18 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2012-01-15 11:07:18 +0100 |
commit | 167c9c556147cc70ea0ccc8d1095903be52d4630 (patch) | |
tree | 0e46c42b36ee7bb3402001c3f7433b205f7ef674 /src/urlbar | |
parent | only make labels for viewable elements (diff) | |
download | rekonq-167c9c556147cc70ea0ccc8d1095903be52d4630.tar.xz |
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
Diffstat (limited to 'src/urlbar')
-rw-r--r-- | src/urlbar/urlbar.cpp | 18 | ||||
-rw-r--r-- | src/urlbar/urlbar.h | 7 |
2 files changed, 23 insertions, 2 deletions
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 <adjam7 at gmail dot com> +* Copyright (C) 2008-2012 by Andrea Diamantini <adjam7 at gmail dot com> * Copyright (C) 2009 by Domrachev Alexandr <alexandr.domrachev@gmail.com> * Copyright (C) 2009 by Paweł Prażak <pawelprazak at gmail dot com> * Copyright (C) 2009-2011 by Lionel Chauvin <megabigbug@yahoo.fr> @@ -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); } diff --git a/src/urlbar/urlbar.h b/src/urlbar/urlbar.h index 2d158ff3..fb7bcb2b 100644 --- a/src/urlbar/urlbar.h +++ b/src/urlbar/urlbar.h @@ -2,7 +2,7 @@ * * This file is a part of the rekonq project * -* Copyright (C) 2008-2011 by Andrea Diamantini <adjam7 at gmail dot com> +* Copyright (C) 2008-2012 by Andrea Diamantini <adjam7 at gmail dot com> * Copyright (C) 2009 by Domrachev Alexandr <alexandr.domrachev@gmail.com> * Copyright (C) 2009 by Paweł Prażak <pawelprazak at gmail dot com> * Copyright (C) 2009-2011 by Lionel Chauvin <megabigbug@yahoo.fr> @@ -119,6 +119,11 @@ private Q_SLOTS: void delSlot(); bool isValidURL(QString url); + /** + * Load digited url + */ + void loadDigitedUrl(); + protected: void paintEvent(QPaintEvent *event); void keyPressEvent(QKeyEvent *event); |