From b162ed32be2af7a5e895cd63d1332c2bf1411924 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Sun, 14 Sep 2014 19:14:18 +0200 Subject: [PATCH] Fixed some visual staff, recycle bin is now fixed on first position. Fixed #66. --- CMakeLists.txt | 6 +++--- .../icons/mini-kfaenza/item-open-external.png | Bin 0 -> 1892 bytes .../{item-open.png => item-open-internal.png} | Bin resources/text/CHANGELOG | 1 + src/core/feedsmodelfeed.cpp | 4 +--- src/core/feedsmodelrecyclebin.cpp | 17 +++++++++++++++++ src/core/feedsmodelrecyclebin.h | 17 +++++++++++++++++ src/core/feedsproxymodel.cpp | 12 ++++++++++-- src/gui/feedmessageviewer.cpp | 8 +------- src/gui/formmain.cpp | 6 +++--- src/gui/messagessearchlineedit.cpp | 3 --- src/gui/messagesview.cpp | 11 +---------- src/gui/toolbareditor.h | 1 - src/miscellaneous/application.h | 1 - .../webbrowsernetworkaccessmanager.cpp | 3 +-- 15 files changed, 55 insertions(+), 35 deletions(-) create mode 100644 resources/graphics/icons/mini-kfaenza/item-open-external.png rename resources/graphics/icons/mini-kfaenza/{item-open.png => item-open-internal.png} (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index c99512ae7..f7d8f604f 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -71,8 +71,8 @@ project(rssguard) set(APP_NAME "RSS Guard") set(APP_LOW_NAME "rssguard") -set(APP_VERSION "2.0.0.1") -set(FILE_VERSION "2,0,0,1") +set(APP_VERSION "2.0.0.2") +set(FILE_VERSION "2,0,0,2") set(APP_AUTHOR "Martin Rotter") set(APP_URL "http://bitbucket.org/skunkos/rssguard") set(APP_URL_ISSUES "http://bitbucket.org/skunkos/rssguard/issues") @@ -458,7 +458,7 @@ set(APP_HEADERS src/core/feedsproxymodel.h src/core/feeddownloader.h src/core/feedsimportexportmodel.h - src/core/feedsmodelrecyclebin.h + #src/core/feedsmodelrecyclebin.h # NETWORK-WEB headers. src/network-web/webpage.h diff --git a/resources/graphics/icons/mini-kfaenza/item-open-external.png b/resources/graphics/icons/mini-kfaenza/item-open-external.png new file mode 100644 index 0000000000000000000000000000000000000000..e035c97f293dd546aac91fe6b9f3fe80bdd2f7ee GIT binary patch literal 1892 zcmV-q2b=hbP)(_`g8%^e{{R4h=>PzAFaQARU;qF*m;eA5Z<1fd zMgRZ?>PbXFRCwCdT2E*jR~r9)@6C)XM^Y=xvKu>&?W7H6?X=K^h4xZdywLX0Q+jO= z38C$lK$G6O*FAQjP+Dk1a}6|x91DeQFMC;bO(FXyuy*Cdn^m%wYP(USc{B6g*Mmpu zNE%5aCj|Au1C7U{_xt|*zJDWPX8e+uz%P7R(TkNr!Di;{zjk+d1cfud%IArQ?*F4& z^}7T(Jvo_KU0z;(^P`V`x3IAAaw?UY871^essC+lZGCm+!iBF-Pfq^xMx{~%0Agkk zkvv@}ocv^M?cB<9&%Nw<-hHjLH%bCXDILdgvNyi_?yKLQIdl0&wYtg7x+y>gz%%7? z`A=Hwk@k5hC5|3FdJ({Xn7P*Ua~nXxw(TcIowOmwLWsG=0SO?*%x2WXDl;1ZsStBZ z00Kb97z`4Ch@#Pn6C5}+#=fD*m=@lyFiJ#&P9w{*93h0Yv$JC>r68pQ5kUw6A_5U{ zV*Vg`)zycyRkuftT5ke{DuCA`${dciwZ-4mVQSpd;L}?9U4EkZ<4xfykP0Wmh zn?28KEIs?|_S~gQWd zYOySC%N_zy0`SI|W|>1>#oVwFqiKm#D=W8;UAj~@9U%K{E9P$r&+J)^iUd(8RtVqs z-BT+ow`VS1ESr#wiQFkhs6i{lC}PX$CW(jLT5DEHxz8*w-=2Q&y|QK==tgt^rfo|h z2AlS{#D`d9+qSdu%{QlZu3yiN zTUIMf3<4EBjS_G%Br(P10g8mF;kqKrvTv=g&sVQroygcWNDP-5IE?#(2!k+mhEZ#n zI;2N=Yv117oZSE7i8a&7iy#z|hz_oYBQc_xxRb<*IUp@d?q9z?J2pPv(teN3(*mxQf;e&nx?YFn zI0yG4M@AwR_2OfQF`mRpEkH!%DV1`!w#dn5+qB>LJV^U#U9~N{`_wj2rWS@VYbFaO&mCNNS zN-1~p384VesXqpqgJc!YpsK*A1kHYiN(c@!uj)69RvUogk>d-TohMM3qDu_YjPrj zuGNTy07-eUL+~aDAkt|}z4Okku}tQUtCSnpXBcDHbzL_nx;o_;!@Qprj!E$u4L zQwdD}(2LsZr7jC3CbIH8H~->`cQ7`Fr#~Anot%dBt=((rMiP+~y4J}3*aJYo e%xxL}rvU(^JYr>h1laZf0000 +
  • Fixed bug #66.
  • Added: diff --git a/src/core/feedsmodelfeed.cpp b/src/core/feedsmodelfeed.cpp index 5e32bce4d..a7a388248 100755 --- a/src/core/feedsmodelfeed.cpp +++ b/src/core/feedsmodelfeed.cpp @@ -477,8 +477,7 @@ void FeedsModelFeed::updateMessages(const QList &messages) { // Used to check if give feed contains with message with given // title, url and date_created. - // WARNING: One feed CANNOT contain two (or more) messages with same - // AUTHOR AND TITLE AND URL AND DATE_CREATED. + // WARNING: One feed CANNOT contain two (or more) messages with same AUTHOR AND TITLE AND URL AND DATE_CREATED. query_select.setForwardOnly(true); query_select.prepare("SELECT id, feed, date_created FROM Messages " "WHERE feed = :feed AND title = :title AND url = :url AND author = :author;"); @@ -491,7 +490,6 @@ void FeedsModelFeed::updateMessages(const QList &messages) { if (!database.transaction()) { database.rollback(); - qDebug("Transaction start for message downloader failed."); return; } diff --git a/src/core/feedsmodelrecyclebin.cpp b/src/core/feedsmodelrecyclebin.cpp index c29219664..de16d75f6 100644 --- a/src/core/feedsmodelrecyclebin.cpp +++ b/src/core/feedsmodelrecyclebin.cpp @@ -1,3 +1,20 @@ +// This file is part of RSS Guard. +// +// Copyright (C) 2011-2014 by Martin Rotter +// +// RSS Guard is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// RSS Guard is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with RSS Guard. If not, see . + #include "core/feedsmodelrecyclebin.h" #include "miscellaneous/application.h" diff --git a/src/core/feedsmodelrecyclebin.h b/src/core/feedsmodelrecyclebin.h index c3e624d32..71224f3f2 100644 --- a/src/core/feedsmodelrecyclebin.h +++ b/src/core/feedsmodelrecyclebin.h @@ -1,3 +1,20 @@ +// This file is part of RSS Guard. +// +// Copyright (C) 2011-2014 by Martin Rotter +// +// RSS Guard is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// RSS Guard is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with RSS Guard. If not, see . + #ifndef FEEDSMODELRECYCLEBIN_H #define FEEDSMODELRECYCLEBIN_H diff --git a/src/core/feedsproxymodel.cpp b/src/core/feedsproxymodel.cpp index 86a517d03..21be49c0b 100755 --- a/src/core/feedsproxymodel.cpp +++ b/src/core/feedsproxymodel.cpp @@ -67,15 +67,23 @@ bool FeedsProxyModel::lessThan(const QModelIndex &left, right_item->title()) < 0; } } + else if (left_item->kind() == FeedsModelRootItem::RecycleBin) { + // Left item is recycle bin. Make sure it is "smaller" item if we have selected ascending order. + return sortOrder() == Qt::AscendingOrder; + } + else if (right_item->kind() == FeedsModelRootItem::RecycleBin) { + // Right item is recycle bin. Make sure it is "biggest" item if we have selected descending order. + return sortOrder() == Qt::DescendingOrder; + } else if (left_item->kind() == FeedsModelRootItem::Feed) { // Left item is feed, right item is category. return false; } else { // Left item is category, right item is feed. - // NOTE: Category is in fact "more" than feed but - // we consider it to be "less" because it should be "placed" + // NOTE: Category is in fact "more" than feed but we consider it to be "less" because it should be "placed" // above the "smalles" feed when ascending sort is used. + // NOTE: We need to keep recycle bin in first position. return true; } } diff --git a/src/gui/feedmessageviewer.cpp b/src/gui/feedmessageviewer.cpp index b42bb9aa3..520c1d84b 100755 --- a/src/gui/feedmessageviewer.cpp +++ b/src/gui/feedmessageviewer.cpp @@ -176,13 +176,8 @@ void FeedMessageViewer::onFeedUpdatesProgress(FeedsModelFeed *feed, } void FeedMessageViewer::onFeedUpdatesFinished() { - // Updates of some feeds finished, unlock the lock. qApp->closeLock()->unlock(); - - // And also hide progress bar. qApp->mainForm()->statusBar()->clearProgress(); - - // TODO: Check integrity and conformance of this. m_messagesView->reloadSelections(1); } @@ -221,8 +216,7 @@ void FeedMessageViewer::createConnections() { // State of many messages is changed, then we need // to reload selections. - connect(m_feedsView, SIGNAL(feedsNeedToBeReloaded(int)), - m_messagesView, SLOT(reloadSelections(int))); + connect(m_feedsView, SIGNAL(feedsNeedToBeReloaded(int)), m_messagesView, SLOT(reloadSelections(int))); // If counts of unread/all messages change, update the tray icon. connect(m_feedsView, SIGNAL(feedCountsChanged(int,int)), diff --git a/src/gui/formmain.cpp b/src/gui/formmain.cpp index c2d3f7daf..52f8ea119 100755 --- a/src/gui/formmain.cpp +++ b/src/gui/formmain.cpp @@ -247,9 +247,9 @@ void FormMain::setupIcons() { m_ui->m_actionMarkSelectedMessagesAsRead->setIcon(icon_theme_factory->fromTheme("mail-mark-read")); m_ui->m_actionMarkSelectedMessagesAsUnread->setIcon(icon_theme_factory->fromTheme("mail-mark-unread")); m_ui->m_actionSwitchImportanceOfSelectedMessages->setIcon(icon_theme_factory->fromTheme("mail-mark-favorite")); - m_ui->m_actionOpenSelectedSourceArticlesInternally->setIcon(icon_theme_factory->fromTheme("item-open")); - m_ui->m_actionOpenSelectedSourceArticlesExternally->setIcon(icon_theme_factory->fromTheme("item-open")); - m_ui->m_actionOpenSelectedMessagesInternally->setIcon(icon_theme_factory->fromTheme("item-open")); + m_ui->m_actionOpenSelectedSourceArticlesInternally->setIcon(icon_theme_factory->fromTheme("item-open-internal")); + m_ui->m_actionOpenSelectedSourceArticlesExternally->setIcon(icon_theme_factory->fromTheme("item-open-external")); + m_ui->m_actionOpenSelectedMessagesInternally->setIcon(icon_theme_factory->fromTheme("item-open-internal")); m_ui->m_actionViewSelectedItemsNewspaperMode->setIcon(icon_theme_factory->fromTheme("item-newspaper")); m_ui->m_actionSelectNextFeedCategory->setIcon(icon_theme_factory->fromTheme("go-down")); m_ui->m_actionSelectPreviousFeedCategory->setIcon(icon_theme_factory->fromTheme("go-up")); diff --git a/src/gui/messagessearchlineedit.cpp b/src/gui/messagessearchlineedit.cpp index 78e97b80c..940bb59ba 100644 --- a/src/gui/messagessearchlineedit.cpp +++ b/src/gui/messagessearchlineedit.cpp @@ -19,9 +19,6 @@ MessagesSearchLineEdit::MessagesSearchLineEdit(QWidget *parent) : BaseLineEdit(parent) { - // TODO: ke standardnimu contextovemu menu (metoda createStandardContextMenu() - // pridat submenu "Search type" = fixed string, wildcard, regexp - // a vic neresit asi na strane tohodle kontrolu } MessagesSearchLineEdit::~MessagesSearchLineEdit() { diff --git a/src/gui/messagesview.cpp b/src/gui/messagesview.cpp index bea787c0e..b30352c59 100755 --- a/src/gui/messagesview.cpp +++ b/src/gui/messagesview.cpp @@ -224,15 +224,10 @@ void MessagesView::selectionChanged(const QItemSelection &selected, } void MessagesView::loadFeeds(const QList &feed_ids) { - // Load messages. - - // TODO: Here we could load user-defined default sorting - // column/order AND possibly hide/show user-defined columns for the feed(s). m_sourceModel->loadMessages(feed_ids); // Make sure that initial sorting is that unread messages are visible // first. - // NOTE: This can be rewritten so that it's changeable. sortByColumn(MSG_DB_DCREATED_INDEX, Qt::DescendingOrder); // Messages are loaded, make sure that previously @@ -286,8 +281,6 @@ void MessagesView::openSelectedMessagesInternally() { emit openMessagesInNewspaperView(messages); // Finally, mark opened messages as read. - // TODO: It is a question if to mark selected messages as read - // when they get opened externally/in new tab. markSelectedMessagesRead(); } @@ -396,8 +389,7 @@ void MessagesView::reselectIndexes(const QModelIndexList &indexes) { selection.merge(QItemSelection(index, index), QItemSelectionModel::Select); } - selectionModel()->select(selection, - QItemSelectionModel::Select | QItemSelectionModel::Rows); + selectionModel()->select(selection, QItemSelectionModel::Select | QItemSelectionModel::Rows); } void MessagesView::selectNextItem() { @@ -461,7 +453,6 @@ void MessagesView::adjustColumns() { #endif // Hide columns. - // TODO: Make this changeable. hideColumn(MSG_DB_ID_INDEX); hideColumn(MSG_DB_DELETED_INDEX); hideColumn(MSG_DB_FEED_INDEX); diff --git a/src/gui/toolbareditor.h b/src/gui/toolbareditor.h index ed2a55441..0042935c4 100644 --- a/src/gui/toolbareditor.h +++ b/src/gui/toolbareditor.h @@ -29,7 +29,6 @@ namespace Ui { class BaseToolBar; -// TODO: dialog pro úpravu prirazeneho toolbaru. class ToolBarEditor : public QWidget { Q_OBJECT diff --git a/src/miscellaneous/application.h b/src/miscellaneous/application.h index 976f99607..472ccd67d 100755 --- a/src/miscellaneous/application.h +++ b/src/miscellaneous/application.h @@ -49,7 +49,6 @@ class FormMain; class IconFactory; class QAction; -// TODO: presunout nektery veci sem, settings atp class Application : public QtSingleApplication { Q_OBJECT diff --git a/src/network-web/webbrowsernetworkaccessmanager.cpp b/src/network-web/webbrowsernetworkaccessmanager.cpp index 5d3d5810f..c81618fd6 100755 --- a/src/network-web/webbrowsernetworkaccessmanager.cpp +++ b/src/network-web/webbrowsernetworkaccessmanager.cpp @@ -39,8 +39,7 @@ void WebBrowserNetworkAccessManager::onAuthenticationRequired(QNetworkReply *rep Q_UNUSED(authenticator); // TODO: Support authentication for web pages. - qDebug("URL '%s' requested authentication but username/password is not available.", - qPrintable(reply->url().toString())); + qDebug("URL '%s' requested authentication but username/password is not available.", qPrintable(reply->url().toString())); } WebBrowserNetworkAccessManager *WebBrowserNetworkAccessManager::instance() {