$ git show --format=fuller --patch-with-stat --summary 6259a865384b818e49340723f693a0de214eb8bd
commit 6259a865384b818e49340723f693a0de214eb8bd
Author: mandian <mandian@users.noreply.github.com>
AuthorDate: Wed Dec 6 17:29:29 2023 +0000
Commit: mandian <mandian@users.noreply.github.com>
CommitDate: Wed Dec 6 17:29:29 2023 +0000
upgrade at the latest git version and rebuild against gtk3
---
.abf.yml | 1 +
...cify-GTK_REQUEST_CONSTANT_SIZE.-Fixes-773.patch | 37 ++++++
3c1ad6bc7c8b4b3ba66c04e6e10aa741f028ba75.patch | 22 ++++
...-poll-alsa-mixer-several-times-at-startup.patch | 42 +++++++
lxpanel-0.10.1-batt-chaging-pending.patch | 12 ++
lxpanel-0.10.1-remove_failing_plugins.patch | 11 ++
lxpanel-0.8.1-Fix-pager-scroll.patch | 11 ++
lxpanel.spec | 136 ++++++++++++---------
8 files changed, 215 insertions(+), 57 deletions(-)
create mode 100644 0001-Specify-GTK_REQUEST_CONSTANT_SIZE.-Fixes-773.patch
create mode 100644 3c1ad6bc7c8b4b3ba66c04e6e10aa741f028ba75.patch
create mode 100644 lxpanel-0.10.1-0003-volumealsa-poll-alsa-mixer-several-times-at-startup.patch
create mode 100644 lxpanel-0.10.1-batt-chaging-pending.patch
create mode 100644 lxpanel-0.10.1-remove_failing_plugins.patch
create mode 100644 lxpanel-0.8.1-Fix-pager-scroll.patch
diff --git a/.abf.yml b/.abf.yml
index 46f2956..7a1b592 100644
--- a/.abf.yml
+++ b/.abf.yml
@@ -1,2 +1,3 @@
sources:
lxpanel-0.10.2.r1.tar.bz2: 0ab0d7b299a76b39b5f4a9d1a797ea48d444a7a3
+ lxpanel-633a2d46ffd37f3acde539de9a2861d1ade49ef8.tar.gz: ab288127fd4bc45a6949be0a479ec8d203cc0f19
diff --git a/0001-Specify-GTK_REQUEST_CONSTANT_SIZE.-Fixes-773.patch b/0001-Specify-GTK_REQUEST_CONSTANT_SIZE.-Fixes-773.patch
new file mode 100644
index 0000000..4d53fc8
--- /dev/null
+++ b/0001-Specify-GTK_REQUEST_CONSTANT_SIZE.-Fixes-773.patch
@@ -0,0 +1,37 @@
+From b46e3a39786a5be04bf9cc3844dd184308cd7495 Mon Sep 17 00:00:00 2001
+From: Ben Walsh <b@wumpster.com>
+Date: Sat, 6 Jun 2020 10:38:15 +0100
+Subject: [PATCH] Specify GTK_REQUEST_CONSTANT_SIZE. Fixes #773.
+
+---
+ src/panel.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/panel.c b/src/panel.c
+index da9e718b..b52fc796 100644
+--- a/src/panel.c
++++ b/src/panel.c
+@@ -293,6 +293,12 @@ lxpanel_get_preferred_height (GtkWidget *widget,
+ if (natural_height)
+ *natural_height = requisition.height;
+ }
++
++static GtkSizeRequestMode
++lxpanel_get_request_mode (GtkWidget *widget)
++{
++ return GTK_SIZE_REQUEST_CONSTANT_SIZE;
++}
+ #endif
+
+ static void lxpanel_size_allocate(GtkWidget *widget, GtkAllocation *a)
+@@ -413,6 +419,7 @@ static void lxpanel_class_init(PanelToplevelClass *klass)
+ #if GTK_CHECK_VERSION(3, 0, 0)
+ widget_class->get_preferred_width = lxpanel_get_preferred_width;
+ widget_class->get_preferred_height = lxpanel_get_preferred_height;
++ widget_class->get_request_mode = lxpanel_get_request_mode;
+ #else
+ widget_class->size_request = lxpanel_size_request;
+ #endif
+--
+2.27.0
+
diff --git a/3c1ad6bc7c8b4b3ba66c04e6e10aa741f028ba75.patch b/3c1ad6bc7c8b4b3ba66c04e6e10aa741f028ba75.patch
new file mode 100644
index 0000000..688a372
--- /dev/null
+++ b/3c1ad6bc7c8b4b3ba66c04e6e10aa741f028ba75.patch
@@ -0,0 +1,22 @@
+From 3c1ad6bc7c8b4b3ba66c04e6e10aa741f028ba75 Mon Sep 17 00:00:00 2001
+From: Ben Walsh <b@wumpster.com>
+Date: Mon, 7 Feb 2022 07:02:05 +0000
+Subject: [PATCH] Correct icon-grid width under GTK3. Fixes Github #29.
+
+---
+ src/icon-grid.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/icon-grid.c b/src/icon-grid.c
+index 2177971e..5948fee6 100644
+--- a/src/icon-grid.c
++++ b/src/icon-grid.c
+@@ -392,7 +392,7 @@ static void panel_icon_grid_get_preferred_width(GtkWidget *widget,
+ }
+ panel_icon_grid_size_request(widget, &requisition);
+ if (minimal_width)
+- *minimal_width = requisition.width;
++ *minimal_width = ig->constrain_width ? 2 : requisition.width;
+ if (natural_width)
+ *natural_width = requisition.width;
+ }
diff --git a/lxpanel-0.10.1-0003-volumealsa-poll-alsa-mixer-several-times-at-startup.patch b/lxpanel-0.10.1-0003-volumealsa-poll-alsa-mixer-several-times-at-startup.patch
new file mode 100644
index 0000000..932f622
--- /dev/null
+++ b/lxpanel-0.10.1-0003-volumealsa-poll-alsa-mixer-several-times-at-startup.patch
@@ -0,0 +1,42 @@
+From d682b50677dde648bf4ff0fca52b9ff8e1d25d09 Mon Sep 17 00:00:00 2001
+From: Mamoru TASAKA <mtasaka@fedoraproject.org>
+Date: Sun, 1 Aug 2021 21:50:00 +0900
+Subject: [PATCH] volumealsa: poll alsa mixer several times at startup
+
+On Fedora 34, the default alsa mixer is replaced by pipewire-alsa.
+Very often time, pipewire wakes up later than lxpanel is launched, which
+makes alsa mixer not detectable at lxpanel startup.
+
+For workaround, poll mixer several times at lxpanel startup.
+---
+ plugins/volumealsa/volumealsa.c | 13 ++++++++++---
+ 1 file changed, 10 insertions(+), 3 deletions(-)
+
+diff --git a/plugins/volumealsa/volumealsa.c b/plugins/volumealsa/volumealsa.c
+index 5c41051..bf5410b 100644
+--- a/plugins/volumealsa/volumealsa.c
++++ b/plugins/volumealsa/volumealsa.c
+@@ -963,10 +963,17 @@ static GtkWidget *volumealsa_constructor(LXPanel *panel, config_setting_t *setti
+ lxpanel_apply_hotkey(&vol->hotkey_mute, tmp_str, volume_mute, vol, FALSE);
+
+ /* Initialize ALSA. If that fails, present nothing. */
+- if ( ! asound_initialize(vol))
+ {
+- volumealsa_destructor(vol);
+- return NULL;
++ int ret = 0;
++ for (int i = 0 ; i < 4 ; i++) {
++ ret = asound_initialize(vol);
++ if (ret) break;
++ usleep(750 * 1000);
++ }
++ if (!ret) {
++ volumealsa_destructor(vol);
++ return NULL;
++ }
+ }
+
+ /* Allocate top level widget and set into Plugin widget pointer. */
+--
+2.31.1
+
diff --git a/lxpanel-0.10.1-batt-chaging-pending.patch b/lxpanel-0.10.1-batt-chaging-pending.patch
new file mode 100644
index 0000000..104d3d0
--- /dev/null
+++ b/lxpanel-0.10.1-batt-chaging-pending.patch
@@ -0,0 +1,12 @@
+diff -urp lxpanel-0.10.1/plugins/batt.orig/batt_sys.c lxpanel-0.10.1/plugins/batt/batt_sys.c
+--- lxpanel-0.10.1/plugins/batt.orig/batt_sys.c 2021-01-30 07:34:46.000000000 +0900
++++ lxpanel-0.10.1/plugins/batt/batt_sys.c 2023-02-07 16:34:54.182239090 +0900
+@@ -396,6 +396,7 @@ gboolean battery_is_charging( battery *b
+ return ( strcasecmp( b->state, "Unknown" ) == 0
+ || strcasecmp( b->state, "Full" ) == 0
+ || strcasecmp( b->state, "Charging" ) == 0
++ || strcasecmp( b->state, "Not Charging" ) == 0
+ || b->current_now == 0 ); /* bug sf.net, #720 */
+ }
+
+Only in lxpanel-0.10.1/plugins/batt: batt_sys.c~
diff --git a/lxpanel-0.10.1-remove_failing_plugins.patch b/lxpanel-0.10.1-remove_failing_plugins.patch
new file mode 100644
index 0000000..cf181a7
--- /dev/null
+++ b/lxpanel-0.10.1-remove_failing_plugins.patch
@@ -0,0 +1,11 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -220,7 +220,7 @@
+ fi
+ fi
+
+-ALL_PLUGINS_LIST="netstatus netstat volume volumealsa cpu deskno batt kbled xkb thermal cpufreq monitors indicator weather"
++ALL_PLUGINS_LIST="netstatus volume volumealsa cpu deskno batt kbled xkb thermal cpufreq monitors weather"
+
+ AC_DEFUN([check_plugin_name],[
+ plugin_found=false
diff --git a/lxpanel-0.8.1-Fix-pager-scroll.patch b/lxpanel-0.8.1-Fix-pager-scroll.patch
new file mode 100644
index 0000000..4874a9b
--- /dev/null
+++ b/lxpanel-0.8.1-Fix-pager-scroll.patch
@@ -0,0 +1,11 @@
+--- lxpanel-0.8.1/plugins/xkb/xkb-plugin.c.revert 2015-05-07 04:44:51.000000000 +0900
++++ lxpanel-0.8.1/plugins/xkb/xkb-plugin.c 2015-05-24 15:58:10.987343168 +0900
+@@ -190,7 +190,7 @@
+
+ /* Change to next or previous group. */
+ xkb_change_group(xkb,
+- (((event->direction == GDK_SCROLL_UP) || (event->direction == GDK_SCROLL_RIGHT)) ? 1 : -1));
++ (((event->direction == GDK_SCROLL_DOWN) || (event->direction == GDK_SCROLL_RIGHT)) ? 1 : -1));
+ return TRUE;
+ }
+
diff --git a/lxpanel.spec b/lxpanel.spec
index 2e48dd7..fe493c6 100644
--- a/lxpanel.spec
+++ b/lxpanel.spec
@@ -3,24 +3,45 @@
# Workaround for Clang 15+
%global optflags %{optflags} -Wno-error -Wno-implicit-function-declaration
-%define git 0
-%define prerel 63ffd68
-%define gitday 20121312
-%define _disable_ld_no_undefined 1
+# git snapshot
+%global snapshot 1
+%if 0%{?snapshot}
+ %global commit 633a2d46ffd37f3acde539de9a2861d1ade49ef8
+ %global commitdate 20230918
+ %global shortcommit %(c=%{commit}; echo ${c:0:7})
+%endif
+
+#define git 0
+#define prerel 63ffd68
+#define gitday 20121312
+#define _disable_ld_no_undefined 1
%define major 0
-%define libname %mklibname %name %major
+%define libname %mklibname %name
+%define oldlibname %mklibname %name 0
Summary: Lightweight X11 desktop panel based on fbpanel
Name: lxpanel
-Release: 1
-Version: 0.10.2.r1
-# Use active maintained fork
-Source0: https://github.com/lxde-continued/%{name}/releases/download/%{name}-%{version}/%{name}-%{version}.tar.bz2
-#Source0: http://downloads.sourceforge.net/lxde/lxpanel-%{version}.tar.xz
+Version: 0.10.1
+Release: 2
License: GPLv2+
Group: Graphical desktop/Other
-Url: http://lxde.sourceforge.net/
+Url: http://www.lxde.org
+# Use active maintained fork
+#Source0: https://github.com/lxde-continued/%{name}/releases/download/%{name}-%{version}/%{name}-%{version}.tar.bz2
+#Source0: http://downloads.sourceforge.net/lxde/lxpanel-%{version}.tar.xz
+Source0: https://github.com/lxde/lxpanel/archive/%{?snapshot:%{commit}}%{!?snapshot:%{version}}/%{name}-%{?snapshot:%{commit}}%{!?snapshot:%{version}}.tar.gz
+# https://sourceforge.net/p/lxde/bugs/773/
+Patch0: 0001-Specify-GTK_REQUEST_CONSTANT_SIZE.-Fixes-773.patch
+# https://github.com/walshb/lxpanel/commit/3c1ad6bc7c8b4b3ba66c04e6e10aa741f028ba75
+Patch1: https://github.com/walshb/lxpanel/commit/3c1ad6bc7c8b4b3ba66c04e6e10aa741f028ba75.patch
+# (fedora)
+Patch3: lxpanel-0.10.1-0003-volumealsa-poll-alsa-mixer-several-times-at-startup.patch
+Patch4: lxpanel-0.8.1-Fix-pager-scroll.patch
+Patch5: lxpanel-0.10.1-batt-chaging-pending.patch
+# some plugins can't be compiled:
+# netstat, indicator
+Patch10: lxpanel-0.10.1-remove_failing_plugins.patch
BuildRequires: docbook-to-man
BuildRequires: docbook-dtd412-xml
@@ -33,15 +54,15 @@ BuildRequires: pkgconfig(gmodule-2.0)
BuildRequires: pkgconfig(gthread-2.0)
BuildRequires: pkgconfig(gdk-pixbuf-xlib-2.0)
BuildRequires: pkgconfig(gtk+-3.0)
-BuildRequires: pkgconfig(libfm-gtk3)
-BuildRequires: pkgconfig(libfm-extra)
+BuildRequires: pkgconfig(libfm-gtk3)
+BuildRequires: pkgconfig(libfm-extra)
BuildRequires: pkgconfig(libmenu-cache)
-BuildRequires: pkgconfig(libwnck-1.0)
+#BuildRequires: pkgconfig(libwnck-1.0)
BuildRequires: pkgconfig(libwnck-3.0)
-BuildRequires: pkgconfig(keybinder-3.0)
-BuildRequires: pkgconfig(indicator-0.4)
+BuildRequires: pkgconfig(keybinder-3.0)
+BuildRequires: pkgconfig(indicator3-0.4)
BuildRequires: pkgconfig(libcurl)
-BuildRequires: pkgconfig(libxml-2.0)
+BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(xkbfile)
#BuildRequires: libiw-devel
@@ -68,14 +89,43 @@ LXPanel is a lightweight X11 desktop panel contains:
This version based on lxpanelx 0.6.0 alpha version
+%files -f %{name}.lang
+%{_bindir}/%{name}
+%{_bindir}/lxpanelctl
+%dir %{_sysconfdir}/xdg/%{name}/
+%{_sysconfdir}/xdg/%{name}/*
+%dir %{_libdir}/%{name}
+%dir %{_libdir}/%{name}/plugins
+%{_libdir}/%{name}/plugins/batt.so
+%{_libdir}/%{name}/plugins/cpu.so
+%{_libdir}/%{name}/plugins/cpufreq.so
+%{_libdir}/%{name}/plugins/deskno.so
+%{_libdir}/%{name}/plugins/kbled.so
+%{_libdir}/%{name}/plugins/monitors.so
+%{_libdir}/%{name}/plugins/netstatus.so
+%{_libdir}/%{name}/plugins/thermal.so
+%{_libdir}/%{name}/plugins/volume.so
+%{_libdir}/%{name}/plugins/weather.so
+%{_libdir}/%{name}/plugins/xkb.so
+%{_datadir}/%{name}
+%{_mandir}/man1/*
+
+#---------------------------------------------------------------------------
+
%package -n %libname
Summary: Lxpanel library package
Group: Graphical desktop/Other
Requires: %{name} = %{version}
+Obsoletes: %oldlibname < %{EVRD}
%description -n %libname
Library for access to the API.
+%files -n %libname
+%{_libdir}/%{name}/lib%{name}.so.%{major}{,.*}
+
+#---------------------------------------------------------------------------
+
%package devel
Summary: Development files for lxpanel
Group: Graphical desktop/Other
@@ -83,55 +133,27 @@ Group: Graphical desktop/Other
%description devel
This package contains development files needed for building lxde plugins.
-%prep
-%if %git
-%setup -qn %{name}-%{prerel} -a1
-%else
-%setup -q
-%endif
-%autopatch -p1
+%files devel
+%{_includedir}/lxpanel
+%{_libdir}/%{name}/lib%{name}.so
+%{_libdir}/pkgconfig/lxpanel.pc
-%build
+#---------------------------------------------------------------------------
-# Disable pager plugin as it breaks panel layout with GTK+ 3
-# https://sourceforge.net/p/lxde/bugs/773/
-#sed -i '/pager.c/d' plugins/Makefile.am
-#sed -i '/STATIC_PAGER/d' src/private.h
-#sed -i 's/libwnck-3.0//' configure.ac
+%prep
+%autosetup -p1 -n %{name}-%{?snapshot:%{commit}}%{!?snapshot:%{version}}
+%build
+autoreconf -fiv
%configure \
- --enable-man \
- --enable-indicator-support \
+ --disable-indicator-support \
--enable-gtk3 \
- --with-plugins="cpu batt kbled xkb thermal deskno volumealsa"
+ %{nil}
%make_build
%install
%make_install
+# locales
%find_lang %{name}
-%files -f %{name}.lang
-%{_bindir}/%{name}
-%{_bindir}/lxpanelctl
-%dir %{_sysconfdir}/xdg/%{name}/
-%{_sysconfdir}/xdg/%{name}/*
-%dir %{_libdir}/%{name}
-%dir %{_libdir}/%{name}/plugins
-%{_libdir}/%{name}/plugins/batt.so
-%{_libdir}/%{name}/plugins/cpu.so
-%{_libdir}/%{name}/plugins/deskno.so
-%{_libdir}/%{name}/plugins/kbled.so
-%{_libdir}/%{name}/plugins/xkb.so
-%{_libdir}/%{name}/plugins/thermal.so
-%{_libdir}/%{name}/plugins/volume.so
-%{_datadir}/%{name}
-%{_mandir}/man1/*
-
-%files -n %libname
-%{_libdir}/%{name}/lib%{name}.so.%{major}{,.*}
-
-%files devel
-%{_includedir}/lxpanel
-%{_libdir}/%{name}/lib%{name}.so
-%{_libdir}/pkgconfig/lxpanel.pc