mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 15:54:57 +01:00
NO-OP: whitespace
This commit is contained in:
parent
4e005540c6
commit
a6d1890168
1 changed files with 114 additions and 129 deletions
|
|
@ -58,8 +58,7 @@ PatchChange::PatchChange(MidiRegionView& region,
|
||||||
, _patch (patch)
|
, _patch (patch)
|
||||||
, _popup_initialized (false)
|
, _popup_initialized (false)
|
||||||
{
|
{
|
||||||
_flag = new ArdourCanvas::Flag (
|
_flag = new ArdourCanvas::Flag (parent,
|
||||||
parent,
|
|
||||||
height,
|
height,
|
||||||
outline_color,
|
outline_color,
|
||||||
fill_color,
|
fill_color,
|
||||||
|
|
@ -99,35 +98,28 @@ PatchChange::initialize_popup_menus()
|
||||||
const ChannelNameSet::PatchBanks& patch_banks = channel_name_set->patch_banks ();
|
const ChannelNameSet::PatchBanks& patch_banks = channel_name_set->patch_banks ();
|
||||||
|
|
||||||
if (patch_banks.size () > 1) {
|
if (patch_banks.size () > 1) {
|
||||||
|
|
||||||
// fill popup menu:
|
// fill popup menu:
|
||||||
Gtk::Menu::MenuList& patch_bank_menus = _popup.items ();
|
Gtk::Menu::MenuList& patch_bank_menus = _popup.items ();
|
||||||
|
|
||||||
for (ChannelNameSet::PatchBanks::const_iterator bank = patch_banks.begin();
|
for (ChannelNameSet::PatchBanks::const_iterator bank = patch_banks.begin (); bank != patch_banks.end (); ++bank) {
|
||||||
bank != patch_banks.end();
|
|
||||||
++bank) {
|
|
||||||
Glib::RefPtr<Glib::Regex> underscores = Glib::Regex::create ("_");
|
Glib::RefPtr<Glib::Regex> underscores = Glib::Regex::create ("_");
|
||||||
std::string replacement(" ");
|
std::string const& replacement (" ");
|
||||||
|
|
||||||
Gtk::Menu& patch_bank_menu = *manage (new Gtk::Menu ());
|
Gtk::Menu& patch_bank_menu = *manage (new Gtk::Menu ());
|
||||||
|
|
||||||
const PatchNameList& patches = (*bank)->patch_name_list ();
|
const PatchNameList& patches = (*bank)->patch_name_list ();
|
||||||
Gtk::Menu::MenuList& patch_menus = patch_bank_menu.items ();
|
Gtk::Menu::MenuList& patch_menus = patch_bank_menu.items ();
|
||||||
|
|
||||||
for (PatchNameList::const_iterator patch = patches.begin();
|
for (PatchNameList::const_iterator patch = patches.begin (); patch != patches.end (); ++patch) {
|
||||||
patch != patches.end();
|
|
||||||
++patch) {
|
|
||||||
std::string name = underscores->replace ((*patch)->name ().c_str (), -1, 0, replacement);
|
std::string name = underscores->replace ((*patch)->name ().c_str (), -1, 0, replacement);
|
||||||
|
|
||||||
patch_menus.push_back (
|
patch_menus.push_back (
|
||||||
Gtk::Menu_Helpers::MenuElem (
|
Gtk::Menu_Helpers::MenuElem (
|
||||||
name,
|
name,
|
||||||
sigc::bind(
|
sigc::bind (sigc::mem_fun (*this, &PatchChange::on_patch_menu_selected), (*patch)->patch_primary_key ())));
|
||||||
sigc::mem_fun(*this, &PatchChange::on_patch_menu_selected),
|
|
||||||
(*patch)->patch_primary_key())) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::string name = underscores->replace ((*bank)->name ().c_str (), -1, 0, replacement);
|
std::string name = underscores->replace ((*bank)->name ().c_str (), -1, 0, replacement);
|
||||||
|
|
||||||
patch_bank_menus.push_back (
|
patch_bank_menus.push_back (
|
||||||
|
|
@ -170,14 +162,11 @@ PatchChange::event_handler (GdkEvent* ev)
|
||||||
switch (ev->type) {
|
switch (ev->type) {
|
||||||
case GDK_BUTTON_PRESS:
|
case GDK_BUTTON_PRESS:
|
||||||
if (e->current_mouse_mode () == Editing::MouseContent) {
|
if (e->current_mouse_mode () == Editing::MouseContent) {
|
||||||
|
|
||||||
if (Gtkmm2ext::Keyboard::is_delete_event (&ev->button)) {
|
if (Gtkmm2ext::Keyboard::is_delete_event (&ev->button)) {
|
||||||
|
|
||||||
_region.delete_patch_change (this);
|
_region.delete_patch_change (this);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
} else if (Gtkmm2ext::Keyboard::is_edit_event (&ev->button)) {
|
} else if (Gtkmm2ext::Keyboard::is_edit_event (&ev->button)) {
|
||||||
|
|
||||||
_region.edit_patch_change (this);
|
_region.edit_patch_change (this);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
@ -202,14 +191,12 @@ PatchChange::event_handler (GdkEvent* ev)
|
||||||
case GDK_Up:
|
case GDK_Up:
|
||||||
case GDK_KP_Up:
|
case GDK_KP_Up:
|
||||||
case GDK_uparrow:
|
case GDK_uparrow:
|
||||||
_region.step_patch(
|
_region.step_patch (*this, Keyboard::modifier_state_contains (ev->key.state, Keyboard::TertiaryModifier), 1);
|
||||||
*this, Keyboard::modifier_state_contains(ev->key.state, Keyboard::TertiaryModifier), 1);
|
|
||||||
return true;
|
return true;
|
||||||
case GDK_Down:
|
case GDK_Down:
|
||||||
case GDK_KP_Down:
|
case GDK_KP_Down:
|
||||||
case GDK_downarrow:
|
case GDK_downarrow:
|
||||||
_region.step_patch(
|
_region.step_patch (*this, Keyboard::modifier_state_contains (ev->key.state, Keyboard::TertiaryModifier), -1);
|
||||||
*this, Keyboard::modifier_state_contains(ev->key.state, Keyboard::TertiaryModifier), -1);
|
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
@ -228,12 +215,10 @@ PatchChange::event_handler (GdkEvent* ev)
|
||||||
|
|
||||||
case GDK_SCROLL:
|
case GDK_SCROLL:
|
||||||
if (ev->scroll.direction == GDK_SCROLL_UP) {
|
if (ev->scroll.direction == GDK_SCROLL_UP) {
|
||||||
_region.step_patch(
|
_region.step_patch (*this, Keyboard::modifier_state_contains (ev->scroll.state, Keyboard::TertiaryModifier), 1);
|
||||||
*this, Keyboard::modifier_state_contains(ev->scroll.state, Keyboard::TertiaryModifier), 1);
|
|
||||||
return true;
|
return true;
|
||||||
} else if (ev->scroll.direction == GDK_SCROLL_DOWN) {
|
} else if (ev->scroll.direction == GDK_SCROLL_DOWN) {
|
||||||
_region.step_patch(
|
_region.step_patch (*this, Keyboard::modifier_state_contains (ev->scroll.state, Keyboard::TertiaryModifier), -1);
|
||||||
*this, Keyboard::modifier_state_contains(ev->scroll.state, Keyboard::TertiaryModifier), -1);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue