X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/d9556426e85743ed9aa3dad04cea4bbeebfeb4c6..975b017e3c15104564790fe10eb47d78965e2feb:/Client/include/mnu_help_about.h diff --git a/Client/include/mnu_help_about.h b/Client/include/mnu_help_about.h index 2480faf..168bd3d 100644 --- a/Client/include/mnu_help_about.h +++ b/Client/include/mnu_help_about.h @@ -2,6 +2,7 @@ /* Maneja el Ayuda->Acerca de */ #include +#include #include class MnuHelpAbout:public Gtk::MenuItem { @@ -11,14 +12,20 @@ public: virtual ~MnuHelpAbout() {} protected: - // preparo para leer el archivo ChangeLog - Glif::RefPtr change_log; - fstream fp("../ChangeLog"); - change_log = StreamIOChannel::create(fstream); - - Glib::RefPtr refXml; + virtual void on_activate() { + // preparo para leer el archivo ChangeLog + Glib::ustring line; + Glib::RefPtr log_buffer; + Glib::RefPtr log_io; + + log_buffer = Gtk::TextBuffer::create(); + log_io = Glib::IOChannel::create_from_file("../ChangeLog", "r"); + while (log_io->read_line(line) != Glib::IO_STATUS_EOF) { + log_buffer->insert_at_cursor(line); + } + try { refXml = Gnome::Glade::Xml::create("client.glade", "dlgAbout"); } @@ -28,9 +35,12 @@ protected: } Gtk::Window *dlg = 0; Gtk::Button *btn_cerrar = 0; + Gtk::TextView *txt_changelog = 0; refXml->get_widget("dlgAbout", dlg); refXml->get_widget("btn_close", btn_cerrar); + refXml->get_widget("txt_changelog", txt_changelog); btn_cerrar->signal_clicked().connect(SigC::slot(*dlg, &Gtk::Dialog::hide)); + txt_changelog->set_buffer(log_buffer); dlg->show(); } };