another compile fix I forgot

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14977 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Georg Baum 2006-09-11 13:18:41 +00:00
parent 89a92e955d
commit e45d0fb4e4

View File

@ -97,24 +97,24 @@ int prompt_pimpl(docstring const & title, docstring const & question,
}
std::pair<bool, string> const askForText_pimpl(string const & msg,
string const & dflt)
std::pair<bool, docstring> const askForText_pimpl(docstring const & msg,
docstring const & dflt)
{
Gtk::MessageDialog dlg(Glib::Markup::escape_text(Glib::locale_to_utf8(msg)),
Gtk::MessageDialog dlg(Glib::Markup::escape_text(lyx::to_utf8(msg)),
true, Gtk::MESSAGE_QUESTION,
Gtk::BUTTONS_OK_CANCEL,
true);
Gtk::Entry entry;
entry.set_text(Glib::locale_to_utf8(dflt));
entry.set_text(lyx::to_utf8(dflt));
entry.set_position(-1);
entry.show();
dlg.get_vbox()->children().push_back(
Gtk::Box_Helpers::Element(entry));
int response = dlg.run();
if (response == Gtk::RESPONSE_OK) {
string str = Glib::locale_from_utf8(entry.get_text());
return std::make_pair<bool, string>(true, str);
docstring str = lyx::from_utf8(entry.get_text());
return std::make_pair<bool, docstring>(true, str);
}
else
return std::make_pair<bool, string>(false, string());
return std::make_pair<bool, docstring>(false, docstring());
}