Remove internal edit mode and add "content" tool.
[ardour.git] / gtk2_ardour / session_dialog.cc
index a541c90c40320cd684ce71027548b8783bdec53a..72dd0c8fae8f404c98d9c37196e5ce4c8a64f300 100644 (file)
@@ -31,6 +31,7 @@
 #include "pbd/replace_all.h"
 #include "pbd/whitespace.h"
 #include "pbd/stacktrace.h"
+#include "pbd/stl_delete.h"
 #include "pbd/openuri.h"
 
 #include "ardour/audioengine.h"
@@ -54,6 +55,7 @@ using namespace Gdk;
 using namespace Glib;
 using namespace PBD;
 using namespace ARDOUR;
+using namespace ARDOUR_UI_UTILS;
 
 static string poor_mans_glob (string path)
 {
@@ -74,7 +76,9 @@ SessionDialog::SessionDialog (bool require_new, const std::string& session_name,
        , _master_bus_channel_count_adj (2, 0, 100, 1, 10, 0)
        , _existing_session_chooser_used (false)
 {
+#ifndef PLATFORM_WINDOWS
        set_keep_above (true);
+#endif
        set_position (WIN_POS_CENTER);
        get_vbox()->set_spacing (6);
 
@@ -112,7 +116,7 @@ SessionDialog::SessionDialog (bool require_new, const std::string& session_name,
        
        get_vbox()->show_all ();
 
-       /* fill data models and how/hide accordingly */
+       /* fill data models and show/hide accordingly */
 
        populate_session_templates ();
 
@@ -279,7 +283,7 @@ SessionDialog::setup_initial_choice_box ()
 
        string image_path;
 
-       if (find_file_in_search_path (ardour_data_search_path(), "small-splash.png", image_path)) {
+       if (find_file (ardour_data_search_path(), "small-splash.png", image_path)) {
                Gtk::Image* image;
                if ((image = manage (new Gtk::Image (image_path))) != 0) {
                        hbox->pack_start (*image, false, false);
@@ -342,7 +346,7 @@ SessionDialog::setup_initial_choice_box ()
        recent_session_display.signal_row_activated().connect (sigc::mem_fun (*this, &SessionDialog::recent_row_activated));
        
        centering_vbox->pack_start (recent_label, false, false, 12);
-       centering_vbox->pack_start (recent_scroller, false, true);
+       centering_vbox->pack_start (recent_scroller, true, true);
 
        /* Browse button */
        
@@ -620,7 +624,7 @@ SessionDialog::redisplay_recent_sessions ()
 
                get_state_files_in_directory (*i, state_file_paths);
 
-               vector<string*>* states;
+               vector<string> states;
                vector<const gchar*> item;
                string dirname = *i;
 
@@ -638,7 +642,9 @@ SessionDialog::redisplay_recent_sessions ()
 
                /* now get available states for this session */
 
-               if ((states = Session::possible_states (dirname)) == 0) {
+               states = Session::possible_states (dirname);
+
+               if (states.empty()) {
                        /* no state file? */
                        continue;
                }