SHA256
1
0
forked from pool/kmix

Accepting request 200642 from KDE:Distro:Factory

Added Who-needs-event-slider.patch -- since KNotify will no longer be able pretending it can control volume, also remove the Event slider within KMix (forwarded request 200483 from sumski)

OBS-URL: https://build.opensuse.org/request/show/200642
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/kmix?expand=0&rev=20
This commit is contained in:
Stephan Kulow 2013-09-26 09:46:25 +00:00 committed by Git OBS Bridge
parent 1b108d9a3a
commit e52f817031
3 changed files with 91 additions and 0 deletions

View File

@ -0,0 +1,80 @@
From f00539732399bb5c285b159a79c2d42869affd75 Mon Sep 17 00:00:00 2001
From: Hrvoje Senjan <hrvoje.senjan@gmail.com>
Date: Wed, 18 Sep 2013 22:17:31 +0200
Subject: [PATCH 1/1] Who needs event slider?
Related: kdebase4-runtime/Remove-volume-control-from-KNotify.patch
---
backends/mixer_pulse.cpp | 37 ++-----------------------------------
1 file changed, 2 insertions(+), 35 deletions(-)
diff --git a/backends/mixer_pulse.cpp b/backends/mixer_pulse.cpp
index 603debe..b5cd751 100644
--- a/backends/mixer_pulse.cpp
+++ b/backends/mixer_pulse.cpp
@@ -51,7 +51,7 @@
#define KMIXPA_APP_CAPTURE 3
#define KMIXPA_WIDGET_MAX KMIXPA_APP_CAPTURE
-#define KMIXPA_EVENT_KEY "sink-input-by-media-role:event"
+#define KMIXPA_EVENT_KEY "0"
static unsigned int refcount = 0;
static pa_glib_mainloop *s_mainloop = NULL;
@@ -465,31 +465,7 @@ void ext_stream_restore_read_cb(pa_context *c, const pa_ext_stream_restore_info
if (eol > 0) {
dec_outstanding(c);
- // Special case: ensure that our media events exists.
- // On first login by a new users, this wont be in our database so we should create it.
- if (!s_RestoreRules.contains(KMIXPA_EVENT_KEY)) {
- // Create a fake rule
- restoreRule rule;
- rule.channel_map.channels = 1;
- rule.channel_map.map[0] = PA_CHANNEL_POSITION_MONO;
- rule.volume.channels = 1;
- rule.volume.values[0] = PA_VOLUME_NORM;
- rule.mute = false;
- rule.device = "";
- s_RestoreRules[KMIXPA_EVENT_KEY] = rule;
- kDebug(67100) << "Initialising restore rule for new user: " << i18n("Event Sounds");
- }
-
if (s_mixers.contains(KMIXPA_APP_PLAYBACK)) {
- // If we have rules, it will be created below... but if no rules
- // then we add it here.
- if (!outputRoles.contains(PA_INVALID_INDEX)) {
- devinfo s = create_role_devinfo(KMIXPA_EVENT_KEY);
- outputRoles[s.index] = s;
-
- s_mixers[KMIXPA_APP_PLAYBACK]->addWidget(s.index);
- }
-
s_mixers[KMIXPA_APP_PLAYBACK]->triggerUpdate();
}
@@ -505,20 +481,11 @@ void ext_stream_restore_read_cb(pa_context *c, const pa_ext_stream_restore_info
rule.mute = !!i->mute;
rule.device = i->device;
- if (rule.channel_map.channels < 1 && name == KMIXPA_EVENT_KEY) {
- // Stream restore rules may not have valid volumes/channel maps (as these are optional)
- // but we need a valid volume+channelmap for our events sounds so fix it up.
- rule.channel_map.channels = 1;
- rule.channel_map.map[0] = PA_CHANNEL_POSITION_MONO;
- rule.volume.channels = 1;
- rule.volume.values[0] = PA_VOLUME_NORM;
- }
-
s_RestoreRules[name] = rule;
if (s_mixers.contains(KMIXPA_APP_PLAYBACK)) {
// We only want to know about Sound Events for now...
- if (name == KMIXPA_EVENT_KEY) {
+ if (0) {
devinfo s = create_role_devinfo(name);
bool is_new = !outputRoles.contains(s.index);
outputRoles[s.index] = s;
--
1.8.4

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Sep 24 20:33:44 UTC 2013 - hrvoje.senjan@gmail.com
- Added Who-needs-event-slider.patch -- since KNotify will no longer
be able pretending it can control volume, also remove the Event
slider within KMix
-------------------------------------------------------------------
Sun Sep 1 10:06:38 UTC 2013 - tittiatcoke@gmail.com

View File

@ -30,6 +30,9 @@ Url: http://www.kde.org
Version: 4.11.1
Release: 0
Source0: %{name}-%{version}.tar.xz
# PATCH-FIX-OPENSUSE Who-needs-event-slider.patch -- since KNotify will no longer be able pretending it can
# control volume, also remove the Event slider within KMix
Patch0: Who-needs-event-slider.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%kde4_runtime_requires
@ -38,6 +41,7 @@ KDE's full featured mini mixer
%prep
%setup -q
%patch0 -p1
%build
%cmake_kde4 -d build