Skip to content

Commit 719071a

Browse files
author
Martin Rotter
committed
try to fix erratic modals behavior
1 parent ade6268 commit 719071a

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

resources/docs/Message-filters.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,25 @@ function filterMessage() {
115115
}
116116
```
117117

118+
Use published element instead of updated element for ATOM entries (only).
119+
```js
120+
function filterMessage() {
121+
// Read raw contents of message and
122+
// convert to JSON.
123+
json = utils.fromXmlToJson(msg.rawContents);
124+
jsonObj = JSON.parse(json)
125+
126+
// Read published date and parse it.
127+
publishedDate = jsonObj.entry.published.__text;
128+
parsedDate = utils.parseDateTime(publishedDate);
129+
130+
// Set new date/time for message and
131+
// proceed.
132+
msg.created = parsedDate;
133+
return MessageObject.Accept;
134+
}
135+
```
136+
118137
Dump RAW data of each message to RSS Guard's [debug output](Documentation.md#generating-debug-log-file).
119138
```js
120139
function filterMessage() {

src/librssguard/gui/guiutilities.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@ void GuiUtilities::setLabelAsNotice(QLabel& label, bool is_warning) {
2222
}
2323

2424
void GuiUtilities::applyDialogProperties(QWidget& widget, const QIcon& icon, const QString& title) {
25-
widget.setWindowFlags(/*Qt::MSWindowsFixedSizeDialogHint | */ Qt::Dialog | Qt::WindowSystemMenuHint | Qt::WindowTitleHint);
25+
#if defined(Q_OS_WIN)
26+
widget.setWindowFlags(Qt::Dialog | Qt::WindowTitleHint);
27+
#else
28+
widget.setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowCloseButtonHint);
29+
#endif
30+
2631
widget.setWindowIcon(icon);
2732

2833
if (!title.isEmpty()) {

0 commit comments

Comments
 (0)