+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.
// 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());
- return tmp;
+ if (tmp != 0)
+ return tmp;
+ else
+ return string();
}
// Inform the user that the buffer is read-only, and that changes in the