summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/NodeModule.cpp9
-rw-r--r--src/gui/NodeModule.hpp1
-rw-r--r--src/gui/PatchCanvas.cpp2
-rw-r--r--src/gui/PatchPortModule.cpp1
-rw-r--r--src/gui/Port.cpp9
-rw-r--r--src/gui/Port.hpp1
6 files changed, 21 insertions, 2 deletions
diff --git a/src/gui/NodeModule.cpp b/src/gui/NodeModule.cpp
index 420bcb28..f30e2fc4 100644
--- a/src/gui/NodeModule.cpp
+++ b/src/gui/NodeModule.cpp
@@ -78,6 +78,15 @@ NodeModule::~NodeModule()
}
bool
+NodeModule::on_click(GdkEventButton* ev)
+{
+ if (ev->button == 3) {
+ return show_menu(ev);
+ }
+ return false;
+}
+
+bool
NodeModule::show_menu(GdkEventButton* ev)
{
WidgetFactory::get_widget_derived("object_menu", _menu);
diff --git a/src/gui/NodeModule.hpp b/src/gui/NodeModule.hpp
index 60b4cb86..c0cf3ec5 100644
--- a/src/gui/NodeModule.hpp
+++ b/src/gui/NodeModule.hpp
@@ -69,6 +69,7 @@ public:
protected:
NodeModule(PatchCanvas& canvas, SharedPtr<const NodeModel> node);
+ bool on_click(GdkEventButton* ev);
void on_double_click(GdkEventButton* ev);
void show_control_window();
diff --git a/src/gui/PatchCanvas.cpp b/src/gui/PatchCanvas.cpp
index 9e8b232b..af68bbae 100644
--- a/src/gui/PatchCanvas.cpp
+++ b/src/gui/PatchCanvas.cpp
@@ -145,7 +145,7 @@ PatchCanvas::PatchCanvas(App& app,
}
void
-PatchCanvas::show_menu(bool position, unsigned button, uint32_t time)
+PatchCanvas::show_menu(bool position, unsigned button, uint32_t time)
{
if (!_internal_menu)
build_menus();
diff --git a/src/gui/PatchPortModule.cpp b/src/gui/PatchPortModule.cpp
index 51669f6d..670de9e9 100644
--- a/src/gui/PatchPortModule.cpp
+++ b/src/gui/PatchPortModule.cpp
@@ -79,7 +79,6 @@ PatchPortModule::app() const
bool
PatchPortModule::show_menu(GdkEventButton* ev)
{
- std::cout << "PPM SHOW MENU" << std::endl;
return _port->show_menu(ev);
}
diff --git a/src/gui/Port.cpp b/src/gui/Port.cpp
index a7153ff3..dc7d0254 100644
--- a/src/gui/Port.cpp
+++ b/src/gui/Port.cpp
@@ -162,6 +162,15 @@ Port::on_event(GdkEvent* ev)
break;
}
+ return Object::on_event(ev);
+}
+
+bool
+Port::on_click(GdkEventButton* ev)
+{
+ if (ev->button == 3) {
+ return show_menu(ev);
+ }
return false;
}
diff --git a/src/gui/Port.hpp b/src/gui/Port.hpp
index 8a8d901f..e63401d5 100644
--- a/src/gui/Port.hpp
+++ b/src/gui/Port.hpp
@@ -74,6 +74,7 @@ private:
void property_changed(const Raul::URI& key, const Raul::Atom& value);
bool on_event(GdkEvent* ev);
+ bool on_click(GdkEventButton* ev);
void moved();
//static ArtVpathDash* _dash;