]> git.pld-linux.org Git - packages/abridge.git/blob - abridge-wxGTK-2.8.patch
- patch for wxGTK2 2.8
[packages/abridge.git] / abridge-wxGTK-2.8.patch
1 diff -ur abridge-0.4.0/src/floatwindow.cpp abridge-0.4.0-patched/src/floatwindow.cpp
2 --- abridge-0.4.0/src/floatwindow.cpp   2003-03-03 15:30:21.000000000 -0500
3 +++ abridge-0.4.0-patched/src/floatwindow.cpp   2006-01-31 00:38:51.909199250 -0500
4 @@ -57,7 +57,7 @@
5  FloatWindow::~FloatWindow() {
6  }
7  
8 -void FloatWindow::OnMove(const wxMoveEvent& event) {
9 +void FloatWindow::OnMove(wxMoveEvent& event) {
10    if (!m_allow_move) {
11      Move(GetParent()->GetPosition() + GetRelativePosition());
12      m_allow_move = true;
13 diff -ur abridge-0.4.0/src/floatwindow.h abridge-0.4.0-patched/src/floatwindow.h
14 --- abridge-0.4.0/src/floatwindow.h     2003-03-03 15:30:20.000000000 -0500
15 +++ abridge-0.4.0-patched/src/floatwindow.h     2006-01-31 00:39:05.434044500 -0500
16 @@ -43,7 +43,7 @@
17  
18    virtual ~FloatWindow();
19  
20 -  void OnMove(const wxMoveEvent& event);
21 +  void OnMove(wxMoveEvent& event);
22    void OnActivate(wxActivateEvent& event);
23    void ParentMoved();
24  
25 @@ -52,8 +52,8 @@
26    void MoveToPosition();
27    void DisallowOneMove();
28  
29 -  virtual wxPoint GetRelativePosition() = NULL;
30 -  virtual void SetRelativePosition(wxPoint p) = NULL;
31 +  virtual wxPoint GetRelativePosition() = 0;
32 +  virtual void SetRelativePosition(wxPoint p) = 0;
33  
34    static void InitStaticVariables() {};
35      
36 diff -ur abridge-0.4.0/src/ftpfilecache.cpp abridge-0.4.0-patched/src/ftpfilecache.cpp
37 --- abridge-0.4.0/src/ftpfilecache.cpp  2003-03-03 15:30:21.000000000 -0500
38 +++ abridge-0.4.0-patched/src/ftpfilecache.cpp  2006-01-31 00:38:00.974016000 -0500
39 @@ -99,13 +99,13 @@
40      return "unknown.png";
41    }
42    wxFileInputStream *in_stream = new wxFileInputStream(filename);
43 -  if (!in_stream || (in_stream->LastError() != wxStream_NOERROR)) {
44 +  if (!in_stream || (in_stream->GetLastError() != wxSTREAM_NO_ERROR)) {
45      DebugMsg("error opening file '" + filename + "' for reading");
46      return "unknown.png";
47    } else {
48      DebugMsg("Successfully opened file '" + filename + "' for reading");
49    }
50 -  long the_size=in_stream->StreamSize();
51 +  long the_size=in_stream->GetSize();
52    if (the_size == 0) {
53      DebugMsg("Aaack the file is empty");
54      return "unknown.png";
55 @@ -177,13 +177,13 @@
56      return NULL;
57    }
58    in_stream = ftp.GetInputStream(m_remotefilename);
59 -  if (!in_stream || in_stream->LastError() != wxStream_NOERROR) {
60 +  if (!in_stream || in_stream->GetLastError() != wxSTREAM_NO_ERROR) {
61      DebugMsg("Problem finding file" + m_remotefilename);
62      return NULL;
63    }
64    DebugMsg("Reading file " + m_remotefilename);
65    wxFileOutputStream *out_stream = new wxFileOutputStream(m_localfilename);
66 -  if (!out_stream || out_stream->LastError() != wxStream_NOERROR) {
67 +  if (!out_stream || out_stream->GetLastError() != wxSTREAM_NO_ERROR) {
68      DebugMsg("error opening file '" + m_localfilename + "' for output");
69      return NULL;
70    }
71 @@ -224,7 +224,7 @@
72    wxFTP ftp;
73    wxOutputStream *out_stream;
74    wxFileInputStream *in_stream = new wxFileInputStream(m_localfilename);
75 -  if (!in_stream || in_stream->LastError() != wxStream_NOERROR) {
76 +  if (!in_stream || in_stream->GetLastError() != wxSTREAM_NO_ERROR) {
77      DebugMsg("error opening file " + m_localfilename + "for reading");
78      return NULL;
79    }
80 @@ -236,7 +236,7 @@
81      return NULL;
82    }
83    out_stream = ftp.GetOutputStream(m_remotefilename);
84 -  if (!out_stream || out_stream->LastError() != wxStream_NOERROR) {
85 +  if (!out_stream || out_stream->GetLastError() != wxSTREAM_NO_ERROR) {
86      DebugMsg("Problem creating remote file " + m_remotefilename);
87      DebugMsg("Perhaps " + m_remotefilename + " is already on server?");
88      return NULL;
89 diff -ur abridge-0.4.0/src/playerprefs.cpp abridge-0.4.0-patched/src/playerprefs.cpp
90 --- abridge-0.4.0/src/playerprefs.cpp   2003-03-03 15:30:21.000000000 -0500
91 +++ abridge-0.4.0-patched/src/playerprefs.cpp   2006-01-31 00:29:19.017395750 -0500
92 @@ -207,7 +207,7 @@
93        if (my_image.LoadFile(hello)) {
94          DebugMsg("Found image file " + hello);
95          my_image.Rescale(64,64);
96 -        m_playerpic_bitmap->SetBitmap(my_image.ConvertToBitmap());
97 +        m_playerpic_bitmap->SetBitmap(wxBitmap(my_image));
98        }
99      }
100    }
101 diff -ur abridge-0.4.0/src/prefmacros.cpp abridge-0.4.0-patched/src/prefmacros.cpp
102 --- abridge-0.4.0/src/prefmacros.cpp    2003-03-03 15:30:21.000000000 -0500
103 +++ abridge-0.4.0-patched/src/prefmacros.cpp    2006-01-31 00:30:08.456485500 -0500
104 @@ -52,7 +52,7 @@
105        if (my_image.LoadFile(filename)) {
106          DebugMsg("Found image file " + filename);
107          my_image.Rescale(64,64);
108 -        return my_image.ConvertToBitmap();
109 +        return wxBitmap(my_image);
110        } else {
111          DebugMsg("Deleting bad image file");
112          wxRemoveFile(filename);
113 diff -ur abridge-0.4.0/src/suit.cpp abridge-0.4.0-patched/src/suit.cpp
114 --- abridge-0.4.0/src/suit.cpp  2003-03-21 09:35:11.000000000 -0500
115 +++ abridge-0.4.0-patched/src/suit.cpp  2006-01-31 00:53:05.182525500 -0500
116 @@ -65,10 +65,10 @@
117    temp_dc.SelectObject(weemap);
118    if (usd) temp_dc.Blit(0,0,w,2*h, &dc, x, y-h);
119    else temp_dc.Blit(0,0,w,2*h, &dc, x, y);
120 -  wxImage myim(weemap);
121 +  wxImage myim(weemap.ConvertToImage());
122    myim.Rescale(4*w, 4*2*h);
123    if (usd) myim = myim.Rotate90().Rotate90();
124 -  wxBitmap bigmap = myim.ConvertToBitmap();
125 +  wxBitmap bigmap(myim);
126    temp_dc.SelectObject(bigmap);
127    if (is_red) temp_dc.SetTextForeground( *wxRED );
128    else temp_dc.SetTextForeground( *wxBLACK );
129 @@ -82,10 +82,10 @@
130    wxFont *f = wxTheFontList->FindOrCreateFont(--i, wxSWISS, wxNORMAL, wxNORMAL);
131    temp_dc.SetFont(*f);
132    temp_dc.DrawText(num, 0, -lead);
133 -  wxImage tm_im(bigmap);
134 +  wxImage tm_im(bigmap.ConvertToImage());
135    if (usd) tm_im = tm_im.Rotate90().Rotate90();
136  
137 -  wxBitmap aabm = anti_alias(tm_im).ConvertToBitmap();
138 +  wxBitmap aabm(anti_alias(tm_im));
139    wxMemoryDC aadc;
140    aadc.SelectObject(aabm);
141    if (usd) dc.Blit(x,y-h, w, 2*h, &aadc, 0, 0, wxAND);
142 @@ -98,15 +98,15 @@
143    wxMemoryDC temp_dc;
144    temp_dc.SelectObject(weemap);
145    temp_dc.Blit(0,0,w,h, &dc, x, y);
146 -  wxImage myim(weemap);
147 +  wxImage myim(weemap.ConvertToImage());
148    myim.Rescale(4*w, 4*h);
149 -  wxBitmap bigmap = myim.ConvertToBitmap();
150 +  wxBitmap bigmap(myim);
151    temp_dc.SelectObject(bigmap);
152    DrawSuitOnBM(temp_dc, m_suit, 4*w, 4*h);
153 -  wxImage tm_im(bigmap);
154 +  wxImage tm_im(bigmap.ConvertToImage());
155    if (usd) tm_im.Mirror(false);
156  
157 -  wxBitmap aabm = anti_alias(tm_im).ConvertToBitmap();
158 +  wxBitmap aabm(anti_alias(tm_im));
159    wxMemoryDC aadc;
160    aadc.SelectObject(aabm);
161    dc.Blit(x,y, w, h, &aadc, 0, 0, wxCOPY);
162 diff -ur abridge-0.4.0/src/table.cpp abridge-0.4.0-patched/src/table.cpp
163 --- abridge-0.4.0/src/table.cpp 2003-03-21 09:35:11.000000000 -0500
164 +++ abridge-0.4.0-patched/src/table.cpp 2006-01-31 00:45:34.742374750 -0500
165 @@ -52,12 +52,12 @@
166  // include config.h for VERSION
167  #include "config.h"
168  
169 +  // EVT_MENU(wxID_CLOSE, aBridgeTable::OnCloseWindow)
170  BEGIN_EVENT_TABLE(aBridgeTable, wxFrame)
171    EVT_MENU(CLAIM, aBridgeTable::Claim)
172    EVT_MENU(SHOWBID, aBridgeTable::ShowBids)
173    EVT_MENU(SHOWSCORES, aBridgeTable::ShowScores)
174    EVT_MENU(SHOWLAST, aBridgeTable::ShowLastTrick)
175 -  EVT_MENU(wxID_CLOSE, aBridgeTable::OnCloseWindow)
176    EVT_MOVE(aBridgeTable::OnMove)
177    EVT_CLOSE(aBridgeTable::OnCloseWindow)
178    EVT_TEXT_ENTER(TALK, aBridgeTable::Talk)
179 @@ -335,7 +335,7 @@
180    }
181  }
182  
183 -void aBridgeTable::OnMove(const wxMoveEvent& event) {
184 +void aBridgeTable::OnMove(wxMoveEvent& event) {
185    if (m_lasttrick) m_lasttrick->ParentMoved();
186    if (m_game) m_game->TableMoved();
187    if (m_scorewin) m_scorewin->ParentMoved();
188 diff -ur abridge-0.4.0/src/table.h abridge-0.4.0-patched/src/table.h
189 --- abridge-0.4.0/src/table.h   2003-03-03 15:30:21.000000000 -0500
190 +++ abridge-0.4.0-patched/src/table.h   2006-01-31 00:24:01.097527000 -0500
191 @@ -54,7 +54,7 @@
192    virtual ~aBridgeTable();
193    
194    void OnCloseWindow(wxCloseEvent& event);
195 -  void OnMove(const wxMoveEvent& event);
196 +  void OnMove(wxMoveEvent& event);
197    
198    // Menu callbacks
199    void ShowBids(wxCommandEvent& event);
This page took 0.094972 seconds and 3 git commands to generate.