Use std::string and Glib::build_filename in gtk2_ardour
git-svn-id: svn://localhost/ardour2/branches/3.0@12903 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
4b96a5b34d
commit
218b63cc37
|
@ -1110,7 +1110,7 @@ ARDOUR_UI::update_wall_clock ()
|
|||
void
|
||||
ARDOUR_UI::redisplay_recent_sessions ()
|
||||
{
|
||||
std::vector<sys::path> session_directories;
|
||||
std::vector<std::string> session_directories;
|
||||
RecentSessionsSorter cmp;
|
||||
|
||||
recent_session_display.set_model (Glib::RefPtr<TreeModel>(0));
|
||||
|
@ -1131,18 +1131,18 @@ ARDOUR_UI::redisplay_recent_sessions ()
|
|||
session_directories.push_back ((*i).second);
|
||||
}
|
||||
|
||||
for (vector<sys::path>::const_iterator i = session_directories.begin();
|
||||
for (vector<std::string>::const_iterator i = session_directories.begin();
|
||||
i != session_directories.end(); ++i)
|
||||
{
|
||||
std::vector<std::string> state_file_paths;
|
||||
|
||||
// now get available states for this session
|
||||
|
||||
get_state_files_in_directory (i->to_string(), state_file_paths);
|
||||
get_state_files_in_directory (*i, state_file_paths);
|
||||
|
||||
vector<string*>* states;
|
||||
vector<const gchar*> item;
|
||||
string fullpath = i->to_string();
|
||||
string fullpath = *i;
|
||||
|
||||
/* remove any trailing / */
|
||||
|
||||
|
|
|
@ -134,7 +134,7 @@ ARDOUR_UI::install_actions ()
|
|||
|
||||
#ifdef WITH_CMT
|
||||
|
||||
sys::path anicomp_file_path;
|
||||
std::string anicomp_file_path;
|
||||
|
||||
if (PBD::find_file_in_search_path (Glib::getenv("PATH"), "AniComp", anicomp_file_path)) {
|
||||
act = ActionManager::register_action (main_actions, X_("aniConnect"), _("Connect"), (sigc::mem_fun (*editor, &PublicEditor::connect_to_image_compositor)));
|
||||
|
|
|
@ -157,7 +157,7 @@ ExportRangeMarkersDialog::is_filepath_valid(string &filepath)
|
|||
|
||||
// directory needs to exist and be writable
|
||||
string dirpath = Glib::path_get_dirname (filepath);
|
||||
if (!exists_and_writable (sys::path (dirpath))) {
|
||||
if (!exists_and_writable (dirpath)) {
|
||||
string txt = _("Cannot write file in: ") + dirpath;
|
||||
MessageDialog msg (*this, txt, false, MESSAGE_ERROR, BUTTONS_OK, true);
|
||||
msg.run();
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
|
||||
#include "pbd/error.h"
|
||||
#include "pbd/file_utils.h"
|
||||
#include "pbd/filesystem.h"
|
||||
|
||||
#include "ardour/filesystem_paths.h"
|
||||
|
||||
|
@ -60,10 +59,7 @@ ArdourKeyboard::setup_keybindings ()
|
|||
|
||||
/* set up the per-user bindings path */
|
||||
|
||||
sys::path p (user_config_directory ());
|
||||
p /= "ardour.bindings";
|
||||
|
||||
user_keybindings_path = p.to_string ();
|
||||
user_keybindings_path = Glib::build_filename (user_config_directory(), "ardour.bindings");
|
||||
|
||||
if (Glib::file_test (user_keybindings_path, Glib::FILE_TEST_EXISTS)) {
|
||||
std::pair<string,string> newpair;
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
|
||||
#include "pbd/failed_constructor.h"
|
||||
#include "pbd/file_utils.h"
|
||||
#include "pbd/filesystem.h"
|
||||
#include "pbd/replace_all.h"
|
||||
#include "pbd/whitespace.h"
|
||||
|
||||
|
@ -123,7 +122,7 @@ Ardour will play NO role in monitoring"))
|
|||
set_default_icon_list (window_icons);
|
||||
}
|
||||
|
||||
new_user = !Glib::file_test(been_here_before_path().to_string(), Glib::FILE_TEST_EXISTS);
|
||||
new_user = !Glib::file_test(been_here_before_path(), Glib::FILE_TEST_EXISTS);
|
||||
|
||||
bool need_audio_setup = !EngineControl::engine_running();
|
||||
|
||||
|
@ -642,7 +641,7 @@ ArdourStartup::on_apply ()
|
|||
Config->set_use_monitor_bus (use_monitor_section_button.get_active());
|
||||
|
||||
/* "touch" the been-here-before path now that we're about to save Config */
|
||||
ofstream fout (been_here_before_path().to_string().c_str());
|
||||
ofstream fout (been_here_before_path().c_str());
|
||||
|
||||
Config->save_state ();
|
||||
}
|
||||
|
@ -901,7 +900,7 @@ ArdourStartup::new_name_changed ()
|
|||
int
|
||||
ArdourStartup::redisplay_recent_sessions ()
|
||||
{
|
||||
std::vector<sys::path> session_directories;
|
||||
std::vector<std::string> session_directories;
|
||||
RecentSessionsSorter cmp;
|
||||
|
||||
recent_session_display.set_model (Glib::RefPtr<TreeModel>(0));
|
||||
|
@ -922,17 +921,17 @@ ArdourStartup::redisplay_recent_sessions ()
|
|||
session_directories.push_back ((*i).second);
|
||||
}
|
||||
|
||||
for (vector<sys::path>::const_iterator i = session_directories.begin(); i != session_directories.end(); ++i)
|
||||
for (vector<std::string>::const_iterator i = session_directories.begin(); i != session_directories.end(); ++i)
|
||||
{
|
||||
std::vector<std::string> state_file_paths;
|
||||
|
||||
// now get available states for this session
|
||||
|
||||
get_state_files_in_directory ((*i).to_string (), state_file_paths);
|
||||
get_state_files_in_directory (*i, state_file_paths);
|
||||
|
||||
vector<string*>* states;
|
||||
vector<const gchar*> item;
|
||||
string fullpath = (*i).to_string();
|
||||
string fullpath = *i;
|
||||
|
||||
/* remove any trailing / */
|
||||
|
||||
|
@ -1393,11 +1392,9 @@ ArdourStartup::existing_session_selected ()
|
|||
move_along_now ();
|
||||
}
|
||||
|
||||
sys::path
|
||||
std::string
|
||||
ArdourStartup::been_here_before_path () const
|
||||
{
|
||||
sys::path b = user_config_directory();
|
||||
b /= ".a3"; // XXXX use more specific version so we can catch upgrades
|
||||
return b;
|
||||
// XXXX use more specific version so we can catch upgrades
|
||||
return Glib::build_filename (user_config_directory (), ".a3");
|
||||
}
|
||||
|
||||
|
|
|
@ -39,8 +39,6 @@
|
|||
#include <gtkmm/liststore.h>
|
||||
#include <gtkmm/combobox.h>
|
||||
|
||||
#include "pbd/filesystem.h"
|
||||
|
||||
#include "ardour/utils.h"
|
||||
|
||||
class EngineControl;
|
||||
|
@ -87,7 +85,7 @@ class ArdourStartup : public Gtk::Assistant {
|
|||
bool new_user;
|
||||
bool new_only;
|
||||
|
||||
PBD::sys::path been_here_before_path () const;
|
||||
std::string been_here_before_path () const;
|
||||
|
||||
void on_apply ();
|
||||
void on_cancel ();
|
||||
|
|
Loading…
Reference in New Issue