summaryrefslogtreecommitdiff
path: root/gtk2_ardour/session_dialog.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-04-28 14:32:37 +0200
committerRobin Gareus <robin@gareus.org>2017-04-28 14:32:37 +0200
commitecda1a8f55b537d6c5d1f1197361d4f2c4660102 (patch)
tree49884ce4c6c30ef2c156154234f050a57695f67b /gtk2_ardour/session_dialog.cc
parent695a74e2a81b0f92a283ebe47236859448e7ebb3 (diff)
Allow "remove from recent" only for top-level
Diffstat (limited to 'gtk2_ardour/session_dialog.cc')
-rw-r--r--gtk2_ardour/session_dialog.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/gtk2_ardour/session_dialog.cc b/gtk2_ardour/session_dialog.cc
index 3205e11d53..61e34a6ebf 100644
--- a/gtk2_ardour/session_dialog.cc
+++ b/gtk2_ardour/session_dialog.cc
@@ -1244,11 +1244,16 @@ SessionDialog::recent_context_mennu (GdkEventButton *ev)
return;
}
+ Gtk::TreeModel::Path tpath = recent_session_model->get_path(iter);
+ const bool is_child = tpath.up () && tpath.up ();
+
Gtk::Menu* m = manage (new Menu);
MenuList& items = m->items ();
items.push_back (MenuElem (s));
- items.push_back (SeparatorElem());
- items.push_back (MenuElem (_("Remove from recent"), sigc::mem_fun (*this, &SessionDialog::recent_remove_selected)));
+ if (!is_child) {
+ items.push_back (SeparatorElem());
+ items.push_back (MenuElem (_("Remove session from recent list"), sigc::mem_fun (*this, &SessionDialog::recent_remove_selected)));
+ }
m->popup (ev->button, ev->time);
}