Start: Improvements to the Start page - relates to #1017

* Removed the videos section
* Added descriptions for feed links
* New cleaner look
* Colors taken from the system
* Feed links open in an external browser
This commit is contained in:
Yorik van Havre
2014-03-03 17:01:18 -03:00
parent def5d954c0
commit 2fb5d5869b
5 changed files with 112 additions and 68 deletions

View File

@@ -47,6 +47,7 @@
# include <QTextStream>
# include <QTimer>
# include <QFileInfo>
# include <QDesktopServices>
#endif
#include "BrowserView.h"
@@ -134,17 +135,29 @@ void BrowserView::onLinkClicked (const QUrl & url)
{
QString scheme = url.scheme();
QString host = url.host();
//QString username = url.userName();
// path handling
QString path = url.path();
QFileInfo fi(path);
QString ext = fi.completeSuffix();
QUrl exturl(url);
//QString fragment = url. fragment();
if (scheme==QString::fromLatin1("http")) {
load(url);
}
// Small trick to force opening a link in an external browser: use exthttp or exthttp
// Write your URL as exthttp://www.example.com
else if (scheme==QString::fromLatin1("exthttp")) {
exturl.setScheme(QString::fromLatin1("http"));
QDesktopServices::openUrl(exturl);
}
else if (scheme==QString::fromLatin1("exthttps")) {
exturl.setScheme(QString::fromLatin1("https"));
QDesktopServices::openUrl(exturl);
}
// run scripts if not from somewhere else!
if ((scheme.size() < 2 || scheme==QString::fromLatin1("file"))&& host.isEmpty()) {
QFileInfo fi(path);