From 1699403b1f771b6f9c66889d54b645baf46c7d4d Mon Sep 17 00:00:00 2001 From: Michal Ratajsky Date: Wed, 20 Aug 2014 19:05:27 +0200 Subject: Fix removing input/output streams --- mate-volume-control/src/gvc-mixer-dialog.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'mate-volume-control/src') diff --git a/mate-volume-control/src/gvc-mixer-dialog.c b/mate-volume-control/src/gvc-mixer-dialog.c index 1393024..b56dad9 100644 --- a/mate-volume-control/src/gvc-mixer-dialog.c +++ b/mate-volume-control/src/gvc-mixer-dialog.c @@ -1095,17 +1095,15 @@ remove_stream (GvcMixerDialog *dialog, const gchar *name) GtkTreeIter iter; GtkTreeModel *model; - /* Remove bars for applications and reset fixed bars */ bar = g_hash_table_lookup (dialog->priv->bars, name); - if (bar != dialog->priv->input_bar && bar != dialog->priv->output_bar) - return; - - g_debug ("Removing stream %s from bar %s", - name, - gvc_channel_bar_get_name (GVC_CHANNEL_BAR (bar))); + if (bar != NULL) { + g_debug ("Removing stream %s from bar %s", + name, + gvc_channel_bar_get_name (GVC_CHANNEL_BAR (bar))); - bar_set_stream (dialog, bar, NULL); + bar_set_stream (dialog, bar, NULL); + } /* Remove from any models */ model = gtk_tree_view_get_model (GTK_TREE_VIEW (dialog->priv->output_treeview)); @@ -1149,7 +1147,6 @@ on_context_stream_removed (MateMixerContext *context, const gchar *name, GvcMixerDialog *dialog) { - if (dialog->priv->hw_profile_combo != NULL) { gboolean show_button; -- cgit v1.2.1