Fixed #14.
This commit is contained in:
parent
a652b06b88
commit
a4fbfea235
@ -1,6 +1,7 @@
|
||||
<body>
|
||||
[1.9.9.7]
|
||||
<ul>
|
||||
<li>[#] Custom counts of messages in feed list (issue #14).</li>
|
||||
<li>[~] Message list optimizations.</li>
|
||||
<li>[+] Feed list categories exapand status is now persistent.</li>
|
||||
<li>[+] System-wide external web browser can now be used.</li>
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "core/defs.h"
|
||||
#include "core/databasefactory.h"
|
||||
#include "core/textfactory.h"
|
||||
#include "core/settings.h"
|
||||
#include "gui/iconthemefactory.h"
|
||||
#include "gui/iconfactory.h"
|
||||
|
||||
@ -81,7 +82,11 @@ QVariant FeedsModelStandardCategory::data(int column, int role) const {
|
||||
return m_title;
|
||||
}
|
||||
else if (column == FDS_MODEL_COUNTS_INDEX) {
|
||||
return QString("(%1)").arg(QString::number(countOfUnreadMessages()));
|
||||
return Settings::instance()->value(APP_CFG_FEEDS,
|
||||
"count_format",
|
||||
"(%unread)").toString()
|
||||
.replace("%unread", QString::number(countOfUnreadMessages()))
|
||||
.replace("%all", QString::number(countOfAllMessages()));
|
||||
}
|
||||
else {
|
||||
return QVariant();
|
||||
|
@ -194,9 +194,11 @@ QVariant FeedsModelStandardFeed::data(int column, int role) const {
|
||||
return m_title;
|
||||
}
|
||||
else if (column == FDS_MODEL_COUNTS_INDEX) {
|
||||
// TODO: Changeable text.
|
||||
return QString("(%1)").arg(QString::number(countOfUnreadMessages()));
|
||||
//QString::number(countOfAllMessages()));
|
||||
return Settings::instance()->value(APP_CFG_FEEDS,
|
||||
"count_format",
|
||||
"(%unread)").toString()
|
||||
.replace("%unread", QString::number(countOfUnreadMessages()))
|
||||
.replace("%all", QString::number(countOfAllMessages()));
|
||||
}
|
||||
else {
|
||||
return QVariant();
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "core/dynamicshortcuts.h"
|
||||
#include "core/webbrowsernetworkaccessmanager.h"
|
||||
#include "core/silentnetworkaccessmanager.h"
|
||||
#include "core/feedsmodel.h"
|
||||
#include "gui/iconthemefactory.h"
|
||||
#include "gui/skinfactory.h"
|
||||
#include "gui/systemtrayicon.h"
|
||||
@ -197,6 +198,8 @@ void FormSettings::loadFeedsMessages() {
|
||||
m_ui->m_spinAutoUpdateInterval->setValue(Settings::instance()->value(APP_CFG_FEEDS, "auto_update_interval", DEFAULT_AUTO_UPDATE_INTERVAL).toInt());
|
||||
m_ui->m_spinFeedUpdateTimeout->setValue(Settings::instance()->value(APP_CFG_FEEDS, "feed_update_timeout", DOWNLOAD_TIMEOUT).toInt());
|
||||
m_ui->m_checkUpdateAllFeedsOnStartup->setChecked(Settings::instance()->value(APP_CFG_FEEDS, "feeds_update_on_startup", false).toBool());
|
||||
m_ui->m_cmbCountsFeedList->addItems(QStringList() << "(%unread)" << "[%unread]" << "%unread/%all" << "%unread-%all" << "[%unread|%all]");
|
||||
m_ui->m_cmbCountsFeedList->setCurrentText(Settings::instance()->value(APP_CFG_FEEDS, "count_format", "(%unread)").toString());
|
||||
}
|
||||
|
||||
void FormSettings::saveFeedsMessages() {
|
||||
@ -206,8 +209,10 @@ void FormSettings::saveFeedsMessages() {
|
||||
Settings::instance()->setValue(APP_CFG_FEEDS, "auto_update_interval", m_ui->m_spinAutoUpdateInterval->value());
|
||||
Settings::instance()->setValue(APP_CFG_FEEDS, "feed_update_timeout", m_ui->m_spinFeedUpdateTimeout->value());
|
||||
Settings::instance()->setValue(APP_CFG_FEEDS, "feeds_update_on_startup", m_ui->m_checkUpdateAllFeedsOnStartup->isChecked());
|
||||
Settings::instance()->setValue(APP_CFG_FEEDS, "count_format", m_ui->m_cmbCountsFeedList->currentText());
|
||||
|
||||
FormMain::instance()->tabWidget()->feedMessageViewer()->feedsView()->updateAutoUpdateStatus();
|
||||
FormMain::instance()->tabWidget()->feedMessageViewer()->feedsView()->sourceModel()->reloadWholeLayout();
|
||||
}
|
||||
|
||||
void FormSettings::displayProxyPassword(int state) {
|
||||
|
@ -17,7 +17,7 @@
|
||||
<item row="0" column="1">
|
||||
<widget class="QStackedWidget" name="m_stackedSettings">
|
||||
<property name="currentIndex">
|
||||
<number>5</number>
|
||||
<number>6</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="m_pageGeneral">
|
||||
<layout class="QFormLayout" name="formLayout_5">
|
||||
@ -633,7 +633,7 @@ Authors of this application are NOT responsible for lost data.</string>
|
||||
<item>
|
||||
<widget class="QTabWidget" name="m_tabBrowserProxy">
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="m_tabInternalBrowser">
|
||||
<attribute name="title">
|
||||
@ -974,7 +974,7 @@ Authors of this application are NOT responsible for lost data.</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="m_tabFeeds">
|
||||
<attribute name="title">
|
||||
<string>Feeds</string>
|
||||
<string>Feeds && categories</string>
|
||||
</attribute>
|
||||
<layout class="QFormLayout" name="formLayout_10">
|
||||
<property name="fieldGrowthPolicy">
|
||||
@ -1039,6 +1039,26 @@ Authors of this application are NOT responsible for lost data.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="text">
|
||||
<string>Message count format in feed list</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QComboBox" name="m_cmbCountsFeedList">
|
||||
<property name="toolTip">
|
||||
<string>Enter format for count of messages displayed next to each feed/category in feed list. Use "%all" and "%unread" placeholders.</string>
|
||||
</property>
|
||||
<property name="editable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="currentText">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="m_tabMessages">
|
||||
|
Loading…
x
Reference in New Issue
Block a user