Some work with newspaper mode.

This commit is contained in:
Martin Rotter 2014-01-04 18:03:36 +01:00
parent d2088cbf4f
commit 9a1a1d6e5d
2 changed files with 14 additions and 2 deletions

View File

@ -137,11 +137,20 @@ void FeedsView::openSelectedFeedsInNewspaperMode() {
// TODO: oznacit vybrane feedy jako prectene zde
// protoze je uzivatel otvira v newspaperu -> jsou prectene automaticky
QList<Message> messages = m_sourceModel->messagesForFeeds(selectedFeeds());
QList<FeedsModelFeed*> selected_feeds = selectedFeeds();
QList<Message> messages = m_sourceModel->messagesForFeeds(selected_feeds);
if (!messages.isEmpty()) {
emit newspaperModeRequested(messages);
}
// Moreover, mark those feeds as read because they were opened in
// newspaper mode, thus, they are read.
m_sourceModel->markFeedsRead(selected_feeds, 1);
updateCountsOfAllFeeds(false);
emit feedsNeedToBeReloaded(1);
}
void FeedsView::updateCountsOfSelectedFeeds(bool update_total_too) {

View File

@ -69,12 +69,15 @@ bool SkinFactory::loadSkinFromData(const Skin &skin) {
//
// "##" is placeholder for the actual path to skin file. This is needed for using
// images within the QSS file.
// So if one uses "##/images/border.png" in QSS then it is
// replaced by fully absolute path and target file can
// be safely loaded.
QString raw_data = skin.m_rawData;
if (!raw_data.isEmpty()) {
QString parsed_data = raw_data.replace("##",
APP_SKIN_PATH + '/' +
skin_folder + "/images");
skin_folder);
qApp->setStyleSheet(parsed_data);
}