Remove use of i18n macros in headers. Prevents our gettext.h being included before...
authorCarl Hetherington <carl@carlh.net>
Sat, 8 May 2010 01:20:33 +0000 (01:20 +0000)
committerCarl Hetherington <carl@carlh.net>
Sat, 8 May 2010 01:20:33 +0000 (01:20 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@7081 d708f5d6-7413-0410-9779-e7cbd77b26cf

27 files changed:
gtk2_ardour/bundle_manager.cc
gtk2_ardour/bundle_manager.h
gtk2_ardour/editor_export_audio.cc
gtk2_ardour/editor_ops.cc
gtk2_ardour/export_dialog.cc
gtk2_ardour/export_dialog.h
gtk2_ardour/global_port_matrix.cc
gtk2_ardour/global_port_matrix.h
gtk2_ardour/io_selector.cc
gtk2_ardour/io_selector.h
gtk2_ardour/port_matrix.cc
gtk2_ardour/port_matrix.h
gtk2_ardour/port_matrix_body.cc
gtk2_ardour/port_matrix_column_labels.cc
gtk2_ardour/return_ui.cc
gtk2_ardour/send_ui.cc
libs/ardour/ardour/audio_playlist_importer.h
libs/ardour/ardour/export_failed.h
libs/ardour/ardour/monitor_processor.h
libs/ardour/ardour/session_object.h
libs/ardour/audio_playlist_importer.cc
libs/ardour/export_failed.cc [new file with mode: 0755]
libs/ardour/export_handler.cc
libs/ardour/monitor_processor.cc
libs/ardour/session_object.cc
libs/ardour/wscript
libs/pbd/pbd/sequence_property.h

index 559bc7ed6c926188e711d9563230d91a5298c557..ba00cce9d0583b3297e5a90ba9fcf9b7631dd196 100644 (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)
 {
index 4172330cf1bf37fb5d6b6152b81da94156e50c8d..c2c30d47bbcdb32201977de8693271fd055de951 100644 (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 {
index 51c2ef072a7d6b6f29e9ce0737760e01329c78ae..6aa43c8bcf5975267798d7ea68b517badcd8fdc9 100644 (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();
 }
index 8e17999d83a59d51b2f974108d0947b46d0e349b..e5513159b0b38487243785b4220587482f5bcdcb 100644 (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:
index d60e5753c4c6300f17e7f3c82753541ac496181e..ae8e963d9ada39d8561f97e0d1126c9958e0b3ce 100644 (file)
@@ -29,6 +29,8 @@
 #include "export_dialog.h"
 #include "gui_thread.h"
 
+#include "i18n.h"
+
 using namespace ARDOUR;
 using namespace PBD;
 
index 33a983062f5ec96d6295d2cca4626554a627581b..93d3b21654b86c4ba037309a8b5d2c87387317d6 100644 (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);
index ae51e7fb68609c73e8283316434f134d1359c0ba..510d3b3ce3cea99897d60be3a24bebda26eb5f19 100644 (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");
+}
+                
index 8e13866f4227d278979e4eb1ad858d558c78c010..0ce77f74c3d9e35a2ca97bf14ef89e4447171324 100644 (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;
index b4e1af132a6e846fd39c7d8cd98fa7515ab3833c..913fa6dafe4c7629bda9c1cf6b70d93c6488f04a 100644 (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)
 {
index 11454f8531e0228ae208cfc9ab00a0e4a4d4d14d..21bd6a2d3e863c952ad16c3923aa99b0e8339cd8 100644 (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; }
index 88987f03efe7b031e97f2e78227e1e99e5bceedd..73e937e8405b2aead4ac7512de8ba0d95440ccbe 100644 (file)
@@ -840,3 +840,9 @@ PortMatrix::port_connected_or_disconnected ()
 {
        _body->rebuild_and_draw_grid ();
 }
+
+string
+PortMatrix::channel_noun () const
+{
+       return _("channel");
+}
index 0c0a52a1a1ea9ccc2e9d04c43cdd6dca4f3570d4..52e2f1663b15077a97ae9af3dc1c12fd9eb93aff 100644 (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,
index 063eaa8d8a0dcc2550b7ae05622b2e287d402daf..6da2ab87b5d97617e81c68d3133186c67ae72baf 100644 (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)
index 522015548f5b35a967130fdd37cf54c823b0607a..c3b10e289b53a2ab4c6225c2a4b8b01526fc1b21 100644 (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)
index 62762dee44b1d94575fd8590b5db0c3c3a75a373..61fe2291a56ba1f11919e67d7d0d1ab489af46f9 100644 (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;
index a0359a48569da9896bdceced5f85146d0a2f0e5f..3cc17faaea5c2e64087a7fbb9c562472109b6fe8 100644 (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;
index 5ab8ae9b26f5dccf5fefd1866ec2eb9895752922..9b3abfc33da043e0cb31f9d2d381b54d9be5649a 100644 (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
index 37f572f3459484bd9baeebecc0bd5fa15a70c697..16687826b169689317f6fd8a69342156f7876dcb 100644 (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()
index 8b8e90573df3040cb23516d926204cf0a7caac95..4bf399c16a657a9eefde0d0d6747baded1930d46 100644 (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;
index 715ffa0e0e2a6f2a0c5dd7ecf5b9a5658ac91ce2..08d5e242f8c45c6f75d6b8cb1a18e92b4e5323c0 100644 (file)
@@ -28,8 +28,6 @@
 #include "ardour/ardour.h"
 #include "ardour/session_handle.h"
 
-#include "i18n.h"
-
 namespace ARDOUR {
 
 namespace Properties {
index 3f773fc0a98633a7e7d87b3e6b4981d123b27107..681f563e688193aa8de5497eb41adc96012f7b72 100644 (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)");
+}
diff --git a/libs/ardour/export_failed.cc b/libs/ardour/export_failed.cc
new file mode 100755 (executable)
index 0000000..97f2ee5
--- /dev/null
@@ -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;
+}
index 7893d8143cf4cb22d12d3816c728eefa9f9a1427..988b9588a8d5f2a50bc893ee90315d157b834ed3 100644 (file)
@@ -35,6 +35,8 @@
 #include "ardour/export_filename.h"
 #include "ardour/export_failed.h"
 
+#include "i18n.h"
+
 using namespace std;
 using namespace PBD;
 
index 80ed2b8e5da445aaceb03280d30a12829fe81b06..6faf46a64de858f069d0a069c6092bb4a3c65f62 100644 (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)
+{
+
+}
index b85a145ac039168243b4ca59e8bcc98b0ab7bbcc..b15771c986928985d6d4898795e372a2a25cabf7 100644 (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;
index 1aceb24e56ce95c4986a9b4b08f765671959f398..d12ab3cc94594ce734944fa5909e5b010b81e68a 100644 (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',
index 875ae622b7ee34edefad44c28f8c4805099cc96d..e55d3336cf89767a98f479baaa7c44286473b777 100644 (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) {