#1 Rebuild with wxWidgets 3.2
Merged 2 months ago by mtasaka. Opened 2 months ago by swt2c.
rpms/ swt2c/4Pane wx3.2  into  rawhide

file added
+140
@@ -0,0 +1,140 @@ 

+ From 66ae9a6f2ac526d80559967cda428cd48e5859ee Mon Sep 17 00:00:00 2001

+ From: dghart <dghart@users.sourceforge.net>

+ Date: Sat, 12 Feb 2022 15:45:54 +0000

+ Subject: [PATCH] Compilation fixes for wxWidgets 3.1.6

+ 

+ Workarounds for the addition of wxBitmapBundle.

+ ---

+  Devices.cpp    |  4 ++++

+  MyDirs.cpp     |  9 +++++++++

+  MyTreeCtrl.cpp | 49 ++++++++++++++++++++++++++++++++++++++-----------

+  3 files changed, 51 insertions(+), 11 deletions(-)

+ 

+ diff --git a/Devices.cpp b/Devices.cpp

+ index 5b8cfe9..dc77cdc 100644

+ --- a/Devices.cpp

+ +++ b/Devices.cpp

+ @@ -210,7 +210,11 @@ wxString bitmap; config->Read(Rootname+subgrp+wxT("/Bitmap"), &bitmap);

+  wxString tooltip; config->Read(Rootname+subgrp+wxT("/Tooltip"), &tooltip);

+  

+  bitmap = BITMAPSDIR + bitmap;

+ +#if wxVERSION_NUMBER > 3105

+ +Create(MyFrame::mainframe->panelette, -1, wxBitmapBundle::FromBitmap(bitmap), wxDefaultPosition, wxDefaultSize, wxNO_BORDER);

+ +#else

+  Create(MyFrame::mainframe->panelette, -1, bitmap, wxDefaultPosition, wxDefaultSize, wxNO_BORDER);

+ +#endif

+  SetToolTip(tooltip);

+  }

+  

+ diff --git a/MyDirs.cpp b/MyDirs.cpp

+ index 68f41a8..f370d5b 100644

+ --- a/MyDirs.cpp

+ +++ b/MyDirs.cpp

+ @@ -522,10 +522,19 @@ for (size_t n=0; n < count; ++n)

+                                                                                                          array->Item(n)->tooltip, wxITEM_NORMAL);

+       else

+        { if (array->Item(n)->bitmaplocation.AfterLast(('/')) == wxT("MyDocuments.xpm")) // If Documents and the label is empty, supply a default

+ +#if wxVERSION_NUMBER > 3105

+ +          toolBar->AddTool(IDM_TOOLBAR_bmfirst+n, label.empty() ? wxString(_("Documents")) : label,wxBitmapBundle::FromBitmap(array->Item(n)->bitmaplocation),

+ +                                                                                                        array->Item(n)->tooltip, wxITEM_NORMAL);

+ +         else                                                                                                    

+ +          toolBar->AddTool(IDM_TOOLBAR_bmfirst + n, label, wxBitmapBundle::FromBitmap(array->Item(n)->bitmaplocation), array->Item(n)->tooltip, wxITEM_NORMAL);

+ +

+ +#else

+            toolBar->AddTool(IDM_TOOLBAR_bmfirst+n, label.empty() ? wxString(_("Documents")) : label, array->Item(n)->bitmaplocation,

+ +

+                                                                                                          array->Item(n)->tooltip, wxITEM_NORMAL);

+           else                                                                                                    

+            toolBar->AddTool(IDM_TOOLBAR_bmfirst + n, label, array->Item(n)->bitmaplocation, array->Item(n)->tooltip, wxITEM_NORMAL);

+ +#endif //wxVERSION_NUMBER > 3105

+        }

+    }

+  

+ diff --git a/MyTreeCtrl.cpp b/MyTreeCtrl.cpp

+ index bc1b607..735b6cf 100644

+ --- a/MyTreeCtrl.cpp

+ +++ b/MyTreeCtrl.cpp

+ @@ -1336,7 +1336,27 @@ void MyTreeCtrl::PaintLevel(wxGenericTreeItem *item, wxDC &dc, int level, int &y

+                      dc.DrawLine(3, y_mid, x - 5, y_mid);

+                  dc.DrawLine(x + 5, y_mid, x + m_spacing, y_mid);

+              }

+ +#if wxVERSION_NUMBER > 3105

+ +            if ( m_imagesButtons.HasImages() )

+ +            {

+ +                // draw the image button here

+ +                int image_h = 0,  image_w = 0;

+ +                int image = item->IsExpanded() ? wxTreeItemIcon_Expanded

+ +                                               : wxTreeItemIcon_Normal;

+ +                if ( item->IsSelected() )

+ +                    image += wxTreeItemIcon_Selected - wxTreeItemIcon_Normal;

+ +

+ +                wxImageList* const

+ +                    imageListButtons = m_imagesButtons.GetImageList();

+ +                imageListButtons->GetSize(image, image_w, image_h);

+ +                int xx = x - image_w/2;

+ +                int yy = y_mid - image_h/2;

+  

+ +                wxDCClipper clip(dc, xx, yy, image_w, image_h);

+ +                imageListButtons->Draw(image, dc, xx, yy,

+ +                                         wxIMAGELIST_DRAW_TRANSPARENT);

+ +            }

+ +#else // !wxVERSION_NUMBER > 3105

+              if (m_imageListButtons != NULL)

+              {

+                  // draw the image button here

+ @@ -1352,9 +1372,10 @@ void MyTreeCtrl::PaintLevel(wxGenericTreeItem *item, wxDC &dc, int level, int &y

+                                           wxIMAGELIST_DRAW_TRANSPARENT);

+                  dc.DestroyClippingRegion();

+              }

+ -

+ +#endif

+      }

+    }

+ +

+             else // no custom buttons

+              {

+                  static const int wImage = 9;

+ @@ -1495,15 +1516,17 @@ if (headerwindow->IsHidden(i)) continue;                                  // //

+        image = NO_IMAGE;  // //item->GetImage(i);

+        }

+    

+ -  if(image != NO_IMAGE) 

+ -   {

+ -      if(m_imageListNormal) {

+ -    m_imageListNormal->GetSize(image, image_w, image_h);

+ -    image_w += 4;

+ -                          }

+ -      else {

+ -    image = NO_IMAGE;

+ -          }

+ +    if (image != NO_IMAGE) 

+ +     {

+ +#if wxVERSION_NUMBER > 3105

+ +      if (GetImageList()) {

+ +          GetImageList()->GetSize(image, image_w, image_h);

+ +#else

+ +      if (m_imageListNormal) {

+ +        m_imageListNormal->GetSize(image, image_w, image_h);

+ +#endif // wxVERSION_NUMBER > 3105

+ +        image_w += 4;

+ +      } else { image = NO_IMAGE;  }

+     }

+  

+    // honor text alignment

+ @@ -1581,8 +1604,12 @@ if (headerwindow->IsHidden(i)) continue;                                  // //

+            item->GetY() + extraH, clip_width,

+            total_h);

+  

+ -  if(image != NO_IMAGE) {

+ +  if (image != NO_IMAGE) {

+ +#if wxVERSION_NUMBER > 3105

+ +      GetImageList()->Draw(image, dc, image_x,

+ +#else

+        m_imageListNormal->Draw(image, dc, image_x,

+ +#endif

+               item->GetY() +((total_h > image_h)?

+                  ((total_h-image_h)/2):0),

+               wxIMAGELIST_DRAW_TRANSPARENT);

+ -- 

+ 2.37.1

+ 

file modified
+8 -3
@@ -8,7 +8,7 @@ 

  

  Name:			4Pane

  Version:		7.0

- Release:		5%{?dist}

+ Release:		6%{?dist}

  Summary:		Multi-pane, detailed-list file manager

  

  License:		GPLv3
@@ -17,11 +17,12 @@ 

  # Patch from the upstream to fix sizing and color issue with

  # GTK 3.20 (bug 1345924)

  #Patch0:		4Pane-4.0-gtk320-sizing.patch

+ Patch0:                 4Pane-7.0-wx3.2.patch

  

  BuildRequires:	gcc-c++

  BuildRequires:	bzip2-devel

  BuildRequires:	xz-devel

- BuildRequires:	wxGTK3-devel

+ BuildRequires:	wxGTK-devel

  BuildRequires:  %{_bindir}/desktop-file-install

  BuildRequires:  %{_bindir}/appstream-util

  BuildRequires:	gettext
@@ -40,6 +41,7 @@ 

  

  %prep

  %setup -q -n 4pane-%{version}

+ %patch0 -p1

  

  %if 0

  cat > .gitignore <<EOF
@@ -61,7 +63,7 @@ 

  	-e '\@[ \t]\{5,\}C.*FLAGS[ \t]*=[ \t]*$@d'

  

  %build

- export WX_CONFIG_NAME=wx-config-3.0

+ export WX_CONFIG_NAME=wx-config-3.2

  export EXTRA_CXXFLAGS="%{optflags}"

  

  # --without-builtin_bzip2 means using system bzip2
@@ -112,6 +114,9 @@ 

  %{_datadir}/icons/hicolor/*/apps/%{name}*

  

  %changelog

+ * Thu Aug 04 2022 Scott Talbert <swt@techie.net> - 7.0-6

+ - Rebuild with wxWidgets 3.2

+ 

  * Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 7.0-5

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

  

Metadata