summaryrefslogtreecommitdiffstats
path: root/src/gui/PatchView.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-11-27 06:25:35 +0000
committerDavid Robillard <d@drobilla.net>2008-11-27 06:25:35 +0000
commit32ff9b5e6822f4af04c5be4a71b43c5363f58031 (patch)
tree6d8082316d2834521f8d9b6bd8634ea7f5a5c1cc /src/gui/PatchView.cpp
parent6eed83b13188d3cb6c4676d74c589f61e4e853dc (diff)
downloadingen-32ff9b5e6822f4af04c5be4a71b43c5363f58031.tar.gz
ingen-32ff9b5e6822f4af04c5be4a71b43c5363f58031.tar.bz2
ingen-32ff9b5e6822f4af04c5be4a71b43c5363f58031.zip
Replace "modes" with boolean "edit controls" in tooltips etc.
Give edit controls a menu entry. Cleanup toolbar, fix some clashing mnemonics, etc. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1790 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui/PatchView.cpp')
-rw-r--r--src/gui/PatchView.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/PatchView.cpp b/src/gui/PatchView.cpp
index 02e6fc97..deac1b22 100644
--- a/src/gui/PatchView.cpp
+++ b/src/gui/PatchView.cpp
@@ -47,7 +47,6 @@ PatchView::PatchView(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::X
xml->get_widget("patch_view_process_but", _process_but);
xml->get_widget("patch_view_poly_spin", _poly_spin);
xml->get_widget("patch_view_clear_but", _clear_but);
- xml->get_widget("patch_view_destroy_but", _destroy_but);
xml->get_widget("patch_view_refresh_but", _refresh_but);
xml->get_widget("patch_view_save_but", _save_but);
xml->get_widget("patch_view_zoom_full_but", _zoom_full_but);
@@ -78,7 +77,6 @@ PatchView::set_patch(SharedPtr<PatchModel> patch)
_canvas_scrolledwindow->add(*_canvas);
_poly_spin->set_value(patch->poly());
- _destroy_but->set_sensitive(patch->path() != "/");
for (GraphObject::Properties::const_iterator i = patch->properties().begin();
i != patch->properties().end(); ++i)
@@ -149,6 +147,13 @@ void
PatchView::editable_toggled()
{
const bool editable = _edit_mode_but->get_active();
+ set_editable(editable);
+}
+
+
+void
+PatchView::set_editable(bool editable)
+{
_patch->set_editable(editable);
_canvas->lock(!editable);
}