forked from pool/wxWidgets-3_2
Accepting request 976441 from home:1Antoine1:branches:M17N
- Add wxWidgets-3.1.6-fix-wxDVC-not-showing-empty-cells.patch (gh#wxWidgets/wxWidgets#22359). - Remove _service file: Unused. - Fix some rpmlint warnings: * Remove unused rpmlintrc filters. * Remove non-breaking spaces. OBS-URL: https://build.opensuse.org/request/show/976441 OBS-URL: https://build.opensuse.org/package/show/X11:wxWidgets/wxWidgets-3_2?expand=0&rev=90
This commit is contained in:
parent
92c3fc84b2
commit
2ecff40c38
15
_service
15
_service
@ -1,15 +0,0 @@
|
|||||||
<services>
|
|
||||||
<service name="tar_scm" mode="disabled">
|
|
||||||
<param name="scm">git</param>
|
|
||||||
<param name="url">git://github.com/wxWidgets/wxWidgets</param>
|
|
||||||
<param name="revision">6cc1d63d68f746cf9e48b75edd119a4cb4309f25</param>
|
|
||||||
<param name="parent-tag">v3.1.4</param>
|
|
||||||
<param name="versionformat">3.1.5~g@TAG_OFFSET@</param>
|
|
||||||
<param name="versionrewrite-pattern">v(.*)</param>
|
|
||||||
</service>
|
|
||||||
<service name="recompress" mode="disabled">
|
|
||||||
<param name="file">*.tar</param>
|
|
||||||
<param name="compression">xz</param>
|
|
||||||
</service>
|
|
||||||
<service name="set_version" mode="disabled"/>
|
|
||||||
</services>
|
|
137
wxWidgets-3.1.6-fix-wxDVC-not-showing-empty-cells.patch
Normal file
137
wxWidgets-3.1.6-fix-wxDVC-not-showing-empty-cells.patch
Normal file
@ -0,0 +1,137 @@
|
|||||||
|
From 1c9c48c34606ef4c26cf92dfb2b5abd4ac65f8d1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Vadim Zeitlin <vadim@wxwidgets.org>
|
||||||
|
Date: Sun, 8 May 2022 00:27:45 +0200
|
||||||
|
Subject: [PATCH 1/3] Don't show value-less wxDataViewVirtualListModel cells in
|
||||||
|
wxGTK
|
||||||
|
|
||||||
|
For some reason, calls to wxGtkTreeSetVisibleProp() were skipped when
|
||||||
|
using virtual list model in wxGTK implementation, resulting in showing
|
||||||
|
the value of the previous (i.e. upper) cell for the rows of this model
|
||||||
|
for which no value was available.
|
||||||
|
|
||||||
|
Simply remove IsVirtualListModel() checks and always set the cell
|
||||||
|
visibility to fix this.
|
||||||
|
|
||||||
|
This commit is best viewed ignoring whitespace-only changes.
|
||||||
|
---
|
||||||
|
src/gtk/dataview.cpp | 20 +++++---------------
|
||||||
|
1 file changed, 5 insertions(+), 15 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/gtk/dataview.cpp b/src/gtk/dataview.cpp
|
||||||
|
index 22f7f25cc359..85e64d69adec 100644
|
||||||
|
--- a/src/gtk/dataview.cpp
|
||||||
|
+++ b/src/gtk/dataview.cpp
|
||||||
|
@@ -3233,25 +3233,15 @@ static void wxGtkTreeCellDataFunc( GtkTreeViewColumn *WXUNUSED(column),
|
||||||
|
|
||||||
|
wxDataViewModel *wx_model = tree_model->internal->GetDataViewModel();
|
||||||
|
|
||||||
|
- if (!wx_model->IsVirtualListModel())
|
||||||
|
+ gboolean visible = wx_model->HasValue(item, column);
|
||||||
|
+ if ( visible )
|
||||||
|
{
|
||||||
|
- gboolean visible = wx_model->HasValue(item, column);
|
||||||
|
- wxGtkTreeSetVisibleProp(renderer, visible);
|
||||||
|
+ cell->GtkSetCurrentItem(item);
|
||||||
|
|
||||||
|
- if ( !visible )
|
||||||
|
- return;
|
||||||
|
+ visible = cell->PrepareForItem(wx_model, item, column);
|
||||||
|
}
|
||||||
|
|
||||||
|
- cell->GtkSetCurrentItem(item);
|
||||||
|
-
|
||||||
|
- if (!cell->PrepareForItem(wx_model, item, column))
|
||||||
|
- {
|
||||||
|
- // We don't have any value in this cell, after all, so hide it.
|
||||||
|
- if (!wx_model->IsVirtualListModel())
|
||||||
|
- {
|
||||||
|
- wxGtkTreeSetVisibleProp(renderer, FALSE);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
+ wxGtkTreeSetVisibleProp(renderer, visible);
|
||||||
|
}
|
||||||
|
|
||||||
|
} // extern "C"
|
||||||
|
|
||||||
|
From 610eeb476ba4e0e87c0cd9d9fff17fa38e098a6a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Vadim Zeitlin <vadim@wxwidgets.org>
|
||||||
|
Date: Sun, 8 May 2022 00:32:06 +0200
|
||||||
|
Subject: [PATCH 2/3] Inline wxGtkTreeSetVisibleProp() function
|
||||||
|
|
||||||
|
No real changes, just get rid of a trivial helper function which is only
|
||||||
|
used once since the changes of the previous commit and copy its code
|
||||||
|
directly into the caller.
|
||||||
|
---
|
||||||
|
src/gtk/dataview.cpp | 12 +++---------
|
||||||
|
1 file changed, 3 insertions(+), 9 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/gtk/dataview.cpp b/src/gtk/dataview.cpp
|
||||||
|
index 85e64d69adec..5b3b391c98b7 100644
|
||||||
|
--- a/src/gtk/dataview.cpp
|
||||||
|
+++ b/src/gtk/dataview.cpp
|
||||||
|
@@ -3199,14 +3199,6 @@ gtk_dataview_header_button_press_callback( GtkWidget *WXUNUSED(widget),
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
-// Helper for wxGtkTreeCellDataFunc() below.
|
||||||
|
-static void wxGtkTreeSetVisibleProp(GtkCellRenderer *renderer, gboolean visible)
|
||||||
|
-{
|
||||||
|
- wxGtkValue gvalue( G_TYPE_BOOLEAN );
|
||||||
|
- g_value_set_boolean( gvalue, visible );
|
||||||
|
- g_object_set_property( G_OBJECT(renderer), "visible", gvalue );
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
extern "C"
|
||||||
|
{
|
||||||
|
|
||||||
|
@@ -3241,7 +3233,9 @@ static void wxGtkTreeCellDataFunc( GtkTreeViewColumn *WXUNUSED(column),
|
||||||
|
visible = cell->PrepareForItem(wx_model, item, column);
|
||||||
|
}
|
||||||
|
|
||||||
|
- wxGtkTreeSetVisibleProp(renderer, visible);
|
||||||
|
+ wxGtkValue gvalue( G_TYPE_BOOLEAN );
|
||||||
|
+ g_value_set_boolean( gvalue, visible );
|
||||||
|
+ g_object_set_property( G_OBJECT(renderer), "visible", gvalue );
|
||||||
|
}
|
||||||
|
|
||||||
|
} // extern "C"
|
||||||
|
|
||||||
|
From 8aefedcb456c32fac72a691001eb47f23447f559 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Vadim Zeitlin <vadim@wxwidgets.org>
|
||||||
|
Date: Sun, 8 May 2022 18:24:01 +0200
|
||||||
|
Subject: [PATCH 3/3] Remove duplicated HasValue() call from wxGTK
|
||||||
|
wxDataViewCtrl code
|
||||||
|
|
||||||
|
HasValue() is already called by PrepareForItem(), so there is no need to
|
||||||
|
call it explicitly from wxGTK code, just rely on PrepareForItem()
|
||||||
|
returning false if there is no value to show -- we can skip the call to
|
||||||
|
GtkSetCurrentItem() in this case, this function is cheap, and we lose
|
||||||
|
more by calling HasValue() twice in the common case than we save on not
|
||||||
|
calling it.
|
||||||
|
|
||||||
|
No real changes.
|
||||||
|
---
|
||||||
|
src/gtk/dataview.cpp | 9 +++------
|
||||||
|
1 file changed, 3 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/gtk/dataview.cpp b/src/gtk/dataview.cpp
|
||||||
|
index 5b3b391c98b7..115299de1365 100644
|
||||||
|
--- a/src/gtk/dataview.cpp
|
||||||
|
+++ b/src/gtk/dataview.cpp
|
||||||
|
@@ -3225,13 +3225,10 @@ static void wxGtkTreeCellDataFunc( GtkTreeViewColumn *WXUNUSED(column),
|
||||||
|
|
||||||
|
wxDataViewModel *wx_model = tree_model->internal->GetDataViewModel();
|
||||||
|
|
||||||
|
- gboolean visible = wx_model->HasValue(item, column);
|
||||||
|
- if ( visible )
|
||||||
|
- {
|
||||||
|
- cell->GtkSetCurrentItem(item);
|
||||||
|
+ cell->GtkSetCurrentItem(item);
|
||||||
|
|
||||||
|
- visible = cell->PrepareForItem(wx_model, item, column);
|
||||||
|
- }
|
||||||
|
+ // Cells without values shouldn't be rendered at all.
|
||||||
|
+ const bool visible = cell->PrepareForItem(wx_model, item, column);
|
||||||
|
|
||||||
|
wxGtkValue gvalue( G_TYPE_BOOLEAN );
|
||||||
|
g_value_set_boolean( gvalue, visible );
|
@ -1,10 +1,4 @@
|
|||||||
# Project name just starts with lowercase.
|
# Project name just starts with lowercase.
|
||||||
addFilter("summary-not-capitalized")
|
addFilter("summary-not-capitalized")
|
||||||
# We know what we are doing. %{wxlibdir}/wx can be owned by more package instances at once.
|
|
||||||
addFilter("shlib-policy-nonversioned-dir")
|
|
||||||
# There is no such package.
|
# There is no such package.
|
||||||
addFilter("no-dependency-on")
|
addFilter("no-dependency-on")
|
||||||
# Package splits to many library packages, we just need to obsolete old one.
|
|
||||||
addFilter("obsolete-not-provided")
|
|
||||||
# Yes, there are macros in comments.
|
|
||||||
addFilter("macro-in-comment")
|
|
||||||
|
@ -1,3 +1,13 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun May 8 09:56:40 UTC 2022 - Antoine Belvire <antoine.belvire@opensuse.org>
|
||||||
|
|
||||||
|
- Add wxWidgets-3.1.6-fix-wxDVC-not-showing-empty-cells.patch
|
||||||
|
(gh#wxWidgets/wxWidgets#22359).
|
||||||
|
- Remove _service file: Unused.
|
||||||
|
- Fix some rpmlint warnings:
|
||||||
|
* Remove unused rpmlintrc filters.
|
||||||
|
* Remove non-breaking spaces.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Apr 13 16:45:53 UTC 2022 - Ferdinand Thiessen <rpm@fthiessen.de>
|
Wed Apr 13 16:45:53 UTC 2022 - Ferdinand Thiessen <rpm@fthiessen.de>
|
||||||
|
|
||||||
|
@ -82,6 +82,8 @@ Source5: wxWidgets-3_2-rpmlintrc
|
|||||||
# identify and backport wxPython fixes to wxWidgets.
|
# identify and backport wxPython fixes to wxWidgets.
|
||||||
Source6: wxpython-mkdiff.sh
|
Source6: wxpython-mkdiff.sh
|
||||||
Patch1: soversion.diff
|
Patch1: soversion.diff
|
||||||
|
# PATCH-FIX-UPSTREAM wxWidgets-3.1.6-fix-wxDVC-not-showing-empty-cells.patch -- https://github.com/wxWidgets/wxWidgets/issues/22359
|
||||||
|
Patch2: wxWidgets-3.1.6-fix-wxDVC-not-showing-empty-cells.patch
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
BuildRequires: cppunit-devel
|
BuildRequires: cppunit-devel
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
@ -210,7 +212,7 @@ Group: System/Libraries
|
|||||||
%description -n libwx_%{toolkit}u_html-%variant%psonum
|
%description -n libwx_%{toolkit}u_html-%variant%psonum
|
||||||
The wxHTML library provides classes for parsing and displaying HTML.
|
The wxHTML library provides classes for parsing and displaying HTML.
|
||||||
It is not intended to be a high-end HTML browser. wxHTML can be used
|
It is not intended to be a high-end HTML browser. wxHTML can be used
|
||||||
as a generic rich text viewer – for example, to display an About Box
|
as a generic rich text viewer – for example, to display an About Box
|
||||||
or the result of a database search.
|
or the result of a database search.
|
||||||
%{?extra_description}
|
%{?extra_description}
|
||||||
|
|
||||||
@ -271,7 +273,7 @@ Group: System/Libraries
|
|||||||
|
|
||||||
%description -n libwx_%{toolkit}u_webview-%variant%psonum
|
%description -n libwx_%{toolkit}u_webview-%variant%psonum
|
||||||
Library for a wxWidgets control that can be used to render web
|
Library for a wxWidgets control that can be used to render web
|
||||||
(HTML / CSS / JavaScript) documents.
|
(HTML / CSS / JavaScript) documents.
|
||||||
|
|
||||||
%package -n libwx_%{toolkit}u_xrc-%variant%psonum
|
%package -n libwx_%{toolkit}u_xrc-%variant%psonum
|
||||||
Summary: wxWidgets's XML-based resource system
|
Summary: wxWidgets's XML-based resource system
|
||||||
|
Loading…
Reference in New Issue
Block a user