Package: gentle / 1.9+cvs20100605+dfsg1-7

wx3.0-compat.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
Description: Fix to work with wxWidgets 3.0
Author: Olly Betts <olly@survex.com>
Last-Update: 2014-06-08
Bug-Debian: http://bugs.debian.org/750906

--- a/TClone.h
+++ b/TClone.h
@@ -68,7 +68,7 @@
 	void parseLines ( wxArrayString &v , char *t , long l ) ; ///< Breaks text into lines
 	void separateNames ( wxString &s1 , wxString &s2 ) ; ///< ???
 	int cmp ( const wxString &s1 , const wxString &s2 ) ; ///< String comparison
-	int a2i ( wxString &s ) { return atoi ( (char*) s.c_str() ) ; }  ///< Converts string to integer
+	int a2i ( wxString &s ) { return atoi ( (const char*) s.c_str() ) ; }  ///< Converts string to integer
 	
 	wxString filename , name , sequence , description ;
 	int size ; ///< Sequence length
--- a/TXMLfile.cpp
+++ b/TXMLfile.cpp
@@ -221,7 +221,7 @@
         {
         char u[100] ;
         sprintf ( u , "short_itemtype%d" , i.getType() ) ;
-        i.name = wxString ( txt(u) , wxConvUTF8 ) ;
+        i.name = txt(u);
         wxString d2 = i.desc ;
         int k = d2.find ( _T("\n") ) ;
         if ( k > -1 ) d2.erase ( k ) ;
--- a/TVirtualGel.cpp
+++ b/TVirtualGel.cpp
@@ -8,7 +8,6 @@
 BEGIN_EVENT_TABLE(TVirtualGel, MyChildBase)
     EVT_CLOSE(ChildBase::OnClose)
     EVT_SET_FOCUS(ChildBase::OnFocus)
-    EVT_SIZE(TVirtualGel::OnSize)
     
     EVT_CHOICE(VG_PERCENT,TVirtualGel::OnPercent)
     EVT_CHOICE(VG_MARKER,TVirtualGel::OnMarker)
--- a/MyChild.cpp
+++ b/MyChild.cpp
@@ -1141,7 +1141,7 @@
 	{
     MyFrame *f = myapp()->frame ; //(MyFrame*) GetParent() ;
     TRestrictionEditor ed ( f , _T("") , wxPoint(-1,-1) , wxSize(600,400) ,
-               wxDEFAULT_DIALOG_STYLE|wxCENTRE|wxDIALOG_MODAL);
+               wxDEFAULT_DIALOG_STYLE|wxCENTRE);
     ed.pre = s ;
     ed.cocktail = vec->cocktail ;
     ed.remoteCocktail = &vec->cocktail ;
--- a/TRestrictionEditor.cpp
+++ b/TRestrictionEditor.cpp
@@ -376,7 +376,7 @@
     wxString s = el->GetItemText ( i ) ;
     TRestrictionEnzyme *e = myapp()->frame->LS->getRestrictionEnzyme ( s ) ;
     TEnzymeDialog ed ( this , s , wxPoint(-1,-1) , wxSize(600,400) , 
-					  wxDEFAULT_DIALOG_STYLE|wxCENTRE|wxDIALOG_MODAL ) ;
+					  wxDEFAULT_DIALOG_STYLE|wxCENTRE ) ;
     ed.initme ( e , true ) ;
     ed.ShowModal() ;
 }
--- a/TVectorEditor.cpp
+++ b/TVectorEditor.cpp
@@ -400,7 +400,7 @@
     e->setCut ( 0 ) ;
     e->setOverlap ( 0 ) ;
     TEnzymeDialog ed ( this , txt("t_new_protease") , wxPoint(-1,-1) , wxSize(600,400) , 
-                    wxDEFAULT_DIALOG_STYLE|wxCENTRE|wxDIALOG_MODAL ) ;
+                    wxDEFAULT_DIALOG_STYLE|wxCENTRE ) ;
     ed.initme ( e ) ;
     if ( ed.ShowModal() == wxID_OK )
        {
--- a/TVectorEditorEnzymes.cpp
+++ b/TVectorEditorEnzymes.cpp
@@ -116,7 +116,7 @@
             wxString s = lb->GetString ( vi[k] ) ;
             TRestrictionEnzyme *e = myapp()->frame->LS->getRestrictionEnzyme ( s ) ;
             TEnzymeDialog ed ( this , s , wxPoint(-1,-1) , wxSize(600,400) , 
-                            wxDEFAULT_DIALOG_STYLE|wxCENTRE|wxDIALOG_MODAL ) ;
+                            wxDEFAULT_DIALOG_STYLE|wxCENTRE ) ;
             ed.initme ( e ) ;
             if ( ed.ShowModal() == wxID_OK )
                {
@@ -149,7 +149,7 @@
         wxString s = lb->GetString ( vi[0] ) ;
         TRestrictionEnzyme *e = myapp()->frame->LS->getRestrictionEnzyme ( s ) ;
         TEnzymeDialog ed ( this , s , wxPoint(-1,-1) , wxSize(600,400) , 
-                        wxDEFAULT_DIALOG_STYLE|wxCENTRE|wxDIALOG_MODAL ) ;
+                        wxDEFAULT_DIALOG_STYLE|wxCENTRE ) ;
         ed.initme ( e ) ;
         ed.ShowModal() ;
         }
