--- gigedit/trunk/src/gigedit/mainwindow.cpp 2014/04/23 16:39:43 2540 +++ gigedit/trunk/src/gigedit/mainwindow.cpp 2014/04/23 16:49:05 2541 @@ -42,7 +42,7 @@ #include #include "mainwindow.h" - +#include "Settings.h" #include "../../gfx/status_attached.xpm" #include "../../gfx/status_detached.xpm" @@ -182,6 +182,18 @@ sigc::mem_fun(*this, &MainWindow::on_action_remove_instrument) ); + + actionGroup->add(Gtk::Action::create("MenuSettings", _("_Settings"))); + + toggle_action = + Gtk::ToggleAction::create("WarnUserOnExtensions", _("Show warning on format _extensions")); + toggle_action->set_active(Settings::singleton()->warnUserOnExtensions); + actionGroup->add( + toggle_action, + sigc::mem_fun(*this, &MainWindow::on_action_warn_user_on_extensions) + ); + + // sample right-click popup actions actionGroup->add( Gtk::Action::create("SampleProperties", Gtk::Stock::PROPERTIES), @@ -233,6 +245,9 @@ " " " " " " + " " + " " + " " " " " " " " @@ -277,6 +292,11 @@ uiManager->get_widget("/MenuBar/MenuEdit/CopySampleLoop")); item->set_tooltip_text(_("Used when dragging a sample to a region's sample reference field. You may disable this for example if you want to replace an existing sample in a region with a new sample, but don't want that the region's current loop informations to be altered by this action.")); } + { + Gtk::MenuItem* item = dynamic_cast( + uiManager->get_widget("/MenuBar/MenuSettings/WarnUserOnExtensions")); + item->set_tooltip_text(_("If checked, a warning will be shown whenever you try to use a feature which is based on a LinuxSampler extension ontop of the original gig format, which would not work with the Gigasampler/GigaStudio application.")); + } instrument_menu = static_cast( uiManager->get_widget("/MenuBar/MenuInstrument"))->get_submenu(); @@ -954,6 +974,11 @@ propDialog.deiconify(); } +void MainWindow::on_action_warn_user_on_extensions() { + Settings::singleton()->warnUserOnExtensions = + !Settings::singleton()->warnUserOnExtensions; +} + void MainWindow::on_action_help_about() { Gtk::AboutDialog dialog;