Move 'poor_mans_glob()' into libpbd
authorJohn Emmas <johne53@tiscali.co.uk>
Mon, 9 Mar 2015 18:29:26 +0000 (18:29 +0000)
committerJohn Emmas <johne53@tiscali.co.uk>
Mon, 9 Mar 2015 18:32:55 +0000 (18:32 +0000)
gtk2_ardour/option_editor.cc
gtk2_ardour/session_dialog.cc
gtk2_ardour/startup.cc
libs/pbd/MSVCpbd/pbd.vcproj
libs/pbd/pbd/replace_all.h
libs/pbd/strreplace.cc

index a7fb86deda4138505349b1e59439d79eb7486b54..d49f8a3be0372864ab8d52691baa7205956cb4a3 100644 (file)
@@ -41,13 +41,6 @@ using namespace Gtk;
 using namespace Gtkmm2ext;
 using namespace ARDOUR;
 
-static string poor_mans_glob (string path)
-{
-       string copy = path;
-       replace_all (copy, "~", Glib::get_home_dir());
-       return copy;
-}
-
 void
 OptionEditorComponent::add_widget_to_page (OptionEditorPage* p, Gtk::Widget* w)
 {
index 27c5d0e4a0bbba2c0c7850d98832694d0216948a..ed369d346ec1b3cc52e81f0eed34fa053e0eca20 100644 (file)
@@ -57,13 +57,6 @@ using namespace PBD;
 using namespace ARDOUR;
 using namespace ARDOUR_UI_UTILS;
 
-static string poor_mans_glob (string path)
-{
-       string copy = path;
-       replace_all (copy, "~", Glib::get_home_dir());
-       return copy;
-}
-
 SessionDialog::SessionDialog (bool require_new, const std::string& session_name, const std::string& session_path, const std::string& template_name, bool cancel_not_quit)
        : ArdourDialog (_("Session Setup"), true, true)
        , new_only (require_new)
index 4e073bf2f1d38af324eecb6a5799981ef0c0b7c6..54d988ec03e8ea35992a83ea3689b94e18444e8c 100644 (file)
@@ -60,13 +60,6 @@ using namespace ARDOUR_UI_UTILS;
 
 ArdourStartup* ArdourStartup::the_startup = 0;
 
-static string poor_mans_glob (string path)
-{
-       string copy = path;
-       replace_all (copy, "~", Glib::get_home_dir());
-       return copy;
-}
-
 ArdourStartup::ArdourStartup ()
        : _response (RESPONSE_OK)
        , config_modified (false)
index 72d525d0b7b2183fb5988000a5f899f231bd27d3..e9260495e8702f6037d2bd527d479037b25c9952 100644 (file)
                                RelativePath="..\pbd\receiver.h"
                                >
                        </File>
+                       <File
+                               RelativePath="..\pbd\replace_all.h"
+                               >
+                       </File>
                        <File
                                RelativePath="..\pbd\resource.h"
                                >
index e7fcc1e0ce695d26214ff1b20e3c69b555851af0..f769bcb3fbb4d775af070923712dde8c74abf66d 100644 (file)
@@ -25,5 +25,6 @@
 #include "pbd/libpbd_visibility.h"
 
 LIBPBD_API int replace_all (std::string& str, const std::string& target, const std::string& replacement);
+LIBPBD_API std::string poor_mans_glob (std::string path);
 
 #endif // __pbd_replace_all_h__
index 5d36608b3bdda4272f420f947717b00d9f614658..e043b9f54e9cb5b15a744ea5cd64ee3fef358917 100644 (file)
@@ -18,6 +18,7 @@
 */
 
 #include "pbd/replace_all.h"
+#include "glibmm/miscutils.h"
 
 int
 replace_all (std::string& str,
@@ -36,3 +37,11 @@ replace_all (std::string& str,
        return cnt;
 }
 
+std::string
+poor_mans_glob (std::string path)
+{
+       std::string copy = path;
+       replace_all (copy, "~", Glib::get_home_dir());
+       return copy;
+}
+