diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2015-07-07 22:12:21 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-02-22 15:31:21 -0500 |
commit | 9010262bed21611f2db652d16f63e4af4380259d (patch) | |
tree | b112724d2b26eb3b66b5e1c5571dbf6c5509cc24 /gtk2_ardour/ardour_ui_dependents.cc | |
parent | 85eee3b09dd53f6f5d1803f2b585270ab535e16f (diff) |
first compilable version of tabbable design.
I would have loved to split this apart, but there are just so many interrelated changes,
it makes little sense and would be a huge effort that would break future git bisect
use because so many intermediate commits would not compile
Diffstat (limited to 'gtk2_ardour/ardour_ui_dependents.cc')
-rw-r--r-- | gtk2_ardour/ardour_ui_dependents.cc | 36 |
1 files changed, 25 insertions, 11 deletions
diff --git a/gtk2_ardour/ardour_ui_dependents.cc b/gtk2_ardour/ardour_ui_dependents.cc index 41af709e2f..031ebd58a8 100644 --- a/gtk2_ardour/ardour_ui_dependents.cc +++ b/gtk2_ardour/ardour_ui_dependents.cc @@ -61,8 +61,8 @@ ARDOUR_UI::we_have_dependents () editor->setup_tooltips (); editor->UpdateAllTransportClocks.connect (sigc::mem_fun (*this, &ARDOUR_UI::update_transport_clocks)); - std::cerr << "Mixer page = " << editor->tabs().append_page (*mixer, _("Mixer")) << std::endl; - editor->tabs().set_tab_detachable (*mixer); + editor->add_to_notebook (_tabs, _("Editor"), 1); + mixer->add_to_notebook (_tabs, _("Mixer"), 1); /* all actions are defined */ @@ -104,7 +104,7 @@ ARDOUR_UI::exit_on_main_window_close (GdkEventAny * /*ev*/) #endif } -Gtk::Notebook* +GtkNotebook* ARDOUR_UI::tab_window_root_drop (GtkNotebook* src, GtkWidget* w, gint x, @@ -112,20 +112,34 @@ ARDOUR_UI::tab_window_root_drop (GtkNotebook* src, gpointer) { using namespace std; + Gtk::Notebook* nb = 0; + Gtk::Window* win = 0; - if (w == GTK_WIDGET(mixer->gobj())) { + if (w == GTK_WIDGET(mixer->contents().gobj())) { /* Mixer */ - cerr << "Call use own window\n"; + cerr << "Call use own window, mixer\n"; - Gtk::Notebook* nb = mixer->use_own_window (); - Gtk::Window* win = (Gtk::Window*) nb->get_toplevel (); + nb = mixer->tab_root_drop (); + win = mixer->own_window (); + + } else if (w == GTK_WIDGET(editor->contents().gobj())) { + + /* Editor */ + + cerr << "Call use own window, editor\n"; - win->move (x, y); - win->present (); + nb = editor->tab_root_drop (); + win = editor->own_window (); - return nb; } - return 0; + if (nb) { + win->move (x, y); + win->show_all (); + win->present (); + return nb->gobj(); + } + + return 0; /* what was that? */ } |