[M-git] Mahogany sources repository. branch master updated. v0.67-929-g2bb5a98f

vadz via Mahogany-cvsupdates <[email protected]> Sat, 02 May 2026 21:52:36 +0000
Newsgroups gmane.mail.mahogany.cvs
Message-ID <[email protected]>
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Mahogany sources repository.".

The branch, master has been updated
       via  2bb5a98f2900548f99b893f07e40f4809c2a48ff (commit)
       via  6fe02590161d85d211e389b8a6912a362acc47fe (commit)
      from  14989495a71a9e63c8580a4fa0dd516d6292191c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 2bb5a98f2900548f99b893f07e40f4809c2a48ff
Author: Vadim Zeitlin <[email protected]>
Date:   Sat May 2 23:51:46 2026 +0200

    Fix wrong format specifier in wxFolderView::UpdateStatusBar()
    
    This was broken by a5da6124 (Get rid of remaining casts to "unsigned
    long" by using "%zu", 2025-07-01), as we need just "%d" here.

diff --git a/src/gui/wxFolderView.cpp b/src/gui/wxFolderView.cpp
index 8e1d0975..1c3d7a15 100644
--- a/src/gui/wxFolderView.cpp
+++ b/src/gui/wxFolderView.cpp
@@ -2862,7 +2862,7 @@ void wxFolderListCtrl::UpdateStatusBar()
 
       String msg;
       if ( m_countSelected )
-         msg.Printf(_("%zu messages selected"), m_countSelected);
+         msg.Printf(_("%d messages selected"), m_countSelected);
 
       // determine where should this message go
       wxFrame *frame = GetFrame(this);

commit 6fe02590161d85d211e389b8a6912a362acc47fe
Author: Vadim Zeitlin <[email protected]>
Date:   Sat May 2 23:44:06 2026 +0200

    Fix scrolling HTML viewer to compile with latest wx
    
    This code used private HandleOnChar() function which was made actually
    private in the latest wx version, so change it to not use it any more.

diff --git a/src/modules/HtmlViewer.cpp b/src/modules/HtmlViewer.cpp
index 9881ea1c..3c0827c7 100644
--- a/src/modules/HtmlViewer.cpp
+++ b/src/modules/HtmlViewer.cpp
@@ -158,9 +158,8 @@ private:
    // printing helper: creates m_printHtml object if not done yet
    void InitPrinting();
 
-   // emulate a key press: this is the only way I found to scroll
-   // wxScrolledWindow
-   void EmulateKeyPress(int keycode);
+   // emulate the effect of a wxScrollWinEvent with the given type
+   void EmulateScroll(wxEventType evtType);
 
 
    // the viewer window
@@ -1207,11 +1206,13 @@ void HtmlViewer::EndBody()
 // scrolling
 // ----------------------------------------------------------------------------
 
-void HtmlViewer::EmulateKeyPress(int keycode)
+void HtmlViewer::EmulateScroll(wxEventType evtType)
 {
-   wxKeyEvent event;
-   event.m_keyCode = keycode;
-   m_window->HandleOnChar(event);
+   wxScrollWinEvent event(evtType, 0, wxVERTICAL);
+   event.SetEventObject(m_window);
+   event.SetId(m_window->GetId());
+
+   m_window->ProcessWindowEvent(event);
 }
 
 bool
@@ -1219,7 +1220,7 @@ HtmlViewer::LineDown()
 {
    ScrollPositionChangeChecker check(m_window);
 
-   EmulateKeyPress(WXK_DOWN);
+   EmulateScroll(wxEVT_SCROLLWIN_LINEDOWN);
 
    return check.HasChanged();
 }
@@ -1229,7 +1230,7 @@ HtmlViewer::LineUp()
 {
    ScrollPositionChangeChecker check(m_window);
 
-   EmulateKeyPress(WXK_UP);
+   EmulateScroll(wxEVT_SCROLLWIN_LINEUP);
 
    return check.HasChanged();
 }
@@ -1239,7 +1240,7 @@ HtmlViewer::PageDown()
 {
    ScrollPositionChangeChecker check(m_window);
 
-   EmulateKeyPress(WXK_PAGEDOWN);
+   EmulateScroll(wxEVT_SCROLLWIN_PAGEDOWN);
 
    return check.HasChanged();
 }
@@ -1249,7 +1250,7 @@ HtmlViewer::PageUp()
 {
    ScrollPositionChangeChecker check(m_window);
 
-   EmulateKeyPress(WXK_PAGEUP);
+   EmulateScroll(wxEVT_SCROLLWIN_PAGEUP);
 
    return check.HasChanged();
 }

-----------------------------------------------------------------------

Summary of changes:
 src/gui/wxFolderView.cpp   |  2 +-
 src/modules/HtmlViewer.cpp | 23 ++++++++++++-----------
 2 files changed, 13 insertions(+), 12 deletions(-)


hooks/post-receive
-- 
Mahogany sources repository.