diff options
author | Michal Ratajsky <[email protected]> | 2014-07-05 01:35:00 +0200 |
---|---|---|
committer | Michal Ratajsky <[email protected]> | 2014-07-05 01:35:00 +0200 |
commit | 85070f3b97a3213d75a7bebf86ad973aaa21c55b (patch) | |
tree | fa3a29c788acd6233ca7a201ee9aaebffafa7d4c /backends/pulse/pulse-backend.c | |
parent | 4793cbd87fed50678215b5dc1ba8e708fd4c9b58 (diff) | |
download | libmatemixer-85070f3b97a3213d75a7bebf86ad973aaa21c55b.tar.bz2 libmatemixer-85070f3b97a3213d75a7bebf86ad973aaa21c55b.tar.xz |
Add ability to set monitor name and fix a few problems
Diffstat (limited to 'backends/pulse/pulse-backend.c')
-rw-r--r-- | backends/pulse/pulse-backend.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/backends/pulse/pulse-backend.c b/backends/pulse/pulse-backend.c index 1794018..da73396 100644 --- a/backends/pulse/pulse-backend.c +++ b/backends/pulse/pulse-backend.c @@ -529,8 +529,12 @@ backend_set_default_input_stream (MateMixerBackend *backend, MateMixerStream *st return FALSE; } - return pulse_connection_set_default_source (pulse->priv->connection, - mate_mixer_stream_get_name (stream)); + if (!pulse_connection_set_default_source (pulse->priv->connection, + mate_mixer_stream_get_name (stream))) + return FALSE; + + g_object_notify (G_OBJECT (pulse), "default-input"); + return TRUE; } static MateMixerStream * @@ -556,8 +560,12 @@ backend_set_default_output_stream (MateMixerBackend *backend, MateMixerStream *s return FALSE; } - return pulse_connection_set_default_sink (pulse->priv->connection, - mate_mixer_stream_get_name (stream)); + if (!pulse_connection_set_default_sink (pulse->priv->connection, + mate_mixer_stream_get_name (stream))) + return FALSE; + + g_object_notify (G_OBJECT (pulse), "default-output"); + return TRUE; } static void @@ -626,6 +634,9 @@ backend_server_info_cb (PulseConnection *connection, if (pulse->priv->default_source != NULL) name_source = mate_mixer_stream_get_name (pulse->priv->default_source); + // XXX + // default input might be monitor !!! + if (g_strcmp0 (name_source, info->default_source_name)) { if (pulse->priv->default_source != NULL) g_clear_object (&pulse->priv->default_source); |