diff options
author | David Robillard <d@drobilla.net> | 2008-02-10 18:16:25 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-02-10 18:16:25 +0000 |
commit | 1b657585572298d1a69a7b43e611f59b7e185df3 (patch) | |
tree | 5b0ca4e1f222357499f97165a13308ac070c5ddc /libs | |
parent | e76b028ffdf054775cb697174d00cd0222d675c6 (diff) |
Committed underlay support (from Audun).
git-svn-id: svn://localhost/ardour2/branches/3.0@3037 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r-- | libs/gtkmm2ext/scroomer.cc | 2 | ||||
-rw-r--r-- | libs/pbd/pbd/xml++.h | 2 | ||||
-rw-r--r-- | libs/pbd/xml++.cc | 21 |
3 files changed, 23 insertions, 2 deletions
diff --git a/libs/gtkmm2ext/scroomer.cc b/libs/gtkmm2ext/scroomer.cc index b9be460de3..6572c8b51c 100644 --- a/libs/gtkmm2ext/scroomer.cc +++ b/libs/gtkmm2ext/scroomer.cc @@ -202,8 +202,6 @@ Scroomer::on_button_press_event (GdkEventButton* ev) { if(ev->button == 1) { Component comp = point_in(ev->y); - cerr << get_comp_name(comp) << " pressed" << endl; - if(comp == Total || comp == None) { return false; } diff --git a/libs/pbd/pbd/xml++.h b/libs/pbd/pbd/xml++.h index bf26a6f685..7171fce6cc 100644 --- a/libs/pbd/pbd/xml++.h +++ b/libs/pbd/pbd/xml++.h @@ -109,6 +109,8 @@ public: void remove_nodes(const string &); /** Remove and delete all nodes with the name passed to remove_nodes */ void remove_nodes_and_delete(const string &); + /** Remove and delete all nodes with property prop matching val */ + void remove_nodes_and_delete(const string& propname, const string& val); }; class XMLProperty { diff --git a/libs/pbd/xml++.cc b/libs/pbd/xml++.cc index 5507f658e9..e603b4c50f 100644 --- a/libs/pbd/xml++.cc +++ b/libs/pbd/xml++.cc @@ -379,6 +379,27 @@ XMLNode::remove_nodes_and_delete(const string & n) } } +void +XMLNode::remove_nodes_and_delete(const string& propname, const string& val) +{ + XMLNodeIterator i = _children.begin(); + XMLNodeIterator tmp; + XMLProperty* prop; + + while (i != _children.end()) { + tmp = i; + ++tmp; + + prop = (*i)->property(propname); + if(prop && prop->value() == val) { + delete *i; + _children.erase(i); + } + + i = tmp; + } +} + XMLProperty::XMLProperty(const string &n, const string &v) : _name(n), _value(v) |