askForText() does not abort anymore when clicking 'cancel'

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@310 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 1999-11-15 10:44:32 +00:00
parent bce0ca02ac
commit aafb979368
2 changed files with 11 additions and 2 deletions

View File

@ -1,3 +1,9 @@
1999-11-15 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* src/lyx_gui_misc.C (askForText): when fl_show_input() returns
NULL, make sure to return an empty string (it is not possible to
set a string to NULL).
1999-11-10 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* src/support/LRegex.C: use regex_t instead of re_pattern_buffer.

View File

@ -396,12 +396,15 @@ int AskConfirmation(string const & s1, string const & s2, string const & s3)
// Asks for a text
string askForText(string const & msg, string const & dflt)
{
string tmp;
const char * tmp;
fl_set_resource("flInput.cancel.label", idex(_("Cancel|^[")));
fl_set_resource("flInput.ok.label", idex(_("OK|#O")));
fl_set_resource("flInput.clear.label", idex(_("Clear|#e")));
tmp = fl_show_input(msg.c_str(), dflt.c_str());
if (tmp != 0)
return tmp;
else
return string();
}
// Inform the user that the buffer is read-only, and that changes in the