diff options
author | Carl Hetherington <carl@carlh.net> | 2012-03-10 11:37:01 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2012-03-10 11:37:01 +0000 |
commit | f6ee63591d928ff63cca81864faa2e80f7d3277c (patch) | |
tree | d11f457555ad96579ee9331563d2f768729f60ba /libs/ardour/recent_sessions.cc | |
parent | ec1e3a1f6069421e769231ed524727919f99e4f7 (diff) |
Patch from colinf to allow the number of recent sessions to
be configured (#2207).
git-svn-id: svn://localhost/ardour2/branches/3.0@11641 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/recent_sessions.cc')
-rw-r--r-- | libs/ardour/recent_sessions.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libs/ardour/recent_sessions.cc b/libs/ardour/recent_sessions.cc index adc25294fb..45c30b085b 100644 --- a/libs/ardour/recent_sessions.cc +++ b/libs/ardour/recent_sessions.cc @@ -28,6 +28,7 @@ #include "pbd/error.h" #include "ardour/configuration.h" +#include "ardour/rc_configuration.h" #include "ardour/filesystem_paths.h" #include "ardour/recent_sessions.h" #include "ardour/utils.h" @@ -130,8 +131,10 @@ ARDOUR::store_recent_sessions (string name, string path) rs.push_front (newpair); - if (rs.size() > 10) { - rs.erase(rs.begin()+10, rs.end()); + uint32_t max_recent_sessions = Config->get_max_recent_sessions(); + + if (rs.size() > max_recent_sessions) { + rs.erase(rs.begin()+max_recent_sessions, rs.end()); } return ARDOUR::write_recent_sessions (rs); |