summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-07-28 05:13:22 +0100
committerSam James <sam@gentoo.org>2024-07-28 05:13:22 +0100
commit5102b52b95c861c2087a93445713a4dc8bb0f4c5 (patch)
treef31224e5960d166c9e53a62e868effcd19ed34a5 /lxde-base/lxpanel
parentlxde-base/lxsession: fix modern C issues (diff)
downloadgentoo-5102b52b95c861c2087a93445713a4dc8bb0f4c5.tar.gz
gentoo-5102b52b95c861c2087a93445713a4dc8bb0f4c5.tar.bz2
gentoo-5102b52b95c861c2087a93445713a4dc8bb0f4c5.zip
lxde-base/lxpanel: fix modern C issues, fix applet icon
Closes: https://bugs.gentoo.org/919092 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'lxde-base/lxpanel')
-rw-r--r--lxde-base/lxpanel/files/lxpanel-0.10.1-c99-2.patch25
-rw-r--r--lxde-base/lxpanel/files/lxpanel-0.10.1-c99.patch29
-rw-r--r--lxde-base/lxpanel/files/lxpanel-0.10.1-netstatus-icon.patch79
-rw-r--r--lxde-base/lxpanel/lxpanel-0.10.1-r1.ebuild73
4 files changed, 206 insertions, 0 deletions
diff --git a/lxde-base/lxpanel/files/lxpanel-0.10.1-c99-2.patch b/lxde-base/lxpanel/files/lxpanel-0.10.1-c99-2.patch
new file mode 100644
index 000000000000..e4d674a3fd10
--- /dev/null
+++ b/lxde-base/lxpanel/files/lxpanel-0.10.1-c99-2.patch
@@ -0,0 +1,25 @@
+https://bugs.gentoo.org/919092
+https://github.com/lxde/lxpanel/commit/633a2d46ffd37f3acde539de9a2861d1ade49ef8
+
+From 633a2d46ffd37f3acde539de9a2861d1ade49ef8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ingo=20Br=C3=BCckl?= <ib@oddnet.de>
+Date: Mon, 18 Sep 2023 13:59:08 +0200
+Subject: [PATCH] Fix warning that argument is of incompatible pointer type
+
+Cast the netstatus icon appropriately.
+---
+ plugins/netstatus/netstatus-dialog.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/plugins/netstatus/netstatus-dialog.c b/plugins/netstatus/netstatus-dialog.c
+index f982b1ed..c4e3e8c1 100644
+--- a/plugins/netstatus/netstatus-dialog.c
++++ b/plugins/netstatus/netstatus-dialog.c
+@@ -880,5 +880,5 @@ void netstatus_dialog_present (GtkWidget *dialog)
+
+ data = g_object_get_data(G_OBJECT(dialog), "netstatus-dialog-data");
+ gtk_window_present(GTK_WINDOW(dialog));
+- gtk_widget_show(data->icon);
++ gtk_widget_show(GTK_WIDGET(data->icon));
+ }
+
diff --git a/lxde-base/lxpanel/files/lxpanel-0.10.1-c99.patch b/lxde-base/lxpanel/files/lxpanel-0.10.1-c99.patch
new file mode 100644
index 000000000000..06a94821079d
--- /dev/null
+++ b/lxde-base/lxpanel/files/lxpanel-0.10.1-c99.patch
@@ -0,0 +1,29 @@
+https://bugs.gentoo.org/919092
+https://github.com/lxde/lxpanel/pull/70
+
+From 914bcc3945503be2506e112883a648b867c6db57 Mon Sep 17 00:00:00 2001
+From: Ravi Kant Sharma <600723+raviksharma@users.noreply.github.com>
+Date: Tue, 23 Jul 2024 18:02:44 +0200
+Subject: [PATCH] fix build failure on gcc-14
+
+gcc-14 treats implicitly casting all pointer types to all other pointer types as error now.
+
+https://gcc.gnu.org/gcc-14/porting_to.html#warnings-as-errors
+---
+ plugins/tray.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/plugins/tray.c b/plugins/tray.c
+index 3e66b81f..42d4917c 100644
+--- a/plugins/tray.c
++++ b/plugins/tray.c
+@@ -631,7 +631,7 @@ static GtkWidget *tray_constructor(LXPanel *panel, config_setting_t *settings)
+ /* Add GDK event filter. */
+ gdk_window_add_filter(NULL, (GdkFilterFunc) tray_event_filter, tr);
+ /* Reference the window since it is never added to a container. */
+- tr->invisible = g_object_ref_sink(G_OBJECT(invisible));
++ tr->invisible = (GtkWidget *) g_object_ref_sink(G_OBJECT(invisible));
+ tr->invisible_window = GDK_WINDOW_XID(gtk_widget_get_window(invisible));
+
+ /* Allocate top level widget and set into Plugin widget pointer. */
+
diff --git a/lxde-base/lxpanel/files/lxpanel-0.10.1-netstatus-icon.patch b/lxde-base/lxpanel/files/lxpanel-0.10.1-netstatus-icon.patch
new file mode 100644
index 000000000000..69d78e26e9cb
--- /dev/null
+++ b/lxde-base/lxpanel/files/lxpanel-0.10.1-netstatus-icon.patch
@@ -0,0 +1,79 @@
+https://github.com/lxde/lxpanel/commit/6eebb78d2cb87276334641965793a8feebc952ab
+
+From 6eebb78d2cb87276334641965793a8feebc952ab Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ingo=20Br=C3=BCckl?= <ib@wupperonline.de>
+Date: Fri, 6 Nov 2020 05:56:08 +0100
+Subject: [PATCH] Show the dialog icon after the window has been presented
+
+This fixes a bug that sometimes made the icon not appear where
+it was supposed to, but in the upper left corner of the dialog
+above the tab.
+--- a/plugins/netstatus/netstatus-dialog.c
++++ b/plugins/netstatus/netstatus-dialog.c
+@@ -1,6 +1,7 @@
+ /*
+ * Copyright (C) 2003 Sun Microsystems, Inc.
+ * Copyright (C) 2004 Red Hat Inc.
++ * Copyright (C) 2020 Ingo Brückl
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+@@ -629,7 +630,6 @@ netstatus_dialog_setup_connection (NetstatusDialogData *data)
+ netstatus_icon_set_tooltips_enabled (NETSTATUS_ICON (icon), FALSE);
+ netstatus_icon_set_show_signal (NETSTATUS_ICON (icon), FALSE);
+ gtk_box_pack_end (GTK_BOX (hbox), icon, FALSE, TRUE, 4);
+- gtk_widget_show (icon);
+
+ data->icon = NETSTATUS_ICON (icon);
+
+@@ -873,3 +873,12 @@ const char* netstatus_dialog_get_iface_name( GtkWidget* dialog )
+ data = g_object_get_data (G_OBJECT (dialog), "netstatus-dialog-data");
+ return netstatus_iface_get_name (data->iface);
+ }
++
++void netstatus_dialog_present (GtkWidget *dialog)
++{
++ NetstatusDialogData *data;
++
++ data = g_object_get_data(G_OBJECT(dialog), "netstatus-dialog-data");
++ gtk_window_present(GTK_WINDOW(dialog));
++ gtk_widget_show(data->icon);
++}
+--- a/plugins/netstatus/netstatus-dialog.h
++++ b/plugins/netstatus/netstatus-dialog.h
+@@ -1,5 +1,6 @@
+ /*
+ * Copyright (C) 2003 Sun Microsystems, Inc.
++ * Copyright (C) 2020 Ingo Brückl
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+@@ -38,6 +39,8 @@ const char* netstatus_dialog_get_configuration_tool( GtkWidget* dialog );
+ /* 2009.05.10 Add by Hong Jen Yee (PCMan) to be used in lxpanel plugin */
+ const char* netstatus_dialog_get_iface_name( GtkWidget* dialog );
+
++void netstatus_dialog_present(GtkWidget *dialog);
++
+ G_END_DECLS
+
+ #endif /* __NETSTATUS_DIALOG_H__ */
+--- a/plugins/netstatus/netstatus.c
++++ b/plugins/netstatus/netstatus.c
+@@ -3,6 +3,7 @@
+ * 2008 Fred Chien <fred@lxde.org>
+ * 2009 martyj19 <martyj19@comcast.net>
+ * 2014 Andriy Grytsenko <andrej@rep.kiev.ua>
++ * 2020 Ingo Brückl
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+@@ -99,7 +100,7 @@ static gboolean on_button_press( GtkWidget* widget, GdkEventButton* evt, LXPanel
+ netstatus_dialog_set_configuration_tool( ns->dlg, ns->config_tool );
+ g_signal_connect( ns->dlg, "response", G_CALLBACK(on_response), ns );
+ }
+- gtk_window_present( GTK_WINDOW(ns->dlg) );
++ netstatus_dialog_present(ns->dlg);
+ }
+ return TRUE;
+ }
+
diff --git a/lxde-base/lxpanel/lxpanel-0.10.1-r1.ebuild b/lxde-base/lxpanel/lxpanel-0.10.1-r1.ebuild
new file mode 100644
index 000000000000..bfc8f51507bc
--- /dev/null
+++ b/lxde-base/lxpanel/lxpanel-0.10.1-r1.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit readme.gentoo-r1 xdg
+
+DESCRIPTION="Lightweight X11 desktop panel for LXDE"
+HOMEPAGE="https://wiki.lxde.org/en/LXPanel"
+SRC_URI="https://downloads.sourceforge.net/lxde/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ppc ~riscv ~x86 ~amd64-linux ~x86-linux"
+IUSE="+alsa wifi"
+
+RDEPEND="
+ dev-libs/keybinder:3
+ lxde-base/lxmenu-data
+ >=lxde-base/menu-cache-1.1.0-r1
+ x11-libs/cairo
+ x11-libs/gdk-pixbuf
+ x11-libs/gtk+:3
+ >=x11-libs/libfm-1.3.2[gtk]
+ x11-libs/libwnck:3
+ x11-libs/libX11
+ x11-libs/libXmu
+ x11-libs/libXpm
+ alsa? ( media-libs/alsa-lib )
+ wifi? ( net-wireless/wireless-tools )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ sys-devel/gettext
+ virtual/pkgconfig
+"
+
+DOC_CONTENTS="If you have problems with broken icons shown in the main panel,
+you will have to configure panel settings via its menu.
+This will not be an issue with first time installations."
+
+PATCHES=(
+ # https://sourceforge.net/p/lxde/bugs/773/
+ "${FILESDIR}/${P}-fix-pager-panel-width.patch"
+ "${FILESDIR}/${PN}-0.10.1-netstatus-icon.patch"
+ "${FILESDIR}/${PN}-0.10.1-c99.patch"
+ "${FILESDIR}/${PN}-0.10.1-c99-2.patch"
+)
+
+src_configure() {
+ local plugins="netstatus,volume,cpu,deskno,batt,kbled,xkb,thermal,cpufreq,monitors"
+
+ use wifi && plugins+=",netstat"
+ use alsa && plugins+=",volumealsa"
+
+ econf \
+ $(use_enable alsa) \
+ --enable-gtk3 \
+ --with-x \
+ --with-plugins="${plugins}"
+ # the gtk+ dep already pulls in libX11, so we might as well hardcode with-x
+}
+
+src_install() {
+ default
+ find "${ED}" -name '*.la' -delete || die
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+}