13
0

add ::make_visible() to Tabbable class

This commit is contained in:
Paul Davis 2015-07-15 16:23:11 -04:00
parent 5288dd057b
commit 347ba94bcd
2 changed files with 13 additions and 1 deletions

View File

@ -40,7 +40,7 @@ class LIBGTKMM2EXT_API Tabbable : public WindowProxy {
~Tabbable ();
void add_to_notebook (Gtk::Notebook& notebook, const std::string& tab_title);
void show_tab ();
void make_visible ();
Gtk::Widget& contents() const { return _contents; }
@ -72,6 +72,8 @@ class LIBGTKMM2EXT_API Tabbable : public WindowProxy {
Gtk::Notebook _own_notebook;
Gtk::Notebook* _parent_notebook;
std::string _tab_title;
void show_tab ();
};
}

View File

@ -263,3 +263,13 @@ Tabbable::set_state (const XMLNode& node, int version)
return ret;
}
void
Tabbable::make_visible ()
{
if (current_toplevel() == _window) {
_window->present ();
} else {
show_tab ();
}
}