#include <gtkmm2ext/gtk_ui.h>
#include <gtkmm2ext/utils.h>
#include <gtkmm2ext/stop_signal.h>
+#include <gtkmm2ext/window_title.h>
#include <ardour/session.h>
#include <ardour/audio_track.h>
add (global_vpacker);
set_name ("MixerWindow");
- set_title (_("ardour: mixer"));
+
+ WindowTitle title(Glib::get_application_name());
+ title += _("Mixer");
+ set_title (title.get_string());
+
set_wmclass (X_("ardour_mixer"), "Ardour");
add_accel_group (ActionManager::ui_manager->get_accel_group());
signal_configure_event().connect (mem_fun (*ARDOUR_UI::instance(), &ARDOUR_UI::configure_handler));
_selection.RoutesChanged.connect (mem_fun(*this, &Mixer_UI::follow_strip_selection));
+
+ mix_group_display_button_box->show();
+ mix_group_add_button->show();
+ mix_group_remove_button->show();
+
+ global_hpacker.show();
+ global_vpacker.show();
+ scroller.show();
+ scroller_base.show();
+ scroller_hpacker.show();
+ mixer_scroller_vpacker.show();
+ list_vpacker.show();
+ group_display_button_label.show();
+ group_display_button.show();
+ track_display_scroller.show();
+ group_display_scroller.show();
+ group_display_vbox.show();
+ track_display_frame.show();
+ group_display_frame.show();
+ rhs_pane1.show();
+ strip_packer.show();
+ out_packer.show();
+ list_hpane.show();
+ track_display.show();
+ group_display.show();
}
Mixer_UI::~Mixer_UI ()
void
Mixer_UI::show_window ()
{
- show_all ();
+ present ();
/* now reset each strips width so the right widgets are shown */
MixerStrip* ms;
for (ri = rows.begin(); ri != rows.end(); ++ri) {
ms = (*ri)[track_columns.strip];
- ms->set_width (ms->get_width());
+ ms->set_width (ms->get_width(), ms->width_owner());
}
_visible = true;
}
for (Session::RouteList::iterator x = routes.begin(); x != routes.end(); ++x) {
boost::shared_ptr<Route> route = (*x);
- if (route->hidden()) {
+ if (route->is_hidden()) {
return;
}
strip = new MixerStrip (*this, *session, route);
strips.push_back (strip);
- strip->set_width (_strip_width);
+ if (strip->width_owner() != strip) {
+ strip->set_width (_strip_width, this);
+ }
+
show_strip (strip);
no_track_list_redisplay = true;
no_track_list_redisplay = false;
redisplay_track_list ();
- route->name_changed.connect (bind (mem_fun(*this, &Mixer_UI::strip_name_changed), strip));
+ route->NameChanged.connect (bind (mem_fun(*this, &Mixer_UI::strip_name_changed), strip));
strip->GoingAway.connect (bind (mem_fun(*this, &Mixer_UI::remove_strip), strip));
strip->signal_button_release_event().connect (bind (mem_fun(*this, &Mixer_UI::strip_button_release_event), strip));
XMLNode* node = ARDOUR_UI::instance()->mixer_settings();
set_state (*node);
- string wintitle = _("ardour: mixer: ");
- wintitle += session->name();
- set_title (wintitle);
+ WindowTitle title(session->name());
+ title += _("Mixer");
+ title += Glib::get_application_name();
+
+ set_title (title.get_string());
initial_track_display ();
group_model->clear ();
_selection.clear ();
- set_title (_("ardour: mixer"));
+
+ WindowTitle title(Glib::get_application_name());
+ title += _("Mixer");
+ set_title (title.get_string());
+
stop_updating ();
}
continue;
}
- if (strip->route()->master() || strip->route()->control()) {
+ if (strip->route()->is_master() || strip->route()->is_control()) {
continue;
}
continue;
}
- if (strip->route()->master() || strip->route()->control()) {
+ if (strip->route()->is_master() || strip->route()->is_control()) {
continue;
}
- AudioTrack* at = strip->audio_track();
+ boost::shared_ptr<AudioTrack> at = strip->audio_track();
switch (tracks) {
case 0:
if (strip->packed()) {
- if (strip->route()->master() || strip->route()->control()) {
+ if (strip->route()->is_master() || strip->route()->is_control()) {
out_packer.reorder_child (*strip, -1);
} else {
strip_packer.reorder_child (*strip, -1); /* put at end */
} else {
- if (strip->route()->master() || strip->route()->control()) {
+ if (strip->route()->is_master() || strip->route()->is_control()) {
out_packer.pack_start (*strip, false, false);
} else {
strip_packer.pack_start (*strip, false, false);
}
strip->set_packed (true);
- strip->show_all ();
+ //strip->show();
}
} else {
- if (strip->route()->master() || strip->route()->control()) {
+ if (strip->route()->is_master() || strip->route()->is_control()) {
/* do nothing, these cannot be hidden */
} else {
if (strip->packed()) {
MixerStrip* strip = (*iter)[track_columns.strip];
if (strip) {
- if (!strip->route()->master() && !strip->route()->control()) {
+ if (!strip->route()->is_master() && !strip->route()->is_control()) {
bool visible = (*iter)[track_columns.visible];
(*iter)[track_columns.visible] = !visible;
}
}
void
-Mixer_UI::strip_name_changed (void* src, MixerStrip* mx)
+Mixer_UI::strip_name_changed (MixerStrip* mx)
{
- ENSURE_GUI_THREAD(bind (mem_fun(*this, &Mixer_UI::strip_name_changed), src, mx));
+ ENSURE_GUI_THREAD(bind (mem_fun(*this, &Mixer_UI::strip_name_changed), mx));
TreeModel::Children rows = track_model->children();
TreeModel::Children::iterator i;
_strip_width = w;
for (list<MixerStrip*>::iterator i = strips.begin(); i != strips.end(); ++i) {
- (*i)->set_width (w);
+ (*i)->set_width (w, this);
}
}