Welcome dialog little tweaked.

This commit is contained in:
Martin Rotter 2013-12-26 16:58:56 +01:00
parent 24fe472510
commit 215b99689f
6 changed files with 28 additions and 2 deletions

View File

@ -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")

View File

@ -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()

View File

@ -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,

View File

@ -4,6 +4,7 @@
#include <QDesktopServices>
#include <QUrl>
#include <QLabel>
#include <QDesktopWidget>
@ -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("<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=\"%1\"><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:%2\"><span "
"style=\"text-decoration: underline; color:#0000ff;\">author</span></a> "
"in case of your interest.</p><p><br/></p>").arg(APP_URL_ISSUES,
APP_EMAIL));
}
void FormWelcome::openLink(const QString &link) {

View File

@ -80,7 +80,7 @@
<item row="1" column="1">
<widget class="QLabel" name="m_lblInfo">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;RSS Guard is a (very) easy-to-use feed reader. It supports all major feed formats, including RSS, ATOM and RDF.&lt;/p&gt;&lt;p&gt;Make sure you explore all available features. If you find a bug or if you want to propose new feature, then create new &lt;a href=&quot;https://sourceforge.net/p/rssguard/tickets&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;issue report&lt;/span&gt;&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;RSS Guard can be translated to any language. Contact its &lt;a href=&quot;mailto:rotter.martinos@gmail.com&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;author&lt;/span&gt;&lt;/a&gt; in case of your interest.&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string notr="true"/>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>

View File

@ -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)));