]> git.lyx.org Git - features.git/commitdiff
compile fix
authorGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Mon, 11 Sep 2006 11:02:36 +0000 (11:02 +0000)
committerGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Mon, 11 Sep 2006 11:02:36 +0000 (11:02 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14975 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/gtk/Alert_pimpl.C
src/frontends/gtk/GDocument.C
src/frontends/gtk/GErrorList.C
src/frontends/gtk/GView.C

index 0abc9bb3e3a96714a257bd815df8f97c60341ab5..5fd23bc8db4912d5faff119bd328bea9e4a21cf3 100644 (file)
 
 #include <gtkmm.h>
 
+using lyx::docstring;
+
 using std::string;
 
 
 namespace {
 
 
-string translateShortcut(string const & str)
+docstring translateShortcut(docstring const & str)
 {
-       string::size_type i = str.find_first_of("&");
-       if (i == string::npos || i == str.length() - 1)
+       docstring::size_type i = str.find_first_of(lyx::from_ascii("&"));
+       if (i == docstring::npos || i == str.length() - 1)
                return str;
-       string tstr = str;
+       docstring tstr = str;
        tstr[i] = '_';
        return tstr;
 }
@@ -45,30 +47,30 @@ string translateShortcut(string const & str)
 
 void warning_pimpl(docstring const & title, docstring const & message)
 {
-       Gtk::MessageDialog dlg(Glib::Markup::escape_text(Glib::locale_to_utf8(message)),
+       Gtk::MessageDialog dlg(Glib::Markup::escape_text(lyx::to_utf8(message)),
                               true, Gtk::MESSAGE_WARNING,
                               Gtk::BUTTONS_CLOSE, true);
-       dlg.set_title(title);
+       dlg.set_title(lyx::to_utf8(title));
        dlg.run();
 }
 
 
 void error_pimpl(docstring const & title, docstring const & message)
 {
-       Gtk::MessageDialog dlg(Glib::Markup::escape_text(Glib::locale_to_utf8(message)),
+       Gtk::MessageDialog dlg(Glib::Markup::escape_text(lyx::to_utf8(message)),
                               true, Gtk::MESSAGE_ERROR,
                               Gtk::BUTTONS_CLOSE, true);
-       dlg.set_title(title);
+       dlg.set_title(lyx::to_utf8(title));
        dlg.run();
 }
 
 
 void information_pimpl(docstring const & title, docstring const & message)
 {
-       Gtk::MessageDialog dlg(Glib::Markup::escape_text(Glib::locale_to_utf8(message)),
+       Gtk::MessageDialog dlg(Glib::Markup::escape_text(lyx::to_utf8(message)),
                               true, Gtk::MESSAGE_INFO,
                               Gtk::BUTTONS_CLOSE, true);
-       dlg.set_title(title);
+       dlg.set_title(lyx::to_utf8(title));
        dlg.run();
 }
 
@@ -77,15 +79,15 @@ int prompt_pimpl(docstring const & title, docstring const & question,
                 int defaultButton, int /*escapeButton*/,
                 docstring const & b1, docstring const & b2, docstring const & b3)
 {
-       Glib::ustring gb1 = Glib::locale_to_utf8(translateShortcut(b1));
-       Glib::ustring gb2 = Glib::locale_to_utf8(translateShortcut(b2));
+       Glib::ustring gb1 = lyx::to_utf8(translateShortcut(b1));
+       Glib::ustring gb2 = lyx::to_utf8(translateShortcut(b2));
        Glib::ustring gb3;
        if (!b3.empty())
-               gb3 = Glib::locale_to_utf8(translateShortcut(b3));
-       Gtk::MessageDialog dlg(Glib::Markup::escape_text(Glib::locale_to_utf8(question)),
+               gb3 = lyx::to_utf8(translateShortcut(b3));
+       Gtk::MessageDialog dlg(Glib::Markup::escape_text(lyx::to_utf8(question)),
                               true, Gtk::MESSAGE_QUESTION,
                               Gtk::BUTTONS_NONE, true);
-       dlg.set_title(title);
+       dlg.set_title(lyx::to_utf8(title));
        dlg.add_button(gb1, 0);
        dlg.add_button(gb2, 1);
        if (!b3.empty())
index d683a6f800a16b2d45ccad9e41bb8cae9f3334fc..3c586b6e033135f05e5bbdad587b02b9b9ad7f27 100644 (file)
@@ -105,7 +105,7 @@ void GDocument::doBuild()
                        // FIXME UNICODE
                        docstring item =
                                bformat(_("Unavailable: %1$s"), lyx::from_utf8(cit->description()));
-                       classcombo_.append_text(item);
+                       classcombo_.append_text(lyx::to_utf8(item));
                }
        }
 
index 8a0970b26bbf6d2d72d9c009cd36a224e3055314..773beac8684cb0e6fd500d2b867a12e1851582f6 100644 (file)
@@ -70,7 +70,7 @@ void GErrorList::onErrListSelection()
                (*errlistsel_->get_selected())[listColIndex_];
 
        ErrorList const & errors = controller().errorList();
-       errdescview_->get_buffer()->set_text(errors[choice].description);
+       errdescview_->get_buffer()->set_text(lyx::to_utf8(errors[choice].description));
 }
 
 
@@ -93,7 +93,7 @@ void GErrorList::updateContents()
                if (rowindex == 0)
                        errlistsel_->select(*row);
 
-               (*row)[listCol_] = cit->error;
+               (*row)[listCol_] = lyx::to_utf8(cit->error);
                (*row)[listColIndex_] = rowindex;
        }
 }
index ebd53ad78e3734ffefb55dfc630d6e1680aa169c..d38a91ac463d9364b627fa17ef7757d65e81776f 100644 (file)
@@ -175,19 +175,19 @@ void GView::allowInput() const
 
 void GView::message(docstring const & msg)
 {
-       minibuffer_->message(msg);
+       minibuffer_->message(lyx::to_utf8(msg));
 }
 
 
 void GView::updateStatusBar()
 {
-       message(getLyXFunc().viewStatusMessage());
+       message(lyx::from_utf8(getLyXFunc().viewStatusMessage()));
 }
 
 
 void GView::setWindowTitle(docstring const & t, docstring const & /*it*/)
 {
-       set_title(Glib::locale_to_utf8(t));
+       set_title(lyx::to_utf8(t));
 }
 
 
@@ -209,7 +209,7 @@ void GView::busy(bool yes) const
 
 void GView::clearMessage()
 {
-       message(getLyXFunc().viewStatusMessage());
+       message(lyx::from_utf8(getLyXFunc().viewStatusMessage()));
 }