Be more sane about finding default template path.
authorNick Mainsbridge <beatroute@iprimus.com.au>
Thu, 11 May 2006 18:37:40 +0000 (18:37 +0000)
committerNick Mainsbridge <beatroute@iprimus.com.au>
Thu, 11 May 2006 18:37:40 +0000 (18:37 +0000)
git-svn-id: svn://localhost/trunk/ardour2@497 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/ardev_common.sh
gtk2_ardour/new_session_dialog.cc

index 23ce163e573984bada653903d8c0ce5238f38848..7e1da03ba0960c24e19a98310698a2bdfff7e188 100755 (executable)
@@ -1,6 +1,6 @@
 #export G_DEBUG=fatal_criticals
 
-export ARDOUR_PATH=./glade:./pixmaps:`pwd`:`cd ../ && pwd`
+export ARDOUR_PATH=./glade:./pixmaps:.:..
 
 export LD_LIBRARY_PATH=../libs/ardour:../libs/midi++2:../libs/pbd3:../libs/soundtouch:../libs/gtkmm2ext:../libs/sigc++2:../libs/glibmm2:../libs/gtkmm2/atk:../libs/gtkmm2/pango:../libs/gtkmm2/gdk:../libs/gtkmm2/gtk:../libs/libgnomecanvasmm:../libs/libglademm:$LD_LIBRARY_PATH
 
index 541bef308137aa052f94786dfa1d4220be095c11..3c113cebf27a40fa4d246d5226974f1f9c899bcf 100644 (file)
@@ -85,12 +85,13 @@ NewSessionDialog::NewSessionDialog(BaseObjectType* cobject,
                m_treeview->get_selection()->set_mode (Gtk::SELECTION_SINGLE);
 
        }
-
-       std::string path = ARDOUR::find_config_file (X_("templates"));
-       if (path !=  "") {
+       std::string path = ARDOUR::get_user_ardour_path() + X_("templates/");
+       if (path == Glib::ustring()) {
+         path = ARDOUR::get_system_data_path() + X_("templates/");
+       }
+       if (path != Glib::ustring()) {
          m_template->set_current_folder (path);
        }
-
        m_template->set_show_hidden (true);
        m_new_session_dialog->set_response_sensitive (Gtk::RESPONSE_OK, false);
        m_new_session_dialog->set_response_sensitive (0, false);
@@ -111,6 +112,7 @@ NewSessionDialog::NewSessionDialog(BaseObjectType* cobject,
        m_treeview->signal_row_activated().connect (mem_fun (*this, &NewSessionDialog::recent_row_activated));
        m_open_filechooser->signal_selection_changed ().connect (mem_fun (*this, &NewSessionDialog::file_chosen));
        m_template->signal_selection_changed ().connect (mem_fun (*this, &NewSessionDialog::template_chosen));
+       m_name->grab_focus();
 }
 
 void