diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-06-12 04:05:10 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-06-12 04:05:10 +0000 |
commit | 557f56a7f2173fdf9b01dfb3f3410f227d05f8e2 (patch) | |
tree | 2ebd0a0655fadffcb962591355fd0d4a9c7e7ce6 /gtk2_ardour/canvas_patch_change.cc | |
parent | cf0753a4bd4ed23d40fd06e8d1dec4f0b46da6fc (diff) |
more changes to patch change/plugin preset support - replace regexp replacement with boost::replace_all(), actually find programs/patches in the data we have, and more. notable changes to constructors and structure of various MIDI::Name objects
git-svn-id: svn://localhost/ardour2/branches/3.0@12667 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/canvas_patch_change.cc')
-rw-r--r-- | gtk2_ardour/canvas_patch_change.cc | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/gtk2_ardour/canvas_patch_change.cc b/gtk2_ardour/canvas_patch_change.cc index b3d8caa488..d57de8a797 100644 --- a/gtk2_ardour/canvas_patch_change.cc +++ b/gtk2_ardour/canvas_patch_change.cc @@ -19,7 +19,7 @@ #include <iostream> -#include <glibmm/regex.h> +#include <boost/algorithm/string.hpp> #include "gtkmm2ext/keyboard.h" #include "ardour/instrument_info.h" @@ -87,9 +87,6 @@ CanvasPatchChange::initialize_popup_menus() for (ChannelNameSet::PatchBanks::const_iterator bank = patch_banks.begin(); bank != patch_banks.end(); ++bank) { - Glib::RefPtr<Glib::Regex> underscores = Glib::Regex::create("_"); - std::string replacement(" "); - Gtk::Menu& patch_bank_menu = *manage(new Gtk::Menu()); const PatchBank::PatchNameList& patches = (*bank)->patch_name_list(); @@ -98,7 +95,8 @@ CanvasPatchChange::initialize_popup_menus() for (PatchBank::PatchNameList::const_iterator patch = patches.begin(); patch != patches.end(); ++patch) { - std::string name = underscores->replace((*patch)->name().c_str(), -1, 0, replacement); + std::string name = (*patch)->name(); + boost::replace_all (name, "_", " "); patch_menus.push_back( Gtk::Menu_Helpers::MenuElem( @@ -108,8 +106,8 @@ CanvasPatchChange::initialize_popup_menus() (*patch)->patch_primary_key())) ); } - - std::string name = underscores->replace((*bank)->name().c_str(), -1, 0, replacement); + std::string name = (*bank)->name(); + boost::replace_all (name, "_", " "); patch_bank_menus.push_back( Gtk::Menu_Helpers::MenuElem( |