Change bitmap_path to take a full name with extension.
authorCarl Hetherington <cth@carlh.net>
Thu, 7 Jul 2022 13:20:03 +0000 (15:20 +0200)
committerCarl Hetherington <cth@carlh.net>
Wed, 20 Jul 2022 08:25:54 +0000 (10:25 +0200)
src/tools/dcpomatic_playlist.cc
src/tools/dcpomatic_server.cc
src/wx/config_dialog.cc
src/wx/config_dialog.h
src/wx/full_config_dialog.cc
src/wx/timeline_dialog.cc
src/wx/video_panel.cc
src/wx/wx_util.cc

index bf958b9f79e3fb80aec5f5c9e459d9c652eae98c..dea8e81d5b84b6204e51ee0fefbca05552684261 100644 (file)
@@ -282,8 +282,8 @@ public:
                auto images = new wxImageList (16, 16);
                wxIcon tick_icon;
                wxIcon no_tick_icon;
-               tick_icon.LoadFile (bitmap_path("tick"), wxBITMAP_TYPE_PNG);
-               no_tick_icon.LoadFile (bitmap_path("no_tick"), wxBITMAP_TYPE_PNG);
+               tick_icon.LoadFile (bitmap_path("tick.png"), wxBITMAP_TYPE_PNG);
+               no_tick_icon.LoadFile (bitmap_path("no_tick.png"), wxBITMAP_TYPE_PNG);
                images->Add (tick_icon);
                images->Add (no_tick_icon);
 
index 6cf0a9609d518ddfb2970627abc216286e90607e..fe70ec6f716dade9aaa3f19b4cce98baea2101e6 100644 (file)
@@ -243,7 +243,7 @@ public:
 #else
                string const colour = gui_is_dark() ? "white" : "black";
                wxBitmap bitmap (
-                       bitmap_path(String::compose("dcpomatic_small_%1", colour)),
+                       bitmap_path(String::compose("dcpomatic_small_%1.png", colour)),
                        wxBITMAP_TYPE_PNG
                        );
                wxIcon icon;
index bae2050af881f04f2d6edc1f904438e16d84ccec..ddf565180697185a6076ceab11899c12ab949565 100644 (file)
@@ -1053,7 +1053,7 @@ LocationsPage::GetName () const
 wxBitmap
 LocationsPage::GetLargeIcon () const
 {
-       return wxBitmap(bitmap_path("locations"), wxBITMAP_TYPE_PNG);
+       return wxBitmap(bitmap_path("locations.png"), wxBITMAP_TYPE_PNG);
 }
 #endif
 
index 3e71cb11ad75c75345c8e7553cc9a1a6691d3376..c767929f75f76fc9558bade2ca846b890e3e3620 100644 (file)
@@ -88,7 +88,7 @@ public:
 #ifdef DCPOMATIC_OSX
        wxBitmap GetLargeIcon () const override
        {
-               return wxBitmap(bitmap_path("general"), wxBITMAP_TYPE_PNG);
+               return wxBitmap(bitmap_path("general.png"), wxBITMAP_TYPE_PNG);
        }
 #endif
 
@@ -166,7 +166,7 @@ public:
 #ifdef DCPOMATIC_OSX
        wxBitmap GetLargeIcon () const override
        {
-               return wxBitmap(bitmap_path("keys"), wxBITMAP_TYPE_PNG);
+               return wxBitmap(bitmap_path("keys.png"), wxBITMAP_TYPE_PNG);
        }
 #endif
 
@@ -197,7 +197,7 @@ public:
 #ifdef DCPOMATIC_OSX
        wxBitmap GetLargeIcon () const override
        {
-               return wxBitmap(bitmap_path("sound"), wxBITMAP_TYPE_PNG);
+               return wxBitmap(bitmap_path("sound.png"), wxBITMAP_TYPE_PNG);
        }
 #endif
 
index 8554af5b989495163ffc8bd1f6bdab250d894317..bb804cae876c837951e387db26de934118c5a9be 100644 (file)
@@ -257,7 +257,7 @@ public:
 #ifdef DCPOMATIC_OSX
        wxBitmap GetLargeIcon () const override
        {
-               return wxBitmap(bitmap_path("defaults"), wxBITMAP_TYPE_PNG);
+               return wxBitmap(bitmap_path("defaults.png"), wxBITMAP_TYPE_PNG);
        }
 #endif
 
@@ -615,7 +615,7 @@ public:
 #ifdef DCPOMATIC_OSX
        wxBitmap GetLargeIcon () const override
        {
-               return wxBitmap(bitmap_path("servers"), wxBITMAP_TYPE_PNG);
+               return wxBitmap(bitmap_path("servers.png"), wxBITMAP_TYPE_PNG);
        }
 #endif
 
@@ -678,7 +678,7 @@ public:
 #ifdef DCPOMATIC_OSX
        wxBitmap GetLargeIcon () const override
        {
-               return wxBitmap(bitmap_path("tms"), wxBITMAP_TYPE_PNG);
+               return wxBitmap(bitmap_path("tms.png"), wxBITMAP_TYPE_PNG);
        }
 #endif
 
@@ -789,7 +789,7 @@ public:
 #ifdef DCPOMATIC_OSX
        wxBitmap GetLargeIcon () const override
        {
-               return wxBitmap(bitmap_path("email"), wxBITMAP_TYPE_PNG);
+               return wxBitmap(bitmap_path("email.png"), wxBITMAP_TYPE_PNG);
        }
 #endif
 
