import libcanberra-0.30-18.el8
This commit is contained in:
parent
4e8500aba5
commit
c71d89811d
51
SOURCES/0001-desktop-add-q-option-to-suppress-errors.patch
Normal file
51
SOURCES/0001-desktop-add-q-option-to-suppress-errors.patch
Normal file
@ -0,0 +1,51 @@
|
||||
From ca209c2cda581249011398df0678ca37d5204be6 Mon Sep 17 00:00:00 2001
|
||||
From: Wim Taymans <wtaymans@redhat.com>
|
||||
Date: Thu, 3 Jan 2019 11:04:06 +0100
|
||||
Subject: [PATCH] desktop: add -q option to suppress errors
|
||||
|
||||
It is possible that the sound theme does not have the specified sound
|
||||
and we don't want to spam the log with error messages in that case.
|
||||
---
|
||||
src/libcanberra-login-sound.desktop.in | 2 +-
|
||||
src/libcanberra-logout-sound.sh.in | 2 +-
|
||||
src/libcanberra-ready-sound.desktop.in | 2 +-
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/libcanberra-login-sound.desktop.in b/src/libcanberra-login-sound.desktop.in
|
||||
index 210d2c1..128391d 100644
|
||||
--- a/src/libcanberra-login-sound.desktop.in
|
||||
+++ b/src/libcanberra-login-sound.desktop.in
|
||||
@@ -2,7 +2,7 @@
|
||||
Type=Application
|
||||
Name=GNOME Login Sound
|
||||
Comment=Plays a sound whenever you log in
|
||||
-Exec=@bindir@/canberra-gtk-play --id="desktop-login" --description="GNOME Login"
|
||||
+Exec=@bindir@/canberra-gtk-play -q --id="desktop-login" --description="GNOME Login"
|
||||
OnlyShowIn=GNOME;
|
||||
AutostartCondition=GSettings org.gnome.desktop.sound event-sounds
|
||||
X-GNOME-Autostart-Phase=Application
|
||||
diff --git a/src/libcanberra-logout-sound.sh.in b/src/libcanberra-logout-sound.sh.in
|
||||
index 8b50de7..96ba602 100644
|
||||
--- a/src/libcanberra-logout-sound.sh.in
|
||||
+++ b/src/libcanberra-logout-sound.sh.in
|
||||
@@ -1,3 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
-@bindir@/canberra-gtk-play --id="desktop-logout" --description="GNOME Logout"
|
||||
+@bindir@/canberra-gtk-play -q --id="desktop-logout" --description="GNOME Logout"
|
||||
diff --git a/src/libcanberra-ready-sound.desktop.in b/src/libcanberra-ready-sound.desktop.in
|
||||
index 4e6a606..e70b080 100644
|
||||
--- a/src/libcanberra-ready-sound.desktop.in
|
||||
+++ b/src/libcanberra-ready-sound.desktop.in
|
||||
@@ -2,7 +2,7 @@
|
||||
Type=Application
|
||||
Name=GNOME System Ready Sound
|
||||
Comment=Plays a sound whenever your system is ready for login
|
||||
-Exec=@bindir@/canberra-gtk-play --id="system-ready" --description="GNOME System Ready"
|
||||
+Exec=@bindir@/canberra-gtk-play -q --id="system-ready" --description="GNOME System Ready"
|
||||
OnlyShowIn=GNOME;
|
||||
AutostartCondition=GSettings org.gnome.desktop.sound event-sounds
|
||||
X-GNOME-Autostart-Phase=Application
|
||||
--
|
||||
2.19.2
|
||||
|
59
SOURCES/add-quiet-option.txt
Normal file
59
SOURCES/add-quiet-option.txt
Normal file
@ -0,0 +1,59 @@
|
||||
diff -ru libcanberra-0.30/src/canberra-gtk-play.c libcanberra-0.30.new/src/canberra-gtk-play.c
|
||||
--- libcanberra-0.30/src/canberra-gtk-play.c 2012-09-25 02:21:07.000000000 +0200
|
||||
+++ libcanberra-0.30.new/src/canberra-gtk-play.c 2019-01-03 10:01:13.090177362 +0100
|
||||
@@ -33,6 +33,7 @@
|
||||
static int ret = 0;
|
||||
static ca_proplist *proplist = NULL;
|
||||
static int n_loops = 1;
|
||||
+static gboolean quiet = FALSE;
|
||||
|
||||
static void callback(ca_context *c, uint32_t id, int error, void *userdata);
|
||||
|
||||
@@ -51,7 +52,8 @@
|
||||
r = ca_context_play_full(ca_gtk_context_get(), 1, proplist, callback, NULL);
|
||||
|
||||
if (r < 0) {
|
||||
- g_printerr("Failed to play sound: %s\n", ca_strerror(r));
|
||||
+ if (!quiet)
|
||||
+ g_printerr("Failed to play sound: %s\n", ca_strerror(r));
|
||||
ret = 1;
|
||||
gtk_main_quit();
|
||||
}
|
||||
@@ -62,7 +64,8 @@
|
||||
static void callback(ca_context *c, uint32_t id, int error, void *userdata) {
|
||||
|
||||
if (error < 0) {
|
||||
- g_printerr("Failed to play sound (callback): %s\n", ca_strerror(error));
|
||||
+ if (!quiet)
|
||||
+ g_printerr("Failed to play sound (callback): %s\n", ca_strerror(error));
|
||||
ret = 1;
|
||||
|
||||
} else if (n_loops > 1) {
|
||||
@@ -128,6 +131,7 @@
|
||||
{ "loop", 'l', 0, G_OPTION_ARG_INT, &n_loops, "Loop how many times (detault: 1)", "INTEGER" },
|
||||
{ "volume", 'V', 0, G_OPTION_ARG_STRING, &volume, "A floating point dB value for the sample volume (ex: 0.0)", "STRING" },
|
||||
{ "property", 0, 0, G_OPTION_ARG_CALLBACK, (void*) property_callback, "An arbitrary property", "STRING" },
|
||||
+ { "quiet", 'q', 0, G_OPTION_ARG_NONE, &quiet, "Don't print error messages", NULL },
|
||||
{ NULL, 0, 0, 0, NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
@@ -154,7 +158,8 @@
|
||||
}
|
||||
|
||||
if (!event_id && !filename) {
|
||||
- g_printerr("No event id or file specified.\n");
|
||||
+ if (!quiet)
|
||||
+ g_printerr("No event id or file specified.\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -182,7 +187,8 @@
|
||||
r = ca_context_play_full(ca_gtk_context_get(), 1, proplist, callback, NULL);
|
||||
|
||||
if (r < 0) {
|
||||
- g_printerr("Failed to play sound: %s\n", ca_strerror(r));
|
||||
+ if (!quiet)
|
||||
+ g_printerr("Failed to play sound: %s\n", ca_strerror(r));
|
||||
ret = 1;
|
||||
goto finish;
|
||||
}
|
@ -1,11 +1,13 @@
|
||||
Name: libcanberra
|
||||
Version: 0.30
|
||||
Release: 16%{?dist}
|
||||
Release: 18%{?dist}
|
||||
Summary: Portable Sound Event Library
|
||||
Group: System Environment/Libraries
|
||||
Source0: http://0pointer.de/lennart/projects/libcanberra/libcanberra-%{version}.tar.xz
|
||||
|
||||
Patch0: 0001-gtk-Don-t-assume-all-GdkDisplays-are-GdkX11Displays-.patch
|
||||
Patch1: add-quiet-option.txt
|
||||
Patch2: 0001-desktop-add-q-option-to-suppress-errors.patch
|
||||
|
||||
License: LGPLv2+
|
||||
Url: http://git.0pointer.de/?p=libcanberra.git;a=summary
|
||||
@ -68,7 +70,7 @@ Development Files for libcanberra Client Development
|
||||
|
||||
%postun
|
||||
/sbin/ldconfig
|
||||
%systemd_postun
|
||||
%systemd_postun canberra-system-bootup.service canberra-system-shutdown.service canberra-system-shutdown-reboot.service
|
||||
|
||||
%post gtk2 -p /sbin/ldconfig
|
||||
%postun gtk2 -p /sbin/ldconfig
|
||||
@ -79,6 +81,8 @@ Development Files for libcanberra Client Development
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
%build
|
||||
%configure --disable-static --enable-pulse --enable-alsa --enable-null --disable-oss --with-builtin=dso --with-systemdsystemunitdir=/usr/lib/systemd/system
|
||||
@ -142,6 +146,15 @@ rm $RPM_BUILD_ROOT%{_docdir}/libcanberra/README
|
||||
%{_datadir}/vala/vapi/libcanberra.vapi
|
||||
|
||||
%changelog
|
||||
* Thu Jan 03 2019 Wim Taymans <wtaymans@redhat.com> - 0.30-18
|
||||
- Quiet theme sounds when not available
|
||||
- Resolves: rhbz#1856770
|
||||
- fix systemd_postun
|
||||
|
||||
* Thu Jan 03 2019 Wim Taymans <wtaymans@redhat.com> - 0.30-17
|
||||
- Add quiet option
|
||||
- Resolves: rhbz#1556800
|
||||
|
||||
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.30-16
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user