summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Ratajsky <[email protected]>2014-11-20 15:40:51 +0100
committerMichal Ratajsky <[email protected]>2014-11-20 15:40:51 +0100
commitaa7214450e29ded03730f564ab5a2369a60f0dcb (patch)
treef5c65fd92706bd8f4e1b19ad752d45e09501b9f8
parent79f72df3ff31bdcb1a0237efd96561d762c955a5 (diff)
downloadmate-media-michal-ui.tar.bz2
mate-media-michal-ui.tar.xz
Hide empty input settings to remove extra padding when there is no port switchmichal-ui
-rw-r--r--mate-volume-control/gvc-mixer-dialog.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/mate-volume-control/gvc-mixer-dialog.c b/mate-volume-control/gvc-mixer-dialog.c
index 8f39f25..db20e8e 100644
--- a/mate-volume-control/gvc-mixer-dialog.c
+++ b/mate-volume-control/gvc-mixer-dialog.c
@@ -563,8 +563,10 @@ update_input_settings (GvcMixerDialog *dialog)
/* Get the control currently associated with the input slider */
control = gvc_channel_bar_get_control (GVC_CHANNEL_BAR (dialog->priv->input_bar));
- if (control == NULL)
+ if (control == NULL) {
+ gtk_widget_hide (dialog->priv->input_settings_box);
return;
+ }
flags = mate_mixer_stream_control_get_flags (control);
@@ -577,8 +579,10 @@ update_input_settings (GvcMixerDialog *dialog)
/* Get owning stream of the control */
stream = mate_mixer_stream_control_get_stream (control);
- if (G_UNLIKELY (stream == NULL))
+ if (G_UNLIKELY (stream == NULL)) {
+ gtk_widget_hide (dialog->priv->input_settings_box);
return;
+ }
/* Enable the port selector if the stream has one */
port_switch = find_stream_port_switch (stream);
@@ -599,8 +603,10 @@ update_input_settings (GvcMixerDialog *dialog)
G_CALLBACK (on_port_switch_active_option_notify),
dialog->priv->input_treeview);
+ gtk_widget_show (dialog->priv->input_settings_box);
gtk_widget_show (dialog->priv->input_port_combo);
- }
+ } else
+ gtk_widget_hide (dialog->priv->input_settings_box);
}
static void