From 215b99689f42d4a3e767bfb7817e0676c5254161 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 26 Dec 2013 16:58:56 +0100 Subject: [PATCH] Welcome dialog little tweaked. --- CMakeLists.txt | 1 + src/core/defs.h.in | 1 + src/gui/feedsview.cpp | 4 ++++ src/gui/formwelcome.cpp | 18 ++++++++++++++++++ src/gui/formwelcome.ui | 2 +- src/gui/webbrowser.cpp | 4 +++- 6 files changed, 28 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e477d12ac..3e363760b 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,6 +45,7 @@ set(APP_VERSION "2.0.0-prealpha-4") set(FILE_VERSION "2,0,0,0") set(APP_AUTHOR "Martin Rotter") set(APP_URL "http://martinrotter.github.io/rssguard") +set(APP_URL_ISSUES "http://github.com/martinrotter/rssguard/issues") set(APP_EMAIL "rotter.martinos@gmail.com") set(MINIMUM_QT_VERSION 4.7.3) set(SOURCE_PACKAGE_SUFFIX "Source") diff --git a/src/core/defs.h.in b/src/core/defs.h.in index d3c01bb5f..fad59d37f 100755 --- a/src/core/defs.h.in +++ b/src/core/defs.h.in @@ -19,6 +19,7 @@ #define APP_AUTHOR "@APP_AUTHOR@" #define APP_EMAIL "@APP_EMAIL@" #define APP_URL "@APP_URL@" +#define APP_URL_ISSUES "@APP_URL_ISSUES@" #define APP_VERSION "@APP_VERSION@" #define APP_USERAGENT QString("@APP_NAME@/@APP_VERSION@ (@APP_URL@) on @CMAKE_SYSTEM@; Webkit/") + qWebKitVersion() diff --git a/src/gui/feedsview.cpp b/src/gui/feedsview.cpp index 31425b729..01cb28dd8 100644 --- a/src/gui/feedsview.cpp +++ b/src/gui/feedsview.cpp @@ -76,6 +76,10 @@ void FeedsView::setupAppearance() { setDragDropMode(QAbstractItemView::NoDragDrop); setAllColumnsShowFocus(true); setSelectionMode(QAbstractItemView::ExtendedSelection); + + // TODO: Check if stylesheets or drawBranches(...) reimplementation + // is better for hiding the branches of the view. + setRootIsDecorated(false); } void FeedsView::selectionChanged(const QItemSelection &selected, diff --git a/src/gui/formwelcome.cpp b/src/gui/formwelcome.cpp index 9f34fea4b..79e94dbe1 100644 --- a/src/gui/formwelcome.cpp +++ b/src/gui/formwelcome.cpp @@ -4,6 +4,7 @@ #include #include +#include #include @@ -24,6 +25,23 @@ FormWelcome::FormWelcome(QWidget *parent) : QDialog(parent), m_ui(new Ui::FormWe // Make sure that clicked hyperlinks are opened in defult web browser. connect(m_ui->m_lblInfo, SIGNAL(linkActivated(QString)), this, SLOT(openLink(QString))); + + // Setup the text. + m_ui->m_lblInfo->setText( + tr("

RSS Guard is a (very) easy-to-use feed reader. " + "It supports all major feed formats, including RSS, " + "ATOM and RDF.

" + "

Make sure you explore all available features. " + "If you find a bug or if you want to propose new " + "feature, then create new " + "issue " + "report.

" + "

RSS Guard can be translated to any language. " + "Contact its author " + "in case of your interest.


").arg(APP_URL_ISSUES, + APP_EMAIL)); } void FormWelcome::openLink(const QString &link) { diff --git a/src/gui/formwelcome.ui b/src/gui/formwelcome.ui index 4c401f0ed..94ec691ce 100644 --- a/src/gui/formwelcome.ui +++ b/src/gui/formwelcome.ui @@ -80,7 +80,7 @@ - <html><head/><body><p>RSS Guard is a (very) easy-to-use feed reader. It supports all major feed formats, including RSS, ATOM and RDF.</p><p>Make sure you explore all available features. If you find a bug or if you want to propose new feature, then create new <a href="https://sourceforge.net/p/rssguard/tickets"><span style=" text-decoration: underline; color:#0000ff;">issue report</span></a>.</p><p>RSS Guard can be translated to any language. Contact its <a href="mailto:rotter.martinos@gmail.com"><span style=" text-decoration: underline; color:#0000ff;">author</span></a> in case of your interest.</p><p><br/></p></body></html> + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter diff --git a/src/gui/webbrowser.cpp b/src/gui/webbrowser.cpp index 4f09d40a4..02886626a 100644 --- a/src/gui/webbrowser.cpp +++ b/src/gui/webbrowser.cpp @@ -167,7 +167,9 @@ void WebBrowser::clear() { void WebBrowser::navigateToMessage(const Message &message) { m_webView->setHtml(SkinFactory::getInstance()->getCurrentMarkup().arg(message.m_title, - tr("Written by ") + message.m_author, + tr("Written by ") + (message.m_author.isEmpty() ? + tr("uknown author") : + message.m_author), message.m_url, message.m_contents, message.m_created.toString(Qt::DefaultLocaleLongDate)));