add "remove from favorites" context menu
This commit is contained in:
parent
9b7352f35f
commit
47922c5d19
@ -2343,18 +2343,19 @@ Mixer_UI::popup_note_context_menu (GdkEventButton *ev)
|
|||||||
|
|
||||||
if (_selection.routes.empty()) {
|
if (_selection.routes.empty()) {
|
||||||
items.push_back (MenuElem (_("No Track/Bus is selected.")));
|
items.push_back (MenuElem (_("No Track/Bus is selected.")));
|
||||||
m->popup (ev->button, ev->time);
|
} else {
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
items.push_back (MenuElem (_("Add at the top"),
|
items.push_back (MenuElem (_("Add at the top"),
|
||||||
sigc::bind (sigc::mem_fun (*this, &Mixer_UI::add_selected_processor), AddTop)));
|
sigc::bind (sigc::mem_fun (*this, &Mixer_UI::add_selected_processor), AddTop)));
|
||||||
items.push_back (MenuElem (_("Add Pre-Fader"),
|
items.push_back (MenuElem (_("Add Pre-Fader"),
|
||||||
sigc::bind (sigc::mem_fun (*this, &Mixer_UI::add_selected_processor), AddPreFader)));
|
sigc::bind (sigc::mem_fun (*this, &Mixer_UI::add_selected_processor), AddPreFader)));
|
||||||
items.push_back (MenuElem (_("Add Post-Fader"),
|
items.push_back (MenuElem (_("Add Post-Fader"),
|
||||||
sigc::bind (sigc::mem_fun (*this, &Mixer_UI::add_selected_processor), AddPostFader)));
|
sigc::bind (sigc::mem_fun (*this, &Mixer_UI::add_selected_processor), AddPostFader)));
|
||||||
items.push_back (MenuElem (_("Add at the end"),
|
items.push_back (MenuElem (_("Add at the end"),
|
||||||
sigc::bind (sigc::mem_fun (*this, &Mixer_UI::add_selected_processor), AddBottom)));
|
sigc::bind (sigc::mem_fun (*this, &Mixer_UI::add_selected_processor), AddBottom)));
|
||||||
|
}
|
||||||
|
items.push_back (SeparatorElem());
|
||||||
|
items.push_back (MenuElem (_("Remove from favorites"), sigc::mem_fun (*this, &Mixer_UI::remove_selected_from_favorites)));
|
||||||
m->popup (ev->button, ev->time);
|
m->popup (ev->button, ev->time);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2382,6 +2383,26 @@ Mixer_UI::add_selected_processor (ProcessorPosition pos)
|
|||||||
add_favorite_processor (ppp, pos);
|
add_favorite_processor (ppp, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Mixer_UI::remove_selected_from_favorites ()
|
||||||
|
{
|
||||||
|
Glib::RefPtr<Gtk::TreeView::Selection> selection = favorite_plugins_display.get_selection();
|
||||||
|
if (!selection) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Gtk::TreeModel::iterator iter = selection->get_selected();
|
||||||
|
if (!iter) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
ARDOUR::PluginPresetPtr ppp = (*iter)[favorite_plugins_columns.plugin];
|
||||||
|
PluginManager::PluginStatusType status = PluginManager::Normal;
|
||||||
|
PluginManager& manager (PluginManager::instance());
|
||||||
|
|
||||||
|
manager.set_status (ppp->_pip->type, ppp->_pip->unique_id, status);
|
||||||
|
manager.save_statuses ();
|
||||||
|
sync_treeview_from_favorite_order ();
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Mixer_UI::plugin_row_activated (const TreeModel::Path& path, TreeViewColumn* column)
|
Mixer_UI::plugin_row_activated (const TreeModel::Path& path, TreeViewColumn* column)
|
||||||
{
|
{
|
||||||
|
@ -211,6 +211,7 @@ class Mixer_UI : public Gtk::Window, public PBD::ScopedConnectionList, public AR
|
|||||||
|
|
||||||
void add_selected_processor (ProcessorPosition);
|
void add_selected_processor (ProcessorPosition);
|
||||||
void add_favorite_processor (ARDOUR::PluginPresetPtr, ProcessorPosition);
|
void add_favorite_processor (ARDOUR::PluginPresetPtr, ProcessorPosition);
|
||||||
|
void remove_selected_from_favorites ();
|
||||||
|
|
||||||
void initial_track_display ();
|
void initial_track_display ();
|
||||||
void show_track_list_menu ();
|
void show_track_list_menu ();
|
||||||
|
Loading…
Reference in New Issue
Block a user