Move bitmap_path() to wx_util.{cc,h}
authorCarl Hetherington <cth@carlh.net>
Mon, 11 May 2020 22:10:38 +0000 (00:10 +0200)
committerCarl Hetherington <cth@carlh.net>
Tue, 12 May 2020 11:13:36 +0000 (13:13 +0200)
src/wx/timeline_dialog.cc
src/wx/timeline_dialog.h
src/wx/wx_util.cc
src/wx/wx_util.h

index 3a720cfecff8ec958d336c139c920bb64bcc6144..0d0d4f9f98facbe2fcfc33db4c0debb33cbdc419 100644 (file)
@@ -93,27 +93,6 @@ TimelineDialog::TimelineDialog (ContentPanel* cp, shared_ptr<Film> film, weak_pt
        _film_changed_connection = film->Change.connect (bind (&TimelineDialog::film_change, this, _1, _2));
 }
 
        _film_changed_connection = film->Change.connect (bind (&TimelineDialog::film_change, this, _1, _2));
 }
 
-wxString
-TimelineDialog::bitmap_path (string name)
-{
-       boost::filesystem::path base;
-
-#ifdef DCPOMATIC_DEBUG
-       /* Hack to allow OS X to find icons when running from the source tree */
-       char* path = getenv ("DCPOMATIC_GRAPHICS");
-       if (path) {
-               base = path;
-       } else {
-               base = shared_path();
-       }
-#else
-       base = shared_path();
-#endif
-
-       boost::filesystem::path p = base / String::compose("%1.png", name);
-       return std_to_wx (p.string());
-}
-
 void
 TimelineDialog::film_change (ChangeType type, Film::Property p)
 {
 void
 TimelineDialog::film_change (ChangeType type, Film::Property p)
 {
index 62649a5f2a06f7ff1dee71900d09bcc7622857b4..77dfede50c452d69107daf080918cc95b514f0b8 100644 (file)
@@ -35,7 +35,6 @@ public:
 private:
        void film_change (ChangeType type, Film::Property);
        void tool_clicked (wxCommandEvent& id);
 private:
        void film_change (ChangeType type, Film::Property);
        void tool_clicked (wxCommandEvent& id);
-       wxString bitmap_path (std::string name);
 
        boost::weak_ptr<Film> _film;
        Timeline _timeline;
 
        boost::weak_ptr<Film> _film;
        Timeline _timeline;
index 6eef0d14795020f0cab6481e76e98ba9687e6567..f8756549b44bca308ca591cace3c3859a9fea02e 100644 (file)
@@ -567,3 +567,26 @@ get_offsets (vector<Offset>& offsets)
 
        return utc;
 }
 
        return utc;
 }
+
+
+wxString
+bitmap_path (string name)
+{
+       boost::filesystem::path base;
+
+#ifdef DCPOMATIC_DEBUG
+       /* Hack to allow OS X to find icons when running from the source tree */
+       char* path = getenv ("DCPOMATIC_GRAPHICS");
+       if (path) {
+               base = path;
+       } else {
+               base = shared_path();
+       }
+#else
+       base = shared_path();
+#endif
+
+       boost::filesystem::path p = base / String::compose("%1.png", name);
+       return std_to_wx (p.string());
+}
+
index 8e0befba92d606a4da09cb5302c3b691ea19c69d..bff58a3239940b735093f8ad66bd72305d3792d6 100644 (file)
@@ -87,7 +87,7 @@ extern wxSplashScreen* maybe_show_splash ();
 extern double calculate_mark_interval (double start);
 extern bool display_progress (wxString title, wxString task);
 extern bool report_errors_from_last_job (wxWindow* parent);
 extern double calculate_mark_interval (double start);
 extern bool display_progress (wxString title, wxString task);
 extern bool report_errors_from_last_job (wxWindow* parent);
-
+extern wxString bitmap_path (std::string name);
 
 struct Offset
 {
 
 struct Offset
 {