escape special characters in strings passed to gtk as markup

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14022 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
John Spray 2006-06-06 16:49:23 +00:00
parent 56cd160c39
commit 87ce9b7647
2 changed files with 9 additions and 5 deletions

View File

@ -45,7 +45,7 @@ string translateShortcut(string const & str)
void warning_pimpl(string const & title, string const & message)
{
Gtk::MessageDialog dlg(Glib::locale_to_utf8(message),
Gtk::MessageDialog dlg(Glib::Markup::escape_text(Glib::locale_to_utf8(message)),
true, Gtk::MESSAGE_WARNING,
Gtk::BUTTONS_CLOSE, true);
dlg.set_title(title);
@ -55,7 +55,7 @@ void warning_pimpl(string const & title, string const & message)
void error_pimpl(string const & title, string const & message)
{
Gtk::MessageDialog dlg(Glib::locale_to_utf8(message),
Gtk::MessageDialog dlg(Glib::Markup::escape_text(Glib::locale_to_utf8(message)),
true, Gtk::MESSAGE_ERROR,
Gtk::BUTTONS_CLOSE, true);
dlg.set_title(title);
@ -65,7 +65,7 @@ void error_pimpl(string const & title, string const & message)
void information_pimpl(string const & title, string const & message)
{
Gtk::MessageDialog dlg(Glib::locale_to_utf8(message),
Gtk::MessageDialog dlg(Glib::Markup::escape_text(Glib::locale_to_utf8(message)),
true, Gtk::MESSAGE_INFO,
Gtk::BUTTONS_CLOSE, true);
dlg.set_title(title);
@ -82,7 +82,7 @@ int prompt_pimpl(string const & title, string const & question,
Glib::ustring gb3;
if (!b3.empty())
gb3 = Glib::locale_to_utf8(translateShortcut(b3));
Gtk::MessageDialog dlg(Glib::locale_to_utf8(question),
Gtk::MessageDialog dlg(Glib::Markup::escape_text(Glib::locale_to_utf8(question)),
true, Gtk::MESSAGE_QUESTION,
Gtk::BUTTONS_NONE, true);
dlg.set_title(title);
@ -98,7 +98,7 @@ int prompt_pimpl(string const & title, string const & question,
std::pair<bool, string> const askForText_pimpl(string const & msg,
string const & dflt)
{
Gtk::MessageDialog dlg(Glib::locale_to_utf8(msg),
Gtk::MessageDialog dlg(Glib::Markup::escape_text(Glib::locale_to_utf8(msg)),
true, Gtk::MESSAGE_QUESTION,
Gtk::BUTTONS_OK_CANCEL,
true);

View File

@ -1,3 +1,7 @@
2006-06-06 John Spray <spray@lyx.org>
* Alert_pimpl.C: escape special characters in strings before
passing them to Gtk::Dialog as markup
2006-04-19 Bernhard Reiter <ockham@gmx.net>
* GExternal.[Ch], glade/external.glade: implement external dialog