]> git.pld-linux.org Git - packages/aMule.git/blame - aMule-wx.patch
- release 23
[packages/aMule.git] / aMule-wx.patch
CommitLineData
9ebe1f63
AM
1diff -urN aMule-2.1.3.org/src/utils/wxCas/src/wxcasprefs.cpp aMule-2.1.3/src/utils/wxCas/src/wxcasprefs.cpp
2--- aMule-2.1.3.org/src/utils/wxCas/src/wxcasprefs.cpp 2005-12-16 13:09:29.000000000 +0100
3+++ aMule-2.1.3/src/utils/wxCas/src/wxcasprefs.cpp 2006-12-17 20:20:47.151203000 +0100
fa2bfda1
AM
4@@ -297,7 +297,7 @@
5 m_validateButton =
6 new wxButton ( this, ID_VALIDATE_BUTTON, wxString ( _( "Validate" ) ) );
7 m_cancelButton =
8- new wxButton ( this, ID_CANCEL_BUTTON, wxString ( _( "Cancel" ) ) );
9+ new wxButton ( this, wxID_CANCEL, wxString ( _( "Cancel" ) ) );
10
11 m_buttonHBox->Add ( m_validateButton, 0, wxALIGN_CENTER | wxALL, 5 );
12 m_buttonHBox->Add ( m_cancelButton, 0, wxALIGN_CENTER | wxALL, 5 );
9ebe1f63
AM
13@@ -321,7 +321,6 @@
14 EVT_BUTTON ( ID_OSPATH_BROWSE_BUTTON, WxCasPrefs::OnOSPathBrowseButton )
15 EVT_BUTTON ( ID_AUTOSTATIMG_BROWSE_BUTTON, WxCasPrefs::OnAutoStatImgBrowseButton )
16 EVT_BUTTON ( ID_VALIDATE_BUTTON, WxCasPrefs::OnValidateButton )
17-EVT_BUTTON ( ID_CANCEL_BUTTON, WxCasPrefs::OnCancel ) // Defined in wxDialog
18 EVT_CHECKBOX ( ID_AUTOSTATIMG_CHECK, WxCasPrefs::OnAutoStatImgCheck )
19 EVT_CHECKBOX ( ID_FTP_UPDATE_CHECK, WxCasPrefs::OnFtpUpdateCheck )
20 END_EVENT_TABLE ()
fa2bfda1
AM
21--- aMule/src/utils/wxCas/src/wxcasprefs.h.org 2006-12-17 22:17:39.017417250 +0100
22+++ aMule/src/utils/wxCas/src/wxcasprefs.h 2006-12-17 22:18:17.611829250 +0100
23@@ -101,8 +101,7 @@
24 ID_AUTOSTATIMG_COMBO,
25 ID_AUTOSTATIMG_BROWSE_BUTTON,
26 ID_FTP_UPDATE_CHECK,
27- ID_VALIDATE_BUTTON,
28- ID_CANCEL_BUTTON
29+ ID_VALIDATE_BUTTON
30 };
31
32 protected:
9ebe1f63
AM
33--- aMule/src/MuleGifCtrl.cpp 2006-02-03 20:14:05.000000000 +0100
34+++ aMule/src/MuleGifCtrl.cpp 2006-11-19 19:35:33.000000000 +0100
35@@ -24,7 +24,6 @@
36
37 #include <wx/mstream.h>
38 #include <wx/gifdecod.h>
39-#include <wx/window.h>
40 #include <wx/dcbuffer.h>
41
42 #include "MuleGifCtrl.h"
43@@ -35,6 +34,50 @@
44 EVT_ERASE_BACKGROUND(MuleGifCtrl::OnErase)
45 END_EVENT_TABLE()
46
47+#if wxCHECK_VERSION(2, 7, 1)
48+// Wrapper that emulates old wxGIFDecoder API
49+
50+class MuleGIFDecoder : public wxGIFDecoder {
51+public:
52+ MuleGIFDecoder(wxInputStream* stream, bool dummy) {
53+ m_stream = stream;
54+ dummy = dummy; // Unused.
55+ m_nframe = 0;
56+ }
57+
58+ ~MuleGIFDecoder() { /* don't delete the stream! */ }
59+
60+ wxGIFErrorCode ReadGIF() {
61+ return LoadGIF(*m_stream);
62+ }
63+
64+ void GoFirstFrame() { m_nframe = 0; }
65+ void GoNextFrame(bool dummy) { m_nframe < GetFrameCount() ? m_nframe++ : m_nframe = 0; }
66+ void GoLastFrame() { m_nframe = GetFrameCount(); }
67+
68+ void ConvertToImage(wxImage* image) { wxGIFDecoder::ConvertToImage(m_nframe, image); }
69+
70+ size_t GetLogicalScreenWidth() { return GetAnimationSize().GetWidth(); }
71+ size_t GetLogicalScreenHeight() { return GetAnimationSize().GetHeight(); }
72+
73+ size_t GetLeft() { return 0; }
74+ size_t GetTop() { return 0; }
75+
76+ long GetDelay() { return wxGIFDecoder::GetDelay(m_nframe); }
77+
78+private:
79+ uint32_t m_nframe;
80+ wxInputStream* m_stream;
81+};
82+
83+#else
84+class MuleGIFDecoder : public wxGIFDecoder {
85+public:
86+ MuleGIFDecoder(wxInputStream* stream, bool flag) : wxGIFDecoder(stream,flag) {};
87+};
88+#endif
89+
90+
91
92 MuleGifCtrl::MuleGifCtrl( wxWindow *parent, wxWindowID id, const wxPoint& pos,
93 const wxSize& size, long style, const wxValidator& validator,
94@@ -66,7 +109,7 @@
95 }
96
97 wxMemoryInputStream stream(data, size);
98- m_decoder = new wxGIFDecoder(&stream, TRUE);
99+ m_decoder = new MuleGIFDecoder(&stream, TRUE);
100 if ( m_decoder->ReadGIF() != wxGIF_OK ) {
101 delete m_decoder;
102 m_decoder = NULL;
103@@ -137,3 +180,4 @@
104 dc.DrawBitmap( m_frame, x + m_decoder->GetLeft(), y + m_decoder->GetTop(), true);
105 }
106
107+// File_checked_for_headers
108--- aMule/src/MuleGifCtrl.h 2006-01-01 06:17:25.000000000 +0100
109+++ aMule/src/MuleGifCtrl.h 2006-11-18 05:01:22.000000000 +0100
110@@ -27,11 +27,10 @@
111
112 #include <wx/control.h>
113 #include <wx/timer.h>
114-#include <wx/bitmap.h>
115
116 const int GIFTIMERID = 271283;
117
118-class wxGIFDecoder;
119+class MuleGIFDecoder;
120 class wxBitmap;
121
122 /**
123@@ -121,7 +120,7 @@
124 void OnErase( wxEraseEvent& WXUNUSED(event) ) {}
125
126 //! A pointer to the current gif-animation.
127- wxGIFDecoder* m_decoder;
128+ MuleGIFDecoder* m_decoder;
129 //! Timer used for the delay between each frame.
130 wxTimer m_timer;
131 //! Current frame.
132@@ -133,3 +132,4 @@
133
134 #endif
135
136+// File_checked_for_headers
137--- aMule-2.1.3/src/MuleTextCtrl.cpp~ 2006-12-17 20:55:37.157820250 +0100
138+++ aMule-2.1.3/src/MuleTextCtrl.cpp 2006-12-17 20:56:21.328580750 +0100
139@@ -26,6 +26,7 @@
140 #include <wx/menu.h>
141 #include <wx/intl.h>
142 #include <wx/clipbrd.h>
143+#include <wx/dataobj.h>
144
145 /**
146 * These are the IDs used to identify the different menu-items.
147--- amule/src/amule.cpp~ 2006-12-17 21:53:26.474639000 +0100
148+++ amule/src/amule.cpp 2006-12-17 21:55:40.307003000 +0100
149@@ -96,6 +96,7 @@
150 #include <CoreFoundation/CFBundle.h>
151 #include <wx/mac/corefoundation/cfstring.h>
152 #endif
153+ #include <wx/msgdlg.h>
154 #endif
155
156
This page took 0.04697 seconds and 4 git commands to generate.