[gnote] Use custom_font_face
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Use custom_font_face
- Date: Sat, 19 Dec 2020 14:06:22 +0000 (UTC)
commit f9cad10919967a2a0e2147672ded7558966b821b
Author: Aurimas Černius <aurisc4 gmail com>
Date: Sat Dec 19 15:45:00 2020 +0200
Use custom_font_face
src/preferencesdialog.cpp | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/src/preferencesdialog.cpp b/src/preferencesdialog.cpp
index 7af8aa9b..31003267 100644
--- a/src/preferencesdialog.cpp
+++ b/src/preferencesdialog.cpp
@@ -366,9 +366,7 @@ namespace gnote {
button->add (*font_box);
button->show ();
- Glib::ustring font_desc = m_gnote.preferences().get_schema_settings(
- Preferences::SCHEMA_GNOTE)->get_string(Preferences::CUSTOM_FONT_FACE);
- update_font_button (font_desc);
+ update_font_button(m_gnote.preferences().custom_font_face());
return button;
}
@@ -937,13 +935,12 @@ namespace gnote {
Gtk::FontSelectionDialog *font_dialog =
new Gtk::FontSelectionDialog (_("Choose Note Font"));
- Glib::RefPtr<Gio::Settings> settings =
m_gnote.preferences().get_schema_settings(Preferences::SCHEMA_GNOTE);
- Glib::ustring font_name = settings->get_string(Preferences::CUSTOM_FONT_FACE);
+ auto font_name = m_gnote.preferences().custom_font_face();
font_dialog->set_font_name(font_name);
if (Gtk::RESPONSE_OK == font_dialog->run()) {
if (font_dialog->get_font_name() != font_name) {
- settings->set_string(Preferences::CUSTOM_FONT_FACE, font_dialog->get_font_name());
+ m_gnote.preferences().custom_font_face();
update_font_button (font_dialog->get_font_name());
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]