summaryrefslogtreecommitdiff
path: root/gtk2_ardour/mixer_ui.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gtk2_ardour/mixer_ui.cc')
-rw-r--r--gtk2_ardour/mixer_ui.cc52
1 files changed, 38 insertions, 14 deletions
diff --git a/gtk2_ardour/mixer_ui.cc b/gtk2_ardour/mixer_ui.cc
index f20171f9fb..cbd9cfe083 100644
--- a/gtk2_ardour/mixer_ui.cc
+++ b/gtk2_ardour/mixer_ui.cc
@@ -15,7 +15,6 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id$
*/
#include <algorithm>
@@ -29,14 +28,15 @@
#include <gtkmm2ext/gtk_ui.h>
#include <gtkmm2ext/utils.h>
#include <gtkmm2ext/stop_signal.h>
+#include <gtkmm2ext/window_title.h>
-#include <ardour/audioengine.h>
#include <ardour/session.h>
#include <ardour/audio_track.h>
#include <ardour/session_route.h>
#include <ardour/audio_diskstream.h>
#include <ardour/plugin_manager.h>
+#include "keyboard.h"
#include "mixer_ui.h"
#include "mixer_strip.h"
#include "plugin_selector.h"
@@ -58,9 +58,8 @@ using namespace std;
using PBD::atoi;
-Mixer_UI::Mixer_UI (AudioEngine& eng)
- : Window (Gtk::WINDOW_TOPLEVEL),
- engine (eng)
+Mixer_UI::Mixer_UI ()
+ : Window (Gtk::WINDOW_TOPLEVEL)
{
_strip_width = Wide;
track_menu = 0;
@@ -203,7 +202,11 @@ Mixer_UI::Mixer_UI (AudioEngine& eng)
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());
@@ -279,7 +282,7 @@ Mixer_UI::add_strip (Session::RouteList& routes)
TreeModel::Row row = *(track_model->append());
row[track_columns.text] = route->name();
- row[track_columns.visible] = true;
+ row[track_columns.visible] = strip->marked_for_display();
row[track_columns.route] = route;
row[track_columns.strip] = strip;
@@ -355,9 +358,11 @@ Mixer_UI::connect_to_session (Session* sess)
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 ();
@@ -383,7 +388,12 @@ Mixer_UI::disconnect_from_session ()
ENSURE_GUI_THREAD(mem_fun(*this, &Mixer_UI::disconnect_from_session));
group_model->clear ();
- set_title (_("ardour: mixer"));
+ _selection.clear ();
+
+ WindowTitle title(Glib::get_application_name());
+ title += _("Mixer");
+ set_title (title.get_string());
+
stop_updating ();
}
@@ -554,12 +564,14 @@ Mixer_UI::hide_all_audiotracks ()
void
Mixer_UI::track_list_change (const Gtk::TreeModel::Path& path,const Gtk::TreeModel::iterator& iter)
{
+ session->set_remote_control_ids();
redisplay_track_list ();
}
void
Mixer_UI::track_list_delete (const Gtk::TreeModel::Path& path)
{
+ session->set_remote_control_ids();
redisplay_track_list ();
}
@@ -612,8 +624,10 @@ Mixer_UI::redisplay_track_list ()
if (strip->route()->master() || strip->route()->control()) {
/* do nothing, these cannot be hidden */
} else {
- strip_packer.remove (*strip);
- strip->set_packed (false);
+ if (strip->packed()) {
+ strip_packer.remove (*strip);
+ strip->set_packed (false);
+ }
}
}
}
@@ -892,6 +906,16 @@ Mixer_UI::group_flags_changed (void* src, RouteGroup* group)
}
ENSURE_GUI_THREAD(bind (mem_fun(*this, &Mixer_UI::group_flags_changed), src, group));
+
+ /* force an update of any mixer strips that are using this group,
+ otherwise mix group names don't change in mixer strips
+ */
+
+ for (list<MixerStrip *>::iterator i = strips.begin(); i != strips.end(); ++i) {
+ if ((*i)->mix_group() == group) {
+ (*i)->mix_group_changed(0);
+ }
+ }
TreeModel::iterator i;
TreeModel::Children rows = group_model->children();
@@ -1003,7 +1027,7 @@ Mixer_UI::strip_scroller_button_release (GdkEventButton* ev)
using namespace Menu_Helpers;
if (Keyboard::is_context_menu_event (ev)) {
- ARDOUR_UI::instance()->add_route();
+ ARDOUR_UI::instance()->add_route (this);
return true;
}