3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Michael Koziarski
8 * Full author contact details are available in file CREDITS.
14 #include "support/lstrings.h"
15 #include "support/std_sstream.h"
17 #include "gnome_helpers.h"
21 #include <gtkmm/button.h>
22 #include <gtkmm/textview.h>
25 : GnomeCB<ControlAboutlyx>("GAbout")
35 // Connect the buttons.
36 close_btn()->signal_clicked().connect(SigC::slot(*this, &GAbout::CancelClicked));
38 // Manage the buttons state
39 bc().setCancel(close_btn());
52 cr += controller().getCopyright();
54 cr += controller().getLicense();
56 cr += controller().getDisclaimer();
57 copyright()->get_buffer()->set_text(cr);
61 version()->set_text(controller().getVersion());
64 controller().getCredits(in);
66 istringstream ss(in.str());
69 Glib::RefPtr<Gtk::TextBuffer> buf = credits()->get_buffer();
72 while (getline(ss, s)) {
74 if (prefixIs(s, "@b"))
75 buf->insert_with_tag(buf->end(),
76 Glib::locale_to_utf8(s.substr(2)),
78 else if (prefixIs(s, "@i"))
79 buf->insert_with_tag(buf->end(),
80 Glib::locale_to_utf8(s.substr(2)),
83 buf->insert(buf->end(),
84 Glib::locale_to_utf8(s.substr(2)));
85 buf->insert(buf->end(),"\n");
93 Gtk::Button * GAbout::close_btn() const
95 return getWidget<Gtk::Button>("r_close_btn");
97 Gtk::Label * GAbout::version() const
99 return getWidget<Gtk::Label>("r_version");
101 Gtk::TextView * GAbout::credits() const
103 return getWidget<Gtk::TextView>("r_credits");
105 Gtk::TextView * GAbout::copyright() const
107 return getWidget<Gtk::TextView>("r_copyright");