make all of dialog visible for add_route_dialog
[ardour.git] / gtk2_ardour / ardour_ui.cc
index 794833b3538396ad3df1368c3e4a037b137da6c9..0633e9cceba6906436f0053d3058270420528383 100644 (file)
@@ -832,6 +832,10 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], string rcfile)
                theArdourUI = this;
        }
 
+       // allow run-time rebinding of accels
+
+       Settings::get_default()->property_gtk_can_change_accels() = true;
+
        ActionManager::init ();
        
        m_new_session_dialog = 0;
@@ -1083,7 +1087,7 @@ If you still wish to quit, please use the\n\n\
                }
        }
 
-       quit();
+       quit ();
 }
 
 int
@@ -1096,7 +1100,7 @@ ARDOUR_UI::ask_about_saving_session (string what)
        msg = string_compose(_("Save and %1"), what);
        window.add_button (msg, RESPONSE_ACCEPT);
        msg = string_compose(_("Just %1"), what);
-       window.add_button (msg, RESPONSE_REJECT);
+       window.add_button (msg, RESPONSE_APPLY);
        msg = string_compose(_("Don't %1"), what);
        window.add_button (msg, RESPONSE_REJECT);
 
@@ -1134,7 +1138,9 @@ ARDOUR_UI::ask_about_saving_session (string what)
        window.hide ();
 
        switch (r) {
-       case RESPONSE_ACCEPT:
+       case RESPONSE_ACCEPT: // save and get out of here
+               return 1;
+       case RESPONSE_APPLY:  // get out of here
                return 0;
        default:
                break;
@@ -1787,8 +1793,7 @@ ARDOUR_UI::open_session ()
                
                FileFilter filter_ardour;
                filter_ardour.set_name (_("Ardour sessions"));
-               filter_ardour.add_custom (FILE_FILTER_FILENAME, mem_fun (*this, &ARDOUR_UI::filter_ardour_session_dirs));
-
+               filter_ardour.add_pattern("*.ardour");
                open_session_selector->add_filter (filter_ardour);
        }
 
@@ -2643,6 +2648,13 @@ ARDOUR_UI::new_session (bool startup, std::string predetermined_path)
                        
                        std::string session_name = m_new_session_dialog->session_name();
                        std::string session_path = m_new_session_dialog->session_folder();
+                       
+                       /*
+                         XXX This is needed because session constructor wants a 
+                         non-existant path. hopefully this will be fixed at some point.
+                       */
+                       session_path = Glib::build_filename(session_path, session_name);
+                       
                        std::string template_name = m_new_session_dialog->session_template_name();
                        
                        if (m_new_session_dialog->use_session_template()) {
@@ -2807,7 +2819,7 @@ ARDOUR_UI::show ()
        }
 
        if (session && mixer) {
-               mixer->show_window ();
+               // mixer->show_window ();
        }
        
        if (about) {