summaryrefslogtreecommitdiffstats
path: root/src/gui/Port.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-01-04 04:37:14 +0000
committerDavid Robillard <d@drobilla.net>2014-01-04 04:37:14 +0000
commit39fd0894a1402f23ce4b5243ec595764aa11625c (patch)
treecb08507d5cf0193d907d0514dbd407b297d866ad /src/gui/Port.cpp
parentbcc0b2d27797d07bf48de1b3a03dea7f878cb2b6 (diff)
downloadingen-39fd0894a1402f23ce4b5243ec595764aa11625c.tar.gz
ingen-39fd0894a1402f23ce4b5243ec595764aa11625c.tar.bz2
ingen-39fd0894a1402f23ce4b5243ec595764aa11625c.zip
Fix documentation pane.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5256 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui/Port.cpp')
-rw-r--r--src/gui/Port.cpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/gui/Port.cpp b/src/gui/Port.cpp
index 92775483..2bdf2e43 100644
--- a/src/gui/Port.cpp
+++ b/src/gui/Port.cpp
@@ -32,6 +32,7 @@
#include "Style.hpp"
#include "WidgetFactory.hpp"
#include "WindowFactory.hpp"
+#include "ingen_config.h"
using namespace Ingen::Client;
using namespace std;
@@ -434,22 +435,27 @@ Port::property_changed(const Raul::URI& key, const Atom& value)
}
}
-void
-Port::set_selected(gboolean b)
+bool
+Port::on_selected(gboolean b)
{
- if (b != get_selected()) {
- Ganv::Port::set_selected(b);
+ if (b) {
SPtr<const PortModel> pm = _port_model.lock();
- if (pm && b) {
+ if (pm) {
SPtr<const BlockModel> block = dynamic_ptr_cast<BlockModel>(pm->parent());
GraphWindow* win = _app.window_factory()->parent_graph_window(block);
if (win && win->documentation_is_visible() && block->plugin_model()) {
+ bool html = false;
+#ifdef HAVE_WEBKIT
+ html = true;
+#endif
const std::string& doc = block->plugin_model()->port_documentation(
- pm->index());
- win->set_documentation(doc, false);
+ pm->index(), html);
+ win->set_documentation(doc, html);
}
}
}
+
+ return true;
}
} // namespace GUI