mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-01-16 19:03:25 +01:00
Fixed some visual staff, recycle bin is now fixed on first position. Fixed #66.
This commit is contained in:
parent
1b4faa4c97
commit
b162ed32be
@ -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
|
||||
|
BIN
resources/graphics/icons/mini-kfaenza/item-open-external.png
Normal file
BIN
resources/graphics/icons/mini-kfaenza/item-open-external.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
@ -3,6 +3,7 @@
|
||||
|
||||
Fixed:
|
||||
<ul>
|
||||
<li>Fixed bug #66.</li>
|
||||
</ul>
|
||||
|
||||
Added:
|
||||
|
@ -477,8 +477,7 @@ void FeedsModelFeed::updateMessages(const QList<Message> &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<Message> &messages) {
|
||||
|
||||
if (!database.transaction()) {
|
||||
database.rollback();
|
||||
|
||||
qDebug("Transaction start for message downloader failed.");
|
||||
return;
|
||||
}
|
||||
|
@ -1,3 +1,20 @@
|
||||
// This file is part of RSS Guard.
|
||||
//
|
||||
// Copyright (C) 2011-2014 by Martin Rotter <rotter.martinos@gmail.com>
|
||||
//
|
||||
// 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "core/feedsmodelrecyclebin.h"
|
||||
|
||||
#include "miscellaneous/application.h"
|
||||
|
@ -1,3 +1,20 @@
|
||||
// This file is part of RSS Guard.
|
||||
//
|
||||
// Copyright (C) 2011-2014 by Martin Rotter <rotter.martinos@gmail.com>
|
||||
//
|
||||
// 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
#ifndef FEEDSMODELRECYCLEBIN_H
|
||||
#define FEEDSMODELRECYCLEBIN_H
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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)),
|
||||
|
@ -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"));
|
||||
|
@ -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() {
|
||||
|
@ -224,15 +224,10 @@ void MessagesView::selectionChanged(const QItemSelection &selected,
|
||||
}
|
||||
|
||||
void MessagesView::loadFeeds(const QList<int> &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);
|
||||
|
@ -29,7 +29,6 @@ namespace Ui {
|
||||
|
||||
class BaseToolBar;
|
||||
|
||||
// TODO: dialog pro úpravu prirazeneho toolbaru.
|
||||
class ToolBarEditor : public QWidget {
|
||||
Q_OBJECT
|
||||
|
||||
|
@ -49,7 +49,6 @@ class FormMain;
|
||||
class IconFactory;
|
||||
class QAction;
|
||||
|
||||
// TODO: presunout nektery veci sem, settings atp
|
||||
class Application : public QtSingleApplication {
|
||||
Q_OBJECT
|
||||
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user