diff options
| -rw-r--r-- | Changelog.txt | 4 | ||||
| -rw-r--r-- | src/browsertab.cpp | 7 | ||||
| -rw-r--r-- | src/fingerclient.cpp | 2 |
3 files changed, 9 insertions, 4 deletions
diff --git a/Changelog.txt b/Changelog.txt index 8a95007..c312549 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,7 +1,5 @@ Kristall Changelog -== - - +================== == 0.2 - Implement Ctrl+D/*Add to favourites* menu item diff --git a/src/browsertab.cpp b/src/browsertab.cpp index 7f6c642..cec5e19 100644 --- a/src/browsertab.cpp +++ b/src/browsertab.cpp @@ -292,6 +292,13 @@ void BrowserTab::on_requestComplete(const QByteArray &data, const QString &mime) this->current_location, doc_style); } + else if(not plaintext_only and mime.startsWith("text/finger")) { + document = std::make_unique<QTextDocument>(); + + document->setDefaultFont(doc_style.preformatted_font); + document->setDefaultStyleSheet(doc_style.toStyleSheet()); + document->setPlainText(QString::fromUtf8(data)); + } else if(not plaintext_only and mime.startsWith("text/html")) { document = std::make_unique<QTextDocument>(); diff --git a/src/fingerclient.cpp b/src/fingerclient.cpp index b696341..8d0ea60 100644 --- a/src/fingerclient.cpp +++ b/src/fingerclient.cpp @@ -58,7 +58,7 @@ void FingerClient::on_finished() { if(not was_cancelled) { - emit this->requestComplete(this->body, "text/plain"); + emit this->requestComplete(this->body, "text/finger"); was_cancelled = true; } body.clear(); |
