diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2015-07-25 09:18:32 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-02-22 15:31:23 -0500 |
commit | 077bb13e94ee08bf4f56e8fc98087f82163ff6b3 (patch) | |
tree | 2659452f0fca36c6a4eed2a60cde1b6fdf00f40f /libs/gtkmm2ext/tabbable.cc | |
parent | 1bdf6d8a68ce5ff18071b0a5a0d9e1d7f85dce08 (diff) |
extend API for tabbable visibility management
Diffstat (limited to 'libs/gtkmm2ext/tabbable.cc')
-rw-r--r-- | libs/gtkmm2ext/tabbable.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libs/gtkmm2ext/tabbable.cc b/libs/gtkmm2ext/tabbable.cc index 720c9df9ca..3c875f4a80 100644 --- a/libs/gtkmm2ext/tabbable.cc +++ b/libs/gtkmm2ext/tabbable.cc @@ -96,9 +96,9 @@ Tabbable::use_own_window (bool and_pack_it) } bool -Tabbable::window_visible () +Tabbable::window_visible () const { - if (!own_window()) { + if (!_window) { return false; } @@ -155,6 +155,8 @@ Tabbable::show_own_window (bool and_pack_it) _window->set_default_size (alloc.get_width(), alloc.get_height()); } + tab_requested_by_state = false; + _window->show_all (); _window->present (); } @@ -271,15 +273,13 @@ Tabbable::delete_event_handler (GdkEventAny *ev) } bool -Tabbable::is_tabbed () const +Tabbable::tabbed () const { - Window* toplevel = (Window*) _contents.get_toplevel(); - - if (_window && (toplevel == _window)) { + if (_window && (current_toplevel() == _window)) { return false; } - if (_parent_notebook && _contents.get_parent()) { + if (_parent_notebook && (_parent_notebook->page_num (_contents) >= 0)) { return true; } @@ -320,9 +320,9 @@ Tabbable::xml_node_name() } bool -Tabbable::tabbed () const +Tabbable::tabbed_by_default() const { - return _parent_notebook && (_parent_notebook->page_num (_contents) >= 0); + return tab_requested_by_state; } XMLNode& |