From df7358904a72dabf6bbcaaf822c7723c26c2d4f7 Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Thu, 7 Jun 2007 03:24:25 +0000 Subject: [PATCH] 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 --- libs/ardour/ardour/session.h | 7 ----- libs/ardour/session_state.cc | 54 ------------------------------------ 2 files changed, 61 deletions(-) diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 58919588b6..035a2bde1d 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -898,13 +898,6 @@ class Session : public PBD::StatefulDestructible void request_play_range (bool yn); bool get_play_range () const { return _play_range; } - /* favorite dirs */ - typedef vector FavoriteDirs; - - static int read_favorite_dirs (FavoriteDirs&); - - static int write_favorite_dirs (FavoriteDirs&); - /* buffers for gain and pan */ gain_t* gain_automation_buffer () const { return _gain_automation_buffer; } diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index fdb5f92ede..3d59e3803c 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -2462,60 +2462,6 @@ Session::get_template_list (list &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 accept_all_non_peak_files (const string& path, void *arg) {