]> git.lyx.org Git - features.git/blobdiff - src/frontends/gnome/GAbout.C
Replace LString.h with support/std_string.h,
[features.git] / src / frontends / gnome / GAbout.C
index 1df4a355fcefc6f16d4973b2c807950ab5e0d6d1..9c69961fc43f0572b7b9e1eb45f91f46befbb28b 100644 (file)
@@ -5,27 +5,24 @@
  *
  * \author Michael Koziarski
  *
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
  */
 
-#ifdef __GNUG__
-#pragma implementation
-#endif
 
 #include <config.h>
 
 #include "support/lstrings.h"
-#include "Lsstream.h"
-
+#include "support/std_sstream.h"
 
+#include "gnome_helpers.h"
 #include "gnomeBC.h"
 #include "GAbout.h"
 
 #include <gtkmm/button.h>
 #include <gtkmm/textview.h>
 
-GAbout::GAbout(ControlAboutlyx & c)
-       : GnomeCB<ControlAboutlyx>(c, "GAbout")
+GAbout::GAbout()
+       : GnomeCB<ControlAboutlyx>("GAbout")
 {}
 
 
@@ -69,21 +66,26 @@ void GAbout::update()
        istringstream ss(in.str());
 
        string s;
-       string out;
-       Gtk::TextIter  e;
+       Glib::RefPtr<Gtk::TextBuffer> buf = credits()->get_buffer();
 
+       addDefaultTags(buf);
        while (getline(ss, s)) {
 
                if (prefixIs(s, "@b"))
-                       out += s.substr(2);
+                       buf->insert_with_tag(buf->end(),
+                                            Glib::locale_to_utf8(s.substr(2)),
+                                            "bold");
                else if (prefixIs(s, "@i"))
-                       out += s.substr(2);
+                       buf->insert_with_tag(buf->end(),
+                                            Glib::locale_to_utf8(s.substr(2)),
+                                            "italic");
                else
-                       out += s.substr(2);
+                       buf->insert(buf->end(),
+                                   Glib::locale_to_utf8(s.substr(2)));
+               buf->insert(buf->end(),"\n");
 
-               out += "\n";
        }
-       credits()->get_buffer()->set_text(out);
+
 }