]> git.lyx.org Git - lyx.git/commitdiff
escape special characters in strings passed to gtk as markup
authorJohn Spray <spray@lyx.org>
Tue, 6 Jun 2006 16:49:23 +0000 (16:49 +0000)
committerJohn Spray <spray@lyx.org>
Tue, 6 Jun 2006 16:49:23 +0000 (16:49 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14022 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/gtk/Alert_pimpl.C
src/frontends/gtk/ChangeLog

index 3233be9c9b5e38d7e3118028ae9280acc3347d50..ac6a19c4d449a4990918941aaac4b05c0893638e 100644 (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);
index e3da2b501d1d0e22b9b440f41c0377b25d31e503..30521acbfd8dd9bde767e6ca93d3cce7a96eadec 100644 (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