use CoreSelection for track selection
[ardour.git] / gtk2_ardour / time_axis_view.cc
index 6c9eb1d4eb598cffb65ffaf4ee7c2c763b26c9a4..5bd26b193a987f56dfad6281dd636e8d6b91537b 100644 (file)
@@ -590,9 +590,7 @@ TimeAxisView::set_height (uint32_t h, TrackHeightMode m)
        TOP_LEVEL_WIDGET.property_height_request () = h;
        height = h;
 
-       char buf[32];
-       snprintf (buf, sizeof (buf), "%u", height);
-       set_gui_property ("height", buf);
+       set_gui_property ("height", height);
 
        for (list<GhostRegion*>::iterator i = ghosts.begin(); i != ghosts.end(); ++i) {
                (*i)->set_height ();
@@ -744,7 +742,7 @@ TimeAxisView::popup_display_menu (guint32 when)
        build_display_menu ();
 
        if (!display_menu->items().empty()) {
-               display_menu->popup (3, when);
+               display_menu->popup (1, when);
        }
 }
 
@@ -771,19 +769,9 @@ TimeAxisView::set_selected (bool yn)
                time_axis_vbox.set_name (controls_base_unselected_name);
 
                hide_selection ();
-
-               /* children will be set for the yn=true case. but when deselecting
-                  the editor only has a list of top-level trackviews, so we
-                  have to do this here.
-               */
-
-               for (Children::iterator i = children.begin(); i != children.end(); ++i) {
-                       (*i)->set_selected (false);
-               }
        }
 
        time_axis_frame.show();
-
 }
 
 void
@@ -1307,10 +1295,9 @@ TimeAxisView::reset_visual_state ()
 {
        /* this method is not required to trigger a global redraw */
 
-       string str = gui_property ("height");
-
-       if (!str.empty()) {
-               set_height (atoi (str));
+       uint32_t height;
+       if (get_gui_property ("height", height)) {
+               set_height (height);
        } else {
                set_height (preset_height (HeightNormal));
        }