[gnote] Replace FontSelectionDialog with FontChooserDialog
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Replace FontSelectionDialog with FontChooserDialog
- Date: Sat, 15 May 2021 10:13:03 +0000 (UTC)
commit 8b31a1138270cfbb07e0d54a936461a14a7c0338
Author: Aurimas Černius <aurisc4 gmail com>
Date: Sat May 15 12:59:12 2021 +0300
Replace FontSelectionDialog with FontChooserDialog
src/preferencesdialog.cpp | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/src/preferencesdialog.cpp b/src/preferencesdialog.cpp
index c37b9cfa..4d8698b6 100644
--- a/src/preferencesdialog.cpp
+++ b/src/preferencesdialog.cpp
@@ -30,7 +30,7 @@
#include <gtkmm/accelgroup.h>
#include <gtkmm/alignment.h>
#include <gtkmm/button.h>
-#include <gtkmm/fontselection.h>
+#include <gtkmm/fontchooserdialog.h>
#include <gtkmm/linkbutton.h>
#include <gtkmm/notebook.h>
#include <gtkmm/separator.h>
@@ -930,14 +930,13 @@ namespace gnote {
void PreferencesDialog::on_font_button_clicked()
{
- Gtk::FontSelectionDialog *font_dialog =
- new Gtk::FontSelectionDialog (_("Choose Note Font"));
+ auto font_dialog = new Gtk::FontChooserDialog(_("Choose Note Font"));
auto font_name = m_gnote.preferences().custom_font_face();
- font_dialog->set_font_name(font_name);
+ font_dialog->set_font(font_name);
if (Gtk::RESPONSE_OK == font_dialog->run()) {
- auto new_font = font_dialog->get_font_name();
+ auto new_font = font_dialog->get_font();
if(new_font != font_name) {
m_gnote.preferences().custom_font_face(new_font);
update_font_button(new_font);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]