summaryrefslogtreecommitdiffstats
path: root/src/gui/PatchWindow.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-03-04 20:34:05 +0000
committerDavid Robillard <d@drobilla.net>2010-03-04 20:34:05 +0000
commitf2d901fe0424bafa39b794117c9547e4969017c6 (patch)
treec33f349bae3d513cfe2bef512d55746e408a1dc7 /src/gui/PatchWindow.cpp
parentcf0be8c26e61218e23aee691bee6f60ead7fe49a (diff)
downloadingen-f2d901fe0424bafa39b794117c9547e4969017c6.tar.gz
ingen-f2d901fe0424bafa39b794117c9547e4969017c6.tar.bz2
ingen-f2d901fe0424bafa39b794117c9547e4969017c6.zip
Fix FlowCanvas key bindings (arrow scrolling and select-connect with enter).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2517 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui/PatchWindow.cpp')
-rw-r--r--src/gui/PatchWindow.cpp31
1 files changed, 7 insertions, 24 deletions
diff --git a/src/gui/PatchWindow.cpp b/src/gui/PatchWindow.cpp
index a9fe62d2..361e525a 100644
--- a/src/gui/PatchWindow.cpp
+++ b/src/gui/PatchWindow.cpp
@@ -472,7 +472,8 @@ PatchWindow::event_save_as()
bool confirm = true;
if (Glib::file_test(filename, Glib::FILE_TEST_IS_DIR)) {
- if (Glib::file_test(filename + "/manifest.ttl", Glib::FILE_TEST_EXISTS)) {
+ if (Glib::file_test(Glib::build_filename(filename, "manifest.ttl"),
+ Glib::FILE_TEST_EXISTS)) {
Gtk::MessageDialog confirm_dialog(*this, (boost::format("<b>"
"A bundle named \"%1%\" already exists. Replace it?"
"</b>") % basename).str(),
@@ -615,30 +616,12 @@ PatchWindow::on_hide()
bool
-PatchWindow::on_key_press_event(GdkEventKey* event)
+PatchWindow::on_event(GdkEvent* event)
{
- bool ret = false;
-
- ret = _view->canvas()->canvas_key_event(event);
-
- if (!ret)
- ret = Gtk::Window::on_key_press_event(event);
-
- return ret;
-}
-
-
-bool
-PatchWindow::on_key_release_event(GdkEventKey* event)
-{
- bool ret = false;
-
- ret = _view->canvas()->canvas_key_event(event);
-
- if (!ret)
- ret = Gtk::Window::on_key_release_event(event);
-
- return ret;
+ if (_view->canvas()->canvas_event(event))
+ return true;
+ else
+ return Gtk::Window::on_event(event);
}