diff options
author | Nick Mainsbridge <beatroute@iprimus.com.au> | 2006-05-11 09:25:51 +0000 |
---|---|---|
committer | Nick Mainsbridge <beatroute@iprimus.com.au> | 2006-05-11 09:25:51 +0000 |
commit | 62198e9c27b128e1d2408004249fc697a3140e44 (patch) | |
tree | 1c94b60943fcfd4cff5b5418bd8b6ba240682eda /gtk2_ardour | |
parent | 3732decd72d387d7005644621205b872ff7fd8d6 (diff) |
New session dialog defaults to the 'best' templates directory, clearing template file now works.
git-svn-id: svn://localhost/trunk/ardour2@496 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rwxr-xr-x | gtk2_ardour/ardev_common.sh | 2 | ||||
-rw-r--r-- | gtk2_ardour/new_session_dialog.cc | 23 | ||||
-rw-r--r-- | gtk2_ardour/new_session_dialog.h | 1 |
3 files changed, 22 insertions, 4 deletions
diff --git a/gtk2_ardour/ardev_common.sh b/gtk2_ardour/ardev_common.sh index 7e1da03ba0..23ce163e57 100755 --- a/gtk2_ardour/ardev_common.sh +++ b/gtk2_ardour/ardev_common.sh @@ -1,6 +1,6 @@ #export G_DEBUG=fatal_criticals -export ARDOUR_PATH=./glade:./pixmaps:.:.. +export ARDOUR_PATH=./glade:./pixmaps:`pwd`:`cd ../ && pwd` 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 diff --git a/gtk2_ardour/new_session_dialog.cc b/gtk2_ardour/new_session_dialog.cc index 533cd2aa96..541bef3081 100644 --- a/gtk2_ardour/new_session_dialog.cc +++ b/gtk2_ardour/new_session_dialog.cc @@ -86,9 +86,14 @@ NewSessionDialog::NewSessionDialog(BaseObjectType* cobject, } + std::string path = ARDOUR::find_config_file (X_("templates")); + if (path != "") { + 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); - m_new_session_dialog->set_default_response (Gtk::RESPONSE_OK); m_notebook->show_all_children(); m_notebook->set_current_page(0); @@ -105,6 +110,7 @@ NewSessionDialog::NewSessionDialog(BaseObjectType* cobject, m_treeview->get_selection()->signal_changed().connect (mem_fun (*this, &NewSessionDialog::treeview_selection_changed)); 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)); } void @@ -253,6 +259,7 @@ void NewSessionDialog::reset_name() { m_name->set_text(Glib::ustring()); + m_new_session_dialog->set_response_sensitive (Gtk::RESPONSE_OK, false); } @@ -319,16 +326,26 @@ NewSessionDialog::file_chosen () } void +NewSessionDialog::template_chosen () +{ + if (m_template->get_filename() != "" ) {; + m_new_session_dialog->set_response_sensitive (0, true); + } else { + m_new_session_dialog->set_response_sensitive (0, false); + } + +} + +void NewSessionDialog::recent_row_activated (const Gtk::TreePath& path, Gtk::TreeViewColumn* col) { m_new_session_dialog->response (Gtk::RESPONSE_YES); } -/// @todo void NewSessionDialog::reset_template() { - + m_template->set_filename(""); } void diff --git a/gtk2_ardour/new_session_dialog.h b/gtk2_ardour/new_session_dialog.h index 8ee4a93969..c9679c617b 100644 --- a/gtk2_ardour/new_session_dialog.h +++ b/gtk2_ardour/new_session_dialog.h @@ -156,6 +156,7 @@ protected: void notebook_page_changed (GtkNotebookPage*, uint); void treeview_selection_changed (); void file_chosen (); + void template_chosen (); void recent_row_activated (const Gtk::TreePath&, Gtk::TreeViewColumn*); |