Revert "show track-ID in mixer" and "...towards unique track numbers."
authorRobin Gareus <robin@gareus.org>
Tue, 9 Jul 2013 23:56:20 +0000 (01:56 +0200)
committerRobin Gareus <robin@gareus.org>
Wed, 10 Jul 2013 13:27:17 +0000 (15:27 +0200)
This reverts commits:
  ca54ea2b462869bfd9254a493d073ca1e9ad4b8e.
  9e87e058e26b87013e89ddf5d3b7358d50024d60.

gtk2_ardour/mixer_strip.cc
libs/ardour/ardour/route.h
libs/ardour/ardour/session.h
libs/ardour/route.cc
libs/ardour/session.cc
libs/ardour/session_state.cc

index 8ba3fa4e6d2af81752545489dc2507ac591d642b..c15d3ea22125097c883fd3ac47d2a967a3926d84 100644 (file)
@@ -1545,7 +1545,7 @@ MixerStrip::name_changed ()
 {
        switch (_width) {
        case Wide:
-               name_button.set_text (_route->id_and_name());
+               name_button.set_text (_route->name());
                break;
        case Narrow:
                name_button.set_text (PBD::short_version (_route->name(), 5));
index 7a8daf8501d0e59e2714a3247789ce6277e4e9d6..2e44d00984f018df7b13ce097a8974c520b9d9b2 100644 (file)
@@ -98,8 +98,6 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
        std::string comment() { return _comment; }
        void set_comment (std::string str, void *src);
 
-       std::string id_and_name(std::string id_prefix="", std::string id_suffix=" ");
-
        bool set_name (const std::string& str);
        static void set_name_in_state (XMLNode &, const std::string &);
 
@@ -186,9 +184,6 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
        void         set_meter_type (MeterType t) { _meter_type = t; }
        MeterType    meter_type() const { return _meter_type; }
 
-       void         set_unique_id (uint32_t id) { _unique_id = id; }
-       uint32_t     unique_id() const { return _unique_id; }
-
        /* Processors */
 
        boost::shared_ptr<Amp> amp() const  { return _amp; }
@@ -500,7 +495,6 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
        uint32_t       _soloed_by_others_upstream;
        uint32_t       _soloed_by_others_downstream;
        uint32_t       _solo_isolated;
-       uint32_t       _unique_id;
 
        bool           _denormal_protection;
 
index c3695de1dcbbba8ae5dd7b3eb3dca99a8e59a7e7..a1492246077f7100d507e9b7f4ed11ca766cfc59 100644 (file)
@@ -929,7 +929,6 @@ class Session : public PBD::StatefulDestructible, public PBD::ScopedConnectionLi
        bool                    _writable;
        bool                    _was_seamless;
        bool                    _under_nsm_control;
-       uint32_t                _unique_track_number;
 
        void initialize_latencies ();
        void set_worst_io_latencies ();
index ba78b0df8b2d00e05aa422dde5f0d16356a16b4b..e87cb4b03fad3bb86e171c163445baa95df144a6 100644 (file)
@@ -88,7 +88,6 @@ Route::Route (Session& sess, string name, Flag flg, DataType default_type)
        , _soloed_by_others_upstream (0)
        , _soloed_by_others_downstream (0)
        , _solo_isolated (0)
-       , _unique_id (0)
        , _denormal_protection (false)
        , _recordable (true)
        , _silent (false)
@@ -1882,9 +1881,6 @@ Route::state(bool full_state)
 
        node->add_property("meter-type", enum_2_string (_meter_type));
 
-       snprintf (buf, sizeof (buf), "%d", _unique_id);
-       node->add_property("unique-id", buf);
-
        if (_route_group) {
                node->add_property("route-group", _route_group->name());
        }
@@ -2063,10 +2059,6 @@ Route::set_state (const XMLNode& node, int version)
                _meter_type = MeterType (string_2_enum (prop->value (), _meter_type));
        }
 
-       if ((prop = node.property (X_("unique-id"))) != 0) {
-               _unique_id = atoi(prop->value());
-       }
-
        set_processor_state (processor_state);
 
        // this looks up the internal instrument in processors
@@ -3488,18 +3480,6 @@ Route::set_name (const string& str)
        return ret;
 }
 
-std::string
-Route::id_and_name (std::string id_prefix, std::string id_postfix)
-{
-       if (_unique_id == 0) {
-               return name();
-       } else {
-               stringstream ss;
-               ss << id_prefix << _unique_id << id_postfix << name();
-               return ss.str();
-       }
-}
-
 /** Set the name of a route in an XML description.
  *  @param node XML <Route> node to set the name in.
  *  @param name New name.
index e7dde4d2256b318044ec7d29a92213618c5bfd9a..914c6a9a77de28bd42aecf336841bf55e9f08609 100644 (file)
@@ -134,7 +134,6 @@ Session::Session (AudioEngine &eng,
        , _target_transport_speed (0.0)
        , _requested_return_frame (-1)
        , _under_nsm_control (false)
-       , _unique_track_number (0)
        , _session_dir (new SessionDirectory(fullpath))
        , state_tree (0)
        , _state_of_the_state (Clean)
@@ -1650,7 +1649,6 @@ Session::new_midi_track (const ChanCount& input, const ChanCount& output, boost:
 
                try {
                        track.reset (new MidiTrack (*this, track_name, Route::Flag (0), mode));
-                       track->set_unique_id(++_unique_track_number);
 
                        if (track->init ()) {
                                goto failed;
@@ -1886,7 +1884,6 @@ Session::new_audio_track (int input_channels, int output_channels, TrackMode mod
 
                try {
                        track.reset (new AudioTrack (*this, track_name, Route::Flag (0), mode));
-                       track->set_unique_id(++_unique_track_number);
 
                        if (track->init ()) {
                                goto failed;
index 59e0331383ab5bd9a78366bfa6827edcaf071cd2..49a0eed559e52e6f4c444241d688ea9ff2cb547f 100644 (file)
@@ -1033,9 +1033,6 @@ Session::state (bool full_state)
        snprintf (buf, sizeof (buf), "%" PRIu64, ID::counter());
        node->add_property ("id-counter", buf);
 
-       snprintf (buf, sizeof (buf), "%d", _unique_track_number);
-       node->add_property ("trackid-counter", buf);
-
        /* save the event ID counter */
 
        snprintf (buf, sizeof (buf), "%d", Evoral::event_id_counter());
@@ -1244,10 +1241,6 @@ Session::set_state (const XMLNode& node, int version)
                ID::init_counter (now);
        }
 
-        if ((prop = node.property (X_("trackid-counter"))) != 0) {
-                _unique_track_number = atoi (prop->value());
-        }
-
         if ((prop = node.property (X_("event-counter"))) != 0) {
                 Evoral::init_event_id_counter (atoi (prop->value()));
         }