]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/gtk/GAboutlyx.C
Change glob() API to accept a dir parameter.
[lyx.git] / src / frontends / gtk / GAboutlyx.C
index 4c1216d9fd06b41c948f0649f1a0cb47048463b2..1d1a8278088e33ba89dfefa0741a2e245bd42363 100644 (file)
@@ -9,16 +9,27 @@
  */
 
 #include <config.h>
-#include <gtkmm.h>
 
-#include <libglademm.h>
-#include <sstream>
+// Too hard to make concept checks work with this file
+#ifdef _GLIBCPP_CONCEPT_CHECKS
+#undef _GLIBCPP_CONCEPT_CHECKS
+#endif
 
 #include "ControlAboutlyx.h"
 #include "GAboutlyx.h"
-#include "support/filetools.h"
+#include "ghelpers.h"
 #include "version.h"
 
+#include <libglademm.h>
+
+#include <sstream>
+
+using std::ostringstream;
+using std::string;
+
+namespace lyx {
+namespace frontend {
+
 namespace {
 
 enum TranslateState {NORMAL, BEGIN, IN_AT, IN_BOLD, IN_ITALIC};
@@ -80,7 +91,7 @@ Glib::ustring translateMarkup(Glib::ustring const & lyxMarkup)
                case IN_ITALIC:
                        switch (*it) {
                        case '\n':
-                               state = BEGIN;  
+                               state = BEGIN;
                                pangoMarkup += "</i>\n";
                                break;
                        default:
@@ -141,8 +152,7 @@ GAboutlyx::GAboutlyx(Dialog & parent)
 
 void GAboutlyx::doBuild()
 {
-       string const gladeName =
-               lyx::support::LibFileSearch("glade", "aboutlyx", "glade");
+       string const gladeName = findGladeFile("aboutlyx");
        xml_ = Gnome::Glade::Xml::create(gladeName);
        Gtk::Label * version;
        Gtk::Label * credits;
@@ -156,7 +166,10 @@ void GAboutlyx::doBuild()
        version->set_text(Glib::locale_to_utf8(vs.str()));
        std::ostringstream crs;
        controller().getCredits(crs);
-       credits->set_markup(translateMarkup(Glib::locale_to_utf8(crs.str())));
+       credits->set_markup(
+               translateMarkup(Glib::convert(crs.str(),
+                                             "UTF-8",
+                                             "ISO8859-1")));
        std::ostringstream ls;
        ls << controller().getCopyright() << "\n\n"
           << controller().getLicense() << "\n\n"
@@ -164,5 +177,9 @@ void GAboutlyx::doBuild()
        license->set_text(Glib::locale_to_utf8(ls.str()));
        Gtk::Button * btn;
        xml_->get_widget("close_button", btn);
-       btn->signal_clicked().connect(SigC::slot(*this, &GViewBase::onCancel));
+       setCancel(btn);
+       //btn->signal_clicked().connect(sigc::mem_fun(*this, &GViewBase::onCancel));
 }
+
+} // namespace frontend
+} // namespace lyx