summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libs/gui/Makefile.am10
-rw-r--r--src/libs/gui/PatchWindow.cpp4
-rw-r--r--src/libs/gui/WindowFactory.cpp12
3 files changed, 21 insertions, 5 deletions
diff --git a/src/libs/gui/Makefile.am b/src/libs/gui/Makefile.am
index fcfb50aa..a1e070cd 100644
--- a/src/libs/gui/Makefile.am
+++ b/src/libs/gui/Makefile.am
@@ -29,7 +29,6 @@ libingen_gui_la_LIBADD = \
../module/libingen_module.la \
../client/libingen_client.la
-
libingen_gui_la_SOURCES = \
gui.hpp \
gui.cpp \
@@ -99,9 +98,14 @@ libingen_gui_la_SOURCES = \
SubpatchModule.hpp \
ThreadedLoader.cpp \
ThreadedLoader.hpp \
- UploadPatchWindow.cpp \
- UploadPatchWindow.hpp \
WindowFactory.cpp \
WindowFactory.hpp
+
+if WITH_CURL
+libingen_gui_la_SOURCES += \
+ UploadPatchWindow.cpp \
+ UploadPatchWindow.hpp
+endif
+
diff --git a/src/libs/gui/PatchWindow.cpp b/src/libs/gui/PatchWindow.cpp
index de551f2d..6260221d 100644
--- a/src/libs/gui/PatchWindow.cpp
+++ b/src/libs/gui/PatchWindow.cpp
@@ -126,6 +126,10 @@ PatchWindow::PatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glad
_breadcrumb_box = new BreadCrumbBox();
_breadcrumb_box->signal_patch_selected.connect(sigc::mem_fun(this, &PatchWindow::set_patch_from_path));
+
+#ifndef HAVE_CURL
+ _menu_upload->hide();
+#endif
}
diff --git a/src/libs/gui/WindowFactory.cpp b/src/libs/gui/WindowFactory.cpp
index 456cdb04..096bb9df 100644
--- a/src/libs/gui/WindowFactory.cpp
+++ b/src/libs/gui/WindowFactory.cpp
@@ -15,6 +15,7 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include CONFIG_H_PATH
#include "WindowFactory.hpp"
#include "App.hpp"
#include "PatchWindow.hpp"
@@ -25,10 +26,12 @@
#include "LoadPluginWindow.hpp"
#include "LoadPatchWindow.hpp"
#include "LoadRemotePatchWindow.hpp"
-#include "UploadPatchWindow.hpp"
#include "LoadSubpatchWindow.hpp"
#include "RenameWindow.hpp"
#include "NewSubpatchWindow.hpp"
+#ifdef HAVE_CURL
+#include "UploadPatchWindow.hpp"
+#endif
namespace Ingen {
namespace GUI {
@@ -49,12 +52,15 @@ WindowFactory::WindowFactory()
xml->get_widget_derived("load_plugin_win", _load_plugin_win);
xml->get_widget_derived("load_patch_win", _load_patch_win);
xml->get_widget_derived("load_remote_patch_win", _load_remote_patch_win);
- xml->get_widget_derived("upload_patch_win", _upload_patch_win);
xml->get_widget_derived("new_subpatch_win", _new_subpatch_win);
xml->get_widget_derived("load_subpatch_win", _load_subpatch_win);
xml->get_widget_derived("node_properties_win", _node_properties_win);
xml->get_widget_derived("patch_properties_win", _patch_properties_win);
xml->get_widget_derived("rename_win", _rename_win);
+
+#ifdef HAVE_CURL
+ xml->get_widget_derived("upload_patch_win", _upload_patch_win);
+#endif
}
@@ -286,12 +292,14 @@ WindowFactory::present_load_remote_patch(SharedPtr<PatchModel> patch, MetadataMa
void
WindowFactory::present_upload_patch(SharedPtr<PatchModel> patch)
{
+#ifdef HAVE_CURL
PatchWindowMap::iterator w = _patch_windows.find(patch->path());
if (w != _patch_windows.end())
_upload_patch_win->set_transient_for(*w->second);
_upload_patch_win->present(patch);
+#endif
}