From f2d901fe0424bafa39b794117c9547e4969017c6 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 4 Mar 2010 20:34:05 +0000 Subject: 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 --- src/gui/PatchWindow.cpp | 31 +++++++------------------------ 1 file changed, 7 insertions(+), 24 deletions(-) (limited to 'src/gui/PatchWindow.cpp') 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("" "A bundle named \"%1%\" already exists. Replace it?" "") % 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); } -- cgit v1.2.1