LogTextView::LogTextView(string path_log_file)
    : path_log_file(path_log_file)
{
  // create log file
  system("mkdir " LOG_FOLDER " &> /dev/null");
  system((string("touch ") + path_log_file + string(" &> /dev/null")).c_str());

  set_border_width(10);
  set_editable(false);
  log_text_buffer = Gtk::TextBuffer::create();
  time_t result_time = time(NULL);
  log_text_buffer->set_text(ctime(&result_time));
  this->set_buffer(log_text_buffer);
  this->add_line_file(ctime(&result_time));
}
Exemple #2
0
InfoBox::InfoBox()
{
    auto statMgr(GetStatMgr().lock());
    assert(statMgr);
    //f_stats = statMgr->GetStats();

    // Misc stuff about the label
    //
    set_wrap_mode( Gtk::WRAP_WORD );
    f_infoBuffer = Gtk::TextBuffer::create();
    set_buffer( f_infoBuffer );
    set_editable( false );

    // StatManager
    //
    statMgr->signal_changed().connect( sigc::mem_fun( *this, &InfoBox::OnReloadTables ) );
}