This commit is contained in:
Martin Rotter 2016-11-09 08:48:07 +01:00
parent e5fd6b4666
commit 653b18f6fa
7 changed files with 56 additions and 22 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,9 @@
3.3.6
—————
Added:
▪ Height if message attachment image is now configurable, defaults to 36. (issue #69)
Changed:
▪ TT-RSS plugin now does NOT require service URL to be entered with "/api/" suffix. In other words, do not use that suffix now, RSS Guard will add it silently when it needs to.

View File

@ -41,6 +41,8 @@ SettingsFeedsMessages::SettingsFeedsMessages(Settings *settings, QWidget *parent
connect(m_ui->m_checkUpdateAllFeedsOnStartup, &QCheckBox::toggled, this, &SettingsFeedsMessages::dirtifySettings);
connect(m_ui->m_spinAutoUpdateInterval, static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),
this, &SettingsFeedsMessages::dirtifySettings);
connect(m_ui->m_spinHeightImageAttachments, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged),
this, &SettingsFeedsMessages::dirtifySettings);
connect(m_ui->m_checkAutoUpdate, &QCheckBox::toggled, m_ui->m_spinAutoUpdateInterval, &TimeSpinBox::setEnabled);
connect(m_ui->m_spinFeedUpdateTimeout, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this, &SettingsFeedsMessages::dirtifySettings);
connect(m_ui->m_cmbMessagesDateTimeFormat, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this, &SettingsFeedsMessages::dirtifySettings);
@ -89,6 +91,7 @@ void SettingsFeedsMessages::loadSettings() {
m_ui->m_checkUpdateAllFeedsOnStartup->setChecked(settings()->value(GROUP(Feeds), SETTING(Feeds::FeedsUpdateOnStartup)).toBool());
m_ui->m_cmbCountsFeedList->addItems(QStringList() << "(%unread)" << "[%unread]" << "%unread/%all" << "%unread-%all" << "[%unread|%all]");
m_ui->m_cmbCountsFeedList->setEditText(settings()->value(GROUP(Feeds), SETTING(Feeds::CountFormat)).toString());
m_ui->m_spinHeightImageAttachments->setValue(settings()->value(GROUP(Messages), SETTING(Messages::MessageHeadImageHeight)).toInt());
initializeMessageDateFormats();
@ -119,6 +122,7 @@ void SettingsFeedsMessages::saveSettings() {
settings()->setValue(GROUP(Feeds), Feeds::FeedsUpdateOnStartup, m_ui->m_checkUpdateAllFeedsOnStartup->isChecked());
settings()->setValue(GROUP(Feeds), Feeds::CountFormat, m_ui->m_cmbCountsFeedList->currentText());
settings()->setValue(GROUP(Messages), Messages::UseCustomDate, m_ui->m_checkMessagesDateTimeFormat->isChecked());
settings()->setValue(GROUP(Messages), Messages::MessageHeadImageHeight, m_ui->m_spinHeightImageAttachments->value());
settings()->setValue(GROUP(Messages), Messages::CustomDateFormat,
m_ui->m_cmbMessagesDateTimeFormat->itemData(m_ui->m_cmbMessagesDateTimeFormat->currentIndex()).toString());

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>686</width>
<height>208</height>
<width>700</width>
<height>201</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
@ -50,6 +50,19 @@
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="TimeSpinBox" name="m_spinAutoUpdateInterval">
<property name="enabled">
<bool>false</bool>
</property>
<property name="readOnly">
<bool>false</bool>
</property>
<property name="accelerated">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
@ -111,29 +124,13 @@
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="TimeSpinBox" name="m_spinAutoUpdateInterval">
<property name="enabled">
<bool>false</bool>
</property>
<property name="readOnly">
<bool>false</bool>
</property>
<property name="accelerated">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="m_tabMessages">
<attribute name="title">
<string>Messages</string>
</attribute>
<layout class="QFormLayout" name="formLayout_11">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
<widget class="QCheckBox" name="m_checkRemoveReadMessagesOnExit">
<property name="text">
@ -148,6 +145,27 @@
</property>
</widget>
</item>
<item row="2" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Height of image attachments</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="m_spinHeightImageAttachments">
<property name="minimum">
<number>22</number>
</property>
<property name="maximum">
<number>1000</number>
</property>
</widget>
</item>
</layout>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="m_checkMessagesDateTimeFormat">
<property name="text">

View File

@ -94,7 +94,10 @@ void WebViewer::loadMessages(const QList<Message> &messages) {
if (enclosure.m_mimeType.startsWith(QSL("image/"))) {
// Add thumbnail image.
enclosure_images += skin.m_enclosureImageMarkup.arg(enclosure.m_url, enclosure.m_mimeType) ;
enclosure_images += skin.m_enclosureImageMarkup.arg(
enclosure.m_url,
enclosure.m_mimeType,
qApp->settings()->value(GROUP(Messages), SETTING(Messages::MessageHeadImageHeight)).toString());
}
}

View File

@ -49,6 +49,9 @@ DVALUE(bool) Feeds::ShowOnlyUnreadFeedsDef = false;
// Messages.
DKEY Messages::ID = "messages";
DKEY Messages::MessageHeadImageHeight = "message_head_image_height";
DVALUE(int) Messages::MessageHeadImageHeightDef = 36;
DKEY Messages::UseCustomDate = "use_custom_date";
DVALUE(bool) Messages::UseCustomDateDef = false;

View File

@ -66,6 +66,9 @@ namespace Feeds {
namespace Messages {
KEY ID;
KEY MessageHeadImageHeight;
VALUE(int) MessageHeadImageHeightDef;
KEY UseCustomDate;
VALUE(bool) UseCustomDateDef;