[gnote] Use custom font utilities in export to html



commit b9e95749561825e33b205c6b8584c0f83fbff6a8
Author: Aurimas Černius <aurisc4 gmail com>
Date:   Fri Dec 18 23:27:41 2020 +0200

    Use custom font utilities in export to html

 src/addins/exporttohtml/exporttohtml.desktop.in.in | 2 +-
 src/addins/exporttohtml/exporttohtmlnoteaddin.cpp  | 7 +++----
 2 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/src/addins/exporttohtml/exporttohtml.desktop.in.in 
b/src/addins/exporttohtml/exporttohtml.desktop.in.in
index a3c72e8a..5b7d4cd5 100644
--- a/src/addins/exporttohtml/exporttohtml.desktop.in.in
+++ b/src/addins/exporttohtml/exporttohtml.desktop.in.in
@@ -4,7 +4,7 @@ _Name=Export to HTML
 _Description=Exports individual notes to HTML.
 _Authors=Hubert Figuiere and the Tomboy Project
 Category=Tools
-Version=0.7
+Version=0.8
 DefaultEnabled=false
 Module=libexporttohtml
 LibgnoteRelease=@LIBGNOTE_RELEASE@
diff --git a/src/addins/exporttohtml/exporttohtmlnoteaddin.cpp 
b/src/addins/exporttohtml/exporttohtmlnoteaddin.cpp
index a0360fab..82e28e76 100644
--- a/src/addins/exporttohtml/exporttohtmlnoteaddin.cpp
+++ b/src/addins/exporttohtml/exporttohtmlnoteaddin.cpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2010-2013,2016-2017,2019 Aurimas Cernius
+ * Copyright (C) 2010-2013,2016-2017,2019- 2020 Aurimas Cernius
  * Copyright (C) 2009 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
@@ -234,9 +234,8 @@ void ExportToHtmlNoteAddin::write_html_for_note (sharp::StreamWriter & writer,
   args.add_param ("export-linked-all", "", export_linked_all);
   args.add_param ("root-note", "", gnote::utils::XmlEncoder::encode(note->get_title()));
 
-  Glib::RefPtr<Gio::Settings> settings = 
ignote().preferences().get_schema_settings(Preferences::SCHEMA_GNOTE);
-  if (settings->get_boolean(Preferences::ENABLE_CUSTOM_FONT)) {
-    Glib::ustring font_face = settings->get_string(Preferences::CUSTOM_FONT_FACE);
+  if(ignote().preferences().enable_custom_font()) {
+    Glib::ustring font_face = ignote().preferences().custom_font_face();
     Pango::FontDescription font_desc (font_face);
     Glib::ustring font = Glib::ustring::compose("font-family:'%1';", font_desc.get_family());
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]