Introduce a macro for imprecise configurations
[ardour.git] / libs / ardour / rc_configuration.cc
index 9fdd6aa1ad606639f900c0b20920d9c8f0719a6b..7fc2f5105b6755ed7906c0d1d7f9f781c1e417f1 100644 (file)
 #include <cstdio> /* for snprintf, grrr */
 
 #include <glib.h>
-#include <glib/gstdio.h> /* for g_stat() */
+#include "pbd/gstdio_compat.h"
 #include <glibmm/miscutils.h>
 
 #include "pbd/xml++.h"
 #include "pbd/file_utils.h"
+#include "pbd/replace_all.h"
 
 #include "ardour/audioengine.h"
 #include "ardour/control_protocol_manager.h"
@@ -35,7 +36,7 @@
 #include "ardour/rc_configuration.h"
 #include "ardour/session_metadata.h"
 
-#include "i18n.h"
+#include "pbd/i18n.h"
 
 using namespace ARDOUR;
 using namespace std;
@@ -88,7 +89,7 @@ RCConfiguration::load_state ()
                }
 
                if (statbuf.st_size != 0) {
-                       info << string_compose (_("Loading system configuration file %1"), rcfile) << endl;
+                       info << string_compose (_("Loading system configuration file %1"), rcfile) << endmsg;
 
                        XMLTree tree;
                        if (!tree.read (rcfile.c_str())) {
@@ -116,7 +117,7 @@ RCConfiguration::load_state ()
                }
 
                if (statbuf.st_size != 0) {
-                       info << string_compose (_("Loading user configuration file %1"), rcfile) << endl;
+                       info << string_compose (_("Loading user configuration file %1"), rcfile) << endmsg;
 
                        XMLTree tree;
                        if (!tree.read (rcfile)) {
@@ -171,7 +172,7 @@ XMLNode&
 RCConfiguration::get_state ()
 {
        XMLNode* root;
-       LocaleGuard lg (X_("C"));
+       LocaleGuard lg;
 
        root = new XMLNode("Ardour");
 
@@ -192,7 +193,7 @@ XMLNode&
 RCConfiguration::get_variables ()
 {
        XMLNode* node;
-       LocaleGuard lg (X_("C"));
+       LocaleGuard lg;
 
        node = new XMLNode ("Config");
 
@@ -219,6 +220,7 @@ RCConfiguration::set_state (const XMLNode& root, int version)
        XMLNodeList nlist = root.children();
        XMLNodeConstIterator niter;
        XMLNode *node;
+       LocaleGuard lg;
 
        Stateful::save_extra_xml (root);