Replace html2pango with html2text.

This commit is contained in:
Jordan Petridis 2018-06-06 15:28:44 +03:00
parent dea517c17c
commit a9feed56fe
No known key found for this signature in database
GPG Key ID: CEABAD9F5683B9A6
3 changed files with 5 additions and 4 deletions

View File

@ -24,7 +24,7 @@ failure_derive = "0.1.1"
regex = "1.0.0"
reqwest = "0.8.5"
serde_json = "1.0.17"
html2pango = { git = "https://gitlab.gnome.org/World/html2pango" }
html2text = "0.1.7"
[dependencies.gtk]
features = ["v3_22"]

View File

@ -29,7 +29,7 @@ extern crate chrono;
extern crate crossbeam_channel;
extern crate hammond_data;
extern crate hammond_downloader;
extern crate html2pango;
extern crate html2text;
extern crate humansize;
extern crate loggerv;
extern crate open;

View File

@ -4,7 +4,7 @@ use gtk::prelude::*;
use crossbeam_channel::{SendError, Sender};
use failure::Error;
use html2pango::markup_from_raw;
use html2text;
use open;
use rayon;
use send_cell::SendCell;
@ -124,7 +124,8 @@ impl ShowWidget {
/// Set the descripton text.
fn set_description(&self, text: &str) {
self.description.set_markup(&markup_from_raw(text));
self.description
.set_markup(&html2text::from_read(text.as_bytes(), 70));
}
/// Save the scrollabar vajustment to the cache.