indicate read-only scripts

This commit is contained in:
Robin Gareus 2016-04-11 14:58:42 +02:00
parent baf6319613
commit 957a18f635
1 changed files with 9 additions and 1 deletions

View File

@ -567,8 +567,16 @@ LuaWindow::rebuild_menu ()
items_scratch.push_back(elem);
}
items_scratch.push_back(SeparatorElem());
for (ScriptBufferList::const_iterator i = script_buffers.begin (); i != script_buffers.end (); ++i) {
Menu_Helpers::MenuElem elem = Gtk::Menu_Helpers::MenuElem((*i)->name,
std::string name;
if ((*i)->flags & Buffer_ReadOnly) {
name = "[R] " + (*i)->name;
} else {
name = (*i)->name;
}
Menu_Helpers::MenuElem elem = Gtk::Menu_Helpers::MenuElem(name,
sigc::bind(sigc::mem_fun(*this, &LuaWindow::script_selection_changed), (*i), false));
if ((*i)->flags & Buffer_Scratch) {