mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-26 16:37:44 +01:00
add right-click menu option to recall snap
This commit is contained in:
parent
584a6c334b
commit
ce7021283f
2 changed files with 9 additions and 1 deletions
|
|
@ -195,8 +195,9 @@ void MixerSnapshotDialog::popup_context_menu(int btn, int64_t time, string path)
|
|||
using namespace Menu_Helpers;
|
||||
MenuList& items(menu.items());
|
||||
items.clear();
|
||||
add_item_with_sensitivity(items, MenuElem(_("Remove"), sigc::bind(sigc::mem_fun(*this, &MixerSnapshotDialog::remove_snapshot), path)), true);
|
||||
add_item_with_sensitivity(items, MenuElem(_("Recall"), sigc::bind(sigc::mem_fun(*this, &MixerSnapshotDialog::load_snapshot), path)), true);
|
||||
add_item_with_sensitivity(items, MenuElem(_("Rename..."), sigc::bind(sigc::mem_fun(*this, &MixerSnapshotDialog::rename_snapshot), path)), true);
|
||||
add_item_with_sensitivity(items, MenuElem(_("Remove"), sigc::bind(sigc::mem_fun(*this, &MixerSnapshotDialog::remove_snapshot), path)), true);
|
||||
menu.popup(btn, time);
|
||||
}
|
||||
|
||||
|
|
@ -206,6 +207,12 @@ void MixerSnapshotDialog::remove_snapshot(const string path)
|
|||
refill();
|
||||
}
|
||||
|
||||
void MixerSnapshotDialog::load_snapshot(const string path)
|
||||
{
|
||||
MixerSnapshot n = MixerSnapshot(_session, path);
|
||||
n.recall();
|
||||
}
|
||||
|
||||
void MixerSnapshotDialog::rename_snapshot(const string old_path)
|
||||
{
|
||||
string dir_name = Glib::path_get_dirname(old_path);
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ class MixerSnapshotDialog : public ArdourWindow
|
|||
|
||||
void ensure_directory(bool);
|
||||
void new_snapshot(bool);
|
||||
void load_snapshot(const std::string);
|
||||
void new_snap_from_session(bool);
|
||||
|
||||
void rename_snapshot(const std::string);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue