From 8d0581a720dd73c7714289ae8db12455c6f5c8c7 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 8 May 2010 01:20:33 +0000 Subject: 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 --- libs/ardour/ardour/audio_playlist_importer.h | 6 ++--- libs/ardour/ardour/export_failed.h | 10 +-------- libs/ardour/ardour/monitor_processor.h | 18 +-------------- libs/ardour/ardour/session_object.h | 2 -- libs/ardour/audio_playlist_importer.cc | 7 ++++++ libs/ardour/export_failed.cc | 33 ++++++++++++++++++++++++++++ libs/ardour/export_handler.cc | 2 ++ libs/ardour/monitor_processor.cc | 20 +++++++++++++++++ libs/ardour/session_object.cc | 2 ++ libs/ardour/wscript | 1 + 10 files changed, 69 insertions(+), 32 deletions(-) create mode 100755 libs/ardour/export_failed.cc (limited to 'libs/ardour') 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 #include -#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& polarity; MPControl& soloed; - ChannelRecord (uint32_t chn) : current_gain(1.0) - , cut_ptr (new MPControl (1.0, string_compose (_("cut control %1"), chn), PBD::Controllable::GainLike)) - , dim_ptr (new MPControl (false, string_compose (_("dim control"), chn), PBD::Controllable::Toggle)) - , polarity_ptr (new MPControl (1.0, string_compose (_("polarity control"), chn), PBD::Controllable::Toggle)) - , soloed_ptr (new MPControl (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 _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(); } + +MonitorProcessor::ChannelRecord::ChannelRecord (uint32_t chn) + : current_gain (1.0) + , cut_ptr (new MPControl (1.0, string_compose (_("cut control %1"), chn), PBD::Controllable::GainLike)) + , dim_ptr (new MPControl (false, string_compose (_("dim control"), chn), PBD::Controllable::Toggle)) + , polarity_ptr (new MPControl (1.0, string_compose (_("polarity control"), chn), PBD::Controllable::Toggle)) + , soloed_ptr (new MPControl (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', -- cgit v1.2.3