summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-07-25 16:22:02 +0100
committerCarl Hetherington <cth@carlh.net>2019-07-25 16:22:02 +0100
commit4b1c869f2139bcc0ad2163646d04e0d787cf8a32 (patch)
tree4ded6ada358365bc90753a3a39202d08dae7fd1c /src
parent57f112a2bd073123a686141be6c16ba997349056 (diff)
Hack to allow OS X to find timeline icons when running from the source tree.
Diffstat (limited to 'src')
-rw-r--r--src/wx/timeline_dialog.cc16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/wx/timeline_dialog.cc b/src/wx/timeline_dialog.cc
index 80686dc17..3a720cfec 100644
--- a/src/wx/timeline_dialog.cc
+++ b/src/wx/timeline_dialog.cc
@@ -96,7 +96,21 @@ TimelineDialog::TimelineDialog (ContentPanel* cp, shared_ptr<Film> film, weak_pt
wxString
TimelineDialog::bitmap_path (string name)
{
- boost::filesystem::path p = shared_path() / String::compose("%1.png", 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());
}