Fixed snapshot dialog annoyance.
authorTaybin Rutkin <taybin@taybin.com>
Fri, 3 Nov 2006 04:27:58 +0000 (04:27 +0000)
committerTaybin Rutkin <taybin@taybin.com>
Fri, 3 Nov 2006 04:27:58 +0000 (04:27 +0000)
Hilight current snapshot in snapshot list with asterisks.
Crash fix in sndfilesource dtor from brianahr.  Thanks!
Fixed COREAUDIO compilation.

git-svn-id: svn://localhost/ardour2/trunk@1066 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/ardour_ui.cc
gtk2_ardour/editor.cc
gtk2_ardour/redirect_box.cc
libs/ardour/sndfilesource.cc
libs/ardour/source_factory.cc

index de4eaca43ed4091f9b583af3d624604884fe36de..cf5c918f37da67460139648a1fcf9fd3530f9c49 100644 (file)
@@ -1433,7 +1433,6 @@ ARDOUR_UI::snapshot_session ()
 
        prompter.set_name ("Prompter");
        prompter.add_button (Gtk::Stock::SAVE, Gtk::RESPONSE_ACCEPT);
-       prompter.set_response_sensitive (Gtk::RESPONSE_ACCEPT, false);
        prompter.set_prompt (_("Name of New Snapshot"));
        prompter.set_initial_text (now);
        
index 68177a11183cc7076ba3dfc1da64650d150c5a55..32d4f4e658fd8f92c7948a80f0d51b4f75eb897d 100644 (file)
@@ -4004,7 +4004,17 @@ Editor::redisplay_snapshots ()
        for (vector<string*>::iterator i = states->begin(); i != states->end(); ++i) {
                string statename = *(*i);
                TreeModel::Row row = *(snapshot_display_model->append());
-               row[snapshot_display_columns.visible_name] = statename;
+               
+               // we don't have a way of changing the rendering in just one TreeView 
+               // cell so just put an asterisk on each side of the name for now.
+               string display_name;
+               if (statename == session->snap_name()) {
+                       display_name = "*"+statename+"*";
+               } else {
+                       display_name = statename;
+               }
+               
+               row[snapshot_display_columns.visible_name] = display_name;
                row[snapshot_display_columns.real_name] = statename;
        }
 
index f6b56d2f49c55a364af5d19644acb9b5e0c79623..6153d093f3e943eda4b18649ba36a4893a5e3777 100644 (file)
@@ -973,7 +973,7 @@ RedirectBox::edit_redirect (boost::shared_ptr<Redirect> redirect)
                                        } else {
                                                ARDOUR_UI::instance()->the_editor().ensure_float (*plugin_ui);
                                        }
-                                       plugin_ui->set_title (RedirectBox::generate_redirect_title (plugin_insert));
+                                       plugin_ui->set_title (generate_redirect_title (plugin_insert));
                                        plugin_insert->set_gui (plugin_ui);
                                        
                                        // change window title when route name is changed
@@ -1234,7 +1234,7 @@ RedirectBox::route_name_changed (void* src, PluginUIWindow* plugin_ui, boost::sh
 {
        ENSURE_GUI_THREAD(bind (mem_fun (*this, &RedirectBox::route_name_changed), src, plugin_ui, pi));
        
-       plugin_ui->set_title (RedirectBox::generate_redirect_title (pi));
+       plugin_ui->set_title (generate_redirect_title (pi));
 }
 
 string 
index 17e45c11d762998a76bdc5b34ceec3726ead8e7e..378b62ea04b057f20faa3cc56bcf5683bc9b5cbc 100644 (file)
@@ -179,6 +179,8 @@ SndFileSource::init (string idstr)
        string::size_type pos;
        string file;
 
+       // lets try to keep the object initalizations here at the top
+       xfade_buf = 0;
        interleave_buf = 0;
        interleave_bufsize = 0;
        sf = 0;
@@ -213,7 +215,7 @@ SndFileSource::init (string idstr)
        if (destructive()) {
                xfade_buf = new Sample[xfade_frames];
                timeline_position = header_position_offset;
-       } 
+       }
 
        AudioFileSource::HeaderPositionOffsetChanged.connect (mem_fun (*this, &SndFileSource::handle_header_position_change));
 }
index 9a3902147b83b08321848dda94b4badc69a88e58..d83533ca09c6c206c3fc0a32abd363a821e5fc85 100644 (file)
@@ -122,16 +122,14 @@ SourceFactory::createReadable (Session& s, string idstr, AudioFileSource::Flag f
 
        } else {
 
-               catch (failed_constructor& err) {
-                       boost::shared_ptr<Source> ret (new SndFileSource (s, idstr, flags));
-                       if (setup_peakfile (ret)) {
-                               return boost::shared_ptr<Source>();
-                       }
-                       if (announce) {
-                               SourceCreated (ret);
-                       }
-                       return ret;
+               boost::shared_ptr<Source> ret (new SndFileSource (s, idstr, flags));
+               if (setup_peakfile (ret)) {
+                       return boost::shared_ptr<Source>();
+               }
+               if (announce) {
+                       SourceCreated (ret);
                }
+               return ret;
        }
 
        return boost::shared_ptr<Source>();