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
This commit is contained in:
Carl Hetherington 2010-05-08 01:20:33 +00:00
parent 129ace60e2
commit 8d0581a720
27 changed files with 136 additions and 71 deletions

View file

@ -174,6 +174,12 @@ BundleEditorMatrix::list_is_global (int dim) const
return (dim == OTHER);
}
string
BundleEditorMatrix::disassociation_verb () const
{
return _("Disassociate");
}
BundleEditor::BundleEditor (Session* session, boost::shared_ptr<UserBundle> bundle)
: ArdourDialog (_("Edit Bundle")), _matrix (this, session, bundle), _bundle (bundle)
{

View file

@ -25,7 +25,6 @@
#include <gtkmm/entry.h>
#include "ardour_dialog.h"
#include "port_matrix.h"
#include "i18n.h"
namespace ARDOUR {
class Session;
@ -50,9 +49,7 @@ class BundleEditorMatrix : public PortMatrix
void setup_ports (int);
bool list_is_global (int) const;
std::string disassociation_verb () const {
return _("Disassociate");
}
std::string disassociation_verb () const;
private:
enum {

View file

@ -58,7 +58,7 @@ using namespace Gtk;
void
Editor::export_audio ()
{
ExportDialog dialog (*this);
ExportDialog dialog (*this, _("Export"));
dialog.set_session (_session);
dialog.run();
}

View file

@ -4976,7 +4976,7 @@ Editor::set_fade_length (bool in)
nframes64_t pos = get_preferred_edit_position();
nframes64_t len;
char* cmd;
char const * cmd;
if (pos > rv->region()->last_frame() || pos < rv->region()->first_frame()) {
/* edit point is outside the relevant region */
@ -6192,7 +6192,8 @@ Editor::do_insert_time ()
return;
}
InsertTimeOption opt;
/* only setting this to keep GCC quiet */
InsertTimeOption opt = LeaveIntersected;
switch (intersected_combo.get_active_row_number ()) {
case 0:

View file

@ -29,6 +29,8 @@
#include "export_dialog.h"
#include "gui_thread.h"
#include "i18n.h"
using namespace ARDOUR;
using namespace PBD;

View file

@ -34,8 +34,6 @@
#include <gtkmm.h>
#include "i18n.h"
namespace ARDOUR {
class ExportStatus;
class ExportHandler;
@ -48,7 +46,7 @@ class ExportDialog : public ArdourDialog {
public:
explicit ExportDialog (PublicEditor & editor, Glib::ustring title = _("Export"));
explicit ExportDialog (PublicEditor & editor, Glib::ustring title);
~ExportDialog ();
void set_session (ARDOUR::Session* s);

View file

@ -165,3 +165,16 @@ GlobalPortMatrixWindow::on_show ()
pair<uint32_t, uint32_t> const pm_max = _port_matrix.max_size ();
resize_window_to_proportion_of_monitor (this, pm_max.first, pm_max.second);
}
string
GlobalPortMatrix::disassociation_verb () const
{
return _("Disconnect");
}
string
GlobalPortMatrix::channel_noun () const
{
return _("port");
}

View file

@ -24,7 +24,6 @@
#include "port_matrix.h"
#include "port_group.h"
#include "ardour_dialog.h"
#include "i18n.h"
class GlobalPortMatrix : public PortMatrix
{
@ -36,13 +35,8 @@ public:
void set_state (ARDOUR::BundleChannel c[2], bool);
PortMatrixNode::State get_state (ARDOUR::BundleChannel c[2]) const;
std::string disassociation_verb () const {
return _("Disconnect");
}
std::string channel_noun () const {
return _("port");
}
std::string disassociation_verb () const;
std::string channel_noun () const;
bool list_is_global (int) const {
return true;

View file

@ -157,6 +157,18 @@ IOSelector::list_is_global (int dim) const
return (dim == _other);
}
string
IOSelector::disassociation_verb () const
{
return _("Disconnect");
}
string
IOSelector::channel_noun () const
{
return _("port");
}
IOSelectorWindow::IOSelectorWindow (ARDOUR::Session* session, boost::shared_ptr<ARDOUR::IO> io, bool /*can_cancel*/)
: _selector (this, session, io)
{

View file

@ -22,7 +22,6 @@
#include "ardour_dialog.h"
#include "port_matrix.h"
#include "i18n.h"
namespace ARDOUR {
class PortInsert;
@ -36,13 +35,8 @@ class IOSelector : public PortMatrix
void set_state (ARDOUR::BundleChannel c[2], bool);
PortMatrixNode::State get_state (ARDOUR::BundleChannel c[2]) const;
std::string disassociation_verb () const {
return _("Disconnect");
}
std::string channel_noun () const {
return _("port");
}
std::string disassociation_verb () const;
std::string channel_noun () const;
uint32_t n_io_ports () const;
boost::shared_ptr<ARDOUR::IO> const io () { return _io; }

View file

@ -840,3 +840,9 @@ PortMatrix::port_connected_or_disconnected ()
{
_body->rebuild_and_draw_grid ();
}
string
PortMatrix::channel_noun () const
{
return _("channel");
}

View file

@ -35,7 +35,6 @@
#include "port_group.h"
#include "port_matrix_types.h"
#include "i18n.h"
/** The `port matrix' UI. This is a widget which lets the user alter
* associations between one set of ports and another. e.g. to connect
@ -146,7 +145,7 @@ public:
}
virtual void rename_channel (ARDOUR::BundleChannel) {}
virtual std::string disassociation_verb () const = 0;
virtual std::string channel_noun () const { return _("channel"); }
virtual std::string channel_noun () const;
enum Result {
Cancelled,

View file

@ -28,6 +28,8 @@
#include "port_matrix_row_labels.h"
#include "port_matrix_grid.h"
#include "i18n.h"
using namespace std;
PortMatrixBody::PortMatrixBody (PortMatrix* p)

View file

@ -25,6 +25,8 @@
#include "port_matrix_body.h"
#include "utils.h"
#include "i18n.h"
using namespace std;
PortMatrixColumnLabels::PortMatrixColumnLabels (PortMatrix* m, PortMatrixBody* b)

View file

@ -30,6 +30,8 @@
#include "ardour_ui.h"
#include "gui_thread.h"
#include "i18n.h"
using namespace std;
using namespace ARDOUR;
using namespace PBD;

View file

@ -30,6 +30,8 @@
#include "ardour_ui.h"
#include "gui_thread.h"
#include "i18n.h"
using namespace std;
using namespace ARDOUR;
using namespace PBD;

View file

@ -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

View file

@ -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()

View file

@ -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;

View file

@ -28,8 +28,6 @@
#include "ardour/ardour.h"
#include "ardour/session_handle.h"
#include "i18n.h"
namespace ARDOUR {
namespace Properties {

View file

@ -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)");
}

33
libs/ardour/export_failed.cc Executable file
View file

@ -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;
}

View file

@ -35,6 +35,8 @@
#include "ardour/export_filename.h"
#include "ardour/export_failed.h"
#include "i18n.h"
using namespace std;
using namespace PBD;

View file

@ -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)
{
}

View file

@ -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;

View file

@ -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',

View file

@ -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) {