summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-05-08 01:20:33 +0000
committerCarl Hetherington <carl@carlh.net>2010-05-08 01:20:33 +0000
commit8d0581a720dd73c7714289ae8db12455c6f5c8c7 (patch)
tree0b9024b067f5abe53088c04f779531f72f95f271 /libs
parent129ace60e24aa7b5297563d389edbae1d70a3a80 (diff)
Remove use of i18n macros in headers. Prevents our gettext.h being included before libintl.h, which causes failures when ENABLE_NLS is not defined (bug #3111)
git-svn-id: svn://localhost/ardour2/branches/3.0@7081 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/ardour/audio_playlist_importer.h6
-rw-r--r--libs/ardour/ardour/export_failed.h10
-rw-r--r--libs/ardour/ardour/monitor_processor.h18
-rw-r--r--libs/ardour/ardour/session_object.h2
-rw-r--r--libs/ardour/audio_playlist_importer.cc7
-rwxr-xr-xlibs/ardour/export_failed.cc33
-rw-r--r--libs/ardour/export_handler.cc2
-rw-r--r--libs/ardour/monitor_processor.cc20
-rw-r--r--libs/ardour/session_object.cc2
-rw-r--r--libs/ardour/wscript1
-rw-r--r--libs/pbd/pbd/sequence_property.h20
11 files changed, 78 insertions, 43 deletions
diff --git a/libs/ardour/ardour/audio_playlist_importer.h b/libs/ardour/ardour/audio_playlist_importer.h
index 5ab8ae9b26..9b3abfc33d 100644
--- a/libs/ardour/ardour/audio_playlist_importer.h
+++ b/libs/ardour/ardour/audio_playlist_importer.h
@@ -32,8 +32,6 @@
#include "ardour/element_import_handler.h"
#include "ardour/types.h"
-#include "i18n.h"
-
namespace ARDOUR {
class AudioRegionImportHandler;
@@ -63,8 +61,8 @@ class UnusedAudioPlaylistImportHandler : public AudioPlaylistImportHandler
{
public:
UnusedAudioPlaylistImportHandler (XMLTree const & source, Session & session, AudioRegionImportHandler & region_handler) :
- AudioPlaylistImportHandler (source, session, region_handler, X_("UnusedPlaylists")) { }
- std::string get_info () const { return _("Audio Playlists (unused)"); }
+ AudioPlaylistImportHandler (source, session, region_handler, "UnusedPlaylists") { }
+ std::string get_info () const;
};
class AudioPlaylistImporter : public ElementImporter
diff --git a/libs/ardour/ardour/export_failed.h b/libs/ardour/ardour/export_failed.h
index 37f572f345..16687826b1 100644
--- a/libs/ardour/ardour/export_failed.h
+++ b/libs/ardour/ardour/export_failed.h
@@ -23,9 +23,6 @@
#include <exception>
#include <string>
-#include "pbd/error.h"
-
-#include "i18n.h"
namespace ARDOUR
{
@@ -33,12 +30,7 @@ namespace ARDOUR
class ExportFailed : public std::exception
{
public:
- ExportFailed (std::string const & reason)
- : reason (reason.c_str())
- {
- PBD::error << string_compose (_("Export failed: %1"), reason) << endmsg;
- }
-
+ ExportFailed (std::string const &);
~ExportFailed () throw() { }
const char* what() const throw()
diff --git a/libs/ardour/ardour/monitor_processor.h b/libs/ardour/ardour/monitor_processor.h
index 8b8e90573d..4bf399c16a 100644
--- a/libs/ardour/ardour/monitor_processor.h
+++ b/libs/ardour/ardour/monitor_processor.h
@@ -178,23 +178,7 @@ class MonitorProcessor : public Processor
MPControl<gain_t>& polarity;
MPControl<bool>& soloed;
- ChannelRecord (uint32_t chn) : current_gain(1.0)
- , cut_ptr (new MPControl<gain_t> (1.0, string_compose (_("cut control %1"), chn), PBD::Controllable::GainLike))
- , dim_ptr (new MPControl<bool> (false, string_compose (_("dim control"), chn), PBD::Controllable::Toggle))
- , polarity_ptr (new MPControl<gain_t> (1.0, string_compose (_("polarity control"), chn), PBD::Controllable::Toggle))
- , soloed_ptr (new MPControl<bool> (false, string_compose (_("solo control"), chn), PBD::Controllable::Toggle))
-
- , cut_control (cut_ptr)
- , dim_control (dim_ptr)
- , polarity_control (polarity_ptr)
- , soloed_control (soloed_ptr)
-
- , cut (*cut_ptr)
- , dim (*dim_ptr)
- , polarity (*polarity_ptr)
- , soloed (*soloed_ptr)
-
- {}
+ ChannelRecord (uint32_t);
};
std::vector<ChannelRecord*> _channels;
diff --git a/libs/ardour/ardour/session_object.h b/libs/ardour/ardour/session_object.h
index 715ffa0e0e..08d5e242f8 100644
--- a/libs/ardour/ardour/session_object.h
+++ b/libs/ardour/ardour/session_object.h
@@ -28,8 +28,6 @@
#include "ardour/ardour.h"
#include "ardour/session_handle.h"
-#include "i18n.h"
-
namespace ARDOUR {
namespace Properties {
diff --git a/libs/ardour/audio_playlist_importer.cc b/libs/ardour/audio_playlist_importer.cc
index 3f773fc0a9..681f563e68 100644
--- a/libs/ardour/audio_playlist_importer.cc
+++ b/libs/ardour/audio_playlist_importer.cc
@@ -32,6 +32,8 @@
#include "ardour/playlist_factory.h"
#include "ardour/session_playlists.h"
+#include "i18n.h"
+
using namespace std;
using namespace PBD;
using namespace ARDOUR;
@@ -252,3 +254,8 @@ AudioPlaylistImporter::populate_region_list ()
}
}
+string
+UnusedAudioPlaylistImportHandler::get_info () const
+{
+ return _("Audio Playlists (unused)");
+}
diff --git a/libs/ardour/export_failed.cc b/libs/ardour/export_failed.cc
new file mode 100755
index 0000000000..97f2ee56ac
--- /dev/null
+++ b/libs/ardour/export_failed.cc
@@ -0,0 +1,33 @@
+/*
+ Copyright (C) 2008 Paul Davis
+ Author: Sakari Bergen
+
+ 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.
+
+*/
+
+#include "pbd/error.h"
+#include "ardour/export_failed.h"
+
+#include "i18n.h"
+
+using namespace std;
+using namespace ARDOUR;
+
+ExportFailed::ExportFailed (string const & reason)
+ : reason (reason.c_str())
+{
+ PBD::error << string_compose (_("Export failed: %1"), reason) << endmsg;
+}
diff --git a/libs/ardour/export_handler.cc b/libs/ardour/export_handler.cc
index 7893d8143c..988b9588a8 100644
--- a/libs/ardour/export_handler.cc
+++ b/libs/ardour/export_handler.cc
@@ -35,6 +35,8 @@
#include "ardour/export_filename.h"
#include "ardour/export_failed.h"
+#include "i18n.h"
+
using namespace std;
using namespace PBD;
diff --git a/libs/ardour/monitor_processor.cc b/libs/ardour/monitor_processor.cc
index 80ed2b8e5d..6faf46a64d 100644
--- a/libs/ardour/monitor_processor.cc
+++ b/libs/ardour/monitor_processor.cc
@@ -510,3 +510,23 @@ MonitorProcessor::channel_solo_control (uint32_t chn) const
}
return boost::shared_ptr<Controllable>();
}
+
+MonitorProcessor::ChannelRecord::ChannelRecord (uint32_t chn)
+ : current_gain (1.0)
+ , cut_ptr (new MPControl<gain_t> (1.0, string_compose (_("cut control %1"), chn), PBD::Controllable::GainLike))
+ , dim_ptr (new MPControl<bool> (false, string_compose (_("dim control"), chn), PBD::Controllable::Toggle))
+ , polarity_ptr (new MPControl<gain_t> (1.0, string_compose (_("polarity control"), chn), PBD::Controllable::Toggle))
+ , soloed_ptr (new MPControl<bool> (false, string_compose (_("solo control"), chn), PBD::Controllable::Toggle))
+
+ , cut_control (cut_ptr)
+ , dim_control (dim_ptr)
+ , polarity_control (polarity_ptr)
+ , soloed_control (soloed_ptr)
+
+ , cut (*cut_ptr)
+ , dim (*dim_ptr)
+ , polarity (*polarity_ptr)
+ , soloed (*soloed_ptr)
+{
+
+}
diff --git a/libs/ardour/session_object.cc b/libs/ardour/session_object.cc
index b85a145ac0..b15771c986 100644
--- a/libs/ardour/session_object.cc
+++ b/libs/ardour/session_object.cc
@@ -21,6 +21,8 @@
#include "ardour/session_object.h"
#include "ardour/debug.h"
+#include "i18n.h"
+
using namespace ARDOUR;
using namespace PBD;
using namespace std;
diff --git a/libs/ardour/wscript b/libs/ardour/wscript
index 1aceb24e56..d12ab3cc94 100644
--- a/libs/ardour/wscript
+++ b/libs/ardour/wscript
@@ -80,6 +80,7 @@ libardour_sources = [
'event_type_map.cc',
'export_channel.cc',
'export_channel_configuration.cc',
+ 'export_failed.cc',
'export_filename.cc',
'export_format_base.cc',
'export_format_manager.cc',
diff --git a/libs/pbd/pbd/sequence_property.h b/libs/pbd/pbd/sequence_property.h
index 875ae622b7..e55d3336cf 100644
--- a/libs/pbd/pbd/sequence_property.h
+++ b/libs/pbd/pbd/sequence_property.h
@@ -31,8 +31,6 @@
#include "pbd/id.h"
#include "pbd/property_basics.h"
-#include "i18n.h"
-
namespace PBD {
/** A base class for properties whose state is a container of other
@@ -83,23 +81,23 @@ class SequenceProperty : public PropertyBase
if (!_change.added.empty()) {
for (typename ChangeContainer::iterator i = _change.added.begin(); i != _change.added.end(); ++i) {
- XMLNode* add_node = new XMLNode (X_("Add"));
+ XMLNode* add_node = new XMLNode ("Add");
child->add_child_nocopy (*add_node);
- add_node->add_property (X_("id"), (*i)->id().to_s());
+ add_node->add_property ("id", (*i)->id().to_s());
}
}
if (!_change.removed.empty()) {
for (typename ChangeContainer::iterator i = _change.removed.begin(); i != _change.removed.end(); ++i) {
- XMLNode* remove_node = new XMLNode (X_("Remove"));
+ XMLNode* remove_node = new XMLNode ("Remove");
child->add_child_nocopy (*remove_node);
- remove_node->add_property (X_("id"), (*i)->id().to_s());
+ remove_node->add_property ("id", (*i)->id().to_s());
}
}
}
bool set_state_from_owner_state (XMLNode const& owner_state) {
- XMLProperty const* n = owner_state.property (X_("name"));
+ XMLProperty const* n = owner_state.property ("name");
if (!n) {
return false;
@@ -111,10 +109,10 @@ class SequenceProperty : public PropertyBase
for (XMLNodeList::const_iterator c = children.begin(); c != children.end(); ++c) {
- if ((*c)->name() == X_("Added")) {
+ if ((*c)->name() == "Added") {
const XMLNodeList& grandchildren = (*c)->children();
for (XMLNodeList::const_iterator gc = grandchildren.begin(); gc != grandchildren.end(); ++gc) {
- const XMLProperty* prop = (*gc)->property (X_("id"));
+ const XMLProperty* prop = (*gc)->property ("id");
if (prop) {
typename Container::value_type v = lookup_id (PBD::ID (prop->value()));
if (v) {
@@ -122,10 +120,10 @@ class SequenceProperty : public PropertyBase
}
}
}
- } else if ((*c)->name() == X_("Removed")) {
+ } else if ((*c)->name() == "Removed") {
const XMLNodeList& grandchildren = (*c)->children();
for (XMLNodeList::const_iterator gc = grandchildren.begin(); gc != grandchildren.end(); ++gc) {
- const XMLProperty* prop = (*gc)->property (X_("id"));
+ const XMLProperty* prop = (*gc)->property ("id");
if (prop) {
typename Container::value_type v = lookup_id (PBD::ID (prop->value()));
if (v) {