Skip to content

Commit

Permalink
Fix switch skin when manager is not connected
Browse files Browse the repository at this point in the history
  • Loading branch information
talregev committed Jul 9, 2022
1 parent 081df22 commit bdfb84b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion clientgui/sg_BoincSimpleFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,7 @@ void CSimpleFrame::OnMenuOpening( wxMenuEvent &event) {
wxMenu* menuFile = NULL;
wxMenu* menuHelp = NULL;
wxMenu* menuChangeGUI = NULL;
wxMenu* menuSkinSelector = NULL;

wxASSERT(pDoc);

Expand All @@ -480,10 +481,11 @@ void CSimpleFrame::OnMenuOpening( wxMenuEvent &event) {
menu->FindItem(ID_CLOSEWINDOW, &menuFile);
menu->FindItem(ID_HELPBOINC, &menuHelp);
menu->FindItem(ID_CHANGEGUI, &menuChangeGUI);
menu->FindItem(ID_SGDEFAULTSKINSELECTOR, &menuSkinSelector);
size_t numItems = menu->GetMenuItemCount();
for (size_t pos = 0; pos < numItems; ++pos) {
wxMenuItem * item = menu->FindItemByPosition(pos);
if ((menu == menuFile) || (menu == menuHelp) || (menu == menuChangeGUI)) {
if ((menu == menuFile) || (menu == menuHelp) || (menu == menuChangeGUI) || (menu == menuSkinSelector)) {
// Always enable all items in File menu or Help menu:
// ID_CLOSEWINDOW, wxID_EXIT, ID_HELPBOINC, ID_HELPBOINCMANAGER,
// ID_HELPBOINCWEBSITE, wxID_ABOUT, ID_CHANGEGUI
Expand Down
4 changes: 2 additions & 2 deletions win_build/boinc_finalize.targets
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<Target Name="CopyCertificateAndLocaleFiles" DependsOnTargets="Build" AfterTargets="Build">
<ItemGroup>
<LOCALE Include="..\locale\**\*.mo" />
<CERT Include="..\curl\ca-bundle.crt" />
<SKINS Include="..\clientgui\skins\**" />
</ItemGroup>
<Copy SourceFiles="@(LOCALE)" DestinationFolder="$(OutDir)\locale\%(RecursiveDir)" SkipUnchangedFiles="true" />
<Copy SourceFiles="@(CERT)" DestinationFolder="$(OutDir)" SkipUnchangedFiles="true" />
<Copy SourceFiles="@(SKINS)" DestinationFolder="$(OutDir)\skins\%(RecursiveDir)" SkipUnchangedFiles="true" />
</Target>
</Project>

0 comments on commit bdfb84b

Please sign in to comment.