add action and menu entry for "reattach all tearoffs".

So far only does the transport tearoff
This commit is contained in:
Paul Davis 2014-10-16 13:31:20 -04:00
parent 6970972191
commit 8097b8c762
4 changed files with 16 additions and 6 deletions

View File

@ -337,6 +337,7 @@
<menuitem action='ToggleMaximalEditor'/>
<menuitem action='ToggleMaximalMixer'/>
<menuitem action='KeepTearoffs'/>
<menuitem action='reattach-all-tearoffs'/>
<separator/>

View File

@ -112,10 +112,6 @@ class NSM_Client;
class LevelMeterHBox;
class GUIObjectState;
namespace Gtkmm2ext {
class TearOff;
}
namespace ARDOUR {
class ControlProtocolInfo;
class IO;
@ -126,6 +122,10 @@ namespace ARDOUR {
class ProcessThread;
}
namespace Gtkmm2ext {
class TearOff;
}
class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
{
public:
@ -380,10 +380,11 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
std::list<MidiTracer*> _midi_tracer_windows;
/* Transport Control */
void detach_tearoff (Gtk::Box* parent, Gtk::Widget* contents);
void reattach_tearoff (Gtk::Box* parent, Gtk::Widget* contents, int32_t order);
void reattach_all_tearoffs ();
/* Transport Control */
Gtkmm2ext::TearOff* transport_tearoff;
Gtk::Frame transport_frame;

View File

@ -480,6 +480,12 @@ ARDOUR_UI::reattach_tearoff (Box* b, Widget* w, int32_t n)
b->reorder_child (*w, n);
}
void
ARDOUR_UI::reattach_all_tearoffs ()
{
if (transport_tearoff) transport_tearoff->put_it_back();
}
void
ARDOUR_UI::soloing_changed (bool onoff)
{

View File

@ -200,6 +200,8 @@ ARDOUR_UI::install_actions ()
ActionManager::register_action (common_actions, X_("toggle-editor-mixer"), _("Toggle Editor+Mixer"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_editor_mixer));
ActionManager::register_toggle_action (common_actions, X_("toggle-meterbridge"), S_("Window|Meterbridge"), sigc::mem_fun(*this, &ARDOUR_UI::toggle_meterbridge));
ActionManager::register_action (common_actions, X_("reattach-all-tearoffs"), _("Reattach All Tearoffs"), sigc::mem_fun (*this, &ARDOUR_UI::reattach_all_tearoffs));
act = ActionManager::register_action (common_actions, X_("NewMIDITracer"), _("MIDI Tracer"), sigc::mem_fun(*this, &ARDOUR_UI::new_midi_tracer_window));
ActionManager::session_sensitive_actions.push_back (act);
ActionManager::register_action (common_actions, X_("Chat"), _("Chat"), sigc::mem_fun(*this, &ARDOUR_UI::launch_chat));