mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 00:04:56 +01:00
Use Glib instead of pbd/filesystem.h in GenericMidiControlProtocol
git-svn-id: svn://localhost/ardour2/branches/3.0@12901 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
ca888dcba7
commit
4522ef26a2
1 changed files with 7 additions and 11 deletions
|
|
@ -30,7 +30,6 @@
|
||||||
#include "pbd/failed_constructor.h"
|
#include "pbd/failed_constructor.h"
|
||||||
#include "pbd/pathscanner.h"
|
#include "pbd/pathscanner.h"
|
||||||
#include "pbd/xml++.h"
|
#include "pbd/xml++.h"
|
||||||
#include "pbd/filesystem.h"
|
|
||||||
|
|
||||||
#include "midi++/port.h"
|
#include "midi++/port.h"
|
||||||
#include "midi++/manager.h"
|
#include "midi++/manager.h"
|
||||||
|
|
@ -107,11 +106,11 @@ static const char * const midimap_env_variable_name = "ARDOUR_MIDIMAPS_PATH";
|
||||||
static const char* const midi_map_dir_name = "midi_maps";
|
static const char* const midi_map_dir_name = "midi_maps";
|
||||||
static const char* const midi_map_suffix = ".map";
|
static const char* const midi_map_suffix = ".map";
|
||||||
|
|
||||||
static sys::path
|
static std::string
|
||||||
system_midi_map_search_path ()
|
system_midi_map_search_path ()
|
||||||
{
|
{
|
||||||
bool midimap_path_defined = false;
|
bool midimap_path_defined = false;
|
||||||
sys::path spath_env (Glib::getenv (midimap_env_variable_name, midimap_path_defined));
|
std::string spath_env (Glib::getenv (midimap_env_variable_name, midimap_path_defined));
|
||||||
|
|
||||||
if (midimap_path_defined) {
|
if (midimap_path_defined) {
|
||||||
return spath_env;
|
return spath_env;
|
||||||
|
|
@ -126,16 +125,13 @@ system_midi_map_search_path ()
|
||||||
return *i;
|
return *i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return sys::path();
|
return std::string();
|
||||||
}
|
}
|
||||||
|
|
||||||
static sys::path
|
static std::string
|
||||||
user_midi_map_directory ()
|
user_midi_map_directory ()
|
||||||
{
|
{
|
||||||
sys::path p(user_config_directory());
|
return Glib::build_filename (user_config_directory(), midi_map_dir_name);
|
||||||
p /= midi_map_dir_name;
|
|
||||||
|
|
||||||
return p;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
|
|
@ -150,8 +146,8 @@ GenericMidiControlProtocol::reload_maps ()
|
||||||
{
|
{
|
||||||
vector<string *> *midi_maps;
|
vector<string *> *midi_maps;
|
||||||
PathScanner scanner;
|
PathScanner scanner;
|
||||||
SearchPath spath (system_midi_map_search_path().to_string());
|
SearchPath spath (system_midi_map_search_path());
|
||||||
spath += user_midi_map_directory ().to_string();
|
spath += user_midi_map_directory ();
|
||||||
|
|
||||||
midi_maps = scanner (spath.to_string(), midi_map_filter, 0, false, true);
|
midi_maps = scanner (spath.to_string(), midi_map_filter, 0, false, true);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue