[med-svn] [Git][med-team/gentle][master] Patch for compatibility with wxWidgets 3.2

Étienne Mollier (@emollier) gitlab at salsa.debian.org
Fri Sep 16 20:06:35 BST 2022



Étienne Mollier pushed to branch master at Debian Med / gentle


Commits:
50bef03a by Scott Talbert at 2022-09-16T14:25:29-04:00
Patch for compatibility with wxWidgets 3.2

- - - - -


3 changed files:

- debian/changelog
- debian/patches/series
- + debian/patches/wx3.2-compat.patch


Changes:

=====================================
debian/changelog
=====================================
@@ -1,10 +1,14 @@
 gentle (1.9+cvs20100605+dfsg1-10) UNRELEASED; urgency=medium
 
+  [ Andreas Tille ]
   * transition to wxwidgets3.2
     Closes: #1019809
   * Fix watchfile to detect new versions on github
   * Standards-Version: 4.6.1 (routine-update)
 
+  [ Scott Talbert ]
+  * Patch for compatibility with wxWidgets 3.2
+
  -- Andreas Tille <tille at debian.org>  Thu, 15 Sep 2022 09:12:11 +0200
 
 gentle (1.9+cvs20100605+dfsg1-9) unstable; urgency=medium


=====================================
debian/patches/series
=====================================
@@ -4,3 +4,4 @@ remove_clustalw.patch
 remove-sqlite-dep.patch
 wx3.0-compat.patch
 fix-format-codes.patch
+wx3.2-compat.patch


=====================================
debian/patches/wx3.2-compat.patch
=====================================
@@ -0,0 +1,249 @@
+Description: Fix to work with wxWidgets 3.2
+Author: Scott Talbert <swt at techie.net>
+Last-Update: 2022-09-16
+Bug-Debian: https://bugs.debian.org/1019809
+Forwarded: no
+
+--- a/TCalculator.cpp
++++ b/TCalculator.cpp
+@@ -111,8 +111,8 @@ void TCalculator::initme ()
+ 
+     SetMenuBar(menu_bar);
+     
+-    menu_bar->FindItem ( SEQ_PRINT ) -> SetText ( txt("m_print") ) ;
+-    menu_bar->FindItem ( MDI_PRINT_REPORT ) -> SetText ( txt("m_print_preview") ) ;
++    menu_bar->FindItem ( SEQ_PRINT ) -> SetItemLabel ( txt("m_print") ) ;
++    menu_bar->FindItem ( MDI_PRINT_REPORT ) -> SetItemLabel ( txt("m_print_preview") ) ;
+     
+ 
+     nb = new wxNotebook ( this , -1 ) ;
+--- a/PrimerDesign.cpp
++++ b/PrimerDesign.cpp
+@@ -415,21 +415,25 @@ void TPrimerDesign::initme ()
+ 	myapp()->frame->addTool ( toolBar , SEQ_PRINT ) ;
+     if ( !myapp()->frame->mainToolBar ) toolBar->AddSeparator() ;
+     toolBar->AddTool( PD_IMPORT, 
++            wxEmptyString ,
+             myapp()->frame->bitmaps[14] ,
+             txt("b_import_primer") ) ;
+     toolBar->AddTool( PD_EXPORT, 
++            wxEmptyString ,
+             myapp()->frame->bitmaps[15] ,
+             txt("b_export_primer") ) ;
+     toolBar->AddSeparator() ;
+ 	myapp()->frame->addTool ( toolBar , MDI_COPY ) ;
+     toolBar->AddTool( MDI_EDIT_MODE,
++        wxEmptyString ,
+         myapp()->frame->bitmaps[13] ,
+         myapp()->frame->bitmaps[13] ,
+-        TRUE, -1, -1, (wxObject *) NULL, txt("m_edit_mode") ) ;
++        wxITEM_CHECK, txt("m_edit_mode") ) ;
+     toolBar->AddTool( MDI_TOGGLE_FEATURES,
++        wxEmptyString ,
+         myapp()->frame->bitmaps[10] ,
+         myapp()->frame->bitmaps[10] ,
+-        TRUE, -1, -1, (wxObject *) NULL, txt("m_display_features") ) ;
++        wxITEM_CHECK, txt("m_display_features") ) ;
+     toolBar->AddSeparator() ;
+     
+     spin = new wxSpinCtrl ( toolBar , PCR_SPIN , _T("") , wxDefaultPosition , wxSize ( MYSPINBOXSIZE , -1 ) ) ;
+--- a/MyChild.cpp
++++ b/MyChild.cpp
+@@ -397,30 +397,36 @@ void MyChild::initToolbar ()
+         myapp()->frame->addTool ( toolBar , SEQ_PRINT ) ;
+         myapp()->frame->addCCPFTools ( toolBar , true ) ;
+         toolBar->AddTool( MDI_CIRCULAR_LINEAR,
++            wxEmptyString,
+             myapp()->frame->bitmaps[7],
+             myapp()->frame->bitmaps[8],
+-            TRUE, -1, -1, (wxObject *) NULL, txt("m_toggle_rc") ) ;
++            wxITEM_CHECK, txt("m_toggle_rc") ) ;
+         toolBar->AddTool( MDI_ORFS,
++            wxEmptyString,
+             myapp()->frame->bitmaps[9],
+             myapp()->frame->bitmaps[9],
+-            TRUE, -1, -1, (wxObject *) NULL, txt("m_orfs") ) ;
++            wxITEM_CHECK, txt("m_orfs") ) ;
+         toolBar->AddTool( MDI_TOGGLE_FEATURES,
++            wxEmptyString,
+             myapp()->frame->bitmaps[10],
+             myapp()->frame->bitmaps[10],
+-            TRUE, -1, -1, (wxObject *) NULL, txt("m_display_features") ) ;
++            wxITEM_CHECK, txt("m_display_features") ) ;
+         toolBar->AddTool( MDI_TOGGLE_RESTRICTION,
++            wxEmptyString,
+             myapp()->frame->bitmaps[11],
+             myapp()->frame->bitmaps[11],
+-            TRUE, -1, -1, (wxObject *) NULL, txt("m_display_restriction") ) ;        
++            wxITEM_CHECK, txt("m_display_restriction") ) ;
+         toolBar->AddSeparator() ;
+         toolBar->AddTool( MDI_VIEW_MODE,
++            wxEmptyString,
+             myapp()->frame->bitmaps[12],
+             myapp()->frame->bitmaps[12],
+-            TRUE, -1, -1, (wxObject *) NULL, txt("m_view_mode") ) ;
++            wxITEM_CHECK, txt("m_view_mode") ) ;
+         toolBar->AddTool( MDI_EDIT_MODE,
++            wxEmptyString,
+             myapp()->frame->bitmaps[13],
+             myapp()->frame->bitmaps[13],
+-            TRUE, -1, -1, (wxObject *) NULL, txt("m_edit_mode") ) ;
++            wxITEM_CHECK, txt("m_edit_mode") ) ;
+         toolBar->AddSeparator() ;
+         toolBar->AddControl ( new wxStaticText ( toolBar , -1 , txt("t_zoom") ) ) ;
+ #ifdef __WXMSW__
+@@ -1518,14 +1524,14 @@ void MyChild::updateUndoMenu ()
+     bool canUndo ;
+     if ( lm.IsEmpty() )
+         {
+-        mi->SetText ( txt("u_no") ) ;
++        mi->SetItemLabel ( txt("u_no") ) ;
+         mi->Enable ( false ) ;
+ 	    canUndo = false ;
+         }
+     else
+         {
+         mi->Enable ( true ) ;
+-        mi->SetText ( lm ) ;
++        mi->SetItemLabel ( lm ) ;
+ 	    canUndo = true ;
+         }
+     allow_undo = canUndo ;
+--- a/MyFrame.cpp
++++ b/MyFrame.cpp
+@@ -1223,14 +1223,17 @@ void MyFrame::addTool ( wxToolBar* toolB
+ 	
+ 	if ( id == MDI_TEXT_IMPORT )
+ 		toolBar->AddTool( MDI_TEXT_IMPORT ,
++						 wxEmptyString,
+ 						 bitmaps[0],
+ 						 txt("m_new_sequence") ) ;  
+ 	else if ( id == MDI_FILE_IMPORT )
+ 		toolBar->AddTool( MDI_FILE_IMPORT, 
++						 wxEmptyString,
+ 						 bitmaps[14],
+ 						 txt("m_importtxt") );
+ 	else if ( id == MDI_FILE_OPEN )
+ 		toolBar->AddTool( MDI_FILE_OPEN, 
++						 wxEmptyString,
+ 						 bitmaps[1],
+ 						 txt("m_opentxt") );
+ 	else if ( id == MDI_FILE_SAVE )
+@@ -1266,11 +1269,11 @@ void MyFrame::addDefaultTools(wxToolBar*
+ {
+ 	if ( mainToolBar && toolBar != mainToolBar ) return ;
+  	toolBar->AddSeparator() ;
+- 	toolBar->AddTool( MDI_ALIGNMENT, myapp()->frame->bitmaps[17] , txt("m_alignment_text") ) ;
+- 	toolBar->AddTool( MDI_IMAGE_VIEWER, myapp()->frame->bitmaps[18] , txt("m_imageviewer_text") ) ;
+- 	toolBar->AddTool( MDI_CALCULATOR, myapp()->frame->bitmaps[20] , txt("m_calculator_text") ) ;
+- 	toolBar->AddTool( PROGRAM_OPTIONS, myapp()->frame->bitmaps[21] , txt("m_options_text") ) ;
+- 	toolBar->AddTool( MDI_EXTERNAL_INTERFACE, myapp()->frame->bitmaps[19] , txt("m_external_text") ) ;
++ 	toolBar->AddTool( MDI_ALIGNMENT, wxEmptyString, myapp()->frame->bitmaps[17] , txt("m_alignment_text") ) ;
++ 	toolBar->AddTool( MDI_IMAGE_VIEWER, wxEmptyString, myapp()->frame->bitmaps[18] , txt("m_imageviewer_text") ) ;
++ 	toolBar->AddTool( MDI_CALCULATOR, wxEmptyString, myapp()->frame->bitmaps[20] , txt("m_calculator_text") ) ;
++ 	toolBar->AddTool( PROGRAM_OPTIONS, wxEmptyString, myapp()->frame->bitmaps[21] , txt("m_options_text") ) ;
++ 	toolBar->AddTool( MDI_EXTERNAL_INTERFACE, wxEmptyString, myapp()->frame->bitmaps[19] , txt("m_external_text") ) ;
+ }
+ 
+ /** \brief Adds cut,copy,paste (and find) tools to a given toolbar
+--- a/AminoAcids.cpp
++++ b/AminoAcids.cpp
+@@ -602,14 +602,14 @@ void TAminoAcids::updateUndoMenu ()
+     bool canUndo ;
+     if ( lm.IsEmpty() )
+         {
+-        mi->SetText ( txt("u_no") ) ;
++        mi->SetItemLabel ( txt("u_no") ) ;
+         mi->Enable ( false ) ;
+ 	canUndo = false ;
+         }
+     else
+         {
+         mi->Enable ( true ) ;
+-        mi->SetText ( lm ) ;
++        mi->SetItemLabel ( lm ) ;
+ 	canUndo = true ;
+         }
+ #ifdef __WXMSW__
+--- a/ExternalBLAST.cpp
++++ b/ExternalBLAST.cpp
+@@ -180,7 +180,7 @@ void EIpanel::process_blast()
+     blast_res.Empty() ;
+     wxString seq = t1->GetValue() ;
+     blast_thread = new blastThread ( this , seq ) ;
+-    if ( !blast_thread || wxTHREAD_NO_ERROR != blast_thread->Create() )
++    if ( !blast_thread || wxTHREAD_NO_ERROR != blast_thread->CreateThread() )
+     {
+ 	blast_thread = NULL ;
+ 	return ;
+--- a/Alignment.cpp
++++ b/Alignment.cpp
+@@ -4,6 +4,7 @@
+ #include "Alignment.h"
+ #include "AlignmentAppearanceDialog.h"
+ #include <wx/textfile.h>
++#include <wx/filename.h>
+ 
+ #ifdef __DEBIAN__
+ 	#define USE_EXTERNAL_CLUSTALW
+@@ -264,6 +265,7 @@ void TAlignment::initme ()
+ 	myapp()->frame->addTool ( toolBar , SEQ_PRINT ) ;
+     if ( !myapp()->frame->mainToolBar ) toolBar->AddSeparator () ;
+     toolBar->AddTool( ALIGNMENT_SETTINGS,
++                wxEmptyString,
+                 myapp()->frame->bitmaps[21],
+                 txt("t_alignment_settings") ) ;
+     toolBar->AddSeparator () ;
+@@ -304,7 +306,7 @@ void* TAlignment::Entry()
+     wxString cwt = _T("clustalw.txt") ;
+     wxString hd = myapp()->homedir ;
+     
+-    wxString tmpdir = wxGetTempFileName ( _T("") ) ;
++    wxString tmpdir = wxFileName::CreateTempFileName ( _T("") ) ;
+     tmpdir.Replace ( _T("\\") , _T("/") ) ;
+     tmpdir = tmpdir.BeforeLast ( '/' ) ;
+     
+@@ -437,7 +439,7 @@ void TAlignment::recalcAlignments ()
+ 		threadRunning = true ;
+ 		sc->Refresh () ;
+ //		wxSafeYield() ;
+-		wxThreadHelper::Create () ;
++		wxThreadHelper::CreateThread () ;
+ 		GetThread()->Run() ;
+ 		return ;
+ 	    }
+--- a/TGraphDisplay.cpp
++++ b/TGraphDisplay.cpp
+@@ -971,8 +971,8 @@ void TGraphDisplay::OnSwapSides(wxComman
+ 	{
+ 	if ( !old_scale ) return ;
+ 	old_scale->left = !old_scale->left ;
+-	wxPaintEvent ev ;
+-	OnPaint ( ev ) ;
++	Refresh();
++	Update();
+ 	}
+ 	
+ void TGraphDisplay::DrawIntoBitmap ( wxBitmap &bmp )
+--- a/CloningAssistant.cpp
++++ b/CloningAssistant.cpp
+@@ -206,8 +206,8 @@ void TCloningAssistantPanel::Refresh (bo
+ void TCloningAssistantPanel::OnEvent(wxMouseEvent& event)
+ 	{
+ 	if ( timer.move_back ) return ;
+-	wxPaintEvent ev ;
+-	OnPaint ( ev ) ;	
++	Refresh();
++	Update();
+     wxPoint pt(event.GetPosition());
+ 	
+ 	TDDR *over = NULL ;
+@@ -509,7 +509,7 @@ void TDDR::draw ( wxDC &dc , wxPoint off
+ 
+ void TDDR::resizeForText ( wxDC &dc )
+ 	{
+-	long w , h ;
++	wxCoord w , h ;
+ 	dc.GetTextExtent ( title , &w , &h ) ;
+ 	r.SetWidth ( w + 4 ) ;
+ 	r.SetHeight ( h + 4 ) ;



View it on GitLab: https://salsa.debian.org/med-team/gentle/-/commit/50bef03ae28bfe440cfa7c570e2a4e483f167e49

-- 
View it on GitLab: https://salsa.debian.org/med-team/gentle/-/commit/50bef03ae28bfe440cfa7c570e2a4e483f167e49
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20220916/eb8fdb43/attachment-0001.htm>


More information about the debian-med-commit mailing list