aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix (xq) Queißner <git@mq32.de>2020-06-08 20:51:19 +0200
committerFelix (xq) Queißner <git@mq32.de>2020-06-08 20:51:19 +0200
commitfee07814e3f0ec1a45644bb7330fff12df35b475 (patch)
tree9fb785462ef41d064252ad21dbae274aba328b6f
parent4276fd7662167fbabf78edf75e75a85218dff4a5 (diff)
downloadkristall-fee07814e3f0ec1a45644bb7330fff12df35b475.tar.gz
Changes finger responses to monospace font.
-rw-r--r--Changelog.txt4
-rw-r--r--src/browsertab.cpp7
-rw-r--r--src/fingerclient.cpp2
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();