add close button to about dialog (issue 1659)

This commit is contained in:
Troy Sankey
2012-12-25 22:19:21 -08:00
parent cd5cb5b570
commit 4e32b0e015
2 changed files with 12 additions and 0 deletions

View File

@@ -79,6 +79,13 @@ Splash::Splash (Gtk::Window& parent) : Gtk::Dialog(M("GENERAL_ABOUT"), parent, t
nb = Gtk::manage (new Gtk::Notebook ()); nb = Gtk::manage (new Gtk::Notebook ());
get_vbox()->pack_start (*nb); get_vbox()->pack_start (*nb);
// Add close button to bottom of the notebook
Gtk::Button* closeButton = Gtk::manage (new Gtk::Button (M("GENERAL_CLOSE")));
closeButton->signal_clicked().connect( sigc::mem_fun(*this, &Splash::closePressed) );
Gtk::HBox* bottomHBox = Gtk::manage (new Gtk::HBox ());
bottomHBox->pack_end (*closeButton, Gtk::PACK_SHRINK, 0);
get_vbox()->pack_start (*bottomHBox, Gtk::PACK_SHRINK, 0);
// Tab 1: the image // Tab 1: the image
splashImage = Gtk::manage(new SplashImage ()); splashImage = Gtk::manage(new SplashImage ());
nb->append_page (*splashImage, M("ABOUT_TAB_SPLASH")); nb->append_page (*splashImage, M("ABOUT_TAB_SPLASH"));
@@ -249,3 +256,7 @@ void Splash::showReleaseNotes() {
if (releaseNotesSW) if (releaseNotesSW)
nb->set_current_page(nb->page_num(*releaseNotesSW)); nb->set_current_page(nb->page_num(*releaseNotesSW));
} }
void Splash::closePressed() {
hide();
}

View File

@@ -50,6 +50,7 @@ class Splash : public Gtk::Dialog {
void showReleaseNotes(); void showReleaseNotes();
bool on_timer (); bool on_timer ();
//virtual bool on_button_release_event (GdkEventButton* event); //virtual bool on_button_release_event (GdkEventButton* event);
void closePressed();
}; };
#endif #endif