summaryrefslogtreecommitdiff
path: root/libs/gtkmm2ext/tearoff.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2006-01-19 18:05:31 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2006-01-19 18:05:31 +0000
commite1ad4e0a532b10e78b6286537e8b0ec1142fcf6b (patch)
tree9cf96cbb0ae2939c6b1bcb91c8b9e9efcb4e0166 /libs/gtkmm2ext/tearoff.cc
parent5eb4a701f3c233b0f49b581b3350eb6fdf3c1012 (diff)
F11 now toggles maximal editor space
git-svn-id: svn://localhost/trunk/ardour2@280 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/gtkmm2ext/tearoff.cc')
-rw-r--r--libs/gtkmm2ext/tearoff.cc22
1 files changed, 22 insertions, 0 deletions
diff --git a/libs/gtkmm2ext/tearoff.cc b/libs/gtkmm2ext/tearoff.cc
index 07c24dc0d5..9f915d8227 100644
--- a/libs/gtkmm2ext/tearoff.cc
+++ b/libs/gtkmm2ext/tearoff.cc
@@ -35,6 +35,7 @@ TearOff::TearOff (Widget& c, bool allow_resize)
close_arrow (ARROW_UP, SHADOW_OUT)
{
dragging = false;
+ _visible = true;
tearoff_event_box.add (tearoff_arrow);
tearoff_event_box.set_events (BUTTON_PRESS_MASK|BUTTON_RELEASE_MASK);
@@ -77,6 +78,27 @@ TearOff::~TearOff ()
{
}
+void
+TearOff::set_visible (bool yn)
+{
+ /* don't change visibility if torn off */
+
+ if (own_window.is_visible()) {
+ return;
+ }
+
+ if (_visible != yn) {
+ _visible = yn;
+ if (yn) {
+ show_all();
+ Visible ();
+ } else {
+ hide ();
+ Hidden ();
+ }
+ }
+}
+
gint
TearOff::tearoff_click (GdkEventButton* ev)
{