Definite fix for #103.
This commit is contained in:
parent
615538200d
commit
327b0eaaf5
@ -71,8 +71,8 @@ project(rssguard)
|
|||||||
|
|
||||||
set(APP_NAME "RSS Guard")
|
set(APP_NAME "RSS Guard")
|
||||||
set(APP_LOW_NAME "rssguard")
|
set(APP_LOW_NAME "rssguard")
|
||||||
set(APP_VERSION "2.1")
|
set(APP_VERSION "2.0.5")
|
||||||
set(FILE_VERSION "2,1,0,0")
|
set(FILE_VERSION "2,0,5,0")
|
||||||
set(APP_AUTHOR "Martin Rotter")
|
set(APP_AUTHOR "Martin Rotter")
|
||||||
set(APP_URL "http://bitbucket.org/skunkos/rssguard")
|
set(APP_URL "http://bitbucket.org/skunkos/rssguard")
|
||||||
set(APP_URL_ISSUES "http://bitbucket.org/skunkos/rssguard/issues")
|
set(APP_URL_ISSUES "http://bitbucket.org/skunkos/rssguard/issues")
|
||||||
|
@ -155,6 +155,7 @@ class FeedsView : public QTreeView {
|
|||||||
// Handle selections.
|
// Handle selections.
|
||||||
void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
|
void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
|
||||||
|
|
||||||
|
// React on "Del" key.
|
||||||
void keyPressEvent(QKeyEvent *event);
|
void keyPressEvent(QKeyEvent *event);
|
||||||
|
|
||||||
// Show custom context menu.
|
// Show custom context menu.
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>928</width>
|
<width>951</width>
|
||||||
<height>498</height>
|
<height>498</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -478,8 +478,8 @@ Authors of this application are NOT responsible for lost data.</string>
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>167</width>
|
<width>190</width>
|
||||||
<height>219</height>
|
<height>238</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QFormLayout" name="formLayout">
|
<layout class="QFormLayout" name="formLayout">
|
||||||
@ -1163,7 +1163,7 @@ Authors of this application are NOT responsible for lost data.</string>
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QTabWidget" name="m_tabFeedsMessages">
|
<widget class="QTabWidget" name="m_tabFeedsMessages">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>0</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="m_tabFeeds">
|
<widget class="QWidget" name="m_tabFeeds">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
|
@ -208,14 +208,14 @@ void MessagesView::selectionChanged(const QItemSelection &selected, const QItemS
|
|||||||
current_index.row(), current_index.column(),
|
current_index.row(), current_index.column(),
|
||||||
mapped_current_index.row(), mapped_current_index.column());
|
mapped_current_index.row(), mapped_current_index.column());
|
||||||
|
|
||||||
if (mapped_current_index.isValid() && !selected_rows.isEmpty()) {
|
if (mapped_current_index.isValid() && selected_rows.count() == 1) {
|
||||||
if (!m_batchUnreadSwitch) {
|
if (!m_batchUnreadSwitch) {
|
||||||
// Set this message as read only if current item
|
// Set this message as read only if current item
|
||||||
// wasn't changed by "mark selected messages unread" action.
|
// wasn't changed by "mark selected messages unread" action.
|
||||||
m_sourceModel->setMessageRead(mapped_current_index.row(), 1);
|
m_sourceModel->setMessageRead(mapped_current_index.row(), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
emit currentMessagesChanged(QList<Message>() << m_sourceModel->messageAt(m_proxyModel->mapToSource(selected_rows.first()).row()));
|
emit currentMessagesChanged(QList<Message>() << m_sourceModel->messageAt(m_proxyModel->mapToSource(selected_rows.at(0)).row()));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
emit currentMessagesRemoved();
|
emit currentMessagesRemoved();
|
||||||
|
@ -87,6 +87,7 @@ class MessagesView : public QTreeView {
|
|||||||
// Changes resize mode for all columns.
|
// Changes resize mode for all columns.
|
||||||
void adjustColumns();
|
void adjustColumns();
|
||||||
|
|
||||||
|
// Saves current sort state.
|
||||||
void saveSortState(int column, Qt::SortOrder order);
|
void saveSortState(int column, Qt::SortOrder order);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -46,8 +46,7 @@ void SkinFactory::loadCurrentSkin() {
|
|||||||
qDebug("Skin '%s' loaded.", qPrintable(skin_name_from_settings));
|
qDebug("Skin '%s' loaded.", qPrintable(skin_name_from_settings));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
qFatal("Skin '%s' not loaded because its data are corrupted. No skin is loaded now!",
|
qFatal("Skin '%s' not loaded because its data are corrupted. No skin is loaded now!", qPrintable(skin_name_from_settings));
|
||||||
qPrintable(skin_name_from_settings));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,9 +86,7 @@ bool SkinFactory::loadSkinFromData(const Skin &skin) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!raw_data.isEmpty()) {
|
if (!raw_data.isEmpty()) {
|
||||||
QString parsed_data = raw_data.replace("##",
|
QString parsed_data = raw_data.replace("##", APP_SKIN_PATH + '/' + skin_folder);
|
||||||
APP_SKIN_PATH + '/' +
|
|
||||||
skin_folder);
|
|
||||||
qApp->setStyleSheet(parsed_data);
|
qApp->setStyleSheet(parsed_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -101,9 +98,7 @@ void SkinFactory::setCurrentSkinName(const QString &skin_name) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QString SkinFactory::selectedSkinName() {
|
QString SkinFactory::selectedSkinName() {
|
||||||
return qApp->settings()->value(GROUP(GUI),
|
return qApp->settings()->value(GROUP(GUI), "skin", APP_SKIN_DEFAULT).toString();
|
||||||
"skin",
|
|
||||||
APP_SKIN_DEFAULT).toString();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Skin SkinFactory::skinInfo(const QString &skin_name, bool *ok) {
|
Skin SkinFactory::skinInfo(const QString &skin_name, bool *ok) {
|
||||||
|
@ -195,6 +195,9 @@ bool SystemFactory::isUpdateNewer(const QString &update_version) {
|
|||||||
// New version is indeed higher thatn current version.
|
// New version is indeed higher thatn current version.
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else if (new_number < current_number) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Versions are either the same or they have unequal sizes.
|
// Versions are either the same or they have unequal sizes.
|
||||||
@ -203,8 +206,12 @@ bool SystemFactory::isUpdateNewer(const QString &update_version) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Version are not the same length. New version is really higher if it is longer + its last digit is not 0.
|
if (new_version_tkn.isEmpty()) {
|
||||||
return !new_version_tkn.isEmpty() && new_version_tkn.takeFirst().toInt() != 0;
|
return false;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return new_version_tkn.join("").toInt() > 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user