-bool
-TimeAxisView::has_state () const
-{
- return _has_state;
-}
-
-TimeAxisView*
-TimeAxisView::get_parent_with_state ()
-{
- if (parent == 0) {
- return 0;
- }
-
- if (parent->has_state()) {
- return parent;
- }
-
- return parent->get_parent_with_state ();
-}
-
-
-XMLNode&
-TimeAxisView::get_state ()
-{
- /* XXX: is this method used? */
-
- XMLNode* node = new XMLNode ("TAV-" + name());
- char buf[32];
-
- snprintf (buf, sizeof(buf), "%u", height);
- node->add_property ("height", buf);
- node->add_property ("marked-for-display", (_marked_for_display ? "1" : "0"));
- return *node;
-}
-
-int
-TimeAxisView::set_state (const XMLNode& node, int /*version*/)
-{
- const XMLProperty *prop;
-
- /* XXX: I think this might be vestigial */
- if ((prop = node.property ("marked-for-display")) != 0) {
- _marked_for_display = (prop->value() == "1");
- }
-
- if ((prop = node.property ("shown-editor")) != 0) {
- _marked_for_display = string_is_affirmative (prop->value ());
- }
-
- if ((prop = node.property ("track-height")) != 0) {
-
- if (prop->value() == "largest") {
- set_height_enum (HeightLargest);
- } else if (prop->value() == "large") {
- set_height_enum (HeightLarge);
- } else if (prop->value() == "larger") {
- set_height_enum (HeightLarger);
- } else if (prop->value() == "normal") {
- set_height_enum (HeightNormal);
- } else if (prop->value() == "smaller") {
- set_height_enum (HeightSmaller);
- } else if (prop->value() == "small") {
- set_height_enum (HeightSmall);
- } else {
- error << string_compose(_("unknown track height name \"%1\" in XML GUI information"), prop->value()) << endmsg;
- set_height_enum (HeightNormal);
- }
-
- } else if ((prop = node.property ("height")) != 0) {
-
- set_height (atoi (prop->value()));
-
- } else {
-
- set_height_enum (HeightNormal);
- }
-
- return 0;
-}
-