Consolidate API, prefer ->running()
[ardour.git] / gtk2_ardour / axis_view.cc
index 1502c8e1ea6a58bca29318bf16ede522d10f3293..ebcca2a91443030d7c876da754ea8ca70da10592 100644 (file)
 #include "pbd/convert.h"
 
 #include <gtkmm2ext/utils.h>
-#include <gtkmm2ext/selector.h>
 #include <gtkmm2ext/gtk_ui.h>
 
+#include "ardour/selection.h"
+
 #include "public_editor.h"
 #include "ardour_ui.h"
 #include "gui_object.h"
 #include "axis_view.h"
 #include "utils.h"
+
 #include "pbd/i18n.h"
 
 using namespace std;
@@ -98,19 +100,23 @@ AxisView::set_gui_property (const std::string& property_name, const std::string&
 bool
 AxisView::marked_for_display () const
 {
-       string const v = gui_property ("visible");
-       return (v == "" || PBD::string_is_affirmative (v));
+       bool visible;
+       if (!get_gui_property ("visible", visible)) {
+               return true;
+       }
+       return visible;
 }
 
 bool
 AxisView::set_marked_for_display (bool yn)
 {
-       string const v = gui_property ("visible");
-       if (v == "" || yn != PBD::string_is_affirmative (v)) {
-               set_gui_property ("visible", yn);
-               return true; // things changed
+       bool visible;
+       if (get_gui_property ("visible", visible) && visible == yn) {
+               return false; // nothing changed
        }
-       return false;
+
+       set_gui_property ("visible", yn);
+       return true; // things changed
 }
 
 GUIObjectState&
@@ -127,10 +133,4 @@ AxisView::set_selected (bool yn)
        }
 
        Selectable::set_selected (yn);
-
-       boost::shared_ptr<Stripable> s = stripable ();
-
-       if (s) {
-               s->presentation_info().set_selected (yn);
-       }
 }