diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2013-05-21 09:28:45 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2013-06-06 23:48:27 +0200 |
commit | 3d0017226abe2f2b42787de12fea2ba7cdc668be (patch) | |
tree | a7bfdf7fd156f127945a8b491d47aa38c0e3c75f /src/icons | |
parent | Use webkit general font to render rekonq pages (diff) | |
download | rekonq-3d0017226abe2f2b42787de12fea2ba7cdc668be.tar.xz |
Move from about: to rekonq: protocol for our special links
Diffstat (limited to 'src/icons')
-rw-r--r-- | src/icons/iconmanager.cpp | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/src/icons/iconmanager.cpp b/src/icons/iconmanager.cpp index c8775ed3..d0222bed 100644 --- a/src/icons/iconmanager.cpp +++ b/src/icons/iconmanager.cpp @@ -79,19 +79,19 @@ KIcon IconManager::iconForUrl(const KUrl &url) QByteArray encodedUrl = url.toEncoded(); // rekonq icons.. - if (encodedUrl == QByteArray("about:home")) + if (encodedUrl == QByteArray("rekonq:home")) return KIcon("go-home"); - if (encodedUrl == QByteArray("about:closedTabs")) + if (encodedUrl == QByteArray("rekonq:closedtabs")) return KIcon("tab-close"); - if (encodedUrl == QByteArray("about:history")) + if (encodedUrl == QByteArray("rekonq:history")) return KIcon("view-history"); - if (encodedUrl == QByteArray("about:bookmarks")) + if (encodedUrl == QByteArray("rekonq:bookmarks")) return KIcon("bookmarks"); - if (encodedUrl == QByteArray("about:favorites")) + if (encodedUrl == QByteArray("rekonq:favorites")) return KIcon("emblem-favorite"); - if (encodedUrl == QByteArray("about:downloads")) + if (encodedUrl == QByteArray("rekonq:downloads")) return KIcon("download"); - if (encodedUrl == QByteArray("about:tabs")) + if (encodedUrl == QByteArray("rekonq:tabs")) return KIcon("tab-duplicate"); // TODO: return other mimetype icons @@ -200,41 +200,36 @@ QString IconManager::iconPathForUrl(const KUrl &url) QByteArray encodedUrl = url.toEncoded(); // rekonq icons.. - if (encodedUrl == QByteArray("about:home")) + if (encodedUrl == QByteArray("rekonq:home")) { QString icon = QL1S("file://") + KGlobal::dirs()->findResource("icon", "oxygen/16x16/actions/go-home.png"); return icon; } - if (encodedUrl == QByteArray("about:closedTabs")) + if (encodedUrl == QByteArray("rekonq:closedtabs")) { QString icon = QL1S("file://") + KGlobal::dirs()->findResource("icon", "oxygen/16x16/actions/tab-close.png"); return icon; } - if (encodedUrl == QByteArray("about:history")) + if (encodedUrl == QByteArray("rekonq:history")) { QString icon = QL1S("file://") + KGlobal::dirs()->findResource("icon", "oxygen/16x16/actions/view-history.png"); return icon; } - if (encodedUrl == QByteArray("about:bookmarks")) + if (encodedUrl == QByteArray("rekonq:bookmarks")) { QString icon = QL1S("file://") + KGlobal::dirs()->findResource("icon", "oxygen/16x16/places/bookmarks.png"); return icon; } - if (encodedUrl == QByteArray("about:favorites")) + if (encodedUrl == QByteArray("rekonq:favorites")) { QString icon = QL1S("file://") + KGlobal::dirs()->findResource("icon", "oxygen/16x16/emblems/emblem-favorite.png"); return icon; } - if (encodedUrl == QByteArray("about:downloads")) + if (encodedUrl == QByteArray("rekonq:downloads")) { QString icon = QL1S("file://") + KGlobal::dirs()->findResource("icon", "oxygen/16x16/actions/download.png"); return icon; } - if (encodedUrl == QByteArray("about:tabs")) - { - QString icon = QL1S("file://") + KGlobal::dirs()->findResource("icon", "oxygen/16x16/actions/tab-duplicate.png"); - return icon; - } // TODO: return other mimetype icons if (url.isLocalFile()) |