+
+void
+Mixer_UI::update_title ()
+{
+ if (_session) {
+ string n;
+
+ if (_session->snap_name() != _session->name()) {
+ n = _session->snap_name ();
+ } else {
+ n = _session->name ();
+ }
+
+ if (_session->dirty ()) {
+ n = "*" + n;
+ }
+
+ WindowTitle title (n);
+ title += _("Mixer");
+ title += Glib::get_application_name ();
+ set_title (title.get_string());
+
+ } else {
+
+ WindowTitle title (X_("Mixer"));
+ title += Glib::get_application_name ();
+ set_title (title.get_string());
+ }
+}
+
+MixerStrip*
+Mixer_UI::strip_by_x (int x)
+{
+ for (list<MixerStrip*>::iterator i = strips.begin(); i != strips.end(); ++i) {
+ int x1, x2, y;
+
+ (*i)->translate_coordinates (*this, 0, 0, x1, y);
+ x2 = x1 + (*i)->get_width();
+
+ if (x >= x1 && x <= x2) {
+ return (*i);
+ }
+ }
+
+ return 0;
+}
+
+void
+Mixer_UI::set_route_targets_for_operation ()
+{
+ _route_targets.clear ();
+
+ if (!_selection.empty()) {
+ _route_targets = _selection.routes;
+ return;
+ }
+
+ /* try to get mixer strip at mouse */
+
+ int x, y;
+ get_pointer (x, y);
+
+ MixerStrip* ms = strip_by_x (x);
+
+ if (ms) {
+ _route_targets.insert (ms);
+ }
+}