@@ -961,7 +961,7 @@ public:
 #ifdef DCPOMATIC_OSX
        wxBitmap GetLargeIcon () const override
        {
-               return wxBitmap(bitmap_path("kdm_email"), wxBITMAP_TYPE_PNG);
+               return wxBitmap(bitmap_path("kdm_email.png"), wxBITMAP_TYPE_PNG);
        }
 #endif
 
@@ -1086,7 +1086,7 @@ public:
 #ifdef DCPOMATIC_OSX
        wxBitmap GetLargeIcon () const override
        {
-               return wxBitmap(bitmap_path("notifications"), wxBITMAP_TYPE_PNG);
+               return wxBitmap(bitmap_path("notifications.png"), wxBITMAP_TYPE_PNG);
        }
 #endif
 
@@ -1262,7 +1262,7 @@ public:
 #ifdef DCPOMATIC_OSX
        wxBitmap GetLargeIcon () const override
        {
-               return wxBitmap(bitmap_path("cover_sheet"), wxBITMAP_TYPE_PNG);
+               return wxBitmap(bitmap_path("cover_sheet.png"), wxBITMAP_TYPE_PNG);
        }
 #endif
 
@@ -1321,7 +1321,7 @@ public:
 #ifdef DCPOMATIC_OSX
        wxBitmap GetLargeIcon () const override
        {
-               return wxBitmap(bitmap_path("identifiers"), wxBITMAP_TYPE_PNG);
+               return wxBitmap(bitmap_path("identifiers.png"), wxBITMAP_TYPE_PNG);
        }
 #endif
 
@@ -1439,7 +1439,7 @@ public:
 #ifdef DCPOMATIC_OSX
        wxBitmap GetLargeIcon () const override
        {
-               return wxBitmap(bitmap_path("advanced"), wxBITMAP_TYPE_PNG);
+               return wxBitmap(bitmap_path("advanced.png"), wxBITMAP_TYPE_PNG);
        }
 #endif
 
index c7f057b1ebfacd286aa38cb6ed519a0bfa918803..1c67622c2bffb21858dc405a17afb15fc3fd343d 100644 (file)
@@ -63,11 +63,11 @@ TimelineDialog::TimelineDialog (ContentPanel* cp, shared_ptr<Film> film, weak_pt
 {
        auto sizer = new wxBoxSizer (wxVERTICAL);
 
-       wxBitmap select (bitmap_path("select"), wxBITMAP_TYPE_PNG);
-       wxBitmap zoom (bitmap_path("zoom"), wxBITMAP_TYPE_PNG);
-       wxBitmap zoom_all (bitmap_path("zoom_all"), wxBITMAP_TYPE_PNG);
-       wxBitmap snap (bitmap_path("snap"), wxBITMAP_TYPE_PNG);
-       wxBitmap sequence (bitmap_path("sequence"), wxBITMAP_TYPE_PNG);
+       wxBitmap select (bitmap_path("select.png"), wxBITMAP_TYPE_PNG);
+       wxBitmap zoom (bitmap_path("zoom.png"), wxBITMAP_TYPE_PNG);
+       wxBitmap zoom_all (bitmap_path("zoom_all.png"), wxBITMAP_TYPE_PNG);
+       wxBitmap snap (bitmap_path("snap.png"), wxBITMAP_TYPE_PNG);
+       wxBitmap sequence (bitmap_path("sequence.png"), wxBITMAP_TYPE_PNG);
 
        _toolbar = new wxToolBar (this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTB_HORIZONTAL);
        _toolbar->SetMargins (4, 4);
index 83c29611d74c6a9acc6ac62a395be0c573809edf..e866c59a7fcdef5f3968c23058e59f724effc229 100644 (file)
@@ -127,7 +127,7 @@ VideoPanel::create ()
                );
 
        _left_right_link = new wxToggleButton (this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(link_width, link_height));
-       _left_right_link->SetBitmap (wxBitmap(bitmap_path("link"), wxBITMAP_TYPE_PNG));
+       _left_right_link->SetBitmap (wxBitmap(bitmap_path("link.png"), wxBITMAP_TYPE_PNG));
 
        _right_crop_label = create_label (this, _("Right"), true);
        _right_crop = new ContentSpinCtrl<VideoContent> (
@@ -152,7 +152,7 @@ VideoPanel::create ()
                );
 
        _top_bottom_link = new wxToggleButton (this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(link_width, link_height));
-       _top_bottom_link->SetBitmap (wxBitmap(bitmap_path("link"), wxBITMAP_TYPE_PNG));
+       _top_bottom_link->SetBitmap (wxBitmap(bitmap_path("link.png"), wxBITMAP_TYPE_PNG));
 
        _bottom_crop_label = create_label (this, _("Bottom"), true);
        _bottom_crop = new ContentSpinCtrl<VideoContent> (
index 55de4b1c706286b9503bb868fca3cbb4439a378f..e94f3e512acf03322be4f09032a09d0147cceb1b 100644 (file)
@@ -517,7 +517,7 @@ maybe_show_splash ()
        wxSplashScreen* splash = nullptr;
        try {
                wxBitmap bitmap;
-               if (bitmap.LoadFile(bitmap_path("splash"), wxBITMAP_TYPE_PNG)) {
+               if (bitmap.LoadFile(bitmap_path("splash.png"), wxBITMAP_TYPE_PNG)) {
                        {
                                /* This wxMemoryDC must be destroyed before bitmap can be used elsewhere */
                                wxMemoryDC dc(bitmap);
@@ -646,7 +646,7 @@ bitmap_path (string name)
        base = resources_path();
 #endif
 
-       auto p = base / String::compose("%1.png", name);
+       auto p = base / name;
        return std_to_wx (p.string());
 }