Github messages for voidlinux
 help / color / Atom feed
* [PR PATCH] pa-applet: license identifier & notification only shows "pa-applet" fix
@ 2020-07-30  8:11 ndgnuh
  0 siblings, 0 replies; only message in thread
From: ndgnuh @ 2020-07-30  8:11 UTC (permalink / raw)
  To: ml


[-- Attachment #1: Type: text/plain, Size: 513 bytes --]

There is a new pull request by ndgnuh against master on the void-packages repository

https://github.com/ndgnuh/void-packages pa-applet-patch
https://github.com/void-linux/void-packages/pull/23946

pa-applet: license identifier & notification only shows "pa-applet" fix
Upstream doesn't seem to be maintained. I took this patch from one of the pull requests ([this one](https://github.com/fernandotcl/pa-applet/pull/24)).

A patch file from https://github.com/void-linux/void-packages/pull/23946.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-pa-applet-patch-23946.patch --]
[-- Type: text/x-diff, Size: 2473 bytes --]

From c8ceaa3cb91aa875d4b5f3bed39e1fd0b13e6ce5 Mon Sep 17 00:00:00 2001
From: hung <ndgnuh@protonmail.com>
Date: Thu, 30 Jul 2020 15:03:38 +0700
Subject: [PATCH] pa-applet: license identifier & notification only shows
 "pa-applet" fix

---
 .../patches/fix-volume-notification.patch     | 27 +++++++++++++++++++
 srcpkgs/pa-applet/template                    |  4 +--
 2 files changed, 29 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/pa-applet/patches/fix-volume-notification.patch

diff --git a/srcpkgs/pa-applet/patches/fix-volume-notification.patch b/srcpkgs/pa-applet/patches/fix-volume-notification.patch
new file mode 100644
index 00000000000..20e6db7cc10
--- /dev/null
+++ b/srcpkgs/pa-applet/patches/fix-volume-notification.patch
@@ -0,0 +1,27 @@
+diff --git a/src/notifications.c b/src/notifications.c
+index f5ac1f8..e366a12 100644
+--- src/notifications.c
++++ src/notifications.c
+@@ -7,6 +7,7 @@
+  *
+  */
+ 
++#include <stdio.h>
+ #include <libnotify/notify.h>
+ 
+ #include "audio_status.h"
+@@ -73,7 +74,13 @@ void notifications_flash(void)
+     notify_notification_set_hint_int32(notification, "value", (gint)as->volume);
+ 
+     // Update the notification icon
+-    notify_notification_update(notification, PROGRAM_NAME, NULL, icon_name);
++    char vol_text[5];
++    if (as->muted) {
++      snprintf(vol_text, 5, "mute");
++    } else {
++      snprintf(vol_text, 5, "%3.0f%%", as->volume);
++    }
++    notify_notification_update(notification, PROGRAM_NAME, vol_text, icon_name);
+ 
+     // Show the notification
+     notify_notification_show(notification, NULL);
diff --git a/srcpkgs/pa-applet/template b/srcpkgs/pa-applet/template
index 19c91143816..e190ff2d99a 100644
--- a/srcpkgs/pa-applet/template
+++ b/srcpkgs/pa-applet/template
@@ -1,7 +1,7 @@
 # Template file for 'pa-applet'
 pkgname=pa-applet
 version=0.0.0.20140304
-revision=1
+revision=2
 _commit=33b413b83234d457b9512219cf4c1020eb99a3de
 wrksrc="$pkgname-$_commit"
 build_style=gnu-configure
@@ -9,7 +9,7 @@ hostmakedepends="automake libtool pkg-config"
 makedepends="gtk+3-devel libnotify-devel libcanberra-devel pulseaudio-devel"
 short_desc="PulseAudio system tray applet with volume bar"
 maintainer="Alexander Mamay <alexander@mamay.su>"
-license="2-clause-BSD"
+license="BSD-2-Clause"
 homepage="https://github.com/fernandotcl/pa-applet"
 distfiles="$homepage/archive/$_commit.tar.gz"
 checksum=db30c04a6954e1d138c6bc80739dae80d667a0af151b015db503e48fb30b0b7a

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-30  8:11 [PR PATCH] pa-applet: license identifier & notification only shows "pa-applet" fix ndgnuh

Github messages for voidlinux

Archives are clonable: git clone --mirror http://inbox.vuxu.org/voidlinux-github

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.github.voidlinux


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git