From 26d3c94464f7339e29d9c3a871669d1384d57e33 Mon Sep 17 00:00:00 2001 From: 4fury-c3440d8 Date: Sat, 16 Apr 2022 02:45:15 +0300 Subject: [PATCH] LXDE: lxpanel-0.10.1 --- desktop/lxde/lxpanel/actions.py | 35 ++++++ .../Correct_icon_grid_width_under_GTK3.patch | 22 ++++ .../files/Correct_panel_size_under_GTK3.patch | 34 ++++++ ....1-volume-plugin-fix-mouse-scrolling.patch | 31 ++++++ desktop/lxde/lxpanel/pspec.xml | 100 ++++++++++++++++++ 5 files changed, 222 insertions(+) create mode 100644 desktop/lxde/lxpanel/actions.py create mode 100644 desktop/lxde/lxpanel/files/Correct_icon_grid_width_under_GTK3.patch create mode 100644 desktop/lxde/lxpanel/files/Correct_panel_size_under_GTK3.patch create mode 100644 desktop/lxde/lxpanel/files/lxpanel-0.10.1-volume-plugin-fix-mouse-scrolling.patch create mode 100644 desktop/lxde/lxpanel/pspec.xml diff --git a/desktop/lxde/lxpanel/actions.py b/desktop/lxde/lxpanel/actions.py new file mode 100644 index 0000000000..be003d0908 --- /dev/null +++ b/desktop/lxde/lxpanel/actions.py @@ -0,0 +1,35 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# +# Licensed under the GNU General Public License, version 3. +# See the file https://www.gnu.org/licenses/gpl-3.0.txt + +from pisi.actionsapi import autotools, pisitools, get + +t = ''.join([ + 'netstatus ', + 'netstat ', + 'volume ', + 'deskno ', + 'kbled ', + 'batt ', + 'xkb ', + 'cpufreq ', + 'monitors ', + 'indicator' + ]) + +def setup(): + pisitools.cflags.add("-fcommon -Wno-deprecated-declarations") + autotools.configure("--enable-gtk3 --with-plugins='%s'" % t) + + pisitools.dosed("libtool", " -shared ", " -Wl,-O2,--as-needed -shared ") + +def build(): + autotools.make() + +def install(): + autotools.rawInstall("DESTDIR=%s" % get.installDIR()) + + pisitools.dodoc("AUTHORS", "ChangeLog", "README", "TODO") + diff --git a/desktop/lxde/lxpanel/files/Correct_icon_grid_width_under_GTK3.patch b/desktop/lxde/lxpanel/files/Correct_icon_grid_width_under_GTK3.patch new file mode 100644 index 0000000000..b8da2850e6 --- /dev/null +++ b/desktop/lxde/lxpanel/files/Correct_icon_grid_width_under_GTK3.patch @@ -0,0 +1,22 @@ +From 8a408946dfd2e69ae2cb1066c7fa31f8b7ecc445 Mon Sep 17 00:00:00 2001 +From: Ben Walsh +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/desktop/lxde/lxpanel/files/Correct_panel_size_under_GTK3.patch b/desktop/lxde/lxpanel/files/Correct_panel_size_under_GTK3.patch new file mode 100644 index 0000000000..28ab954615 --- /dev/null +++ b/desktop/lxde/lxpanel/files/Correct_panel_size_under_GTK3.patch @@ -0,0 +1,34 @@ +From 12576de7b83c634437217e23d74954070a1be2d5 Mon Sep 17 00:00:00 2001 +From: Ben Walsh +Date: Sat, 6 Jun 2020 10:38:15 +0100 +Subject: [PATCH] Correct panel size under GTK3. Fixes Sourceforge #773. + +--- + src/panel.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/src/panel.c b/src/panel.c +index 45188dbe..2b5fc9be 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 diff --git a/desktop/lxde/lxpanel/files/lxpanel-0.10.1-volume-plugin-fix-mouse-scrolling.patch b/desktop/lxde/lxpanel/files/lxpanel-0.10.1-volume-plugin-fix-mouse-scrolling.patch new file mode 100644 index 0000000000..7790e3b558 --- /dev/null +++ b/desktop/lxde/lxpanel/files/lxpanel-0.10.1-volume-plugin-fix-mouse-scrolling.patch @@ -0,0 +1,31 @@ +diff -ru a/plugins/volumealsa/volumealsa.c b/plugins/volumealsa/volumealsa.c +--- a/plugins/volumealsa/volumealsa.c 2021-01-29 23:33:27.000000000 +0100 ++++ b/plugins/volumealsa/volumealsa.c 2021-03-21 13:49:00.124807793 +0100 +@@ -794,10 +794,25 @@ + gdouble val = gtk_range_get_value(GTK_RANGE(vol->volume_scale)); + + /* Dispatch on scroll direction to update the value. */ +- if ((evt->direction == GDK_SCROLL_UP) || (evt->direction == GDK_SCROLL_LEFT)) ++ switch (evt->direction) ++ { ++ case GDK_SCROLL_UP: ; ++ case GDK_SCROLL_LEFT: ; + val += 2; +- else ++ break; ++ case GDK_SCROLL_DOWN: ; ++ case GDK_SCROLL_RIGHT: ; + val -= 2; ++ break; ++ case GDK_SCROLL_SMOOTH: ; ++ gdouble delta_x; ++ gdouble delta_y; ++ gdk_event_get_scroll_deltas(evt, &delta_x, &delta_y); ++ if (delta_y > 0) ++ val -= 2; ++ else ++ val += 2; ++ } + + /* Reset the state of the vertical scale. This provokes a "value_changed" event. */ + gtk_range_set_value(GTK_RANGE(vol->volume_scale), CLAMP((int)val, 0, 100)); diff --git a/desktop/lxde/lxpanel/pspec.xml b/desktop/lxde/lxpanel/pspec.xml new file mode 100644 index 0000000000..546336ab77 --- /dev/null +++ b/desktop/lxde/lxpanel/pspec.xml @@ -0,0 +1,100 @@ + + + + + lxpanel + https://www.lxde.org/ + + fury + uglyside@yandex.ru + + GPL-2 + app:gui + desktop.lxde + Lightweight X11 desktop panel for LXDE. + lxpanel is a lightweight X11 desktop panel for LXDE. + + mirrors://sourceforge/lxde/lxpanel-0.10.1.tar.xz + + + intltool + atk-devel + gtk3-devel + curl-devel + cairo-devel + pango-devel + libxml2-devel + alsa-lib-devel + libwnck3-devel + keybinder-devel + fontconfig-devel + menu-cache-devel + gdk-pixbuf-devel + wireless-tools-devel + libfilemanager-lxde-devel + + + Correct_panel_size_under_GTK3.patch + Correct_icon_grid_width_under_GTK3.patch + lxpanel-0.10.1-volume-plugin-fix-mouse-scrolling.patch + + + + + lxpanel + + atk + gtk3 + curl + glib2 + cairo + pango + libX11 + libxml2 + alsa-lib + libwnck3 + keybinder + menu-cache + gdk-pixbuf + fontconfig + lxmenu-data + wireless-tools + libfilemanager-lxde + network-manager-applet + + + /etc/xdg/lxpanel + /usr/bin + /usr/lib + /usr/share + /usr/share/locale + /usr/share/man + /usr/share/doc + + + + + lxpanel-devel + + lxpanel + gtk3-devel + glib2-devel + libfilemanager-lxde-devel + + + /usr/include + /usr/lib/pkgconfig + + + + + + 2022-04-14 + 0.10.1 + First build. + fury + uglyside@yandex.ru + + + +