diff options
author | Carl Hetherington <carl@carlh.net> | 2010-02-11 17:08:34 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-02-11 17:08:34 +0000 |
commit | 3a27410dcbaaca10480ffc14770b41c11e9ca1da (patch) | |
tree | 0b017597b99f3279dc3981033382a4d3f18a2b14 /libs/ardour/ardour/session_object.h | |
parent | 24fbade20a831fe629ed9bbc1d68a33ac1bd4d74 (diff) |
More tinkering with State<>. Use some StateDiffCommands instead of
MementoCommand<Region>. More use of State<> for Region members.
git-svn-id: svn://localhost/ardour2/branches/3.0@6675 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/session_object.h')
-rw-r--r-- | libs/ardour/ardour/session_object.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/libs/ardour/ardour/session_object.h b/libs/ardour/ardour/session_object.h index 47caab5475..cf9ccbb3a7 100644 --- a/libs/ardour/ardour/session_object.h +++ b/libs/ardour/ardour/session_object.h @@ -26,6 +26,8 @@ #include "ardour/session_handle.h" +#include "i18n.h" + namespace ARDOUR { class Session; @@ -39,11 +41,13 @@ class SessionObject : public SessionHandleRef, public PBD::StatefulDestructible public: SessionObject (Session& session, const std::string& name) : SessionHandleRef (session) - , _name(name) - {} + , _name (X_("name"), PBD::Change (0), "") + { + add_state (_name); + } - Session& session() const { return _session; } - const std::string& name() const { return _name; } + Session& session() const { return _session; } + std::string name() const { return _name; } virtual bool set_name (const std::string& str) { if (_name != str) { @@ -56,7 +60,7 @@ class SessionObject : public SessionHandleRef, public PBD::StatefulDestructible PBD::Signal0<void> NameChanged; protected: - std::string _name; + PBD::State<std::string> _name; }; } // namespace ARDOUR |