fix newly-appearing crash-at-close caused by muddled thinking in pbd/pthread_utils
[ardour.git] / gtk2_ardour / editor.cc
index ee0e668e138571701d2ecc77b12df675d864ba67..300e317a388729da26950c32cb4c40630e7e9512 100644 (file)
 
 #include "i18n.h"
 
-#ifdef WITH_CMT
-#include "imageframe_socket_handler.h"
-#endif
-
 using namespace std;
 using namespace ARDOUR;
 using namespace PBD;
@@ -246,9 +242,7 @@ Editor::Editor ()
        , range_mark_label (_("Range Markers"))
        , transport_mark_label (_("Loop/Punch Ranges"))
        , cd_mark_label (_("CD Markers"))
-#ifdef WITH_VIDEOTIMELINE
        , videotl_label (_("Video Timeline"))
-#endif
        , edit_packer (4, 4, true)
 
          /* the values here don't matter: layout widgets
@@ -267,10 +261,6 @@ Editor::Editor ()
 
        , _toolbar_viewport (*manage (new Gtk::Adjustment (0, 0, 1e10)), *manage (new Gtk::Adjustment (0, 0, 1e10)))
 
-#ifdef WITH_CMT
-       , image_socket_listener(0)
-#endif
-
          /* nudge */
 
        , nudge_clock (new AudioClock (X_("nudge"), false, X_("nudge"), true, false, true))
@@ -440,7 +430,6 @@ Editor::Editor ()
        cd_mark_label.hide();
        cd_mark_label.set_no_show_all();
 
-#ifdef WITH_VIDEOTIMELINE
        videotl_bar_height = 4;
        videotl_label.set_name ("EditorRulerLabel");
        videotl_label.set_size_request (-1, (int)timebar_height * videotl_bar_height);
@@ -448,7 +437,6 @@ Editor::Editor ()
        videotl_label.set_padding (5,0);
        videotl_label.hide();
        videotl_label.set_no_show_all();
-#endif
 
        range_mark_label.set_name ("EditorRulerLabel");
        range_mark_label.set_size_request (-1, (int)timebar_height);
@@ -709,7 +697,7 @@ Editor::Editor ()
        signal_configure_event().connect (sigc::mem_fun (*ARDOUR_UI::instance(), &ARDOUR_UI::configure_handler));
        signal_delete_event().connect (sigc::mem_fun (*ARDOUR_UI::instance(), &ARDOUR_UI::exit_on_main_window_close));
 
-       Gtkmm2ext::Keyboard::the_keyboard().ShiftReleased.connect (sigc::mem_fun (*this, &Editor::shift_key_released));
+       Gtkmm2ext::Keyboard::the_keyboard().ZoomVerticalModifierReleased.connect (sigc::mem_fun (*this, &Editor::zoom_vertical_modifier_released));
        
        /* allow external control surfaces/protocols to do various things */
 
