[gnome-control-center] sound: Remove old support code for PA < 0.9.15



commit b7f42ae16146041db58b81520fccdb261768ef57
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Mar 14 17:54:06 2011 +0000

    sound: Remove old support code for PA < 0.9.15

 panels/sound/gvc-mixer-control.c |   17 +++++------------
 panels/sound/gvc-mixer-sink.c    |    4 ----
 panels/sound/gvc-mixer-source.c  |    4 ----
 3 files changed, 5 insertions(+), 20 deletions(-)
---
diff --git a/panels/sound/gvc-mixer-control.c b/panels/sound/gvc-mixer-control.c
index 0e64165..42152c8 100644
--- a/panels/sound/gvc-mixer-control.c
+++ b/panels/sound/gvc-mixer-control.c
@@ -786,16 +786,14 @@ update_sink (GvcMixerControl    *control,
         stream = g_hash_table_lookup (control->priv->sinks,
                                       GUINT_TO_POINTER (info->index));
         if (stream == NULL) {
-#if PA_MICRO > 15
                 GList *list = NULL;
                 guint i;
-#endif /* PA_MICRO > 15 */
 
                 map = gvc_channel_map_new_from_pa_channel_map (&info->channel_map);
                 stream = gvc_mixer_sink_new (control->priv->pa_context,
                                              info->index,
                                              map);
-#if PA_MICRO > 15
+
                 for (i = 0; i < info->n_ports; i++) {
                         GvcMixerStreamPort *port;
 
@@ -806,7 +804,7 @@ update_sink (GvcMixerControl    *control,
                         list = g_list_prepend (list, port);
                 }
                 gvc_mixer_stream_set_ports (stream, list);
-#endif /* PA_MICRO > 15 */
+
                 g_object_unref (map);
                 is_new = TRUE;
         } else if (gvc_mixer_stream_is_running (stream)) {
@@ -824,10 +822,9 @@ update_sink (GvcMixerControl    *control,
         gvc_mixer_stream_set_is_muted (stream, info->mute);
         gvc_mixer_stream_set_can_decibel (stream, !!(info->flags & PA_SINK_DECIBEL_VOLUME));
         gvc_mixer_stream_set_base_volume (stream, (guint32) info->base_volume);
-#if PA_MICRO > 15
+
         if (info->active_port != NULL)
                 gvc_mixer_stream_set_port (stream, info->active_port->name);
-#endif /* PA_MICRO > 15 */
 
         if (is_new) {
                 g_hash_table_insert (control->priv->sinks,
@@ -872,17 +869,15 @@ update_source (GvcMixerControl      *control,
         stream = g_hash_table_lookup (control->priv->sources,
                                       GUINT_TO_POINTER (info->index));
         if (stream == NULL) {
-#if PA_MICRO > 15
                 GList *list = NULL;
                 guint i;
-#endif /* PA_MICRO > 15 */
                 GvcChannelMap *map;
 
                 map = gvc_channel_map_new_from_pa_channel_map (&info->channel_map);
                 stream = gvc_mixer_source_new (control->priv->pa_context,
                                                info->index,
                                                map);
-#if PA_MICRO > 15
+
                 for (i = 0; i < info->n_ports; i++) {
                         GvcMixerStreamPort *port;
 
@@ -893,7 +888,6 @@ update_source (GvcMixerControl      *control,
                         list = g_list_prepend (list, port);
                 }
                 gvc_mixer_stream_set_ports (stream, list);
-#endif /* PA_MICRO > 15 */
 
                 g_object_unref (map);
                 is_new = TRUE;
@@ -913,10 +907,9 @@ update_source (GvcMixerControl      *control,
         gvc_mixer_stream_set_is_muted (stream, info->mute);
         gvc_mixer_stream_set_can_decibel (stream, !!(info->flags & PA_SOURCE_DECIBEL_VOLUME));
         gvc_mixer_stream_set_base_volume (stream, (guint32) info->base_volume);
-#if PA_MICRO > 15
+
         if (info->active_port != NULL)
                 gvc_mixer_stream_set_port (stream, info->active_port->name);
-#endif /* PA_MICRO > 15 */
 
         if (is_new) {
                 g_hash_table_insert (control->priv->sources,
diff --git a/panels/sound/gvc-mixer-sink.c b/panels/sound/gvc-mixer-sink.c
index a6f1493..78c3c68 100644
--- a/panels/sound/gvc-mixer-sink.c
+++ b/panels/sound/gvc-mixer-sink.c
@@ -111,7 +111,6 @@ static gboolean
 gvc_mixer_sink_change_port (GvcMixerStream *stream,
                             const char     *port)
 {
-#if PA_MICRO > 15
         pa_operation *o;
         guint         index;
         pa_context   *context;
@@ -133,9 +132,6 @@ gvc_mixer_sink_change_port (GvcMixerStream *stream,
         pa_operation_unref(o);
 
         return TRUE;
-#else
-        return FALSE;
-#endif /* PA_MICRO > 15 */
 }
 
 static void
diff --git a/panels/sound/gvc-mixer-source.c b/panels/sound/gvc-mixer-source.c
index ebb05a6..dd2d0b4 100644
--- a/panels/sound/gvc-mixer-source.c
+++ b/panels/sound/gvc-mixer-source.c
@@ -111,7 +111,6 @@ static gboolean
 gvc_mixer_source_change_port (GvcMixerStream *stream,
                               const char     *port)
 {
-#if PA_MICRO > 15
         pa_operation *o;
         guint         index;
         pa_context   *context;
@@ -133,9 +132,6 @@ gvc_mixer_source_change_port (GvcMixerStream *stream,
         pa_operation_unref(o);
 
         return TRUE;
-#else
-        return FALSE;
-#endif /* PA_MICRO > 15 */
 }
 
 static void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]