1234567891011121314151617181920212223242526272829303132333435 |
- #include "uiAbout.hh"
- UiAbout::UiAbout(): m_Box(Gtk::Orientation::VERTICAL), m_Button("License"), m_Button1("Back"){
- set_title("About");
- set_default_size(250, 300);
- set_resizable(false);
-
- set_child(m_Box);
- m_Box.append(m_Box1);
- m_Box1.append(m_Button);
- m_Box1.append(m_Button1);
- m_Box1.set_homogeneous();
- m_Button.signal_clicked().connect(sigc::mem_fun(*this,
- &UiAbout::showLicense));
- m_Button1.signal_clicked().connect(sigc::mem_fun(*this,
- &Window::hide));
- }
- void UiAbout::showLicense(){
- m_Box.prepend(m_ScrolledWindow);
- m_ScrolledWindow.set_child(m_TextView);
- m_ScrolledWindow.set_policy(Gtk::PolicyType::AUTOMATIC, Gtk::PolicyType::AUTOMATIC);
- m_ScrolledWindow.set_expand();
- m_refTextBuffer = Gtk::TextBuffer::create();
- m_refTextBuffer->set_text("This program is free software; you can redistribute it and/or modify it\nunder the terms of the GNU General Public License as published by the Free\nSoftware Foundation; either version 3 of the License, or (at your option)\nany later version.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT\nANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\nFITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\nmore details.\n\nYou should have received a copy of the GNU General Public License along with\nthis program; if not, write to the Free Software Foundation, Inc., 51 Franklin\nStreet, Fifth Floor, Boston, MA 02110-1301, USA.");
- m_TextView.set_buffer(m_refTextBuffer);
- m_TextView.set_editable(false);
- }
|