@@ -335,7 +335,7 @@
     e->setCut ( 0 ) ;
     e->setOverlap ( 0 ) ;
     TEnzymeDialog ed ( this , txt("t_new_enzyme") , wxPoint(-1,-1) , wxSize(600,400) , 
-                    wxDEFAULT_DIALOG_STYLE|wxCENTRE|wxDIALOG_MODAL ) ;
+                    wxDEFAULT_DIALOG_STYLE|wxCENTRE ) ;
     ed.initme ( e ) ;
     if ( ed.ShowModal() == wxID_OK )
        {
--- a/AminoAcids.cpp
+++ b/AminoAcids.cpp
@@ -656,7 +656,7 @@
 		{
 		if ( curDisplay )
 			{
-			h1->Remove ( curDisplay ) ;
+			h1->Detach ( curDisplay ) ;
 			delete curDisplay ;
 			}
 		curDisplay = NULL ;
--- a/CGview.cpp
+++ b/CGview.cpp
@@ -111,7 +111,7 @@
 
 void CGdialog::OnChooseJar ( wxCommandEvent &event )
 	{
-    wxFileDialog d ( this , txt("t_cgview_choose_jar") , cgviewapp->GetLabel() , _T("") , _T("cgview.jar|cgview.jar") , wxOPEN ) ;
+    wxFileDialog d ( this , txt("t_cgview_choose_jar") , cgviewapp->GetLabel() , _T("") , _T("cgview.jar|cgview.jar") , wxFD_OPEN ) ;
     if ( wxID_OK != d.ShowModal() ) return ;
     cgviewapp->SetLabel ( d.GetPath() ) ;
 	}
--- a/ManageDatabase.cpp
+++ b/ManageDatabase.cpp
@@ -634,7 +634,7 @@
 void TManageDatabaseDialog::pdOnNew ( wxCommandEvent &ev )
     {
     wxString wildcard = _T("GENtle database (*.db)|*.db") ;
-    wxFileDialog d ( this , txt("t_add_new_db") , _T("") , _T("") , wildcard , wxSAVE|wxOVERWRITE_PROMPT ) ;
+    wxFileDialog d ( this , txt("t_add_new_db") , _T("") , _T("") , wildcard , wxFD_SAVE|wxFD_OVERWRITE_PROMPT ) ;
     int x = d.ShowModal() ;
     if ( x != wxID_OK ) return ;
 
@@ -655,7 +655,7 @@
 void TManageDatabaseDialog::pdOnAdd ( wxCommandEvent &ev )
     {
     wxString wildcard = _T("GENtle database (*.db)|*.db") ;
-    wxFileDialog d ( this , txt("t_choose_db") , _T("") , _T("") , wildcard , wxOPEN ) ;
+    wxFileDialog d ( this , txt("t_choose_db") , _T("") , _T("") , wildcard , wxFD_OPEN ) ;
     int x = d.ShowModal() ;
     if ( x != wxID_OK ) return ;
     
@@ -965,7 +965,7 @@
         TVectorItem i ;
         i.name = sr[a][sr["di_name"]] ;
         i.desc = sr[a][sr["di_description"]] ;
-        i.setType ( sr[a][sr["di_type"]].GetChar(0) ) ;
+        i.setType ( (char)sr[a][sr["di_type"]].GetChar(0) ) ;
         i.from = atoi ( sr[a][sr["di_from"]].mb_str() ) ;
         i.to = atoi ( sr[a][sr["di_to"]].mb_str() ) ;
         i.setDirection ( atoi ( sr[a][sr["di_direction"]].mb_str() ) ) ;
--- a/MyFrame.cpp
+++ b/MyFrame.cpp
@@ -727,7 +727,7 @@
     name.Replace ( _T("\\") , _T("_") , TRUE ) ;
 	
     wxString lastdir = LS->getOption ( _T("LAST_IMPORT_DIR") , _T("C:") ) ;
-    wxFileDialog d ( this , txt("t_save_image") , lastdir , name , wildcard , wxSAVE|wxOVERWRITE_PROMPT ) ;
+    wxFileDialog d ( this , txt("t_save_image") , lastdir , name , wildcard , wxFD_SAVE|wxFD_OVERWRITE_PROMPT ) ;
     if ( d.ShowModal() != wxID_OK ) return ;
     wxString filename = d.GetPath() ;
     
@@ -764,7 +764,7 @@
 	_T("|") + wcCM5format ;
     wxString lastdir = LS->getOption ( _T("LAST_IMPORT_DIR") , _T("C:") ) ;
     wxFileDialog d ( this , txt("import_file") , lastdir , 
-					_T("") , wildcard , wxOPEN | wxMULTIPLE ) ;
+					_T("") , wildcard , wxFD_OPEN | wxFD_MULTIPLE ) ;
     int x = d.ShowModal() ;
     if ( x != wxID_OK ) return ;
     
@@ -2616,8 +2616,8 @@
     if ( r == 10 ) { ev.m_keyCode = WXK_LEFT ; msg = _T("LEFT") ; }
     if ( r == 11 ) { ev.m_keyCode = WXK_UP ; msg = _T("UP") ; }
     if ( r == 12 ) { ev.m_keyCode = WXK_DOWN ; msg = _T("DOWN") ; }
-    if ( r == 13 ) { ev.m_keyCode = WXK_PRIOR ; msg = _T("PRIOR") ; }
-    if ( r == 14 ) { ev.m_keyCode = WXK_NEXT ; msg = _T("NEXT") ; }
+    if ( r == 13 ) { ev.m_keyCode = WXK_PAGEUP ; msg = _T("PAGEUP") ; }
+    if ( r == 14 ) { ev.m_keyCode = WXK_PAGEDOWN ; msg = _T("PAGEDOWN") ; }
     mylog ( "Testsuite:Key" , wxString::Format ( "%s" , msg.c_str() ) ) ;
     if ( ac->def == _T("PrimerDesign") ) ((TPrimerDesign*)ac)->sc->OnCharHook(ev) ;
     else ac->cSequence->OnCharHook(ev) ;
--- a/PCR_Troubleshoot.cpp
+++ b/PCR_Troubleshoot.cpp
@@ -415,13 +415,13 @@
 		if ( ( b - a ) / length > 4 )
 			{
 			add_error ( p , nr , msg ,
-			wxString::Format ( txt("t_pcr_ts_warning_runs_text") , (char*)s.Mid(a,length).c_str() ) ) ;
+			wxString::Format ( txt("t_pcr_ts_warning_runs_text") , (const char*)s.Mid(a,length).c_str() ) ) ;
 			a = b - length ;
 			}
 		else if ( ( b - a ) / length  == 4 )
 			{
 			add_warning ( p , nr , msg ,
-			wxString::Format ( txt("t_pcr_ts_warning_runs_text2") , (char*)s.Mid(a,length).c_str() ) ) ;
+			wxString::Format ( txt("t_pcr_ts_warning_runs_text2") , (const char*)s.Mid(a,length).c_str() ) ) ;
 			a = b - length ;
 			}
 		}
