From 8de36d389b8e668dcfa68e54a9b2e2ee2ca105dd Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Sat, 10 Apr 2010 16:18:54 +0000 Subject: [PATCH] Fix bug #2762: LyX -> LaTeX export autonomously overwrites existing EPS files git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34115 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/Exporter.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/Exporter.cpp b/src/Exporter.cpp index f56209e37b..766cb6d7bd 100644 --- a/src/Exporter.cpp +++ b/src/Exporter.cpp @@ -49,10 +49,21 @@ static int checkOverwrite(FileName const & src_file, FileName const & dst_file) docstring text = bformat(_("The file %1$s already exists.\n\n" "Do you want to overwrite that file?"), makeDisplayPath(dst_file.absFilename())); - return Alert::prompt(_("Overwrite file?"), + int choice = Alert::prompt(_("Overwrite file?"), text, 0, 2, - _("&Overwrite"), _("Overwrite &all"), + _("&Keep file"), _("&Overwrite"), _("&Cancel export")); + + if (choice == 0) + return -1; + + if (choice == 1) { + text = _("Should I continue asking for overwriting files?"); + return Alert::prompt(_("Overwrite all files?"), + text, 0, 0, + _("Continue &asking"), _("&Overwrite all")); + } + return choice; } -- 2.39.5