summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/ardour/configuration_variable.h3
-rw-r--r--libs/ardour/ardour/utils.h2
-rw-r--r--libs/ardour/midi_clock_slave.cc1
-rw-r--r--libs/ardour/mute_master.cc3
-rw-r--r--libs/ardour/utils.cc20
-rw-r--r--libs/pbd/convert.cc20
-rw-r--r--libs/pbd/pbd/convert.h2
-rw-r--r--libs/surfaces/mackie/pot.h19
-rw-r--r--libs/surfaces/mackie/wscript1
9 files changed, 47 insertions, 24 deletions
diff --git a/libs/ardour/ardour/configuration_variable.h b/libs/ardour/ardour/configuration_variable.h
index da8fc1b9a1..a7fe8def48 100644
--- a/libs/ardour/ardour/configuration_variable.h
+++ b/libs/ardour/ardour/configuration_variable.h
@@ -24,6 +24,7 @@
#include <sstream>
#include "pbd/xml++.h"
+#include "pbd/convert.h"
#include "ardour/types.h"
#include "ardour/utils.h"
@@ -153,7 +154,7 @@ class ConfigVariable<bool> : public ConfigVariableBase
}
void set_from_string (std::string const & s) {
- value = string_is_affirmative (s);
+ value = PBD::string_is_affirmative (s);
}
protected:
diff --git a/libs/ardour/ardour/utils.h b/libs/ardour/ardour/utils.h
index 52b7c3053e..7eba3fa18c 100644
--- a/libs/ardour/ardour/utils.h
+++ b/libs/ardour/ardour/utils.h
@@ -32,8 +32,6 @@
#include <CoreFoundation/CoreFoundation.h>
#endif /* __APPLE__ */
-bool string_is_affirmative (const std::string&);
-
#include "ardour/ardour.h"
#include "ardour/data_type.h"
#include "ardour/dB.h"
diff --git a/libs/ardour/midi_clock_slave.cc b/libs/ardour/midi_clock_slave.cc
index 892bc800ff..87ea05738d 100644
--- a/libs/ardour/midi_clock_slave.cc
+++ b/libs/ardour/midi_clock_slave.cc
@@ -26,6 +26,7 @@
#include "pbd/error.h"
#include "pbd/failed_constructor.h"
#include "pbd/pthread_utils.h"
+#include "pbd/convert.h"
#include "midi++/port.h"
diff --git a/libs/ardour/mute_master.cc b/libs/ardour/mute_master.cc
index a58bb8a421..9f2ed08dab 100644
--- a/libs/ardour/mute_master.cc
+++ b/libs/ardour/mute_master.cc
@@ -20,6 +20,7 @@
#include "pbd/enumwriter.h"
#include "pbd/xml++.h"
+#include "pbd/convert.h"
#include "ardour/types.h"
#include "ardour/mute_master.h"
@@ -144,7 +145,7 @@ MuteMaster::set_state (const XMLNode& node, int /*version*/)
}
if ((prop = node.property ("muted")) != 0) {
- _muted_by_self = string_is_affirmative (prop->value());
+ _muted_by_self = PBD::string_is_affirmative (prop->value());
} else {
_muted_by_self = (_mute_point != MutePoint (0));
}
diff --git a/libs/ardour/utils.cc b/libs/ardour/utils.cc
index 4933cd7e5c..beb003e713 100644
--- a/libs/ardour/utils.cc
+++ b/libs/ardour/utils.cc
@@ -627,26 +627,6 @@ bool_as_string (bool yn)
return (yn ? "yes" : "no");
}
-bool
-string_is_affirmative (const std::string& str)
-{
- /* to be used only with XML data - not intended to handle user input */
-
- if (str.empty ()) {
- return false;
- }
-
- /* the use of g_strncasecmp() is solely to get around issues with
- * charsets posed by trying to use C++ for the same
- * comparison. switching a std::string to its lower- or upper-case
- * version has several issues, but handled by default
- * in the way we desire when doing it in C.
- */
-
- return str == "1" || str == "y" || str == "Y" || (!g_strncasecmp(str.c_str(), "yes", str.length())) ||
- (!g_strncasecmp(str.c_str(), "true", str.length()));
-}
-
const char*
native_header_format_extension (HeaderFormat hf, const DataType& type)
{
diff --git a/libs/pbd/convert.cc b/libs/pbd/convert.cc
index 3d968d0627..07407e2fad 100644
--- a/libs/pbd/convert.cc
+++ b/libs/pbd/convert.cc
@@ -255,6 +255,26 @@ strings_equal_ignore_case (const string& a, const string& b)
return false;
}
+bool
+string_is_affirmative (const std::string& str)
+{
+ /* to be used only with XML data - not intended to handle user input */
+
+ if (str.empty ()) {
+ return false;
+ }
+
+ /* the use of g_strncasecmp() is solely to get around issues with
+ * charsets posed by trying to use C++ for the same
+ * comparison. switching a std::string to its lower- or upper-case
+ * version has several issues, but handled by default
+ * in the way we desire when doing it in C.
+ */
+
+ return str == "1" || str == "y" || str == "Y" || (!g_strncasecmp(str.c_str(), "yes", str.length())) ||
+ (!g_strncasecmp(str.c_str(), "true", str.length()));
+}
+
/** A wrapper for dgettext that takes a msgid of the form Context|Text.
* If Context|Text is translated, the translation is returned, otherwise
* just Text is returned. Useful for getting translations of words or phrases
diff --git a/libs/pbd/pbd/convert.h b/libs/pbd/pbd/convert.h
index 937b5a7a9d..fec0248157 100644
--- a/libs/pbd/pbd/convert.h
+++ b/libs/pbd/pbd/convert.h
@@ -53,6 +53,8 @@ to_string (T t, std::ios_base & (*f)(std::ios_base&))
return oss.str();
}
+bool string_is_affirmative (const std::string&);
+
const char *
sgettext (const char *, const char *);
diff --git a/libs/surfaces/mackie/pot.h b/libs/surfaces/mackie/pot.h
index 5e9ca6e682..ad700be906 100644
--- a/libs/surfaces/mackie/pot.h
+++ b/libs/surfaces/mackie/pot.h
@@ -1,3 +1,22 @@
+/*
+ Copyright (C) 2006,2007 John Anderson
+ Copyright (C) 2012 Paul Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
#ifndef __ardour_mackie_control_protocol_pot_h__
#define __ardour_mackie_control_protocol_pot_h__
diff --git a/libs/surfaces/mackie/wscript b/libs/surfaces/mackie/wscript
index b7712865d5..6cf60e842c 100644
--- a/libs/surfaces/mackie/wscript
+++ b/libs/surfaces/mackie/wscript
@@ -23,6 +23,7 @@ def build(bld):
obj.source = '''
button.cc
controls.cc
+ device_info.cc
fader.cc
gui.cc
interface.cc