Some work with newspaper mode.
This commit is contained in:
parent
d2088cbf4f
commit
9a1a1d6e5d
@ -137,11 +137,20 @@ void FeedsView::openSelectedFeedsInNewspaperMode() {
|
|||||||
// TODO: oznacit vybrane feedy jako prectene zde
|
// TODO: oznacit vybrane feedy jako prectene zde
|
||||||
// protoze je uzivatel otvira v newspaperu -> jsou prectene automaticky
|
// 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()) {
|
if (!messages.isEmpty()) {
|
||||||
emit newspaperModeRequested(messages);
|
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) {
|
void FeedsView::updateCountsOfSelectedFeeds(bool update_total_too) {
|
||||||
|
@ -69,12 +69,15 @@ bool SkinFactory::loadSkinFromData(const Skin &skin) {
|
|||||||
//
|
//
|
||||||
// "##" is placeholder for the actual path to skin file. This is needed for using
|
// "##" is placeholder for the actual path to skin file. This is needed for using
|
||||||
// images within the QSS file.
|
// 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;
|
QString raw_data = skin.m_rawData;
|
||||||
|
|
||||||
if (!raw_data.isEmpty()) {
|
if (!raw_data.isEmpty()) {
|
||||||
QString parsed_data = raw_data.replace("##",
|
QString parsed_data = raw_data.replace("##",
|
||||||
APP_SKIN_PATH + '/' +
|
APP_SKIN_PATH + '/' +
|
||||||
skin_folder + "/images");
|
skin_folder);
|
||||||
qApp->setStyleSheet(parsed_data);
|
qApp->setStyleSheet(parsed_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user