X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Ftimeline_dialog.cc;h=3a720cfecff8ec958d336c139c920bb64bcc6144;hb=5ee3fcbd31065275faad4c06a7805dcbcb338812;hp=80686dc1749b552431d038a19866f9880574b56a;hpb=43b5ff1d2dc872f9029a7e59a85af59dbad8536f;p=dcpomatic.git 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, 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()); }