Fix some bugs I introduced with the last commit.
[ardour.git] / gtk2_ardour / sfdb_ui.h
index d0cde342f80dfb9f316d95a3af1f9cc78260f2d4..4a4bdf9c7d2aa84de8fd85493c54f6fec4c11047 100644 (file)
@@ -114,12 +114,24 @@ class SoundFileBrowser : public ArdourDialog
                FoundTagColumns() { add(pathname); }
        };
 
+       class FreesoundColumns : public Gtk::TreeModel::ColumnRecord
+       {
+         public:
+               Gtk::TreeModelColumn<std::string> id;
+               Gtk::TreeModelColumn<std::string> uri;
+               Gtk::TreeModelColumn<std::string> filename;
+
+               FreesoundColumns() { add(id); add(filename); add(uri); }
+       };
+
        FoundTagColumns found_list_columns;
        Glib::RefPtr<Gtk::ListStore> found_list;
 
-       FoundTagColumns freesound_list_columns;
+       FreesoundColumns freesound_list_columns;
        Glib::RefPtr<Gtk::ListStore> freesound_list;
 
+       Gtk::ProgressBar progress_bar;
+
   public:
        SoundFileBrowser (Gtk::Window& parent, std::string title, ARDOUR::Session* _s, bool persistent);
        virtual ~SoundFileBrowser ();
@@ -137,13 +149,14 @@ class SoundFileBrowser : public ArdourDialog
        Gtk::Button found_search_btn;
        Gtk::TreeView found_list_view;
 
-       Gtk::Entry freesound_name_entry;
-       Gtk::Entry freesound_pass_entry;
        Gtk::Entry freesound_entry;
+       Gtk::ComboBoxText freesound_sort;
+       Gtk::SpinButton freesound_page;
+       
        Gtk::Button freesound_search_btn;
        Gtk::TreeView freesound_list_view;
 
-       void freesound_search_thread();
+       void freesound_search();
 
   protected:
        bool resetting_ourselves;
@@ -205,10 +218,12 @@ class SoundFileOmega : public SoundFileBrowser
 {
 
   public:
-       SoundFileOmega (Gtk::Window& parent, std::string title, ARDOUR::Session* _s, int selected_tracks, bool persistent,
+       SoundFileOmega (Gtk::Window& parent, std::string title, ARDOUR::Session* _s, 
+                       uint32_t selected_audio_tracks, uint32_t selected_midi_tracks,
+                       bool persistent,
                        Editing::ImportMode mode_hint = Editing::ImportAsTrack);
 
-       void reset (int selected_tracks);
+       void reset (uint32_t selected_audio_tracks, uint32_t selected_midi_tracks);
 
        Gtk::ComboBoxText action_combo;
        Gtk::ComboBoxText where_combo;
@@ -227,7 +242,8 @@ class SoundFileOmega : public SoundFileBrowser
        void on_hide();
 
   private:
-       uint32_t selected_track_cnt;
+       uint32_t selected_audio_track_cnt;
+       uint32_t selected_midi_track_cnt;
 
        typedef std::map<std::string,Editing::ImportDisposition> DispositionMap;
        DispositionMap disposition_map;