Remove unused Session methods for re/storing favorite directories.
This sort of functionality is also now supported directly by Gtk+. git-svn-id: svn://localhost/ardour2/trunk@1971 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
131366d046
commit
df7358904a
@ -898,13 +898,6 @@ class Session : public PBD::StatefulDestructible
|
|||||||
void request_play_range (bool yn);
|
void request_play_range (bool yn);
|
||||||
bool get_play_range () const { return _play_range; }
|
bool get_play_range () const { return _play_range; }
|
||||||
|
|
||||||
/* favorite dirs */
|
|
||||||
typedef vector<string> FavoriteDirs;
|
|
||||||
|
|
||||||
static int read_favorite_dirs (FavoriteDirs&);
|
|
||||||
|
|
||||||
static int write_favorite_dirs (FavoriteDirs&);
|
|
||||||
|
|
||||||
/* buffers for gain and pan */
|
/* buffers for gain and pan */
|
||||||
|
|
||||||
gain_t* gain_automation_buffer () const { return _gain_automation_buffer; }
|
gain_t* gain_automation_buffer () const { return _gain_automation_buffer; }
|
||||||
|
@ -2462,60 +2462,6 @@ Session::get_template_list (list<string> &template_names)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
|
||||||
Session::read_favorite_dirs (FavoriteDirs & favs)
|
|
||||||
{
|
|
||||||
string path = get_user_ardour_path();
|
|
||||||
path += "/favorite_dirs";
|
|
||||||
|
|
||||||
ifstream fav (path.c_str());
|
|
||||||
|
|
||||||
favs.clear();
|
|
||||||
|
|
||||||
if (!fav) {
|
|
||||||
if (errno != ENOENT) {
|
|
||||||
//error << string_compose (_("cannot open favorite file %1 (%2)"), path, strerror (errno)) << endmsg;
|
|
||||||
return -1;
|
|
||||||
} else {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
while (true) {
|
|
||||||
|
|
||||||
string newfav;
|
|
||||||
|
|
||||||
getline(fav, newfav);
|
|
||||||
|
|
||||||
if (!fav.good()) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
favs.push_back (newfav);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
Session::write_favorite_dirs (FavoriteDirs & favs)
|
|
||||||
{
|
|
||||||
string path = get_user_ardour_path();
|
|
||||||
path += "/favorite_dirs";
|
|
||||||
|
|
||||||
ofstream fav (path.c_str());
|
|
||||||
|
|
||||||
if (!fav) {
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (FavoriteDirs::iterator i = favs.begin(); i != favs.end(); ++i) {
|
|
||||||
fav << (*i) << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
accept_all_non_peak_files (const string& path, void *arg)
|
accept_all_non_peak_files (const string& path, void *arg)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user