mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
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:
parent
56cd160c39
commit
87ce9b7647
@ -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);
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user