From 7546eefb75d4c3d44151893a89c6a723238daeb6 Mon Sep 17 00:00:00 2001 From: Adrian Cochrane Date: Thu, 19 Apr 2018 15:16:22 +1200 Subject: [PATCH] Indicate selected font. --- src/window.vala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/window.vala b/src/window.vala index 988361c..e8a0151 100644 --- a/src/window.vala +++ b/src/window.vala @@ -99,9 +99,11 @@ public class WriteAs.MainWindow : Gtk.ApplicationWindow { fonts.popup.show_all(); } + private unowned SList? font_options = null; private void build_fontoption(Gtk.Menu menu, string label, string fontstyle, string families) { - var option = new Gtk.MenuItem.with_label(label); + var option = new Gtk.RadioMenuItem.with_label(font_options, label); + font_options = option.get_group(); option.activate.connect(() => { this.font = families; this.fontstyle = fontstyle;