From b8925c349ae62a288f81da657c8c96876d617f0c Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 6 Jun 2021 12:58:25 +0200 Subject: [PATCH] Use bitmap_path() and wxBITMAP_TYPE_PNG (not _RESOURCE) to allow prefs to work with in-tree builds. --- src/wx/config_dialog.cc | 2 +- src/wx/config_dialog.h | 6 +++--- src/wx/full_config_dialog.cc | 18 +++++++++--------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/wx/config_dialog.cc b/src/wx/config_dialog.cc index c018a1251..1bd5036e7 100644 --- a/src/wx/config_dialog.cc +++ b/src/wx/config_dialog.cc @@ -1081,7 +1081,7 @@ LocationsPage::GetName () const wxBitmap LocationsPage::GetLargeIcon () const { - return wxBitmap ("locations", wxBITMAP_TYPE_PNG_RESOURCE); + return wxBitmap(bitmap_path("locations"), wxBITMAP_TYPE_PNG); } #endif diff --git a/src/wx/config_dialog.h b/src/wx/config_dialog.h index dd0e92152..992490927 100644 --- a/src/wx/config_dialog.h +++ b/src/wx/config_dialog.h @@ -84,7 +84,7 @@ public: #ifdef DCPOMATIC_OSX wxBitmap GetLargeIcon () const { - return wxBitmap ("general", wxBITMAP_TYPE_PNG_RESOURCE); + return wxBitmap(bitmap_path("general"), wxBITMAP_TYPE_PNG); } #endif @@ -161,7 +161,7 @@ public: #ifdef DCPOMATIC_OSX wxBitmap GetLargeIcon () const { - return wxBitmap ("keys", wxBITMAP_TYPE_PNG_RESOURCE); + return wxBitmap(bitmap_path("keys"), wxBITMAP_TYPE_PNG); } #endif @@ -191,7 +191,7 @@ public: #ifdef DCPOMATIC_OSX wxBitmap GetLargeIcon () const { - return wxBitmap ("sound", wxBITMAP_TYPE_PNG_RESOURCE); + return wxBitmap(bitmap_path("sound"), wxBITMAP_TYPE_PNG); } #endif diff --git a/src/wx/full_config_dialog.cc b/src/wx/full_config_dialog.cc index e9573b4d3..e83cdac4d 100644 --- a/src/wx/full_config_dialog.cc +++ b/src/wx/full_config_dialog.cc @@ -251,7 +251,7 @@ public: #ifdef DCPOMATIC_OSX wxBitmap GetLargeIcon () const { - return wxBitmap ("defaults", wxBITMAP_TYPE_PNG_RESOURCE); + return wxBitmap(bitmap_path("defaults"), wxBITMAP_TYPE_PNG); } #endif @@ -466,7 +466,7 @@ public: #ifdef DCPOMATIC_OSX wxBitmap GetLargeIcon () const { - return wxBitmap ("servers", wxBITMAP_TYPE_PNG_RESOURCE); + return wxBitmap(bitmap_path("servers"), wxBITMAP_TYPE_PNG); } #endif @@ -527,7 +527,7 @@ public: #ifdef DCPOMATIC_OSX wxBitmap GetLargeIcon () const { - return wxBitmap ("tms", wxBITMAP_TYPE_PNG_RESOURCE); + return wxBitmap(bitmap_path("tms"), wxBITMAP_TYPE_PNG); } #endif @@ -638,7 +638,7 @@ public: #ifdef DCPOMATIC_OSX wxBitmap GetLargeIcon () const { - return wxBitmap ("email", wxBITMAP_TYPE_PNG_RESOURCE); + return wxBitmap(bitmap_path("email"), wxBITMAP_TYPE_PNG); } #endif @@ -775,7 +775,7 @@ public: #ifdef DCPOMATIC_OSX wxBitmap GetLargeIcon () const { - return wxBitmap ("kdm_email", wxBITMAP_TYPE_PNG_RESOURCE); + return wxBitmap(bitmap_path("kdm_email"), wxBITMAP_TYPE_PNG); } #endif @@ -897,7 +897,7 @@ public: #ifdef DCPOMATIC_OSX wxBitmap GetLargeIcon () const { - return wxBitmap ("notifications", wxBITMAP_TYPE_PNG_RESOURCE); + return wxBitmap(bitmap_path("notifications"), wxBITMAP_TYPE_PNG); } #endif @@ -1070,7 +1070,7 @@ public: #ifdef DCPOMATIC_OSX wxBitmap GetLargeIcon () const { - return wxBitmap ("cover_sheet", wxBITMAP_TYPE_PNG_RESOURCE); + return wxBitmap(bitmap_path("cover_sheet"), wxBITMAP_TYPE_PNG); } #endif @@ -1129,7 +1129,7 @@ public: #ifdef DCPOMATIC_OSX wxBitmap GetLargeIcon () const { - return wxBitmap ("identifiers", wxBITMAP_TYPE_PNG_RESOURCE); + return wxBitmap(bitmap_path("identifiers"), wxBITMAP_TYPE_PNG); } #endif @@ -1247,7 +1247,7 @@ public: #ifdef DCPOMATIC_OSX wxBitmap GetLargeIcon () const { - return wxBitmap ("advanced", wxBITMAP_TYPE_PNG_RESOURCE); + return wxBitmap(bitmap_path("advanced"), wxBITMAP_TYPE_PNG); } #endif -- 2.30.2