The Birdfont Source Code


All Repositories / birdfont.git / commitdiff – RSS feed

Fix overwrite dialog

These changes was commited to the Birdfont repository Tue, 03 Nov 2015 20:00:36 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
[Tue, 03 Nov 2015 20:00:36 +0000]

Updated Files

libbirdfont/OverwriteBfFile.vala
libbirdfont/QuestionDialog.vala
libbirdfont/SaveCallback.vala
--- a/libbirdfont/OverwriteBfFile.vala +++ b/libbirdfont/OverwriteBfFile.vala @@ -26,16 +26,19 @@ replace = new Button (t_("Replace")); replace.action.connect (() => { - save_callback.save (); MainWindow.hide_dialog (); + save_callback.save (); }); + add_button (replace); cancel = new Button (t_("Cancel")); cancel.action.connect (() => { + save_callback.is_done = true; MainWindow.hide_dialog (); }); + add_button (cancel); } } }
--- a/libbirdfont/QuestionDialog.vala +++ b/libbirdfont/QuestionDialog.vala @@ -35,6 +35,8 @@ question.set_text (message); this.height = height; + + buttons = new Gee.ArrayList<Button> (); } public void add_button (Button button) {
--- a/libbirdfont/SaveCallback.vala +++ b/libbirdfont/SaveCallback.vala @@ -45,8 +45,8 @@ #if MAC save (); #else - if (f.has_suffix (".bf")) { - f = f.replace (".bf", ""); + if (!f.has_suffix (".bf")) { + f = @"$f.bf"; } file_name = @"$(f)";