bundled LV2 plugin build and deployment
[ardour.git] / gtk2_ardour / sfdb_ui.cc
index e8db9d493925fddcaa7cb4fc78080a20289de715..4944ef41a0c3ed7375ea04d0fc1e92dfa540be08 100644 (file)
@@ -26,8 +26,8 @@
 #include <sstream>
 
 #include <unistd.h>
+#include <limits.h>
 #include <sys/stat.h>
-#include <sys/param.h>
 
 #include <gtkmm/box.h>
 #include <gtkmm/stock.h>
@@ -64,9 +64,7 @@
 #include "main_clock.h"
 #include "public_editor.h"
 
-#ifdef FREESOUND
 #include "sfdb_freesound_mootcher.h"
-#endif
 
 #include "i18n.h"
 
@@ -342,7 +340,8 @@ SoundFileBox::audition ()
                try {
                        afs = boost::dynamic_pointer_cast<AudioFileSource> (
                                SourceFactory::createExternal (DataType::AUDIO, *_session,
-                                                              path, n, Source::Flag (0), false));
+                                                              path, n,
+                                                              Source::Flag (0), false));
                        
                        srclist.push_back(afs);
 
@@ -515,8 +514,6 @@ SoundFileBrowser::SoundFileBrowser (string title, ARDOUR::Session* s, bool persi
        
        notebook.append_page (*vbox, _("Search Tags"));
 
-#ifdef FREESOUND
-
        //add freesound search
 
        HBox* passbox;
@@ -592,7 +589,6 @@ SoundFileBrowser::SoundFileBrowser (string title, ARDOUR::Session* s, bool persi
        freesound_more_btn.signal_clicked().connect(sigc::mem_fun(*this, &SoundFileBrowser::freesound_more_clicked));
        freesound_similar_btn.signal_clicked().connect(sigc::mem_fun(*this, &SoundFileBrowser::freesound_similar_clicked));
        notebook.append_page (*vbox, _("Search Freesound"));
-#endif
 
        notebook.set_size_request (500, -1);
        notebook.signal_switch_page().connect (sigc::hide_return (sigc::hide (sigc::hide (sigc::mem_fun (*this, &SoundFileBrowser::reset_options)))));
@@ -1148,7 +1144,6 @@ SoundFileBrowser::get_paths ()
                        results.push_back (str);
                }
        } else {
-#ifdef FREESOUND
                ListPath rows = freesound_list_view.get_selection()->get_selected_rows ();
                for (ListPath::iterator i = rows.begin() ; i != rows.end(); ++i) {
                        string str = freesound_get_audio_file (freesound_list->get_iter(*i));
@@ -1156,7 +1151,6 @@ SoundFileBrowser::get_paths ()
                                results.push_back (str);
                        }
                }
-#endif
        }
 
        return results;
@@ -1474,7 +1468,7 @@ SoundFileOmega::check_link_status (const Session* s, const vector<string>& paths
 
        for (vector<string>::const_iterator i = paths.begin(); i != paths.end(); ++i) {
 
-               char tmpc[MAXPATHLEN+1];
+               char tmpc[PATH_MAX+1];
 
                snprintf (tmpc, sizeof(tmpc), "%s/%s", tmpdir.c_str(), Glib::path_get_basename (*i).c_str());