diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2011-08-18 17:35:34 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2011-08-18 17:35:34 +0000 |
commit | e626152a22232895357a5e1381e3d49af7b130d5 (patch) | |
tree | 26e2c191c936ecb8eb9aabed3434379733daf217 | |
parent | 115934e6abfa124d1e93ecb7c212083a1b255fae (diff) |
remove use of Glib::ustring from gtk2_ardour
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@10006 d708f5d6-7413-0410-9779-e7cbd77b26cf
50 files changed, 247 insertions, 237 deletions
diff --git a/gtk2_ardour/actions.cc b/gtk2_ardour/actions.cc index 09178646f5..d0dacb04a7 100644 --- a/gtk2_ardour/actions.cc +++ b/gtk2_ardour/actions.cc @@ -136,7 +136,7 @@ ActionManager::register_toggle_action (RefPtr<ActionGroup> group, const char * n } bool -ActionManager::lookup_entry (const ustring accel_path, Gtk::AccelKey& key) +ActionManager::lookup_entry (const string accel_path, Gtk::AccelKey& key) { GtkAccelKey gkey; bool known = gtk_accel_map_lookup_entry (accel_path.c_str(), &gkey); @@ -152,8 +152,8 @@ ActionManager::lookup_entry (const ustring accel_path, Gtk::AccelKey& key) struct SortActionsByLabel { bool operator() (Glib::RefPtr<Gtk::Action> a, Glib::RefPtr<Gtk::Action> b) { - ustring astr = a->get_accel_path(); - ustring bstr = b->get_accel_path(); + string astr = a->get_accel_path(); + string bstr = b->get_accel_path(); return astr < bstr; } }; @@ -235,7 +235,8 @@ ActionManager::get_all_actions (vector<string>& names, vector<string>& paths, ve for (action_list::iterator a = the_acts.begin(); a != the_acts.end(); ++a) { string accel_path = (*a)->get_accel_path (); - ustring label = (*a)->property_label(); + Glib::ustring sl = (*a)->property_label(); + string label = sl; names.push_back (label); paths.push_back (accel_path); diff --git a/gtk2_ardour/actions.h b/gtk2_ardour/actions.h index c84ad2c15b..de663f106e 100644 --- a/gtk2_ardour/actions.h +++ b/gtk2_ardour/actions.h @@ -95,7 +95,7 @@ class ActionManager static Glib::RefPtr<Gtk::Action> register_toggle_action (Glib::RefPtr<Gtk::ActionGroup> group, const char * name, const char * label, sigc::slot<void> sl); - static bool lookup_entry (const Glib::ustring accel_path, Gtk::AccelKey& key); + static bool lookup_entry (const std::string accel_path, Gtk::AccelKey& key); static void get_all_actions (std::vector<std::string>& labels, std::vector<std::string>& paths, diff --git a/gtk2_ardour/add_route_dialog.cc b/gtk2_ardour/add_route_dialog.cc index 0185e46196..dbaba36809 100644 --- a/gtk2_ardour/add_route_dialog.cc +++ b/gtk2_ardour/add_route_dialog.cc @@ -185,7 +185,7 @@ AddRouteDialog::mode () return ARDOUR::Normal; } - Glib::ustring str = track_mode_combo.get_active_text(); + std::string str = track_mode_combo.get_active_text(); if (str == _("Normal")) { return ARDOUR::Normal; } else if (str == _("Tape")) { diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 0d7eecc274..d8e7ae53cb 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -1165,8 +1165,8 @@ ARDOUR_UI::open_recent_session () return; } - Glib::ustring path = (*i)[recent_session_columns.fullpath]; - Glib::ustring state = (*i)[recent_session_columns.visible_name]; + std::string path = (*i)[recent_session_columns.fullpath]; + std::string state = (*i)[recent_session_columns.visible_name]; _session_is_new = false; @@ -2151,7 +2151,7 @@ ARDOUR_UI::fontconfig_dialog () may not and it can take a while to build it. Warn them. */ - Glib::ustring fontconfig = Glib::build_filename (Glib::get_home_dir(), ".fontconfig"); + std::string fontconfig = Glib::build_filename (Glib::get_home_dir(), ".fontconfig"); if (!Glib::file_test (fontconfig, Glib::FILE_TEST_EXISTS|Glib::FILE_TEST_IS_DIR)) { MessageDialog msg (*new_session_dialog, @@ -2173,7 +2173,7 @@ ARDOUR_UI::fontconfig_dialog () } void -ARDOUR_UI::parse_cmdline_path (const Glib::ustring& cmdline_path, Glib::ustring& session_name, Glib::ustring& session_path, bool& existing_session) +ARDOUR_UI::parse_cmdline_path (const std::string& cmdline_path, std::string& session_name, std::string& session_path, bool& existing_session) { existing_session = false; @@ -2192,7 +2192,7 @@ ARDOUR_UI::parse_cmdline_path (const Glib::ustring& cmdline_path, Glib::ustring& } int -ARDOUR_UI::load_cmdline_session (const Glib::ustring& session_name, const Glib::ustring& session_path, bool& existing_session) +ARDOUR_UI::load_cmdline_session (const std::string& session_name, const std::string& session_path, bool& existing_session) { /* when this is called, the backend audio system must be running */ @@ -2208,7 +2208,7 @@ ARDOUR_UI::load_cmdline_session (const Glib::ustring& session_name, const Glib:: if (Glib::file_test (session_path, Glib::FILE_TEST_IS_DIR)) { - Glib::ustring predicted_session_file; + std::string predicted_session_file; predicted_session_file = Glib::build_filename (session_path, session_name + Session::statefile_suffix()); @@ -2238,9 +2238,9 @@ ARDOUR_UI::load_cmdline_session (const Glib::ustring& session_name, const Glib:: } bool -ARDOUR_UI::ask_about_loading_existing_session (const Glib::ustring& session_path) +ARDOUR_UI::ask_about_loading_existing_session (const std::string& session_path) { - Glib::ustring str = string_compose (_("This session\n%1\nalready exists. Do you want to open it?"), session_path); + std::string str = string_compose (_("This session\n%1\nalready exists. Do you want to open it?"), session_path); MessageDialog msg (str, false, @@ -2264,7 +2264,7 @@ ARDOUR_UI::ask_about_loading_existing_session (const Glib::ustring& session_path } int -ARDOUR_UI::build_session_from_nsd (const Glib::ustring& session_path, const Glib::ustring& session_name) +ARDOUR_UI::build_session_from_nsd (const std::string& session_path, const std::string& session_name) { uint32_t cchns; @@ -2352,7 +2352,7 @@ ARDOUR_UI::loading_message (const std::string& msg) } void -ARDOUR_UI::idle_load (const Glib::ustring& path) +ARDOUR_UI::idle_load (const std::string& path) { if (session) { @@ -2383,9 +2383,9 @@ bool ARDOUR_UI::get_session_parameters (bool backend_audio_is_running, bool should_be_new) { bool existing_session = false; - Glib::ustring session_name; - Glib::ustring session_path; - Glib::ustring template_name; + std::string session_name; + std::string session_path; + std::string template_name; int response; begin: @@ -2513,7 +2513,7 @@ ARDOUR_UI::get_session_parameters (bool backend_audio_is_running, bool should_be } - template_name = Glib::ustring(); + template_name = std::string(); switch (new_session_dialog->which_page()) { case NewSessionDialog::OpenPage: @@ -2532,7 +2532,7 @@ ARDOUR_UI::get_session_parameters (bool backend_audio_is_running, bool should_be should_be_new = true; - if (session_name.find ('/') != Glib::ustring::npos) { + if (session_name.find ('/') != std::string::npos) { MessageDialog msg (*new_session_dialog, _("To ensure compatibility with various systems\n" "session names may not contain a '/' character")); msg.run (); @@ -2540,7 +2540,7 @@ ARDOUR_UI::get_session_parameters (bool backend_audio_is_running, bool should_be goto try_again; } - if (session_name.find ('\\') != Glib::ustring::npos) { + if (session_name.find ('\\') != std::string::npos) { MessageDialog msg (*new_session_dialog, _("To ensure compatibility with various systems\n" "session names may not contain a '\\' character")); msg.run (); @@ -2625,7 +2625,7 @@ ARDOUR_UI::close_session () } int -ARDOUR_UI::load_session (const Glib::ustring& path, const Glib::ustring& snap_name, Glib::ustring mix_template) +ARDOUR_UI::load_session (const std::string& path, const std::string& snap_name, std::string mix_template) { Session *new_session; int unload_status; @@ -2746,7 +2746,7 @@ ARDOUR_UI::load_session (const Glib::ustring& path, const Glib::ustring& snap_na } int -ARDOUR_UI::build_session (const Glib::ustring& path, const Glib::ustring& snap_name, +ARDOUR_UI::build_session (const std::string& path, const std::string& snap_name, uint32_t control_channels, uint32_t master_channels, AutoConnectOption input_connect, @@ -2916,8 +2916,8 @@ require some unused files to continue to exist.")); add (visible_name); add (fullpath); } - Gtk::TreeModelColumn<Glib::ustring> visible_name; - Gtk::TreeModelColumn<Glib::ustring> fullpath; + Gtk::TreeModelColumn<std::string> visible_name; + Gtk::TreeModelColumn<std::string> fullpath; }; diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h index 8c84e331e5..efbfb9e83b 100644 --- a/gtk2_ardour/ardour_ui.h +++ b/gtk2_ardour/ardour_ui.h @@ -121,12 +121,12 @@ class ARDOUR_UI : public Gtkmm2ext::UI void show_about (); void hide_about (); - void idle_load (const Glib::ustring& path); + void idle_load (const std::string& path); void finish(); - int load_session (const Glib::ustring& path, const Glib::ustring& snapshot, Glib::ustring mix_template = Glib::ustring()); + int load_session (const std::string& path, const std::string& snapshot, std::string mix_template = std::string()); bool session_loaded; - int build_session (const Glib::ustring& path, const Glib::ustring& snapshot, + int build_session (const std::string& path, const std::string& snapshot, uint32_t ctl_chns, uint32_t master_chns, ARDOUR::AutoConnectOption input_connect, @@ -147,10 +147,10 @@ class ARDOUR_UI : public Gtkmm2ext::UI } bool get_session_parameters (bool have_engine = false, bool should_be_new = false); - void parse_cmdline_path (const Glib::ustring& cmdline_path, Glib::ustring& session_name, Glib::ustring& session_path, bool& existing_session); - int load_cmdline_session (const Glib::ustring& session_name, const Glib::ustring& session_path, bool& existing_session); - int build_session_from_nsd (const Glib::ustring& session_name, const Glib::ustring& session_path); - bool ask_about_loading_existing_session (const Glib::ustring& session_path); + void parse_cmdline_path (const std::string& cmdline_path, std::string& session_name, std::string& session_path, bool& existing_session); + int load_cmdline_session (const std::string& session_name, const std::string& session_path, bool& existing_session); + int build_session_from_nsd (const std::string& session_name, const std::string& session_path); + bool ask_about_loading_existing_session (const std::string& session_path); int unload_session (bool hide_stuff = false); void close_session(); @@ -492,8 +492,8 @@ class ARDOUR_UI : public Gtkmm2ext::UI add (visible_name); add (fullpath); } - Gtk::TreeModelColumn<Glib::ustring> visible_name; - Gtk::TreeModelColumn<Glib::ustring> fullpath; + Gtk::TreeModelColumn<std::string> visible_name; + Gtk::TreeModelColumn<std::string> fullpath; }; RecentSessionModelColumns recent_session_columns; diff --git a/gtk2_ardour/ardour_ui2.cc b/gtk2_ardour/ardour_ui2.cc index 733b1f4f28..7107b64d95 100644 --- a/gtk2_ardour/ardour_ui2.cc +++ b/gtk2_ardour/ardour_ui2.cc @@ -128,7 +128,7 @@ ARDOUR_UI::status_bar_button_press (GdkEventButton* ev) void ARDOUR_UI::display_message (const char *prefix, gint prefix_len, RefPtr<TextBuffer::Tag> ptag, RefPtr<TextBuffer::Tag> mtag, const char *msg) { - ustring text; + string text; UI::display_message (prefix, prefix_len, ptag, mtag, msg); #ifdef TOP_MENUBAR @@ -809,7 +809,7 @@ ARDOUR_UI::shuttle_unit_clicked () void ARDOUR_UI::shuttle_style_changed () { - ustring str = shuttle_style_button.get_active_text (); + string str = shuttle_style_button.get_active_text (); if (str == _("sprung")) { Config->set_shuttle_behaviour (Sprung); @@ -874,7 +874,7 @@ void ARDOUR_UI::sync_option_changed () { if (session) { - ustring txt = sync_option_combo.get_active_text (); + string txt = sync_option_combo.get_active_text (); if (txt.length()) { session->request_slave_source (string_to_slave_source (txt)); } diff --git a/gtk2_ardour/au_pluginui.h b/gtk2_ardour/au_pluginui.h index cb4b88ee39..4837b8a57f 100644 --- a/gtk2_ardour/au_pluginui.h +++ b/gtk2_ardour/au_pluginui.h @@ -52,7 +52,7 @@ class AUPluginUI : public PlugUIBase, public Gtk::VBox void activate (); void deactivate (); - bool on_window_show (const Glib::ustring&); + bool on_window_show (const std::string&); void on_window_hide (); bool non_gtk_gui() const { return true; } diff --git a/gtk2_ardour/au_pluginui.mm b/gtk2_ardour/au_pluginui.mm index a704dcd148..3b7e40b418 100644 --- a/gtk2_ardour/au_pluginui.mm +++ b/gtk2_ardour/au_pluginui.mm @@ -172,7 +172,12 @@ AUPluginUI::AUPluginUI (boost::shared_ptr<PluginInsert> insert) if (test_cocoa_view_support()) { cerr << insert->name() << " creating cocoa view\n"; - create_cocoa_view (); + if (create_cocoa_view () != 0) { + if (test_carbon_view_support()) { + cerr << insert->name() << " falling back to carbon view\n"; + create_carbon_view (); + } + } } else if (test_carbon_view_support()) { cerr << insert->name() << " creating carbon view\n"; create_carbon_view (); @@ -302,7 +307,12 @@ AUPluginUI::create_cocoa_view () // we only take the first view in this example. factoryClassName = (NSString *)cocoaViewInfo->mCocoaAUViewClass[0]; - cerr << insert->name() << " fetching cocoa UI via factory called " << factoryClassName << '\n'; + if (factoryClassName) { + cerr << insert->name() << " no factory name class name provided\n"; + } else { + const char* fcn = [factoryClassName UTF8String]; + cerr << insert->name() << " fetching cocoa UI via factory called " << fcn << '\n'; + } } else { @@ -326,6 +336,7 @@ AUPluginUI::create_cocoa_view () Class factoryClass = [viewBundle classNamed:factoryClassName]; if (!factoryClass) { error << _("AUPluginUI: error getting AU view's factory class from bundle") << endmsg; + cerr << _("AUPluginUI: error getting AU view's factory class from bundle") << endl; return -1; } @@ -635,7 +646,7 @@ AUPluginUI::on_window_hide () } bool -AUPluginUI::on_window_show (const Glib::ustring& title) +AUPluginUI::on_window_show (const string& title) { /* this is idempotent so just call it every time we show the window */ diff --git a/gtk2_ardour/automation_line.cc b/gtk2_ardour/automation_line.cc index 54620cd291..ded54a5a24 100644 --- a/gtk2_ardour/automation_line.cc +++ b/gtk2_ardour/automation_line.cc @@ -555,7 +555,7 @@ AutomationLine::model_representation (ControlPoint& cp, ModelRepresentation& mr) void AutomationLine::determine_visible_control_points (ALPoints& points) { - uint32_t view_index, pi, n; + uint32_t view_index, pi; AutomationList::iterator model; uint32_t npoints; double last_control_point_x = 0.0; diff --git a/gtk2_ardour/canvas-noevent-text.h b/gtk2_ardour/canvas-noevent-text.h index e897895cf5..f210354404 100644 --- a/gtk2_ardour/canvas-noevent-text.h +++ b/gtk2_ardour/canvas-noevent-text.h @@ -29,7 +29,7 @@ namespace Gnome { namespace Canvas { class NoEventText : public Text { public: - NoEventText(Group& parent, double x, double y, const Glib::ustring& text) + NoEventText(Group& parent, double x, double y, const std::string& text) : Text (parent, x, y, text) {} NoEventText(Group& parent) : Text (parent) {} diff --git a/gtk2_ardour/connection_editor.h b/gtk2_ardour/connection_editor.h index aca85c7a83..5605a1d423 100644 --- a/gtk2_ardour/connection_editor.h +++ b/gtk2_ardour/connection_editor.h @@ -66,7 +66,7 @@ class ConnectionEditor : public ArdourDialog { add (name); add (connection); } - Gtk::TreeModelColumn<Glib::ustring> name; + Gtk::TreeModelColumn<std::string> name; Gtk::TreeModelColumn<ARDOUR::Connection*> connection; }; diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 79e71b52e8..ec5fe5c673 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -3145,7 +3145,7 @@ Editor::setup_toolbar () } int -Editor::convert_drop_to_paths (vector<ustring>& paths, +Editor::convert_drop_to_paths (vector<string>& paths, const RefPtr<Gdk::DragContext>& context, gint x, gint y, @@ -3158,7 +3158,7 @@ Editor::convert_drop_to_paths (vector<ustring>& paths, return -1; } - vector<ustring> uris = data.get_uris(); + vector<string> uris = data.get_uris(); if (uris.empty()) { @@ -3176,7 +3176,7 @@ Editor::convert_drop_to_paths (vector<ustring>& paths, THERE MAY BE NO NULL TERMINATING CHAR!!! */ - ustring txt = data.get_text(); + string txt = data.get_text(); const char* p; const char* q; @@ -3204,7 +3204,7 @@ Editor::convert_drop_to_paths (vector<ustring>& paths, if (q > p) { - uris.push_back (ustring (p, q - p + 1)); + uris.push_back (string (p, q - p + 1)); } } } @@ -3220,19 +3220,19 @@ Editor::convert_drop_to_paths (vector<ustring>& paths, } } - for (vector<ustring>::iterator i = uris.begin(); i != uris.end(); ++i) { + for (vector<string>::iterator i = uris.begin(); i != uris.end(); ++i) { if ((*i).substr (0,7) == "file://") { - ustring p = *i; + string p = *i; PBD::url_decode (p); // scan forward past three slashes - ustring::size_type slashcnt = 0; - ustring::size_type n = 0; - ustring::iterator x = p.begin(); + string::size_type slashcnt = 0; + string::size_type n = 0; + string::iterator x = p.begin(); while (slashcnt < 3 && x != p.end()) { if ((*x) == '/') { @@ -4091,7 +4091,7 @@ Editor::snapshot_display_selection_changed () TreeModel::iterator i = snapshot_display.get_selection()->get_selected(); - Glib::ustring snap_name = (*i)[snapshot_display_columns.real_name]; + string snap_name = (*i)[snapshot_display_columns.real_name]; if (snap_name.length() == 0) { return; @@ -4135,7 +4135,7 @@ Editor::snapshot_display_button_press (GdkEventButton* ev) */ void -Editor::popup_snapshot_context_menu (int button, int32_t time, Glib::ustring snapshot_name) +Editor::popup_snapshot_context_menu (int button, int32_t time, string snapshot_name) { using namespace Menu_Helpers; @@ -4158,7 +4158,7 @@ Editor::popup_snapshot_context_menu (int button, int32_t time, Glib::ustring sna } void -Editor::rename_snapshot (Glib::ustring old_name) +Editor::rename_snapshot (string old_name) { ArdourPrompter prompter(true); @@ -4180,7 +4180,7 @@ Editor::rename_snapshot (Glib::ustring old_name) void -Editor::remove_snapshot (Glib::ustring name) +Editor::remove_snapshot (string name) { vector<string> choices; diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h index 3d1feeef13..95d86ae3b5 100644 --- a/gtk2_ardour/editor.h +++ b/gtk2_ardour/editor.h @@ -25,7 +25,6 @@ #include <set> #include <string> #include <sys/time.h> -#include <glibmm/ustring.h> #include <boost/optional.hpp> @@ -897,7 +896,7 @@ class Editor : public PublicEditor add (region); add (color_); } - Gtk::TreeModelColumn<Glib::ustring> name; + Gtk::TreeModelColumn<std::string> name; Gtk::TreeModelColumn<boost::shared_ptr<ARDOUR::Region> > region; Gtk::TreeModelColumn<Gdk::Color> color_; }; @@ -911,7 +910,7 @@ class Editor : public PublicEditor void region_list_selection_changed (); bool region_list_selection_filter (const Glib::RefPtr<Gtk::TreeModel>& model, const Gtk::TreeModel::Path& path, bool yn); - void region_name_edit (const Glib::ustring&, const Glib::ustring&); + void region_name_edit (const std::string&, const std::string&); void get_regions_corresponding_to (boost::shared_ptr<ARDOUR::Region> region, std::vector<RegionView*>& regions); Gtk::Menu *region_list_menu; @@ -946,8 +945,8 @@ class Editor : public PublicEditor add (visible_name); add (real_name); } - Gtk::TreeModelColumn<Glib::ustring> visible_name; - Gtk::TreeModelColumn<Glib::ustring> real_name; + Gtk::TreeModelColumn<std::string> visible_name; + Gtk::TreeModelColumn<std::string> real_name; }; SnapshotDisplayModelColumns snapshot_display_columns; @@ -958,7 +957,7 @@ class Editor : public PublicEditor bool snapshot_display_button_press (GdkEventButton*); void snapshot_display_selection_changed (); void redisplay_snapshots(); - void popup_snapshot_context_menu (int, int32_t, Glib::ustring); + void popup_snapshot_context_menu (int, int32_t, std::string); /* named selections */ @@ -967,7 +966,7 @@ class Editor : public PublicEditor add (text); add (selection); } - Gtk::TreeModelColumn<Glib::ustring> text; + Gtk::TreeModelColumn<std::string> text; Gtk::TreeModelColumn<ARDOUR::NamedSelection*> selection; }; @@ -980,8 +979,8 @@ class Editor : public PublicEditor void create_named_selection (); void paste_named_selection (float times); void remove_selected_named_selections (); - void remove_snapshot (Glib::ustring); - void rename_snapshot (Glib::ustring); + void remove_snapshot (std::string); + void rename_snapshot (std::string); void handle_new_named_selection (); void add_named_selection_to_named_selection_display (ARDOUR::NamedSelection&); @@ -1160,24 +1159,24 @@ class Editor : public PublicEditor void external_audio_dialog (); int check_whether_and_how_to_import(string, bool all_or_nothing = true); - bool check_multichannel_status (const std::vector<Glib::ustring>& paths); + bool check_multichannel_status (const std::vector<std::string>& paths); SoundFileOmega* sfbrowser; void bring_in_external_audio (Editing::ImportMode mode, nframes64_t& pos); - bool idle_drop_paths (std::vector<Glib::ustring> paths, nframes64_t frame, double ypos); - void drop_paths_part_two (const std::vector<Glib::ustring>& paths, nframes64_t frame, double ypos); + bool idle_drop_paths (std::vector<std::string> paths, nframes64_t frame, double ypos); + void drop_paths_part_two (const std::vector<std::string>& paths, nframes64_t frame, double ypos); - void do_import (vector<Glib::ustring> paths, Editing::ImportDisposition, Editing::ImportMode mode, ARDOUR::SrcQuality, nframes64_t&); - void do_embed (vector<Glib::ustring> paths, Editing::ImportDisposition, Editing::ImportMode mode, nframes64_t&); + void do_import (vector<std::string> paths, Editing::ImportDisposition, Editing::ImportMode mode, ARDOUR::SrcQuality, nframes64_t&); + void do_embed (vector<std::string> paths, Editing::ImportDisposition, Editing::ImportMode mode, nframes64_t&); - int import_sndfiles (vector<Glib::ustring> paths, Editing::ImportMode mode, ARDOUR::SrcQuality, nframes64_t& pos, + int import_sndfiles (vector<std::string> paths, Editing::ImportMode mode, ARDOUR::SrcQuality, nframes64_t& pos, int target_regions, int target_tracks, boost::shared_ptr<ARDOUR::AudioTrack>&, bool, uint32_t total); - int embed_sndfiles (vector<Glib::ustring> paths, bool multiple_files, bool& check_sample_rate, Editing::ImportMode mode, + int embed_sndfiles (vector<std::string> paths, bool multiple_files, bool& check_sample_rate, Editing::ImportMode mode, nframes64_t& pos, int target_regions, int target_tracks, boost::shared_ptr<ARDOUR::AudioTrack>&); - int add_sources (vector<Glib::ustring> paths, ARDOUR::SourceList& sources, nframes64_t& pos, Editing::ImportMode, + int add_sources (vector<std::string> paths, ARDOUR::SourceList& sources, nframes64_t& pos, Editing::ImportMode, int target_regions, int target_tracks, boost::shared_ptr<ARDOUR::AudioTrack>&, bool add_channel_suffix); int finish_bringing_in_audio (boost::shared_ptr<ARDOUR::AudioRegion> region, uint32_t, uint32_t, nframes64_t& pos, Editing::ImportMode mode, boost::shared_ptr<ARDOUR::AudioTrack>& existing_track); @@ -1221,7 +1220,7 @@ class Editor : public PublicEditor /* to support this ... */ void import_audio (bool as_tracks); - void do_import (vector<Glib::ustring> paths, bool split, bool as_tracks); + void do_import (vector<std::string> paths, bool split, bool as_tracks); void move_to_start (); void move_to_end (); @@ -1735,7 +1734,7 @@ public: add (tv); add (route); } - Gtk::TreeModelColumn<Glib::ustring> text; + Gtk::TreeModelColumn<std::string> text; Gtk::TreeModelColumn<bool> visible; Gtk::TreeModelColumn<bool> temporary_visible; Gtk::TreeModelColumn<TimeAxisView*> tv; @@ -1823,7 +1822,7 @@ public: bool in_edit_group_row_change; void edit_group_row_change (const Gtk::TreeModel::Path&,const Gtk::TreeModel::iterator&); - void edit_group_name_edit (const Glib::ustring&, const Glib::ustring&); + void edit_group_name_edit (const std::string&, const std::string&); void new_edit_group (); void edit_group_list_button_clicked (); gint edit_group_list_button_press_event (GdkEventButton* ev); @@ -1885,7 +1884,7 @@ public: /* Drag-n-Drop */ - int convert_drop_to_paths (std::vector<Glib::ustring>& paths, + int convert_drop_to_paths (std::vector<std::string>& paths, const Glib::RefPtr<Gdk::DragContext>& context, gint x, gint y, diff --git a/gtk2_ardour/editor_audio_import.cc b/gtk2_ardour/editor_audio_import.cc index c25c2c8950..05e31e8791 100644 --- a/gtk2_ardour/editor_audio_import.cc +++ b/gtk2_ardour/editor_audio_import.cc @@ -62,7 +62,6 @@ using namespace sigc; using namespace Gtk; using namespace Gtkmm2ext; using namespace Editing; -using Glib::ustring; /* Functions supporting the incorporation of external (non-captured) audio material into ardour */ @@ -87,7 +86,7 @@ Editor::add_external_audio_action (ImportMode mode_hint) void Editor::external_audio_dialog () { - vector<Glib::ustring> paths; + vector<string> paths; uint32_t track_cnt; if (session == 0) { @@ -141,7 +140,10 @@ Editor::external_audio_dialog () /* lets do it */ - paths = sfbrowser->get_paths (); + vector<std::string> p = sfbrowser->get_paths (); + for (vector<std::string>::iterator pp = p.begin(); pp != p.end(); ++pp) { + paths.push_back (string (*pp)); + } ImportPosition pos = sfbrowser->get_position (); ImportMode mode = sfbrowser->get_mode (); @@ -283,13 +285,13 @@ Editor::get_nth_selected_audio_track (int nth) const } void -Editor::do_import (vector<ustring> paths, ImportDisposition chns, ImportMode mode, SrcQuality quality, nframes64_t& pos) +Editor::do_import (vector<string> paths, ImportDisposition chns, ImportMode mode, SrcQuality quality, nframes64_t& pos) { //this is where an import "starts" so initialize the count here ... the rest gets initialized in import_sndfiles() import_status.count = 0; boost::shared_ptr<AudioTrack> track; - vector<ustring> to_import; + vector<string> to_import; int nth = 0; bool use_timestamp = (pos == -1); @@ -304,7 +306,7 @@ Editor::do_import (vector<ustring> paths, ImportDisposition chns, ImportMode mod */ bool cancel = false; - for (vector<ustring>::iterator a = paths.begin(); a != paths.end(); ++a) { + for (vector<string>::iterator a = paths.begin(); a != paths.end(); ++a) { int check = check_whether_and_how_to_import(*a, false); if (check == 2) { cancel = true; @@ -320,9 +322,9 @@ Editor::do_import (vector<ustring> paths, ImportDisposition chns, ImportMode mod bool replace = false; bool ok = true; - vector<ustring>::size_type total = paths.size(); + vector<string>::size_type total = paths.size(); - for (vector<ustring>::iterator a = paths.begin(); a != paths.end() && ok; ++a) { + for (vector<string>::iterator a = paths.begin(); a != paths.end() && ok; ++a) { int check = check_whether_and_how_to_import (*a, true); @@ -388,19 +390,19 @@ Editor::do_import (vector<ustring> paths, ImportDisposition chns, ImportMode mod } void -Editor::do_embed (vector<ustring> paths, ImportDisposition chns, ImportMode mode, nframes64_t& pos) +Editor::do_embed (vector<string> paths, ImportDisposition chns, ImportMode mode, nframes64_t& pos) { boost::shared_ptr<AudioTrack> track; bool check_sample_rate = true; bool ok = false; - vector<ustring> to_embed; + vector<string> to_embed; bool multi = paths.size() > 1; int nth = 0; bool use_timestamp = (pos == -1); switch (chns) { case Editing::ImportDistinctFiles: - for (vector<ustring>::iterator a = paths.begin(); a != paths.end(); ++a) { + for (vector<string>::iterator a = paths.begin(); a != paths.end(); ++a) { /* have to reset this for every file we handle */ if (use_timestamp) { @@ -421,7 +423,7 @@ Editor::do_embed (vector<ustring> paths, ImportDisposition chns, ImportMode mode break; case Editing::ImportDistinctChannels: - for (vector<ustring>::iterator a = paths.begin(); a != paths.end(); ++a) { + for (vector<string>::iterator a = paths.begin(); a != paths.end(); ++a) { /* have to reset this for every file we handle */ if (use_timestamp) { @@ -444,7 +446,7 @@ Editor::do_embed (vector<ustring> paths, ImportDisposition chns, ImportMode mode break; case Editing::ImportSerializeFiles: - for (vector<ustring>::iterator a = paths.begin(); a != paths.end(); ++a) { + for (vector<string>::iterator a = paths.begin(); a != paths.end(); ++a) { /* have to reset this for every file we handle */ if (use_timestamp) { @@ -470,7 +472,7 @@ Editor::do_embed (vector<ustring> paths, ImportDisposition chns, ImportMode mode } int -Editor::import_sndfiles (vector<ustring> paths, ImportMode mode, SrcQuality quality, nframes64_t& pos, +Editor::import_sndfiles (vector<string> paths, ImportMode mode, SrcQuality quality, nframes64_t& pos, int target_regions, int target_tracks, boost::shared_ptr<AudioTrack>& track, bool replace, uint32_t total) { @@ -538,7 +540,7 @@ Editor::import_sndfiles (vector<ustring> paths, ImportMode mode, SrcQuality qual } int -Editor::embed_sndfiles (vector<Glib::ustring> paths, bool multifile, +Editor::embed_sndfiles (vector<string> paths, bool multifile, bool& check_sample_rate, ImportMode mode, nframes64_t& pos, int target_regions, int target_tracks, boost::shared_ptr<AudioTrack>& track) { @@ -547,14 +549,14 @@ Editor::embed_sndfiles (vector<Glib::ustring> paths, bool multifile, string linked_path; SoundFileInfo finfo; int ret = 0; - Glib::ustring path_to_use; + string path_to_use; track_canvas->get_window()->set_cursor (Gdk::Cursor (Gdk::WATCH)); gdk_flush (); - for (vector<Glib::ustring>::iterator p = paths.begin(); p != paths.end(); ++p) { + for (vector<std::string>::iterator p = paths.begin(); p != paths.end(); ++p) { - ustring path = *p; + string path = *p; /* lets see if we can link it into the session */ @@ -695,11 +697,11 @@ Editor::embed_sndfiles (vector<Glib::ustring> paths, bool multifile, } int -Editor::add_sources (vector<Glib::ustring> paths, SourceList& sources, nframes64_t& pos, ImportMode mode, +Editor::add_sources (vector<string> paths, SourceList& sources, nframes64_t& pos, ImportMode mode, int target_regions, int target_tracks, boost::shared_ptr<AudioTrack>& track, bool add_channel_suffix) { vector<boost::shared_ptr<AudioRegion> > regions; - ustring region_name; + string region_name; uint32_t input_chan = 0; uint32_t output_chan = 0; bool use_timestamp; diff --git a/gtk2_ardour/editor_canvas.cc b/gtk2_ardour/editor_canvas.cc index 1c7e7bf459..c91556160f 100644 --- a/gtk2_ardour/editor_canvas.cc +++ b/gtk2_ardour/editor_canvas.cc @@ -444,14 +444,14 @@ Editor::track_canvas_drag_data_received (const RefPtr<Gdk::DragContext>& context } bool -Editor::idle_drop_paths (vector<ustring> paths, nframes64_t frame, double ypos) +Editor::idle_drop_paths (vector<string> paths, nframes64_t frame, double ypos) { drop_paths_part_two (paths, frame, ypos); return false; } void -Editor::drop_paths_part_two (const vector<ustring>& paths, nframes64_t frame, double ypos) +Editor::drop_paths_part_two (const vector<string>& paths, nframes64_t frame, double ypos) { TimeAxisView* tvp; AudioTimeAxisView* tv; @@ -491,7 +491,7 @@ Editor::drop_paths (const RefPtr<Gdk::DragContext>& context, const SelectionData& data, guint info, guint time) { - vector<ustring> paths; + vector<string> paths; GdkEvent ev; nframes64_t frame; double wx; diff --git a/gtk2_ardour/editor_edit_groups.cc b/gtk2_ardour/editor_edit_groups.cc index 2bd31e55f6..5a3d294342 100644 --- a/gtk2_ardour/editor_edit_groups.cc +++ b/gtk2_ardour/editor_edit_groups.cc @@ -316,7 +316,7 @@ Editor::group_flags_changed (void* src, RouteGroup* group) } void -Editor::edit_group_name_edit (const Glib::ustring& path, const Glib::ustring& new_text) +Editor::edit_group_name_edit (const string& path, const string& new_text) { RouteGroup* group; TreeIter iter; diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index a1b47ec6b5..a2ffd146f7 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -5544,7 +5544,7 @@ Editor::split_region_at_points (boost::shared_ptr<Region> r, AnalysisFeatureList if (positions.size() > 20) { - Glib::ustring msgstr = string_compose (_("You are about to split\n%1\ninto %2 pieces.\nThis could take a long time."), ar->name(), positions.size() + 1); + std::string msgstr = string_compose (_("You are about to split\n%1\ninto %2 pieces.\nThis could take a long time."), ar->name(), positions.size() + 1); MessageDialog msg (msgstr, false, Gtk::MESSAGE_INFO, diff --git a/gtk2_ardour/editor_region_list.cc b/gtk2_ardour/editor_region_list.cc index d56bf4844e..054ef04d97 100644 --- a/gtk2_ardour/editor_region_list.cc +++ b/gtk2_ardour/editor_region_list.cc @@ -114,7 +114,9 @@ Editor::add_audio_region_to_region_display (boost::shared_ptr<AudioRegion> regio } else { - if ((*iter)[region_list_columns.name] != _("Hidden")) { + string name = (*iter)[region_list_columns.name]; + + if (name != _("Hidden")) { parent = *(region_list_model->insert(iter)); parent[region_list_columns.name] = _("Hidden"); @@ -476,8 +478,8 @@ Editor::region_list_sorter (TreeModel::iterator a, TreeModel::iterator b) boost::shared_ptr<AudioRegion> region2 = boost::dynamic_pointer_cast<AudioRegion> (r2); if (region1 == 0 || region2 == 0) { - Glib::ustring s1; - Glib::ustring s2; + std::string s1; + std::string s2; switch (region_list_sort_type) { case ByName: s1 = (*a)[region_list_columns.name]; @@ -623,7 +625,7 @@ Editor::region_list_display_drag_data_received (const RefPtr<Gdk::DragContext>& const SelectionData& data, guint info, guint time) { - vector<ustring> paths; + vector<string> paths; if (data.get_target() == "GTK_TREE_MODEL_ROW") { region_list_display.on_drag_data_received (context, x, y, data, info, time); @@ -659,7 +661,7 @@ Editor::region_list_selection_filter (const RefPtr<TreeModel>& model, const Tree } void -Editor::region_name_edit (const Glib::ustring& path, const Glib::ustring& new_text) +Editor::region_name_edit (const string& path, const string& new_text) { boost::shared_ptr<Region> region; TreeIter iter; diff --git a/gtk2_ardour/engine_dialog.cc b/gtk2_ardour/engine_dialog.cc index c1719ef9a3..2a6f550c28 100644 --- a/gtk2_ardour/engine_dialog.cc +++ b/gtk2_ardour/engine_dialog.cc @@ -595,7 +595,7 @@ EngineControl::setup_engine () return 1; // try again } - Glib::ustring jackdrc_path = Glib::get_home_dir(); + std::string jackdrc_path = Glib::get_home_dir(); jackdrc_path += "/.jackdrc"; ofstream jackdrc (jackdrc_path.c_str()); @@ -928,7 +928,7 @@ EngineControl::redisplay_latency () void EngineControl::audio_mode_changed () { - Glib::ustring str = audio_mode_combo.get_active_text(); + std::string str = audio_mode_combo.get_active_text(); if (str == _("Playback/Recording on 1 Device")) { input_device_combo.set_sensitive (false); @@ -1064,7 +1064,7 @@ EngineControl::get_state () { XMLNode* root = new XMLNode ("AudioSetup"); XMLNode* child; - Glib::ustring path; + std::string path; child = new XMLNode ("periods"); child->add_property ("val", to_string (periods_adjustment.get_value(), std::dec)); diff --git a/gtk2_ardour/export_dialog.cc b/gtk2_ardour/export_dialog.cc index 00d2ebbe66..50322e2d0c 100644 --- a/gtk2_ardour/export_dialog.cc +++ b/gtk2_ardour/export_dialog.cc @@ -1152,7 +1152,7 @@ ExportDialog::start_export () */ if (file_entry.get_text().length() == 0) { - Glib::ustring export_path = session->export_dir(); + std::string export_path = session->export_dir(); if (!wants_dir()) { export_path = Glib::build_filename (export_path, "export.wav"); diff --git a/gtk2_ardour/io_selector.cc b/gtk2_ardour/io_selector.cc index 0e58d3bb98..2338aed427 100644 --- a/gtk2_ardour/io_selector.cc +++ b/gtk2_ardour/io_selector.cc @@ -509,7 +509,7 @@ IOSelector::port_selection_changed (GdkEventButton *ev, TreeView* treeview) return 0; } - ustring other_port_name = (*i)[port_display_columns.full_name]; + string other_port_name = (*i)[port_display_columns.full_name]; if (for_input) { if ((status = io->connect_input (selected_port, other_port_name, this)) == 0) { @@ -614,7 +614,7 @@ IOSelector::connection_button_release (GdkEventButton *ev, TreeView *treeview) if ((iter = treeview->get_model()->get_iter (path.to_string()))) { /* path is valid */ - ustring connected_port_name = (*iter)[port_display_columns.full_name]; + string connected_port_name = (*iter)[port_display_columns.full_name]; Port *port = reinterpret_cast<Port *> (treeview->get_data (X_("port"))); if (for_input) { diff --git a/gtk2_ardour/io_selector.h b/gtk2_ardour/io_selector.h index 665970dba4..8d3142edf5 100644 --- a/gtk2_ardour/io_selector.h +++ b/gtk2_ardour/io_selector.h @@ -85,8 +85,8 @@ class IOSelector : public Gtk::VBox { add (full_name); } - Gtk::TreeModelColumn<Glib::ustring> displayed_name; - Gtk::TreeModelColumn<Glib::ustring> full_name; + Gtk::TreeModelColumn<std::string> displayed_name; + Gtk::TreeModelColumn<std::string> full_name; }; PortDisplayModelColumns port_display_columns; diff --git a/gtk2_ardour/itest.cc b/gtk2_ardour/itest.cc index 97c8937f39..7407383bd1 100644 --- a/gtk2_ardour/itest.cc +++ b/gtk2_ardour/itest.cc @@ -47,7 +47,7 @@ struct ModelColumns : public TreeModel::ColumnRecord { add (port); } TreeModelColumn<bool> used; - TreeModelColumn<ustring> text; + TreeModelColumn<string> text; TreeModelColumn<jack_port_t*> port; }; diff --git a/gtk2_ardour/keyeditor.h b/gtk2_ardour/keyeditor.h index 085bfbb6d9..00808e3ae6 100644 --- a/gtk2_ardour/keyeditor.h +++ b/gtk2_ardour/keyeditor.h @@ -7,7 +7,6 @@ #include <gtkmm/treeview.h> #include <gtkmm/treestore.h> #include <gtkmm/scrolledwindow.h> -#include <glibmm/ustring.h> #include "ardour_dialog.h" @@ -30,7 +29,7 @@ class KeyEditor : public ArdourDialog add (path); add (bindable); } - Gtk::TreeModelColumn<Glib::ustring> action; + Gtk::TreeModelColumn<std::string> action; Gtk::TreeModelColumn<std::string> binding; Gtk::TreeModelColumn<std::string> path; Gtk::TreeModelColumn<bool> bindable; diff --git a/gtk2_ardour/lv2_plugin_ui.cc b/gtk2_ardour/lv2_plugin_ui.cc index 90ee8aa773..8eeaf6c60d 100644 --- a/gtk2_ardour/lv2_plugin_ui.cc +++ b/gtk2_ardour/lv2_plugin_ui.cc @@ -142,7 +142,7 @@ LV2PluginUI::LV2PluginUI (boost::shared_ptr<PluginInsert> pi, boost::shared_ptr< } void -LV2PluginUI::lv2ui_instantiate(const Glib::ustring& title) +LV2PluginUI::lv2ui_instantiate(const std::string& title) { LV2_Feature** features; LV2_Feature** features_src; @@ -287,7 +287,7 @@ LV2PluginUI::is_update_wanted(uint32_t index) } bool -LV2PluginUI::on_window_show(const Glib::ustring& title) +LV2PluginUI::on_window_show(const std::string& title) { //cout << "on_window_show - " << title << endl; flush(cout); diff --git a/gtk2_ardour/lv2_plugin_ui.h b/gtk2_ardour/lv2_plugin_ui.h index 0ad2806537..74f8478862 100644 --- a/gtk2_ardour/lv2_plugin_ui.h +++ b/gtk2_ardour/lv2_plugin_ui.h @@ -77,7 +77,7 @@ class LV2PluginUI : public PlugUIBase, public Gtk::VBox uint32_t format, const void* buffer); - void lv2ui_instantiate(const Glib::ustring& title); + void lv2ui_instantiate(const std::string& title); void parameter_changed(uint32_t, float); void parameter_update(uint32_t, float); @@ -86,7 +86,7 @@ class LV2PluginUI : public PlugUIBase, public Gtk::VBox void output_update(); bool is_update_wanted(uint32_t index); - virtual bool on_window_show(const Glib::ustring& title); + virtual bool on_window_show(const std::string& title); virtual void on_window_hide(); }; #endif // HAVE_LV2 diff --git a/gtk2_ardour/main.cc b/gtk2_ardour/main.cc index 7d9ce7f21e..16e33a79a5 100644 --- a/gtk2_ardour/main.cc +++ b/gtk2_ardour/main.cc @@ -24,7 +24,6 @@ #include <sigc++/bind.h> #include <gtkmm/settings.h> -#include <glibmm/ustring.h> #include <pbd/error.h> #include <pbd/textreceiver.h> @@ -88,9 +87,9 @@ fixup_bundle_environment (int argc, char* argv[]) _NSGetExecutablePath (execpath, &pathsz); - Glib::ustring exec_path (execpath); - Glib::ustring dir_path = Glib::path_get_dirname (exec_path); - Glib::ustring path; + std::string exec_path (execpath); + std::string dir_path = Glib::path_get_dirname (exec_path); + std::string path; const char *cstr = getenv ("PATH"); /* ensure that we find any bundled executables (e.g. JACK), @@ -217,7 +216,7 @@ fixup_bundle_environment (int argc, char* argv[]) error << string_compose (_("cannot open pango.rc file %1") , path) << endmsg; } else { pangorc << "[Pango]\nModuleFiles="; - Glib::ustring mpath; + std::string mpath; mpath = dir_path; mpath += "/../Resources/pango.modules"; @@ -268,9 +267,9 @@ fixup_bundle_environment (int argc, char* argv[]) EnvironmentalProtectionAgency::set_global_epa (new EnvironmentalProtectionAgency (true, "PREBUNDLE_ENV")); - Glib::ustring exec_path = argv[0]; - Glib::ustring dir_path = Glib::path_get_dirname (Glib::path_get_dirname (exec_path)); - Glib::ustring path; + std::string exec_path = argv[0]; + std::string dir_path = Glib::path_get_dirname (Glib::path_get_dirname (exec_path)); + std::string path; const char *cstr = getenv ("PATH"); /* ensure that we find any bundled executables (e.g. JACK), @@ -377,7 +376,7 @@ fixup_bundle_environment (int argc, char* argv[]) << endmsg; } else { - Glib::ustring mpath; + std::string mpath; path = Glib::build_filename (ARDOUR::get_user_ardour_path(), "pango.rc"); @@ -465,7 +464,7 @@ int ardour_main (int argc, char *argv[]) int main (int argc, char* argv[]) #endif { - vector<Glib::ustring> null_file_list; + vector<std::string> null_file_list; fixup_bundle_environment (argc, argv); diff --git a/gtk2_ardour/marker.cc b/gtk2_ardour/marker.cc index ab895394ec..aa32ff2c64 100644 --- a/gtk2_ardour/marker.cc +++ b/gtk2_ardour/marker.cc @@ -355,7 +355,7 @@ Marker::set_name (const string& new_name) int name_width = pixel_width (new_name, *name_font) + 2; _annotation = new_name; - name_pixbuf->property_pixbuf() = pixbuf_from_ustring(new_name, name_font, + name_pixbuf->property_pixbuf() = pixbuf_from_string(new_name, name_font, ARDOUR_UI::config()->canvasvar_MarkerLabel.get(), name_width, name_height); diff --git a/gtk2_ardour/mixer_ui.cc b/gtk2_ardour/mixer_ui.cc index 57db6e935f..8cb8dece9f 100644 --- a/gtk2_ardour/mixer_ui.cc +++ b/gtk2_ardour/mixer_ui.cc @@ -1211,7 +1211,7 @@ Mixer_UI::group_flags_changed (void* src, RouteGroup* group) } void -Mixer_UI::mix_group_name_edit (const Glib::ustring& path, const Glib::ustring& new_text) +Mixer_UI::mix_group_name_edit (const std::string& path, const std::string& new_text) { RouteGroup* group; TreeIter iter; @@ -1258,7 +1258,7 @@ Mixer_UI::mix_group_row_change (const Gtk::TreeModel::Path& path,const Gtk::Tree bool active = (*iter)[group_columns.active]; group->set_active (active, this); - Glib::ustring name = (*iter)[group_columns.text]; + std::string name = (*iter)[group_columns.text]; if (name != group->name()) { group->set_name (name); diff --git a/gtk2_ardour/mixer_ui.h b/gtk2_ardour/mixer_ui.h index 3872234713..bceb171bf5 100644 --- a/gtk2_ardour/mixer_ui.h +++ b/gtk2_ardour/mixer_ui.h @@ -201,7 +201,7 @@ class Mixer_UI : public Gtk::Window void hide_all_mix_groups (); void add_mix_group (ARDOUR::RouteGroup *); void mix_groups_changed (); - void mix_group_name_edit (const Glib::ustring&, const Glib::ustring&); + void mix_group_name_edit (const std::string&, const std::string&); void mix_group_row_change (const Gtk::TreeModel::Path& path,const Gtk::TreeModel::iterator& iter); Gtk::Menu *track_menu; @@ -224,7 +224,7 @@ class Mixer_UI : public Gtk::Window add (strip); } Gtk::TreeModelColumn<bool> visible; - Gtk::TreeModelColumn<Glib::ustring> text; + Gtk::TreeModelColumn<std::string> text; Gtk::TreeModelColumn<boost::shared_ptr<ARDOUR::Route> > route; Gtk::TreeModelColumn<MixerStrip*> strip; }; @@ -238,7 +238,7 @@ class Mixer_UI : public Gtk::Window } Gtk::TreeModelColumn<bool> active; Gtk::TreeModelColumn<bool> visible; - Gtk::TreeModelColumn<Glib::ustring> text; + Gtk::TreeModelColumn<std::string> text; Gtk::TreeModelColumn<ARDOUR::RouteGroup*> group; }; diff --git a/gtk2_ardour/mtest.cc b/gtk2_ardour/mtest.cc index e3f3855010..d1631582bb 100644 --- a/gtk2_ardour/mtest.cc +++ b/gtk2_ardour/mtest.cc @@ -65,7 +65,7 @@ make_action (Glib::RefPtr<ActionGroup> group, string name, string label) } bool -lookup_entry (const ustring accel_path, Gtk::AccelKey& key) +lookup_entry (const string accel_path, Gtk::AccelKey& key) { GtkAccelKey gkey; bool known = gtk_accel_map_lookup_entry (accel_path.c_str(), &gkey); diff --git a/gtk2_ardour/nag.cc b/gtk2_ardour/nag.cc index 7d17ed98f7..de50e87e3e 100644 --- a/gtk2_ardour/nag.cc +++ b/gtk2_ardour/nag.cc @@ -84,7 +84,7 @@ NagScreen::nag () NagScreen* NagScreen::maybe_nag (std::string why) { - Glib::ustring path; + std::string path; bool really_subscribed; bool maybe_subscribed; @@ -106,7 +106,7 @@ NagScreen::maybe_nag (std::string why) void NagScreen::mark_never_again () { - Glib::ustring path; + std::string path; path = Glib::build_filename (get_user_ardour_path(), ".nevernag"); @@ -116,7 +116,7 @@ NagScreen::mark_never_again () void NagScreen::mark_subscriber () { - Glib::ustring path; + std::string path; path = Glib::build_filename (get_user_ardour_path(), ".askedaboutsub"); @@ -126,7 +126,7 @@ NagScreen::mark_subscriber () void NagScreen::mark_affirmed_subscriber () { - Glib::ustring path; + std::string path; path = Glib::build_filename (get_user_ardour_path(), ".isubscribe"); @@ -136,7 +136,7 @@ NagScreen::mark_affirmed_subscriber () bool NagScreen::is_subscribed (bool& really) { - Glib::ustring path; + std::string path; really = false; diff --git a/gtk2_ardour/new_session_dialog.cc b/gtk2_ardour/new_session_dialog.cc index 0bfa96eb51..fb1d8764f4 100644 --- a/gtk2_ardour/new_session_dialog.cc +++ b/gtk2_ardour/new_session_dialog.cc @@ -562,16 +562,16 @@ NewSessionDialog::set_existing_session (bool yn) } void -NewSessionDialog::set_session_name (const Glib::ustring& name) +NewSessionDialog::set_session_name (const std::string& name) { m_name->set_text (name); engine_page_session_name = name; } void -NewSessionDialog::set_session_folder(const Glib::ustring& dir) +NewSessionDialog::set_session_folder(const std::string& dir) { - Glib::ustring realdir = dir; + std::string realdir = dir; /* this little tangled mess is a result of 4 things: diff --git a/gtk2_ardour/new_session_dialog.h b/gtk2_ardour/new_session_dialog.h index c4495dccd5..f1b63e54aa 100644 --- a/gtk2_ardour/new_session_dialog.h +++ b/gtk2_ardour/new_session_dialog.h @@ -65,8 +65,8 @@ public: int run (); - void set_session_name(const Glib::ustring& name); - void set_session_folder(const Glib::ustring& folder); + void set_session_name(const std::string& name); + void set_session_folder(const std::string& folder); std::string session_name() const; std::string session_folder() const; @@ -215,8 +215,8 @@ protected: bool on_new_session_page; bool have_engine; - Glib::ustring engine_page_session_folder; - Glib::ustring engine_page_session_name; + std::string engine_page_session_folder; + std::string engine_page_session_name; sigc::connection ic_connection; void engine_interface_chosen(); diff --git a/gtk2_ardour/option_editor.cc b/gtk2_ardour/option_editor.cc index d858791791..56044b00c8 100644 --- a/gtk2_ardour/option_editor.cc +++ b/gtk2_ardour/option_editor.cc @@ -756,7 +756,7 @@ OptionEditor::add_midi_port () break; } - Glib::ustring mode = dialog.port_mode_combo.get_active_text(); + std::string mode = dialog.port_mode_combo.get_active_text(); std::string smod; if (mode == _("input")) { diff --git a/gtk2_ardour/opts.cc b/gtk2_ardour/opts.cc index 8183bd265f..c14437e1ec 100644 --- a/gtk2_ardour/opts.cc +++ b/gtk2_ardour/opts.cc @@ -29,7 +29,7 @@ using namespace std; -Glib::ustring ARDOUR_COMMAND_LINE::session_name = ""; +std::string ARDOUR_COMMAND_LINE::session_name = ""; string ARDOUR_COMMAND_LINE::jack_client_name = "ardour"; bool ARDOUR_COMMAND_LINE::show_key_actions = false; bool ARDOUR_COMMAND_LINE::no_splash = true; @@ -38,8 +38,8 @@ bool ARDOUR_COMMAND_LINE::use_vst = true; bool ARDOUR_COMMAND_LINE::new_session = false; char* ARDOUR_COMMAND_LINE::curvetest_file = 0; bool ARDOUR_COMMAND_LINE::try_hw_optimization = true; -Glib::ustring ARDOUR_COMMAND_LINE::keybindings_path = ""; /* empty means use builtin default */ -Glib::ustring ARDOUR_COMMAND_LINE::menus_file = "ardour.menus"; +std::string ARDOUR_COMMAND_LINE::keybindings_path = ""; /* empty means use builtin default */ +std::string ARDOUR_COMMAND_LINE::menus_file = "ardour.menus"; bool ARDOUR_COMMAND_LINE::finder_invoked_ardour = false; using namespace ARDOUR_COMMAND_LINE; diff --git a/gtk2_ardour/opts.h b/gtk2_ardour/opts.h index efa2656816..c70cc56004 100644 --- a/gtk2_ardour/opts.h +++ b/gtk2_ardour/opts.h @@ -21,11 +21,10 @@ #define __ardour_opts_h__ #include <string> -#include <glibmm/ustring.h> namespace ARDOUR_COMMAND_LINE { -extern Glib::ustring session_name; +extern std::string session_name; extern bool show_key_actions; extern bool no_splash; extern bool just_version; @@ -35,8 +34,8 @@ extern bool new_session; extern char* curvetest_file; extern bool try_hw_optimization; extern bool use_gtk_theme; -extern Glib::ustring keybindings_path; -extern Glib::ustring menus_file; +extern std::string keybindings_path; +extern std::string menus_file; extern bool finder_invoked_ardour; extern int32_t parse_opts (int argc, char *argv[]); diff --git a/gtk2_ardour/plugin_selector.cc b/gtk2_ardour/plugin_selector.cc index d0c9a8fbb1..7cbb18704f 100644 --- a/gtk2_ardour/plugin_selector.cc +++ b/gtk2_ardour/plugin_selector.cc @@ -614,7 +614,7 @@ PluginSelector::create_by_creator_menu (ARDOUR::PluginInfoList& all_plugs) { using namespace Menu_Helpers; - typedef std::map<Glib::ustring,Gtk::Menu*> SubmenuMap; + typedef std::map<std::string,Gtk::Menu*> SubmenuMap; SubmenuMap creator_submenu_map; Menu* by_creator = manage (new Menu()); @@ -642,7 +642,7 @@ PluginSelector::create_by_creator_menu (ARDOUR::PluginInfoList& all_plugs) } else { submenu = new Gtk::Menu; by_creator_items.push_back (MenuElem (creator, *manage (submenu))); - creator_submenu_map.insert (pair<Glib::ustring,Menu*> (creator, submenu)); + creator_submenu_map.insert (pair<std::string,Menu*> (creator, submenu)); submenu->set_name("ArdourContextMenu"); } submenu->items().push_back (MenuElem ((*i)->name, (bind (mem_fun (*this, &PluginSelector::plugin_chosen_from_menu), *i)))); @@ -655,7 +655,7 @@ PluginSelector::create_by_category_menu (ARDOUR::PluginInfoList& all_plugs) { using namespace Menu_Helpers; - typedef std::map<Glib::ustring,Gtk::Menu*> SubmenuMap; + typedef std::map<std::string,Gtk::Menu*> SubmenuMap; SubmenuMap category_submenu_map; Menu* by_category = manage (new Menu()); @@ -678,7 +678,7 @@ PluginSelector::create_by_category_menu (ARDOUR::PluginInfoList& all_plugs) } else { submenu = new Gtk::Menu; by_category_items.push_back (MenuElem (category, *manage (submenu))); - category_submenu_map.insert (pair<Glib::ustring,Menu*> (category, submenu)); + category_submenu_map.insert (pair<std::string,Menu*> (category, submenu)); submenu->set_name("ArdourContextMenu"); } submenu->items().push_back (MenuElem ((*i)->name, (bind (mem_fun (*this, &PluginSelector::plugin_chosen_from_menu), *i)))); @@ -701,7 +701,7 @@ PluginSelector::plugin_chosen_from_menu (const PluginInfoPtr& pi) } void -PluginSelector::favorite_changed (const Glib::ustring& path) +PluginSelector::favorite_changed (const std::string& path) { PluginInfoPtr pi; @@ -735,7 +735,7 @@ PluginSelector::favorite_changed (const Glib::ustring& path) } void -PluginSelector::hidden_changed (const Glib::ustring& path) +PluginSelector::hidden_changed (const std::string& path) { PluginInfoPtr pi; diff --git a/gtk2_ardour/plugin_selector.h b/gtk2_ardour/plugin_selector.h index b5367c6a99..b38b531e08 100644 --- a/gtk2_ardour/plugin_selector.h +++ b/gtk2_ardour/plugin_selector.h @@ -123,8 +123,8 @@ class PluginSelector : public ArdourDialog bool show_this_plugin (const ARDOUR::PluginInfoPtr&, const std::string&); void setup_filter_string (std::string&); - void favorite_changed (const Glib::ustring& path); - void hidden_changed (const Glib::ustring& path); + void favorite_changed (const std::string& path); + void hidden_changed (const std::string& path); bool in_row_change; void plugin_chosen_from_menu (const ARDOUR::PluginInfoPtr&); diff --git a/gtk2_ardour/plugin_ui.cc b/gtk2_ardour/plugin_ui.cc index b1eee998b9..1c591fb538 100644 --- a/gtk2_ardour/plugin_ui.cc +++ b/gtk2_ardour/plugin_ui.cc @@ -220,7 +220,7 @@ PluginUIWindow::on_hide () } void -PluginUIWindow::set_title(const Glib::ustring& title) +PluginUIWindow::set_title(const std::string& title) { //cout << "PluginUIWindow::set_title(\"" << title << "\"" << endl; Gtk::Window::set_title(title); diff --git a/gtk2_ardour/plugin_ui.h b/gtk2_ardour/plugin_ui.h index 6727707846..330b4dd171 100644 --- a/gtk2_ardour/plugin_ui.h +++ b/gtk2_ardour/plugin_ui.h @@ -82,7 +82,7 @@ class PlugUIBase : public virtual sigc::trackable virtual void update_presets (); - virtual bool on_window_show(const Glib::ustring& title) { return true; } + virtual bool on_window_show(const std::string& title) { return true; } virtual void on_window_hide() {} virtual void forward_key_event (GdkEventKey*) {} @@ -239,10 +239,10 @@ class PluginUIWindow : public Gtk::Window void on_hide (); void on_map (); - void set_title(const Glib::ustring& title); + void set_title(const std::string& title); private: - Glib::ustring _title; + std::string _title; PlugUIBase* _pluginui; sigc::connection death_connection; Gtk::Window* parent; @@ -288,7 +288,7 @@ class VSTPluginUI : public PlugUIBase, public Gtk::VBox add (name); add (number); } - Gtk::TreeModelColumn<Glib::ustring> name; + Gtk::TreeModelColumn<std::string> name; Gtk::TreeModelColumn<int> number; }; diff --git a/gtk2_ardour/route_params_ui.h b/gtk2_ardour/route_params_ui.h index c0b70cbdb1..1f6708f364 100644 --- a/gtk2_ardour/route_params_ui.h +++ b/gtk2_ardour/route_params_ui.h @@ -146,7 +146,7 @@ class RouteParams_UI : public ArdourDialog add(text); add(route); } - Gtk::TreeModelColumn<Glib::ustring> text; + Gtk::TreeModelColumn<std::string> text; Gtk::TreeModelColumn<boost::shared_ptr<ARDOUR::Route> > route; }; diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc index 58da7e02b1..1940f736f1 100644 --- a/gtk2_ardour/route_ui.cc +++ b/gtk2_ardour/route_ui.cc @@ -1176,8 +1176,8 @@ RouteUI::map_frozen () void RouteUI::save_as_template () { - Glib::ustring path; - Glib::ustring safe_name; + std::string path; + std::string safe_name; std::string name; path = Session::route_template_dir(); diff --git a/gtk2_ardour/sfdb_ui.cc b/gtk2_ardour/sfdb_ui.cc index 87a6ae6613..10648c3d24 100644 --- a/gtk2_ardour/sfdb_ui.cc +++ b/gtk2_ardour/sfdb_ui.cc @@ -67,9 +67,9 @@ using namespace Gtk; using namespace Gtkmm2ext; using namespace Editing; -using Glib::ustring; +using std::string; -ustring SoundFileBrowser::persistent_folder; +string SoundFileBrowser::persistent_folder; static ImportMode string2importmode (string str) @@ -218,7 +218,7 @@ SoundFileBox::set_session(Session* s) } bool -SoundFileBox::setup_labels (const ustring& filename) +SoundFileBox::setup_labels (const string& filename) { if (!path.empty()) { // save existing tags @@ -655,7 +655,7 @@ SoundFileBrowser::found_list_view_selected () if (!reset_options ()) { set_response_sensitive (RESPONSE_OK, false); } else { - ustring file; + string file; TreeView::Selection::ListHandle_Path rows = found_list_view.get_selection()->get_selected_rows (); @@ -678,7 +678,7 @@ SoundFileBrowser::freesound_list_view_selected () if (!reset_options ()) { set_response_sensitive (RESPONSE_OK, false); } else { - ustring file; + string file; TreeView::Selection::ListHandle_Path rows = freesound_list_view.get_selection()->get_selected_rows (); @@ -801,16 +801,16 @@ SoundFileBrowser::freesound_search_thread() #endif } -vector<ustring> +vector<string> SoundFileBrowser::get_paths () { - vector<ustring> results; + vector<string> results; int n = notebook.get_current_page (); if (n == 0) { - vector<ustring> filenames = chooser.get_filenames(); - vector<ustring>::iterator i; + vector<string> filenames = chooser.get_filenames(); + vector<string>::iterator i; for (i = filenames.begin(); i != filenames.end(); ++i) { struct stat buf; @@ -826,7 +826,7 @@ SoundFileBrowser::get_paths () ListPath rows = found_list_view.get_selection()->get_selected_rows (); for (ListPath::iterator i = rows.begin() ; i != rows.end(); ++i) { TreeIter iter = found_list->get_iter(*i); - ustring str = (*iter)[found_list_columns.pathname]; + string str = (*iter)[found_list_columns.pathname]; results.push_back (str); } @@ -837,7 +837,7 @@ SoundFileBrowser::get_paths () ListPath rows = freesound_list_view.get_selection()->get_selected_rows (); for (ListPath::iterator i = rows.begin() ; i != rows.end(); ++i) { TreeIter iter = freesound_list->get_iter(*i); - ustring str = (*iter)[freesound_list_columns.pathname]; + string str = (*iter)[freesound_list_columns.pathname]; results.push_back (str); } @@ -857,7 +857,7 @@ SoundFileOmega::reset_options_noret () bool SoundFileOmega::reset_options () { - vector<ustring> paths = get_paths (); + vector<string> paths = get_paths (); if (paths.empty()) { @@ -897,7 +897,7 @@ SoundFileOmega::reset_options () return false; } - ustring existing_choice; + string existing_choice; vector<string> action_strings; if (selected_track_cnt > 0) { @@ -1059,7 +1059,7 @@ SoundFileOmega::bad_file_message() } bool -SoundFileOmega::check_info (const vector<ustring>& paths, bool& same_size, bool& src_needed, bool& multichannel) +SoundFileOmega::check_info (const vector<string>& paths, bool& same_size, bool& src_needed, bool& multichannel) { SoundFileInfo info; nframes64_t sz = 0; @@ -1070,7 +1070,7 @@ SoundFileOmega::check_info (const vector<ustring>& paths, bool& same_size, bool& src_needed = false; multichannel = false; - for (vector<ustring>::const_iterator i = paths.begin(); i != paths.end(); ++i) { + for (vector<string>::const_iterator i = paths.begin(); i != paths.end(); ++i) { if (!AudioFileSource::get_soundfile_info (*i, info, errmsg)) { err = true; @@ -1098,7 +1098,7 @@ SoundFileOmega::check_info (const vector<ustring>& paths, bool& same_size, bool& bool -SoundFileOmega::check_link_status (const Session& s, const vector<ustring>& paths) +SoundFileOmega::check_link_status (const Session& s, const vector<string>& paths) { string tmpdir = s.sound_dir(); bool ret = false; @@ -1111,7 +1111,7 @@ SoundFileOmega::check_link_status (const Session& s, const vector<ustring>& path } } - for (vector<ustring>::const_iterator i = paths.begin(); i != paths.end(); ++i) { + for (vector<string>::const_iterator i = paths.begin(); i != paths.end(); ++i) { char tmpc[MAXPATHLEN+1]; @@ -1152,19 +1152,19 @@ SoundFileChooser::on_hide () } } -ustring +string SoundFileChooser::get_filename () { - vector<ustring> paths; + vector<string> paths; paths = get_paths (); if (paths.empty()) { - return ustring (); + return string (); } if (!Glib::file_test (paths.front(), Glib::FILE_TEST_EXISTS|Glib::FILE_TEST_IS_REGULAR)) { - return ustring(); + return string(); } return paths.front(); @@ -1286,15 +1286,15 @@ SoundFileOmega::SoundFileOmega (Gtk::Window& parent, string title, ARDOUR::Sessi /* setup disposition map */ - disposition_map.insert (pair<ustring,ImportDisposition>(_("one track per file"), ImportDistinctFiles)); - disposition_map.insert (pair<ustring,ImportDisposition>(_("one track per channel"), ImportDistinctChannels)); - disposition_map.insert (pair<ustring,ImportDisposition>(_("merge files"), ImportMergeFiles)); - disposition_map.insert (pair<ustring,ImportDisposition>(_("sequence files"), ImportSerializeFiles)); + disposition_map.insert (pair<string,ImportDisposition>(_("one track per file"), ImportDistinctFiles)); + disposition_map.insert (pair<string,ImportDisposition>(_("one track per channel"), ImportDistinctChannels)); + disposition_map.insert (pair<string,ImportDisposition>(_("merge files"), ImportMergeFiles)); + disposition_map.insert (pair<string,ImportDisposition>(_("sequence files"), ImportSerializeFiles)); - disposition_map.insert (pair<ustring,ImportDisposition>(_("one region per file"), ImportDistinctFiles)); - disposition_map.insert (pair<ustring,ImportDisposition>(_("one region per channel"), ImportDistinctChannels)); - disposition_map.insert (pair<ustring,ImportDisposition>(_("all files in one region"), ImportMergeFiles)); - disposition_map.insert (pair<ustring,ImportDisposition>(_("all files in one track"), ImportSerializeFiles)); + disposition_map.insert (pair<string,ImportDisposition>(_("one region per file"), ImportDistinctFiles)); + disposition_map.insert (pair<string,ImportDisposition>(_("one region per channel"), ImportDistinctChannels)); + disposition_map.insert (pair<string,ImportDisposition>(_("all files in one region"), ImportMergeFiles)); + disposition_map.insert (pair<string,ImportDisposition>(_("all files in one track"), ImportSerializeFiles)); chooser.signal_selection_changed().connect (mem_fun (*this, &SoundFileOmega::file_selection_changed)); @@ -1342,7 +1342,7 @@ SoundFileOmega::on_hide () ImportPosition SoundFileOmega::get_position() const { - ustring str = where_combo.get_active_text(); + string str = where_combo.get_active_text(); if (str == _("use file timestamp")) { return ImportAtTimestamp; @@ -1358,7 +1358,7 @@ SoundFileOmega::get_position() const SrcQuality SoundFileOmega::get_src_quality() const { - ustring str = where_combo.get_active_text(); + string str = where_combo.get_active_text(); if (str == _("Best")) { return SrcBest; @@ -1381,7 +1381,7 @@ SoundFileOmega::get_channel_disposition () const and the ImportDisposition enum that corresponds to it. */ - ustring str = channel_combo.get_active_text(); + string str = channel_combo.get_active_text(); DispositionMap::const_iterator x = disposition_map.find (str); if (x == disposition_map.end()) { diff --git a/gtk2_ardour/sfdb_ui.h b/gtk2_ardour/sfdb_ui.h index 0f164bcb11..611214e83c 100644 --- a/gtk2_ardour/sfdb_ui.h +++ b/gtk2_ardour/sfdb_ui.h @@ -23,7 +23,6 @@ #include <string> #include <vector> #include <map> -#include <glibmm/ustring.h> #include <sigc++/signal.h> @@ -56,7 +55,7 @@ class SoundFileBox : public Gtk::VBox virtual ~SoundFileBox () {}; void set_session (ARDOUR::Session* s); - bool setup_labels (const Glib::ustring& filename); + bool setup_labels (const std::string& filename); void audition(); bool audition_oneshot(); @@ -64,7 +63,7 @@ class SoundFileBox : public Gtk::VBox protected: ARDOUR::Session* _session; - Glib::ustring path; + std::string path; ARDOUR::SoundFileInfo sf_info; @@ -109,7 +108,7 @@ class SoundFileBrowser : public ArdourDialog class FoundTagColumns : public Gtk::TreeModel::ColumnRecord { public: - Gtk::TreeModelColumn<Glib::ustring> pathname; + Gtk::TreeModelColumn<std::string> pathname; FoundTagColumns() { add(pathname); } }; @@ -125,7 +124,7 @@ class SoundFileBrowser : public ArdourDialog virtual ~SoundFileBrowser (); virtual void set_session (ARDOUR::Session*); - std::vector<Glib::ustring> get_paths (); + std::vector<std::string> get_paths (); void clear_selection (); @@ -152,7 +151,7 @@ class SoundFileBrowser : public ArdourDialog Gtk::FileFilter matchall_filter; Gtk::HBox hpacker; - static Glib::ustring persistent_folder; + static std::string persistent_folder; Gtk::Notebook notebook; @@ -192,7 +191,7 @@ class SoundFileChooser : public SoundFileBrowser SoundFileChooser (Gtk::Window& parent, std::string title, ARDOUR::Session* _s = 0); virtual ~SoundFileChooser () {}; - Glib::ustring get_filename (); + std::string get_filename (); protected: void on_hide(); @@ -226,7 +225,7 @@ class SoundFileOmega : public SoundFileBrowser private: uint32_t selected_track_cnt; - typedef std::map<Glib::ustring,Editing::ImportDisposition> DispositionMap; + typedef std::map<std::string,Editing::ImportDisposition> DispositionMap; DispositionMap disposition_map; Gtk::HBox options; @@ -234,10 +233,10 @@ class SoundFileOmega : public SoundFileBrowser Gtk::VBox block_three; Gtk::VBox block_four; - bool check_info (const std::vector<Glib::ustring>& paths, + bool check_info (const std::vector<std::string>& paths, bool& same_size, bool& src_needed, bool& multichannel); - static bool check_link_status (const ARDOUR::Session&, const std::vector<Glib::ustring>& paths); + static bool check_link_status (const ARDOUR::Session&, const std::vector<std::string>& paths); void file_selection_changed (); bool reset_options (); diff --git a/gtk2_ardour/theme_manager.h b/gtk2_ardour/theme_manager.h index 3419cf0768..0e488dcf65 100644 --- a/gtk2_ardour/theme_manager.h +++ b/gtk2_ardour/theme_manager.h @@ -53,8 +53,8 @@ class ThemeManager : public ArdourDialog add (rgba); } - Gtk::TreeModelColumn<Glib::ustring> name; - Gtk::TreeModelColumn<Glib::ustring> color; + Gtk::TreeModelColumn<std::string> name; + Gtk::TreeModelColumn<std::string> color; Gtk::TreeModelColumn<Gdk::Color> gdkcolor; Gtk::TreeModelColumn<UIConfigVariable<uint32_t> *> pVar; Gtk::TreeModelColumn<uint32_t> rgba; diff --git a/gtk2_ardour/time_axis_view_item.cc b/gtk2_ardour/time_axis_view_item.cc index d3f720c253..b9753f40da 100644 --- a/gtk2_ardour/time_axis_view_item.cc +++ b/gtk2_ardour/time_axis_view_item.cc @@ -548,7 +548,7 @@ TimeAxisViewItem::get_time_axis_view() * @param new_name the new name text to display */ void -TimeAxisViewItem::set_name_text(const ustring& new_name) +TimeAxisViewItem::set_name_text(const string& new_name) { if (!name_pixbuf) { return; @@ -558,7 +558,7 @@ TimeAxisViewItem::set_name_text(const ustring& new_name) last_item_width = trackview.editor.frame_to_pixel(item_duration); name_pixbuf_width = pixel_width (new_name, *NAME_FONT) + 2; - name_pixbuf->property_pixbuf() = pixbuf_from_ustring(new_name, NAME_FONT, + name_pixbuf->property_pixbuf() = pixbuf_from_string(new_name, NAME_FONT, ARDOUR_UI::config()->canvasvar_TimeAxisViewItemName.get(), name_pixbuf_width, NAME_HEIGHT); } @@ -931,7 +931,7 @@ TimeAxisViewItem::reset_name_width (double pix_width) name_pixbuf->show(); } - name_pixbuf->property_pixbuf() = pixbuf_from_ustring(item_name, NAME_FONT, + name_pixbuf->property_pixbuf() = pixbuf_from_string(item_name, NAME_FONT, ARDOUR_UI::config()->canvasvar_TimeAxisViewItemName.get(), pb_width, NAME_HEIGHT); } diff --git a/gtk2_ardour/time_axis_view_item.h b/gtk2_ardour/time_axis_view_item.h index 167f1932c0..93de6c7d16 100644 --- a/gtk2_ardour/time_axis_view_item.h +++ b/gtk2_ardour/time_axis_view_item.h @@ -199,7 +199,7 @@ class TimeAxisViewItem : public Selectable * * @param new_name the new name text to display */ - void set_name_text(const Glib::ustring& new_name) ; + void set_name_text(const std::string& new_name) ; /** * Set the height of this item diff --git a/gtk2_ardour/utils.cc b/gtk2_ardour/utils.cc index 3c58a27e60..84482dd328 100644 --- a/gtk2_ardour/utils.cc +++ b/gtk2_ardour/utils.cc @@ -52,7 +52,7 @@ using namespace PBD; sigc::signal<void> DPIReset; int -pixel_width (const ustring& str, Pango::FontDescription& font) +pixel_width (const string& str, Pango::FontDescription& font) { if (str.empty()) { return 0; @@ -69,20 +69,20 @@ pixel_width (const ustring& str, Pango::FontDescription& font) return width; } -ustring -fit_to_pixels (const ustring& str, int pixel_width, Pango::FontDescription& font, int& actual_width, bool with_ellipses) +string +fit_to_pixels (const string& str, int pixel_width, Pango::FontDescription& font, int& actual_width, bool with_ellipses) { Label foo; Glib::RefPtr<Pango::Layout> layout = foo.create_pango_layout (""); - ustring::size_type shorter_by = 0; - ustring txt; + string::size_type shorter_by = 0; + string txt; layout->set_font_description (font); actual_width = 0; - ustring ustr = str; - ustring::iterator last = ustr.end(); + string ustr = str; + string::iterator last = ustr.end(); --last; /* now points at final entry */ txt = ustr; @@ -910,7 +910,7 @@ convert_bgra_to_rgba (guint8 const* src, } Glib::RefPtr<Gdk::Pixbuf> -pixbuf_from_ustring(const ustring& name, Pango::FontDescription* font, uint32_t rgba, int clip_width, int clip_height) +pixbuf_from_string(const string& name, Pango::FontDescription* font, uint32_t rgba, int clip_width, int clip_height) { Glib::RefPtr<Gdk::Pixbuf> buf = Gdk::Pixbuf::create(Gdk::COLORSPACE_RGB, true, 8, clip_width, clip_height); cairo_surface_t* surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, clip_width, clip_height); diff --git a/gtk2_ardour/utils.h b/gtk2_ardour/utils.h index 61d5f4f0f6..8b2fa18591 100644 --- a/gtk2_ardour/utils.h +++ b/gtk2_ardour/utils.h @@ -26,7 +26,6 @@ #include <ardour/types.h> #include <libgnomecanvasmm/line.h> #include <gdkmm/types.h> -#include <glibmm/ustring.h> #include "canvas.h" #include "public_editor.h" @@ -53,8 +52,8 @@ slider_position_to_gain (double pos) return pow (2.0,(sqrt(sqrt(sqrt(pos)))*198.0-192.0)/6.0); } -Glib::ustring fit_to_pixels (const Glib::ustring&, int pixel_width, Pango::FontDescription& font, int& actual_width, bool with_ellipses = false); -int pixel_width (const Glib::ustring& str, Pango::FontDescription& font); +std::string fit_to_pixels (const std::string&, int pixel_width, Pango::FontDescription& font, int& actual_width, bool with_ellipses = false); +int pixel_width (const std::string& str, Pango::FontDescription& font); gint just_hide_it (GdkEventAny*, Gtk::Window*); void allow_keyboard_focus (bool); @@ -94,7 +93,7 @@ void convert_bgra_to_rgba (guint8 const* src, guint8* dst, int width, int height); -Glib::RefPtr<Gdk::Pixbuf> pixbuf_from_ustring (const Glib::ustring& name, +Glib::RefPtr<Gdk::Pixbuf> pixbuf_from_string (const std::string& name, Pango::FontDescription* font, uint32_t rgba, int clip_width, |