From fee07814e3f0ec1a45644bb7330fff12df35b475 Mon Sep 17 00:00:00 2001 From: "Felix (xq) Queißner" Date: Mon, 8 Jun 2020 20:51:19 +0200 Subject: Changes finger responses to monospace font. --- src/browsertab.cpp | 7 +++++++ src/fingerclient.cpp | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'src') 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(); + + 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(); 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(); -- cgit v1.2.3