Make menu item for Add Track/Bus/VCA dialog consistent with window title
[ardour.git] / gtk2_ardour / session_import_dialog.cc
index e5824bd67b57319f68667fbbd73b759016c93745..b528f91b6c325f2f69fdd65fc9b26d511a570b88 100644 (file)
@@ -25,6 +25,7 @@
 #include "ardour/audio_region_importer.h"
 #include "ardour/audio_playlist_importer.h"
 #include "ardour/audio_track_importer.h"
+#include "ardour/filename_extensions.h"
 #include "ardour/location_importer.h"
 #include "ardour/tempo_map_importer.h"
 
@@ -32,7 +33,7 @@
 
 #include "gui_thread.h"
 #include "prompter.h"
-#include "i18n.h"
+#include "pbd/i18n.h"
 
 using namespace std;
 using namespace ARDOUR;
@@ -40,7 +41,7 @@ using namespace PBD;
 using namespace Gtk;
 
 SessionImportDialog::SessionImportDialog (ARDOUR::Session* target) :
-  ArdourDialog (_("Import From Session")),
+  ArdourDialog (_("Import from Session")),
   file_browse_button (_("Browse"))
 {
        set_session (target);
@@ -97,7 +98,7 @@ SessionImportDialog::SessionImportDialog (ARDOUR::Session* target) :
        // prompt signals XXX: problem - handlers to be in the same thread since they return values
        ElementImporter::Rename.connect_same_thread (connections, boost::bind (&SessionImportDialog::open_rename_dialog, this, _1, _2));
        ElementImporter::Prompt.connect_same_thread (connections, boost::bind (&SessionImportDialog::open_prompt_dialog, this, _1));
-               
+
        // Finalize
        show_all();
 }
@@ -112,16 +113,16 @@ SessionImportDialog::load_session (const string& filename)
                 }
                boost::shared_ptr<AudioRegionImportHandler> region_handler (new AudioRegionImportHandler (tree, *_session));
                boost::shared_ptr<AudioPlaylistImportHandler> pl_handler (new AudioPlaylistImportHandler (tree, *_session, *region_handler));
-               
+
                handlers.push_back (boost::static_pointer_cast<ElementImportHandler> (region_handler));
                handlers.push_back (boost::static_pointer_cast<ElementImportHandler> (pl_handler));
                handlers.push_back (HandlerPtr(new UnusedAudioPlaylistImportHandler (tree, *_session, *region_handler)));
                handlers.push_back (HandlerPtr(new AudioTrackImportHandler (tree, *_session, *pl_handler)));
                handlers.push_back (HandlerPtr(new LocationImportHandler (tree, *_session)));
                handlers.push_back (HandlerPtr(new TempoMapImportHandler (tree, *_session)));
-               
+
                fill_list();
-               
+
                if (ElementImportHandler::dirty()) {
                        // Warn user
                        string txt = _("Some elements had errors in them. Please see the log for details");
@@ -164,11 +165,11 @@ SessionImportDialog::browse ()
        dialog.set_transient_for(*this);
        dialog.set_filename (file_entry.get_text());
 
-        FileFilter session_filter;
-        session_filter.add_pattern ("*.ardour");
-        session_filter.set_name (string_compose (_("%1 sessions"), PROGRAM_NAME));
-        dialog.add_filter (session_filter);
-        dialog.set_filter (session_filter);
+       FileFilter session_filter;
+       session_filter.add_pattern (string_compose(X_("*%1"), ARDOUR::statefile_suffix));
+       session_filter.set_name (string_compose (_("%1 sessions"), PROGRAM_NAME));
+       dialog.add_filter (session_filter);
+       dialog.set_filter (session_filter);
 
        dialog.add_button(Stock::CANCEL, RESPONSE_CANCEL);
        dialog.add_button(Stock::OK, RESPONSE_OK);