@@ -770,18 +758,6 @@ Editor::Editor ()
 
 Editor::~Editor()
 {
-#ifdef WITH_CMT
-       if(image_socket_listener) {
-               if(image_socket_listener->is_connected())
-               {
-                       image_socket_listener->close_connection() ;
-               }
-
-               delete image_socket_listener ;
-               image_socket_listener = 0 ;
-       }
-#endif
-
         delete button_bindings;
        delete _routes;
        delete _route_groups;
@@ -3149,12 +3125,12 @@ Editor::convert_drop_to_paths (
                */
 
                string txt = data.get_text();
-               const char* p;
+               char* p;
                const char* q;
 
-               p = (const char *) malloc (txt.length() + 1);
-               txt.copy (const_cast<char *> (p), txt.length(), 0);
-               const_cast<char*>(p)[txt.length()] = '\0';
+               p = (char *) malloc (txt.length() + 1);
+               txt.copy (p, txt.length(), 0);
+               p[txt.length()] = '\0';
 
                while (p)
                {
@@ -3334,8 +3310,6 @@ Editor::duplicate_range (bool with_dialog)
                win.add_button (_("Duplicate"), RESPONSE_ACCEPT);
                win.set_default_response (RESPONSE_ACCEPT);
 
-               win.set_position (WIN_POS_MOUSE);
-
                spinner.grab_focus ();
 
                switch (win.run ()) {
@@ -4037,7 +4011,7 @@ Editor::restore_editing_space ()
 
 /**
  *  Make new playlists for a given track and also any others that belong
- *  to the same active route group with the `edit' property.
+ *  to the same active route group with the `select' property.
  *  @param v Track.
  */
 
@@ -4053,7 +4027,7 @@ Editor::new_playlists (TimeAxisView* v)
 
 /**
  *  Use a copy of the current playlist for a given track and also any others that belong
- *  to the same active route group with the `edit' property.
+ *  to the same active route group with the `select' property.
  *  @param v Track.
  */
 
@@ -4068,7 +4042,7 @@ Editor::copy_playlists (TimeAxisView* v)
 }
 
 /** Clear the current playlist for a given track and also any others that belong
- *  to the same active route group with the `edit' property.
+ *  to the same active route group with the `select' property.
  *  @param v Track.
  */
 
@@ -4293,7 +4267,6 @@ Editor::set_frames_per_unit (double fpu)
        instant_save ();
 }
 
-#ifdef WITH_VIDEOTIMELINE
 void
 Editor::queue_visual_videotimeline_update ()
 {
@@ -4306,7 +4279,6 @@ Editor::queue_visual_videotimeline_update ()
         */
        ensure_visual_change_idle_handler ();
 }
-#endif
 
 void
 Editor::ensure_visual_change_idle_handler ()
@@ -4358,11 +4330,9 @@ Editor::idle_visual_changer ()
                update_tempo_based_rulers (current_bbt_points_begin, current_bbt_points_end);
        }
 
-#ifdef WITH_VIDEOTIMELINE
        if (p & VisualChange::ZoomLevel) {
                update_video_timeline();
        }
-#endif
 
        if (p & VisualChange::TimeOrigin) {
                set_horizontal_position (pending_visual_change.time_origin / frames_per_unit);
@@ -4377,11 +4347,10 @@ Editor::idle_visual_changer ()
                update_fixed_rulers ();
                redisplay_tempo (true);
        }
-#ifdef WITH_VIDEOTIMELINE
+
        if (!(p & VisualChange::ZoomLevel)) {
                update_video_timeline();
        }
-#endif
 
        _summary->set_overlays_dirty ();
 
@@ -4655,7 +4624,7 @@ Editor::get_regions_from_selection_and_entered ()
                regions.add (entered_regionview);
        }
 
-       return get_equivalent_regions (regions, ARDOUR::Properties::select.property_id);
+       return regions;
 }
 
 void
@@ -4867,7 +4836,7 @@ Editor::add_routes (RouteList& routes)
        for (RouteList::iterator x = routes.begin(); x != routes.end(); ++x) {
                boost::shared_ptr<Route> route = (*x);
 
-               if (route->is_hidden() || route->is_monitor()) {
+               if (route->is_auditioner() || route->is_monitor()) {
                        continue;
                }
 
@@ -5417,7 +5386,6 @@ Editor::change_region_layering_order (bool from_context_menu)
 
        if (layering_order_editor == 0) {
                layering_order_editor = new RegionLayeringOrderEditor (*this);
-               layering_order_editor->set_position (WIN_POS_MOUSE);
        }
 
        layering_order_editor->set_context (clicked_routeview->name(), _session, clicked_routeview, pl, position);
@@ -5531,7 +5499,7 @@ Editor::popup_control_point_context_menu (ArdourCanvas::Item* item, GdkEvent* ev
 }
 
 void
-Editor::shift_key_released ()
+Editor::zoom_vertical_modifier_released()
 {
        _stepping_axis_view = 0;
 }