live signal analysis is for the processor -- not the plugin(s) inside
[ardour.git] / gtk2_ardour / time_axis_view.cc
index 436e161583f01dad8322ba9c866bd649a0e1b8e2..6b780a7fc7e899b9ed4fecace543687b568a3134 100644 (file)
@@ -96,7 +96,7 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie
        , parent (rent)
        , selection_group (0)
        , _ghost_group (0)
-       , _hidden (false)
+       , _hidden (true)
        , in_destructor (false)
        , _size_menu (0)
        , _canvas_display (0)
@@ -104,6 +104,7 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie
        , _editor (ed)
        , name_entry (0)
        , ending_name_edit (false)
+       , by_popup_menu (false)
        , control_parent (0)
        , _order (0)
        , _effective_height (0)
@@ -221,8 +222,6 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie
        top_hbox.pack_start (scroomer_placeholder, false, false); // OR pack_end to move after meters ?
 
        UIConfiguration::instance().ColorsChanged.connect (sigc::mem_fun (*this, &TimeAxisView::color_handler));
-
-       GhostRegion::CatchDeletion.connect (*this, invalidator (*this), boost::bind (&TimeAxisView::erase_ghost, this, _1), gui_context());
 }
 
 TimeAxisView::~TimeAxisView()
@@ -654,10 +653,20 @@ TimeAxisView::name_entry_key_release (GdkEventKey* ev)
 bool
 TimeAxisView::name_entry_focus_out (GdkEventFocus*)
 {
+       if (by_popup_menu) {
+               by_popup_menu = false;
+               return false;
+       }
        end_name_edit (RESPONSE_OK);
        return false;
 }
 
+void
+TimeAxisView::name_entry_populate_popup (Gtk::Menu *)
+{
+       by_popup_menu = true;
+}
+
 void
 TimeAxisView::begin_name_edit ()
 {
@@ -677,6 +686,7 @@ TimeAxisView::begin_name_edit ()
                name_entry->signal_focus_out_event().connect (sigc::mem_fun (*this, &TimeAxisView::name_entry_focus_out));
                name_entry->set_text (name_label.get_text());
                name_entry->signal_activate().connect (sigc::bind (sigc::mem_fun (*this, &TimeAxisView::end_name_edit), RESPONSE_OK));
+               name_entry->signal_populate_popup().connect (sigc::mem_fun (*this, &TimeAxisView::name_entry_populate_popup));
 
                if (name_label.is_ancestor (name_hbox)) {
                        name_hbox.remove (name_label);