From c54953a968458d5ed98682ba0a6e08d6d98f4b95 Mon Sep 17 00:00:00 2001 From: paul Date: Fri, 23 Jul 2010 13:15:59 +0000 Subject: [PATCH] position tearoffs at WIN_POS_MOUSE when first torn off, and add tooltips to help tell users what they can do git-svn-id: http://subversion.ardour.org/svn/ardour2/ardour2/branches/3.0@7477 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/gtkmm2ext/tearoff.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libs/gtkmm2ext/tearoff.cc b/libs/gtkmm2ext/tearoff.cc index e59a610aa..bc8829d94 100644 --- a/libs/gtkmm2ext/tearoff.cc +++ b/libs/gtkmm2ext/tearoff.cc @@ -54,10 +54,13 @@ TearOff::TearOff (Widget& c, bool allow_resize) tearoff_event_box.set_events (BUTTON_PRESS_MASK|BUTTON_RELEASE_MASK); tearoff_event_box.signal_button_release_event().connect (mem_fun (*this, &TearOff::tearoff_click)); + tearoff_event_box.set_tooltip_text (_("Click to to tear this into its own window")); + close_event_box.add (close_arrow); close_event_box.set_events (BUTTON_PRESS_MASK|BUTTON_RELEASE_MASK); close_event_box.signal_button_release_event().connect (mem_fun (*this, &TearOff::close_click)); - + + close_event_box.set_tooltip_text (_("Click to put this back in the main window")); VBox* box1; box1 = manage (new VBox); @@ -151,6 +154,9 @@ TearOff::tear_it_off () window_box.pack_start (contents); own_window.set_name (get_name()); close_event_box.set_name (get_name()); + if (own_window_width == 0) { + own_window.set_position (WIN_POS_MOUSE); + } own_window.show_all (); own_window.present (); hide (); -- 2.11.4.GIT