major changes to Region, AudioRegion, Playlist, AudioPlaylist and Crossfade state...
[ardour.git] / gtk2_ardour / ardour_ui.cc
index 55370e7557674ec39cbedc1037e5263a23da29ba..7548f94c5b7ee6c9e3ba66099500d858490eae61 100644 (file)
@@ -178,7 +178,6 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], string rcfile)
        gettimeofday (&last_peak_grab, 0);
        gettimeofday (&last_shuttle_request, 0);
 
-       ARDOUR::AudioDiskstream::DeleteSources.connect (mem_fun(*this, &ARDOUR_UI::delete_sources_in_the_right_thread));
        ARDOUR::Diskstream::DiskOverrun.connect (mem_fun(*this, &ARDOUR_UI::disk_overrun_handler));
        ARDOUR::Diskstream::DiskUnderrun.connect (mem_fun(*this, &ARDOUR_UI::disk_underrun_handler));
 
@@ -565,21 +564,11 @@ ARDOUR_UI::update_disk_space()
                int secs;
                nframes_t fr = session->frame_rate();
                
-               if (session->actively_recording()){
-                       
-                       rec_enabled_diskstreams = 0;
-                       session->foreach_route (this, &ARDOUR_UI::count_recenabled_diskstreams);
-                       
-                       if (rec_enabled_diskstreams) {
-                               frames /= rec_enabled_diskstreams;
-                       }
-                       
-               } else {
-                       
-                       /* hmmm. shall we divide by the route count? or the diskstream count?
-                          or what? for now, do nothing ...
-                       */
-                       
+               rec_enabled_diskstreams = 0;
+               session->foreach_route (this, &ARDOUR_UI::count_recenabled_diskstreams);
+               
+               if (rec_enabled_diskstreams) {
+                       frames /= rec_enabled_diskstreams;
                }
                
                hrs  = frames / (fr * 3600);
@@ -1041,8 +1030,7 @@ ARDOUR_UI::transport_record ()
                switch (session->record_status()) {
                case Session::Disabled:
                        if (session->ntracks() == 0) {
-                               string txt = _("Please create 1 or more track\nbefore trying to record.\nCheck the Session menu.");
-                               MessageDialog msg (*editor, txt);
+                               MessageDialog msg (*editor, _("Please create 1 or more track\nbefore trying to record.\nCheck the Session menu."));
                                msg.run ();
                                return;
                        }
@@ -1699,7 +1687,7 @@ ARDOUR_UI::new_session (bool startup, std::string predetermined_path)
 
                                } else {
 
-                                       std::string session_path = new_session_dialog->session_folder();
+                                       session_path = new_session_dialog->session_folder();
                                        
                                }
                        
@@ -2197,18 +2185,6 @@ ARDOUR_UI::halt_on_xrun_message ()
        msg.run ();
 }
 
-void 
-ARDOUR_UI::delete_sources_in_the_right_thread (list<boost::shared_ptr<ARDOUR::Source> >* deletion_list)
-{
-       ENSURE_GUI_THREAD (bind (mem_fun(*this, &ARDOUR_UI::delete_sources_in_the_right_thread), deletion_list));
-
-       for (list<boost::shared_ptr<Source> >::iterator i = deletion_list->begin(); i != deletion_list->end(); ++i) {
-               (*i)->drop_references ();
-       }
-
-       delete deletion_list;
-}
-
 void
 ARDOUR_UI::disk_overrun_handler ()
 {