return to the old way of editing track names, but hopefully better than it was. likel...
[ardour.git] / gtk2_ardour / sfdb_ui.h
index d2347b5cb98f4f1aa95ec1e1fd98be6b0fdd6595..6992bc5fcdc10058b74f356b935b3c15b06af6b4 100644 (file)
@@ -46,7 +46,7 @@
 #include "ardour/audiofilesource.h"
 #include "ardour/session_handle.h"
 
-#include "ardour_dialog.h"
+#include "ardour_window.h"
 #include "editing.h"
 #include "audio_clock.h"
 
@@ -110,7 +110,7 @@ class SoundFileBox : public Gtk::VBox, public ARDOUR::SessionHandlePtr
        void stop_audition ();
 };
 
-class SoundFileBrowser : public ArdourDialog
+class SoundFileBrowser : public ArdourWindow
 {
   private:
        class FoundTagColumns : public Gtk::TreeModel::ColumnRecord
@@ -152,9 +152,12 @@ class SoundFileBrowser : public ArdourDialog
        Gtk::Button freesound_stop_btn;
 
   public:
-       SoundFileBrowser (Gtk::Window& parent, std::string title, ARDOUR::Session* _s, bool persistent);
+       SoundFileBrowser (std::string title, ARDOUR::Session* _s, bool persistent);
        virtual ~SoundFileBrowser ();
 
+        int run ();
+        int status () const { return _status; }
+        
        virtual void set_session (ARDOUR::Session*);
        std::vector<std::string> get_paths ();
 
@@ -187,6 +190,9 @@ class SoundFileBrowser : public ArdourDialog
 
   protected:
        bool resetting_ourselves;
+       int matches;
+        int _status;
+        bool _done;
 
        Gtk::FileFilter audio_and_midi_filter;
        Gtk::FileFilter audio_filter;
@@ -194,6 +200,11 @@ class SoundFileBrowser : public ArdourDialog
        Gtk::FileFilter custom_filter;
        Gtk::FileFilter matchall_filter;
        Gtk::HBox hpacker;
+        Gtk::VBox vpacker;
+
+        Gtk::Button ok_button;
+        Gtk::Button cancel_button;
+        Gtk::Button apply_button;
 
        static std::string persistent_folder;
 
@@ -225,17 +236,19 @@ class SoundFileBrowser : public ArdourDialog
        bool on_midi_filter (const Gtk::FileFilter::Info& filter_info);
        bool on_audio_and_midi_filter (const Gtk::FileFilter::Info& filter_info);
 
+        void set_action_sensitive (bool);
+
        virtual bool reset_options() { return true; }
 
   protected:
        void on_show();
-
+        virtual void do_something (int action);
 };
 
 class SoundFileChooser : public SoundFileBrowser
 {
   public:
-       SoundFileChooser (Gtk::Window& parent, std::string title, ARDOUR::Session* _s = 0);
+       SoundFileChooser (std::string title, ARDOUR::Session* _s = 0);
        virtual ~SoundFileChooser () {};
 
        std::string get_filename ();
@@ -248,7 +261,7 @@ class SoundFileOmega : public SoundFileBrowser
 {
 
   public:
-       SoundFileOmega (Gtk::Window& parent, std::string title, ARDOUR::Session* _s, 
+       SoundFileOmega (std::string title, ARDOUR::Session* _s, 
                        uint32_t selected_audio_tracks, uint32_t selected_midi_tracks,
                        bool persistent,
                        Editing::ImportMode mode_hint = Editing::ImportAsTrack);
@@ -292,6 +305,8 @@ class SoundFileOmega : public SoundFileBrowser
        bool reset_options ();
        void reset_options_noret ();
        bool bad_file_message ();
+
+        void do_something (int action);
 };
 
 #endif // __ardour_sfdb_ui_h__