--- gigedit/trunk/src/gigedit/mainwindow.cpp 2015/06/11 20:29:22 2772 +++ gigedit/trunk/src/gigedit/mainwindow.cpp 2015/06/12 17:57:52 2773 @@ -229,6 +229,14 @@ sigc::mem_fun(*this, &MainWindow::on_action_sync_sampler_instrument_selection) ); + toggle_action = + Gtk::ToggleAction::create("MoveRootNoteWithRegionMoved", _("Move root note with region moved")); + toggle_action->set_active(Settings::singleton()->moveRootNoteWithRegionMoved); + actionGroup->add( + toggle_action, + sigc::mem_fun(*this, &MainWindow::on_action_move_root_note_with_region_moved) + ); + actionGroup->add(Gtk::Action::create("MenuTools", _("_Tools"))); @@ -362,6 +370,7 @@ " " " " " " + " " " " " " " " @@ -430,6 +439,11 @@ } { Gtk::MenuItem* item = dynamic_cast( + uiManager->get_widget("/MenuBar/MenuSettings/MoveRootNoteWithRegionMoved")); + item->set_tooltip_text(_("If checked, and when a region is moved by dragging it around on the virtual keyboard, the keybord position dependent pitch will move exactly with the amount of semi tones the region was moved around.")); + } + { + Gtk::MenuItem* item = dynamic_cast( uiManager->get_widget("/MenuBar/MenuSample/RemoveUnusedSamples")); item->set_tooltip_text(_("Removes all samples that are not referenced by any instrument (i.e. red ones).")); // copy tooltip to popup menu @@ -591,6 +605,8 @@ sigc::hide(sigc::mem_fun(*this, &MainWindow::file_changed))); m_RegionChooser.signal_instrument_changed().connect( sigc::mem_fun(*this, &MainWindow::file_changed)); + m_RegionChooser.signal_instrument_changed().connect( + sigc::mem_fun(*this, &MainWindow::region_changed)); m_DimRegionChooser.signal_region_changed().connect( sigc::mem_fun(*this, &MainWindow::file_changed)); instrumentProps.signal_changed().connect( @@ -1423,6 +1439,11 @@ !Settings::singleton()->syncSamplerInstrumentSelection; } +void MainWindow::on_action_move_root_note_with_region_moved() { + Settings::singleton()->moveRootNoteWithRegionMoved = + !Settings::singleton()->moveRootNoteWithRegionMoved; +} + void MainWindow::on_action_help_about() { Gtk::AboutDialog dialog;