@@ -489,7 +489,7 @@
 	int a ;
 	for ( a = 0 ; a < s.length() ; a++ )
 		{
-		switch ( s.GetChar ( a ) )
+		switch ( (char)s.GetChar ( a ) )
 			{
 			case 'A' : s.SetChar ( a , 'T' ) ; break ;
 			case 'C' : s.SetChar ( a , 'G' ) ; break ;
--- a/SequenceCanvas.cpp
+++ b/SequenceCanvas.cpp
@@ -394,13 +394,13 @@
       {
       mark ( id , the_sequence->length() , the_sequence->length() , 2 ) ;
       }   	
-    else if ( k == WXK_PRIOR )
+    else if ( k == WXK_PAGEUP )
       {
       from -= page ;
       if ( from < 1 ) from = 1 ;
       mark ( id , from , from , 2 ) ;
       }
-    else if ( k == WXK_NEXT )
+    else if ( k == WXK_PAGEDOWN )
       {
       from += page ;
       if ( from > the_sequence->length() ) from = the_sequence->length() ;
--- a/SequenceTypeAAstructure.cpp
+++ b/SequenceTypeAAstructure.cpp
@@ -400,7 +400,7 @@
 	dc.SetPen ( *pen_C ) ;
 	for ( a = 0 ; a < atom_pos.size() ; a++ )
 		{
-		switch ( atom_type.GetChar ( a ) )
+		switch ( (char)atom_type.GetChar ( a ) )
 			{
 			case 'C' : if ( can->isPrinting() ) dc.SetPen ( *pen_C ) ; dc.SetBrush ( *brush_C ) ; break ;
 			case 'S' : if ( can->isPrinting() ) dc.SetPen ( *pen_S ) ; dc.SetBrush ( *brush_S ) ; break ;
--- a/SequenceTypePlot.cpp
+++ b/SequenceTypePlot.cpp
@@ -538,7 +538,7 @@
 		mylog ( "SeqPlot::useNcoils" , wxString::Format ( _T("BEGIN ncoils_function (%d): ") , b ) + s ) ;
 		x = ncoils_function ( (const char*) s.mb_str() , b ) . c_str() ;
 		mylog ( "SeqPlot::useNcoils" , "END ncoils_function" ) ;
-		wxString t ( (char*) x.c_str() , wxConvUTF8 ) ;
+		wxString t ( (const char*) x.c_str() , wxConvUTF8 ) ;
 		wxArrayString ta ;
 		explode ( _T("\n") , t , ta ) ;
 		for ( b = 0 ; b < s.length() ; b++ )
--- a/TImageDisplay.cpp
+++ b/TImageDisplay.cpp
@@ -310,7 +310,7 @@
 
     if ( invert )
     	{
-        int lf = pdc.GetLogicalFunction() ;
+        wxRasterOperationMode lf = pdc.GetLogicalFunction() ;
         pdc.SetLogicalFunction ( wxINVERT ) ;
         pdc.SetBrush ( *wxWHITE_BRUSH ) ;
         pdc.SetPen ( *wxWHITE_PEN ) ;
--- a/TPhyloTree.cpp
+++ b/TPhyloTree.cpp
@@ -3,7 +3,6 @@
 BEGIN_EVENT_TABLE(TPhyloTree, MyChildBase)
     EVT_CLOSE(ChildBase::OnClose)
     EVT_SET_FOCUS(ChildBase::OnFocus)
-    EVT_SIZE(ChildBase::OnSize)
     EVT_CHECKBOX(PHYLIP_DIRECT_LINES,TPhyloTree::OnDirectLines)
     EVT_LISTBOX(PHYLIP_TREE_LIST,TPhyloTree::OnTreeList)
     EVT_MENU(MDI_FILE_SAVE,TPhyloTree::OnFileSave)
--- a/TStorage.cpp
+++ b/TStorage.cpp
@@ -272,7 +272,7 @@
         } while ( rc == SQLITE_BUSY ) ;
     
     ierror = e ? 1 : 0 ;
-    if ( e ) error = wxString ( _T("An error has occurred when executing query ") + query , wxConvUTF8 ) ;
+    if ( e ) error = _T("An error has occurred when executing query ") + query;
     else error = _T("Alles OK") ;
 
     sqlite3_close ( db ) ;
@@ -531,7 +531,7 @@
         s1 = s2 = _T("") ;
         for ( b = 0 ; b < f.GetCount() ; b++ )
            {
-           int id = r[(char*)f[b].c_str()] ;
+           int id = r[(const char*)f[b].c_str()] ;
            if ( id > -1 ) sqlAdd ( s1 , s2 , f[b] , r[a][id] ) ;
            else sqlAdd ( s1 , s2 , f[b] , _T("") ) ;
            }
--- a/main.cpp
+++ b/main.cpp
@@ -253,7 +253,7 @@
 	if ( wxGetEnv ( _T("COILSDIR") , NULL ) ) wxUnsetEnv ( _T("COILSDIR") ) ;
 	wxSetEnv ( _T("COILSDIR") , homedir ) ;
 #else
-	putenv ( (char*) ncoilsdir.c_str() ) ;
+	setenv ( "COILSDIR" , homedir.c_str() , 1 ) ;
 #endif	
 
 	
--- a/ChildBase.cpp
+++ b/ChildBase.cpp
@@ -223,7 +223,7 @@
 
 	 wxString wildcard = getExportFilters () ;
     wxString lastdir = myapp()->frame->LS->getOption ( _T("LAST_IMPORT_DIR") , _T("C:") ) ;
-    wxFileDialog d ( this , txt("export_file") , lastdir , _T("") , wildcard , wxSAVE|wxOVERWRITE_PROMPT ) ;
+    wxFileDialog d ( this , txt("export_file") , lastdir , _T("") , wildcard , wxFD_SAVE|wxFD_OVERWRITE_PROMPT ) ;
     d.SetFilterIndex ( myapp()->frame->LS->getOption ( _T("LAST_EXPORT_FILTER") , 0 ) ) ;
     int x = d.ShowModal() ;
     if ( x != wxID_OK ) return ;