pytrainer: unpin python 3.10
[NixPkgs.git] / pkgs / games / fsg / wxgtk-3.2.patch
blobdff9f54aeeebf36fc1d829531dd0b879d6bccf12
1 diff --git a/Canvas.cpp b/Canvas.cpp
2 index 8c00727..5ee7756 100644
3 --- a/Canvas.cpp
4 +++ b/Canvas.cpp
5 @@ -889,7 +889,6 @@ void Canvas::Refresh(){
6 if (doDraw){
7 wxClientDC dc(this);
9 - dc.BeginDrawing();
11 wxMemoryDC memdc;
12 wxImage image(g_width, g_height, bitmapdata, true);
13 @@ -899,7 +898,6 @@ void Canvas::Refresh(){
14 dc.Blit(0,0,g_width, g_height, &memdc, 0, 0);
16 if (!drawAll){
17 - dc.EndDrawing();
18 return;
20 else{
21 @@ -912,7 +910,6 @@ void Canvas::Refresh(){
25 - dc.EndDrawing();
29 diff --git a/MainFrame.cpp b/MainFrame.cpp
30 index c45107b..d93f9e1 100644
31 --- a/MainFrame.cpp
32 +++ b/MainFrame.cpp
33 @@ -178,7 +178,7 @@ MainFrame::MainFrame(const wxString& title, const wxPoint& pos, const wxSize& si
34 RHSizer->Add(RH4, 0, wxEXPAND | wxALL, 5);
37 - sizer->Add(g_canvas, 0, wxADJUST_MINSIZE | wxALL, 10);
38 + sizer->Add(g_canvas, 0, wxALL, 10);
39 sizer->Add(RHSizer, 1, wxEXPAND);
41 this->SetSizer(sizer);
42 @@ -1165,7 +1165,7 @@ void MainFrame::OnMenu(wxCommandEvent& event){
44 else if(event.GetId() == 1051){
45 //Load
46 - wxFileDialog dialog(this, _("Load from a file"), _(""), _(""), _("Any Image Files (*.*)|*.*"), wxOPEN);
47 + wxFileDialog dialog(this, _("Load from a file"), _(""), _(""), _("Any Image Files (*.*)|*.*"), wxFD_OPEN);
49 if (dialog.ShowModal() == wxID_OK){
50 sandboxFilename = dialog.GetPath();
51 @@ -1174,7 +1174,7 @@ void MainFrame::OnMenu(wxCommandEvent& event){
53 else if(event.GetId() == 1052){
54 //Save
55 - wxFileDialog dialog(this, _("Save to a file"), _(""), _(""), _("PNG files (*.png)|*.png|BMP files (*.bmp)|*.bmp"), wxSAVE);
56 + wxFileDialog dialog(this, _("Save to a file"), _(""), _(""), _("PNG files (*.png)|*.png|BMP files (*.bmp)|*.bmp"), wxFD_SAVE);
58 if (dialog.ShowModal() == wxID_OK){
59 wxString filename = dialog.GetPath();
60 @@ -1216,7 +1216,7 @@ void MainFrame::OnMenu(wxCommandEvent& event){
61 else if(event.GetId() == 1055){
62 //Load physics
64 - wxFileDialog dialog(this, _("Load from a file"), _(""), _(""), _("Physics Files (*.txt)|*.txt"), wxOPEN);
65 + wxFileDialog dialog(this, _("Load from a file"), _(""), _(""), _("Physics Files (*.txt)|*.txt"), wxFD_OPEN);
66 if (dialog.ShowModal() == wxID_OK){
67 physicsFilename = dialog.GetPath();
68 loadPhysics(physicsFilename);