summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libs/client/PluginModel.cpp2
-rw-r--r--src/libs/engine/Makefile.am2
-rw-r--r--src/libs/gui/ControlGroups.cpp5
-rw-r--r--src/libs/gui/Makefile.am72
-rw-r--r--src/libs/gui/NodeModule.cpp2
-rw-r--r--src/libs/gui/PatchCanvas.cpp9
-rw-r--r--src/libs/gui/PatchCanvas.hpp5
-rw-r--r--src/libs/gui/PortPropertiesWindow.cpp2
-rw-r--r--src/libs/module/Makefile.am1
-rw-r--r--src/libs/module/module.cpp8
10 files changed, 65 insertions, 43 deletions
diff --git a/src/libs/client/PluginModel.cpp b/src/libs/client/PluginModel.cpp
index 886a2fa6..1e6729d6 100644
--- a/src/libs/client/PluginModel.cpp
+++ b/src/libs/client/PluginModel.cpp
@@ -24,8 +24,10 @@
namespace Ingen {
namespace Client {
+#ifdef HAVE_SLV2
SLV2World PluginModel::_slv2_world = NULL;
SLV2Plugins PluginModel::_slv2_plugins = NULL;
+#endif
string
diff --git a/src/libs/engine/Makefile.am b/src/libs/engine/Makefile.am
index aafb18b6..d5bbede4 100644
--- a/src/libs/engine/Makefile.am
+++ b/src/libs/engine/Makefile.am
@@ -159,7 +159,7 @@ libingen_engine_la_SOURCES = \
events/UnregisterClientEvent.cpp \
events/UnregisterClientEvent.hpp \
instantiations.cpp \
- jack_compat.hpp \
+ jack_compat.h \
tuning.hpp \
types.hpp \
util.hpp
diff --git a/src/libs/gui/ControlGroups.cpp b/src/libs/gui/ControlGroups.cpp
index d410f201..b22f0a2d 100644
--- a/src/libs/gui/ControlGroups.cpp
+++ b/src/libs/gui/ControlGroups.cpp
@@ -15,6 +15,8 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "../../../config/config.h"
+
#include <cmath>
#include <iostream>
#include <algorithm>
@@ -125,7 +127,7 @@ SliderControlGroup::init(ControlPanel* panel, SharedPtr<PortModel> pm)
}
const SharedPtr<NodeModel> parent = PtrCast<NodeModel>(pm->parent());
-
+#ifdef HAVE_SLV2
if (parent && parent->plugin() && parent->plugin()->type() == PluginModel::LV2) {
min = slv2_port_get_minimum_value(
parent->plugin()->slv2_plugin(),
@@ -136,6 +138,7 @@ SliderControlGroup::init(ControlPanel* panel, SharedPtr<PortModel> pm)
slv2_plugin_get_port_by_symbol(parent->plugin()->slv2_plugin(),
pm->path().name().c_str()));
}
+#endif
if (min > pm->value())
min = pm->value();
diff --git a/src/libs/gui/Makefile.am b/src/libs/gui/Makefile.am
index 13e082b1..3664e151 100644
--- a/src/libs/gui/Makefile.am
+++ b/src/libs/gui/Makefile.am
@@ -33,75 +33,75 @@ libingen_gui_la_LIBADD = \
libingen_gui_la_SOURCES = \
- gui.h \
+ gui.hpp \
gui.cpp \
App.cpp \
- App.h \
- BreadCrumb.h \
+ App.hpp \
+ BreadCrumb.hpp \
BreadCrumbBox.cpp \
- BreadCrumbBox.h \
+ BreadCrumbBox.hpp \
ConfigWindow.cpp \
- ConfigWindow.h \
+ ConfigWindow.hpp \
Configuration.cpp \
- Configuration.h \
+ Configuration.hpp \
ConnectWindow.cpp \
- ConnectWindow.h \
- Connection.h \
+ ConnectWindow.hpp \
+ Connection.hpp \
ControlGroups.cpp \
- ControlGroups.h \
+ ControlGroups.hpp \
ControlPanel.cpp \
- ControlPanel.h \
+ ControlPanel.hpp \
DSSIController.cpp \
- DSSIController.h \
+ DSSIController.hpp \
DSSIModule.cpp \
- DSSIModule.h \
+ DSSIModule.hpp \
GladeFactory.cpp \
- GladeFactory.h \
+ GladeFactory.hpp \
LoadPatchWindow.cpp \
- LoadPatchWindow.h \
+ LoadPatchWindow.hpp \
LoadPluginWindow.cpp \
- LoadPluginWindow.h \
+ LoadPluginWindow.hpp \
LoadRemotePatchWindow.cpp \
- LoadRemotePatchWindow.h \
+ LoadRemotePatchWindow.hpp \
LoadSubpatchWindow.cpp \
- LoadSubpatchWindow.h \
+ LoadSubpatchWindow.hpp \
MessagesWindow.cpp \
- MessagesWindow.h \
+ MessagesWindow.hpp \
NewSubpatchWindow.cpp \
- NewSubpatchWindow.h \
+ NewSubpatchWindow.hpp \
NodeControlWindow.cpp \
- NodeControlWindow.h \
+ NodeControlWindow.hpp \
NodeMenu.cpp \
- NodeMenu.h \
+ NodeMenu.hpp \
NodeModule.cpp \
- NodeModule.h \
+ NodeModule.hpp \
NodePropertiesWindow.cpp \
- NodePropertiesWindow.h \
+ NodePropertiesWindow.hpp \
PatchCanvas.cpp \
- PatchCanvas.h \
+ PatchCanvas.hpp \
PatchPortModule.cpp \
- PatchPortModule.h \
+ PatchPortModule.hpp \
PatchPropertiesWindow.cpp \
- PatchPropertiesWindow.h \
+ PatchPropertiesWindow.hpp \
PatchTreeWindow.cpp \
- PatchTreeWindow.h \
+ PatchTreeWindow.hpp \
PatchView.cpp \
- PatchView.h \
+ PatchView.hpp \
PatchWindow.cpp \
- PatchWindow.h \
+ PatchWindow.hpp \
Port.cpp \
- Port.h \
+ Port.hpp \
PortPropertiesWindow.cpp \
- PortPropertiesWindow.h \
+ PortPropertiesWindow.hpp \
RenameWindow.cpp \
- RenameWindow.h \
+ RenameWindow.hpp \
SubpatchModule.cpp \
- SubpatchModule.h \
+ SubpatchModule.hpp \
ThreadedLoader.cpp \
- ThreadedLoader.h \
+ ThreadedLoader.hpp \
UploadPatchWindow.cpp \
- UploadPatchWindow.h \
+ UploadPatchWindow.hpp \
WindowFactory.cpp \
- WindowFactory.h
+ WindowFactory.hpp
diff --git a/src/libs/gui/NodeModule.cpp b/src/libs/gui/NodeModule.cpp
index b7126dd7..3c319344 100644
--- a/src/libs/gui/NodeModule.cpp
+++ b/src/libs/gui/NodeModule.cpp
@@ -110,6 +110,7 @@ NodeModule::remove_port(SharedPtr<PortModel> port)
void
NodeModule::show_control_window()
{
+#ifdef HAVE_SLV2
if (_node->plugin()->type() == PluginModel::LV2) {
GtkWidget* gui = (GtkWidget*)_node->plugin()->gui();
if (gui) {
@@ -118,6 +119,7 @@ NodeModule::show_control_window()
cerr << "No gui :(\n";
}
}
+#endif
App::instance().window_factory()->present_controls(_node);
}
diff --git a/src/libs/gui/PatchCanvas.cpp b/src/libs/gui/PatchCanvas.cpp
index 8f6b53e9..ae18e0f2 100644
--- a/src/libs/gui/PatchCanvas.cpp
+++ b/src/libs/gui/PatchCanvas.cpp
@@ -15,7 +15,6 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "../../../../config/config.h"
#include "module/module.h"
#include <cassert>
@@ -94,7 +93,9 @@ PatchCanvas::PatchCanvas(SharedPtr<PatchModel> patch, int width, int height)
sigc::bind(sigc::mem_fun(this, &PatchCanvas::menu_add_port),
"osc_output", "ingen:osc", true));
+#ifdef HAVE_SLV2
build_plugin_menu();
+#endif
// Connect to model signals to track state
_patch->new_node_sig.connect(sigc::mem_fun(this, &PatchCanvas::add_node));
@@ -111,13 +112,13 @@ PatchCanvas::PatchCanvas(SharedPtr<PatchModel> patch, int width, int height)
}
+#ifdef HAVE_SLV2
size_t
PatchCanvas::build_plugin_class_menu(Gtk::Menu* menu,
SLV2PluginClass plugin_class, SLV2PluginClasses classes)
{
size_t num_items = 0;
-#ifdef HAVE_SLV2
// Add submenus
for (unsigned i=0; i < slv2_plugin_classes_size(classes); ++i) {
SLV2PluginClass c = slv2_plugin_classes_get_at(classes, i);
@@ -152,7 +153,6 @@ PatchCanvas::build_plugin_class_menu(Gtk::Menu* menu,
++num_items;
}
}
-#endif
return num_items;
}
@@ -161,7 +161,6 @@ PatchCanvas::build_plugin_class_menu(Gtk::Menu* menu,
void
PatchCanvas::build_plugin_menu()
{
-#ifdef HAVE_SLV2
_menu->items().push_back(Gtk::Menu_Helpers::ImageMenuElem("Plugin",
*(manage(new Gtk::Image(Gtk::Stock::EXECUTE, Gtk::ICON_SIZE_MENU)))));
Gtk::MenuItem* plugin_menu_item = &(_menu->items().back());
@@ -173,8 +172,8 @@ PatchCanvas::build_plugin_menu()
SLV2PluginClasses classes = slv2_world_get_plugin_classes(PluginModel::slv2_world());
build_plugin_class_menu(plugin_menu, lv2_plugin, classes);
-#endif
}
+#endif
void
diff --git a/src/libs/gui/PatchCanvas.hpp b/src/libs/gui/PatchCanvas.hpp
index 06126334..6eba024a 100644
--- a/src/libs/gui/PatchCanvas.hpp
+++ b/src/libs/gui/PatchCanvas.hpp
@@ -18,6 +18,8 @@
#ifndef PATCHCANVAS_H
#define PATCHCANVAS_H
+#include "../../../../config/config.h"
+
#include <string>
#include <map>
#include <boost/shared_ptr.hpp>
@@ -86,9 +88,12 @@ private:
void menu_new_patch();
void menu_load_patch();
void load_plugin(SharedPtr<PluginModel> plugin);
+
+#ifdef HAVE_SLV2
void build_plugin_menu();
size_t build_plugin_class_menu(Gtk::Menu* menu,
SLV2PluginClass plugin_class, SLV2PluginClasses classes);
+#endif
MetadataMap get_initial_data();
diff --git a/src/libs/gui/PortPropertiesWindow.cpp b/src/libs/gui/PortPropertiesWindow.cpp
index e3afad5b..3ca1b2c3 100644
--- a/src/libs/gui/PortPropertiesWindow.cpp
+++ b/src/libs/gui/PortPropertiesWindow.cpp
@@ -76,6 +76,7 @@ PortPropertiesWindow::init(ControlGroup* control, SharedPtr<PortModel> pm)
const SharedPtr<NodeModel> parent = PtrCast<NodeModel>(pm->parent());
+#ifdef HAVE_SLV2
if (parent && parent->plugin() && parent->plugin()->type() == PluginModel::LV2) {
min = slv2_port_get_minimum_value(
parent->plugin()->slv2_plugin(),
@@ -86,6 +87,7 @@ PortPropertiesWindow::init(ControlGroup* control, SharedPtr<PortModel> pm)
slv2_plugin_get_port_by_symbol(parent->plugin()->slv2_plugin(),
pm->path().name().c_str()));
}
+#endif
if (max <= min)
max = min + 1.0f;
diff --git a/src/libs/module/Makefile.am b/src/libs/module/Makefile.am
index 7f5865db..17e2c5fb 100644
--- a/src/libs/module/Makefile.am
+++ b/src/libs/module/Makefile.am
@@ -7,5 +7,6 @@ libingen_module_la_LIBADD = @RAUL_LIBS@ @GLIBMM_LIBS@
libingen_module_la_SOURCES = \
module.h \
module.cpp \
+ World.hpp \
Module.hpp \
Module.cpp
diff --git a/src/libs/module/module.cpp b/src/libs/module/module.cpp
index 25c68c67..7f1741df 100644
--- a/src/libs/module/module.cpp
+++ b/src/libs/module/module.cpp
@@ -18,6 +18,11 @@
#include "module.h"
#include "World.hpp"
+#include "../../../../config/config.h"
+#ifdef HAVE_SLV2
+#include <slv2/slv2.h>
+#endif
+
namespace Ingen {
namespace Shared {
@@ -40,7 +45,10 @@ get_world()
void
destroy_world()
{
+#ifdef HAVE_SLV2
slv2_world_free(world->slv2_world);
+#endif
+
delete world;
}