Fix some capitalisation in the preferences dialog.
[ardour.git] / gtk2_ardour / export_file_notebook.h
index 4eed7dc2008855a157db3239a480f6ee941dea29..5555828e98e5a6dc1e35759fa39038dd8050efb4 100644 (file)
 #include <gtkmm.h>
 
 #include "ardour/export_profile_manager.h"
+#include "ardour/session_handle.h"
 
 #include "export_format_selector.h"
 #include "export_filename_selector.h"
 
-namespace ARDOUR {
-       class Session;
-}
-
-
-class ExportFileNotebook : public Gtk::Notebook
+class ExportFileNotebook : public Gtk::Notebook, public ARDOUR::SessionHandlePtr
 {
   public:
 
@@ -43,7 +39,9 @@ class ExportFileNotebook : public Gtk::Notebook
        void set_session_and_manager (ARDOUR::Session * s, boost::shared_ptr<ARDOUR::ExportProfileManager> manager);
        void sync_with_manager ();
 
-       Glib::ustring get_nth_format_name (uint32_t n);
+       void update_example_filenames();
+
+       std::string get_nth_format_name (uint32_t n);
 
        sigc::signal<void> CriticalSelectionChanged;
 
@@ -55,7 +53,6 @@ class ExportFileNotebook : public Gtk::Notebook
        class FilePage;
 
        ManagerPtr        profile_manager;
-       ARDOUR::Session * session;
 
        void add_new_file_page ();
        void add_file_page (ARDOUR::ExportProfileManager::FormatStatePtr format_state, ARDOUR::ExportProfileManager::FilenameStatePtr filename_state);
@@ -82,7 +79,9 @@ class ExportFileNotebook : public Gtk::Notebook
 
                Gtk::Widget & get_tab_widget () { return tab_widget; }
                void set_remove_sensitive (bool value);
-               Glib::ustring get_format_name () const;
+               std::string get_format_name () const;
+
+               void update_example_filename();
 
                ARDOUR::ExportProfileManager::FormatStatePtr   get_format_state () const { return format_state; }
                ARDOUR::ExportProfileManager::FilenameStatePtr get_filename_state () const { return filename_state; }
@@ -92,6 +91,7 @@ class ExportFileNotebook : public Gtk::Notebook
          private:
                void save_format_to_manager (FormatPtr format);
                void update_tab_label ();
+               void critical_selection_changed ();
 
                ARDOUR::ExportProfileManager::FormatStatePtr   format_state;
                ARDOUR::ExportProfileManager::FilenameStatePtr filename_state;
@@ -102,6 +102,7 @@ class ExportFileNotebook : public Gtk::Notebook
                Gtk::Label              format_label;
                Gtk::Alignment          format_align;
                ExportFormatSelector    format_selector;
+               PBD::ScopedConnection   format_connection;
 
                Gtk::Label              filename_label;
                Gtk::Alignment          filename_align;