[Xfce4-commits] [panel-plugins/xfce4-pulseaudio-plugin] 01/01: Move streams on default output device change (Bug #14157)
noreply at xfce.org
noreply at xfce.org
Sun Feb 25 14:16:10 CET 2018
This is an automated email from the git hooks/post-receive script.
b l u e s a b r e p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository panel-plugins/xfce4-pulseaudio-plugin.
commit ef5822f7c71c8008223b670d399088dc7256e77a
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sun Feb 25 08:16:04 2018 -0500
Move streams on default output device change (Bug #14157)
---
panel-plugin/mprismenuitem.c | 4 ----
panel-plugin/pulseaudio-volume.c | 22 ++++++++++++++++++++++
2 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/panel-plugin/mprismenuitem.c b/panel-plugin/mprismenuitem.c
index b14d254..9e42450 100644
--- a/panel-plugin/mprismenuitem.c
+++ b/panel-plugin/mprismenuitem.c
@@ -91,10 +91,6 @@ G_GNUC_END_IGNORE_DEPRECATIONS
static void mpris_menu_item_finalize (GObject *object);
static void mpris_menu_item_raise (MprisMenuItem *item);
-#ifdef HAVE_WNCK
-static void mpris_menu_item_raise_window (MprisMenuItem *item);
-#endif
-
static void mpris_menu_item_launch (MprisMenuItem *item);
static void mpris_menu_item_raise_or_launch (MprisMenuItem *item);
static GtkWidget * mpris_menu_item_get_widget_at_event (MprisMenuItem *item,
diff --git a/panel-plugin/pulseaudio-volume.c b/panel-plugin/pulseaudio-volume.c
index 55c8070..d0f7a5e 100644
--- a/panel-plugin/pulseaudio-volume.c
+++ b/panel-plugin/pulseaudio-volume.c
@@ -53,6 +53,10 @@ static void pulseaudio_volume_get_source_list_cb (pa_context
const pa_source_info *i,
int eol,
void *userdata);
+static void pulseaudio_volume_move_sink_input (pa_context *context,
+ const pa_sink_input_info *i,
+ int eol,
+ void *userdata);
@@ -925,6 +929,8 @@ pulseaudio_volume_default_sink_changed_info_cb (pa_context *context,
pa_context_move_sink_input_by_index (context, volume->sink_index, i->index, NULL, NULL);
volume->sink_index = (guint)i->index;
+
+ pa_context_get_sink_input_info_list (volume->pa_context, pulseaudio_volume_move_sink_input, volume);
}
@@ -942,6 +948,22 @@ pulseaudio_volume_default_sink_changed (pa_context *context,
+static void
+pulseaudio_volume_move_sink_input (pa_context *context,
+ const pa_sink_input_info *i,
+ int eol,
+ void *userdata)
+{
+ PulseaudioVolume *volume = PULSEAUDIO_VOLUME (userdata);
+
+ if (i == NULL) return;
+ if (eol > 0) return;
+
+ pa_context_move_sink_input_by_name (context, i->index, volume->default_sink_name, NULL, NULL);
+}
+
+
+
void
pulseaudio_volume_set_default_output (PulseaudioVolume *volume,
const gchar *name)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list