The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

OTF offer

These changes was commited to the Birdfont repository Wed, 31 Oct 2018 19:57:34 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
author Johan Mattsson <johan.mattsson.m@gmail.com>
Wed, 31 Oct 2018 19:57:34 +0000 (20:57 +0100)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Wed, 31 Oct 2018 19:57:34 +0000 (20:57 +0100)
commit e65812f62eb1cac8640da0c015f8ee433f13e797
tree 66e5ab64aa6c1e4740110a7ded8d75cd1b30667e
parent 9fc67d4f7f9aed02f0be8a51b429731eddd40692
OTF offer

libbirdfont/ExportSettings.vala
libbirdfont/MainWindow.vala
--- a/libbirdfont/ExportSettings.vala +++ b/libbirdfont/ExportSettings.vala @@ -97,6 +97,23 @@ widgets.add (new Text (t_("Formats"), label_size, label_margin)); + CheckBox otf = new CheckBox ("OTF", label_size); + + otf.updated.connect ((c) => { + if (c) { + MessageDialog dialog; + dialog = MainWindow.show_message (t_("You need the plus version to export OTF fonts.")); + MainWindow.show_dialog (dialog); + + otf.checked = false; + } + }); + + otf.checked = false; + + widgets.add (otf); + focus_ring.add (otf); + ttf = new CheckBox ("TTF", label_size); ttf.updated.connect ((c) => { Font f = BirdFont.get_current_font ();
--- a/libbirdfont/MainWindow.vala +++ b/libbirdfont/MainWindow.vala @@ -112,7 +112,7 @@ } } - public static void show_message (string text) { + public static MessageDialog show_message (string text) { Tab t = MainWindow.get_tab_bar ().get_selected_tab (); string tab_name = t.get_display ().get_name (); @@ -122,6 +122,8 @@ MessageDialog md = new MessageDialog (text); show_dialog (md); + + return md; } public static void hide_dialog () {