[gnome-media/gnome-2-30] Revert "Add speaker testing UI"



commit fb48422ef9424aff4160f9d309b66877ee891438
Author: Bastien Nocera <hadess hadess net>
Date:   Sat Mar 27 16:52:59 2010 +0000

    Revert "Add speaker testing UI"
    
    This reverts commit 9eff86d0b238d367e35b4b6a9248e9621cc41984.

 configure.ac                                       |    1 -
 .../data/icons/scalable/Makefile.am                |    2 +-
 .../data/icons/scalable/devices/Makefile.am        |   35 -
 .../devices/audio-speaker-center-back-testing.svg  |  539 ------------
 .../scalable/devices/audio-speaker-center-back.svg |  506 -----------
 .../devices/audio-speaker-center-testing.svg       |  537 ------------
 .../scalable/devices/audio-speaker-center.svg      |  504 -----------
 .../devices/audio-speaker-left-back-testing.svg    |  537 ------------
 .../scalable/devices/audio-speaker-left-back.svg   |  504 -----------
 .../devices/audio-speaker-left-side-testing.svg    |  537 ------------
 .../scalable/devices/audio-speaker-left-side.svg   |  504 -----------
 .../devices/audio-speaker-left-testing.svg         |  537 ------------
 .../icons/scalable/devices/audio-speaker-left.svg  |  504 -----------
 .../devices/audio-speaker-right-back-testing.svg   |  537 ------------
 .../scalable/devices/audio-speaker-right-back.svg  |  504 -----------
 .../devices/audio-speaker-right-side-testing.svg   |  537 ------------
 .../scalable/devices/audio-speaker-right-side.svg  |  504 -----------
 .../devices/audio-speaker-right-testing.svg        |  913 --------------------
 .../icons/scalable/devices/audio-speaker-right.svg |  504 -----------
 .../scalable/devices/audio-speaker-testing.svg     |  913 --------------------
 .../scalable/devices/audio-subwoofer-testing.svg   |  240 -----
 .../icons/scalable/devices/audio-subwoofer.svg     |  325 -------
 gnome-volume-control/src/Makefile.am               |    6 +-
 gnome-volume-control/src/dialog-main.c             |    1 -
 gnome-volume-control/src/gvc-balance-bar.c         |    2 +-
 gnome-volume-control/src/gvc-balance-bar.h         |    2 +-
 gnome-volume-control/src/gvc-channel-map.c         |   19 +-
 gnome-volume-control/src/gvc-channel-map.h         |   16 +-
 gnome-volume-control/src/gvc-combo-box.c           |   61 +--
 gnome-volume-control/src/gvc-combo-box.h           |    5 +-
 gnome-volume-control/src/gvc-mixer-card.h          |    1 -
 gnome-volume-control/src/gvc-mixer-control.c       |    6 +-
 gnome-volume-control/src/gvc-mixer-dialog.c        |   62 +--
 gnome-volume-control/src/gvc-mixer-event-role.c    |    6 +-
 gnome-volume-control/src/gvc-mixer-sink-input.c    |   12 +-
 gnome-volume-control/src/gvc-mixer-sink.c          |   12 +-
 gnome-volume-control/src/gvc-mixer-source.c        |   12 +-
 gnome-volume-control/src/gvc-mixer-stream.c        |   38 +-
 gnome-volume-control/src/gvc-mixer-stream.h        |    7 +-
 gnome-volume-control/src/gvc-speaker-test.h        |   57 --
 po/POTFILES.in                                     |    1 -
 41 files changed, 61 insertions(+), 10489 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 87e4f1c..140728b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -397,7 +397,6 @@ gnome-volume-control/data/icons/48x48/Makefile
 gnome-volume-control/data/icons/48x48/apps/Makefile
 gnome-volume-control/data/icons/scalable/Makefile
 gnome-volume-control/data/icons/scalable/apps/Makefile
-gnome-volume-control/data/icons/scalable/devices/Makefile
 gnome-volume-control/data/icons/scalable/status/Makefile
 gnome-volume-control/src/Makefile
 grecord/Makefile
diff --git a/gnome-volume-control/data/icons/scalable/Makefile.am b/gnome-volume-control/data/icons/scalable/Makefile.am
index 00c42b1..9ed74c7 100644
--- a/gnome-volume-control/data/icons/scalable/Makefile.am
+++ b/gnome-volume-control/data/icons/scalable/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = status apps devices
+SUBDIRS = status apps
 
 
 -include $(top_srcdir)/git.mk
diff --git a/gnome-volume-control/src/Makefile.am b/gnome-volume-control/src/Makefile.am
index 199d0b5..21462af 100644
--- a/gnome-volume-control/src/Makefile.am
+++ b/gnome-volume-control/src/Makefile.am
@@ -38,6 +38,8 @@ libgnomevolumecontrol_la_SOURCES =		\
 	gvc-mixer-control.c			\
 	gvc-channel-bar.h			\
 	gvc-channel-bar.c			\
+	gvc-applet.h				\
+	gvc-applet.c				\
 	gvc-log.h				\
 	gvc-log.c				\
 	$(NULL)
@@ -52,8 +54,6 @@ gnome_volume_control_applet_LDADD =		\
 gnome_volume_control_applet_SOURCES =		\
 	gvc-stream-status-icon.h		\
 	gvc-stream-status-icon.c		\
-	gvc-applet.h				\
-	gvc-applet.c				\
 	applet-main.c				\
 	$(NULL)
 
@@ -74,8 +74,6 @@ gnome_volume_control_SOURCES =			\
 	gvc-level-bar.c				\
 	gvc-combo-box.h				\
 	gvc-combo-box.c				\
-	gvc-speaker-test.h			\
-	gvc-speaker-test.c			\
 	dialog-main.c				\
 	$(NULL)
 
diff --git a/gnome-volume-control/src/dialog-main.c b/gnome-volume-control/src/dialog-main.c
index 8bfaa0f..b3f06c0 100644
--- a/gnome-volume-control/src/dialog-main.c
+++ b/gnome-volume-control/src/dialog-main.c
@@ -188,7 +188,6 @@ main (int argc, char **argv)
 
         gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (),
                                            ICON_DATA_DIR);
-        gtk_window_set_default_icon_name ("multimedia-volume-control");
 
         control = gvc_mixer_control_new ("GNOME Volume Control Dialog");
         g_signal_connect (control,
diff --git a/gnome-volume-control/src/gvc-balance-bar.c b/gnome-volume-control/src/gvc-balance-bar.c
index 890a8db..02c727d 100644
--- a/gnome-volume-control/src/gvc-balance-bar.c
+++ b/gnome-volume-control/src/gvc-balance-bar.c
@@ -534,7 +534,7 @@ gvc_balance_bar_finalize (GObject *object)
 }
 
 GtkWidget *
-gvc_balance_bar_new (const GvcChannelMap *channel_map, GvcBalanceType btype)
+gvc_balance_bar_new (GvcChannelMap *channel_map, GvcBalanceType btype)
 {
         GObject *bar;
         bar = g_object_new (GVC_TYPE_BALANCE_BAR,
diff --git a/gnome-volume-control/src/gvc-balance-bar.h b/gnome-volume-control/src/gvc-balance-bar.h
index 95e96dc..5122552 100644
--- a/gnome-volume-control/src/gvc-balance-bar.h
+++ b/gnome-volume-control/src/gvc-balance-bar.h
@@ -57,7 +57,7 @@ typedef struct
 
 GType               gvc_balance_bar_get_type            (void);
 
-GtkWidget *         gvc_balance_bar_new                 (const GvcChannelMap *map,
+GtkWidget *         gvc_balance_bar_new                 (GvcChannelMap *map,
                                                          GvcBalanceType btype);
 
 void                gvc_balance_bar_set_size_group      (GvcBalanceBar *bar,
diff --git a/gnome-volume-control/src/gvc-channel-map.c b/gnome-volume-control/src/gvc-channel-map.c
index 82abf86..ea3e5af 100644
--- a/gnome-volume-control/src/gvc-channel-map.c
+++ b/gnome-volume-control/src/gvc-channel-map.c
@@ -49,6 +49,7 @@ struct GvcChannelMapPrivate
         gdouble               extern_volume[NUM_TYPES]; /* volume, balance, fade, lfe */
         gboolean              can_balance;
         gboolean              can_fade;
+        gboolean              has_lfe;
 };
 
 enum {
@@ -103,7 +104,7 @@ gvc_cvolume_get_position (pa_cvolume *cv, const pa_channel_map *map, pa_channel_
 #endif
 
 guint
-gvc_channel_map_get_num_channels (const GvcChannelMap *map)
+gvc_channel_map_get_num_channels (GvcChannelMap *map)
 {
         g_return_val_if_fail (GVC_IS_CHANNEL_MAP (map), 0);
 
@@ -139,7 +140,7 @@ gvc_channel_map_get_volume (GvcChannelMap *map)
 }
 
 gboolean
-gvc_channel_map_can_balance (const GvcChannelMap  *map)
+gvc_channel_map_can_balance (GvcChannelMap  *map)
 {
         g_return_val_if_fail (GVC_IS_CHANNEL_MAP (map), FALSE);
 
@@ -147,7 +148,7 @@ gvc_channel_map_can_balance (const GvcChannelMap  *map)
 }
 
 gboolean
-gvc_channel_map_can_fade (const GvcChannelMap  *map)
+gvc_channel_map_can_fade (GvcChannelMap  *map)
 {
         g_return_val_if_fail (GVC_IS_CHANNEL_MAP (map), FALSE);
 
@@ -155,7 +156,7 @@ gvc_channel_map_can_fade (const GvcChannelMap  *map)
 }
 
 const char *
-gvc_channel_map_get_mapping (const GvcChannelMap  *map)
+gvc_channel_map_get_mapping (GvcChannelMap  *map)
 {
         g_return_val_if_fail (GVC_IS_CHANNEL_MAP (map), NULL);
 
@@ -166,16 +167,15 @@ gvc_channel_map_get_mapping (const GvcChannelMap  *map)
 }
 
 gboolean
-gvc_channel_map_has_position (const GvcChannelMap  *map,
-                              pa_channel_position_t position)
+gvc_channel_map_has_lfe (GvcChannelMap  *map)
 {
         g_return_val_if_fail (GVC_IS_CHANNEL_MAP (map), FALSE);
 
-        return gvc_pa_channel_map_has_position (&(map->priv->pa_map), position);
+        return map->priv->has_lfe;
 }
 
 const pa_channel_map *
-gvc_channel_map_get_pa_channel_map (const GvcChannelMap  *map)
+gvc_channel_map_get_pa_channel_map (GvcChannelMap  *map)
 {
         g_return_val_if_fail (GVC_IS_CHANNEL_MAP (map), NULL);
 
@@ -186,7 +186,7 @@ gvc_channel_map_get_pa_channel_map (const GvcChannelMap  *map)
 }
 
 const pa_cvolume *
-gvc_channel_map_get_cvolume (const GvcChannelMap  *map)
+gvc_channel_map_get_cvolume (GvcChannelMap  *map)
 {
         g_return_val_if_fail (GVC_IS_CHANNEL_MAP (map), NULL);
 
@@ -274,6 +274,7 @@ set_from_pa_map (GvcChannelMap        *map,
 
         map->priv->can_balance = pa_channel_map_can_balance (pa_map);
         map->priv->can_fade = pa_channel_map_can_fade (pa_map);
+        map->priv->has_lfe = gvc_pa_channel_map_has_position (pa_map, PA_CHANNEL_POSITION_LFE);
 
         map->priv->pa_map = *pa_map;
         pa_cvolume_set(&map->priv->pa_volume, pa_map->channels, PA_VOLUME_NORM);
diff --git a/gnome-volume-control/src/gvc-channel-map.h b/gnome-volume-control/src/gvc-channel-map.h
index a149ee3..497ce69 100644
--- a/gnome-volume-control/src/gvc-channel-map.h
+++ b/gnome-volume-control/src/gvc-channel-map.h
@@ -60,22 +60,20 @@ GType                   gvc_channel_map_get_type                (void);
 
 GvcChannelMap *         gvc_channel_map_new                     (void);
 GvcChannelMap *         gvc_channel_map_new_from_pa_channel_map (const pa_channel_map *map);
-guint                   gvc_channel_map_get_num_channels        (const GvcChannelMap  *map);
+guint                   gvc_channel_map_get_num_channels        (GvcChannelMap  *map);
 const gdouble *         gvc_channel_map_get_volume              (GvcChannelMap  *map);
-gboolean                gvc_channel_map_can_balance             (const GvcChannelMap  *map);
-gboolean                gvc_channel_map_can_fade                (const GvcChannelMap  *map);
-gboolean                gvc_channel_map_has_position            (const GvcChannelMap  *map,
-                                                                 pa_channel_position_t position);
-#define                 gvc_channel_map_has_lfe(x)              gvc_channel_map_has_position (x, PA_CHANNEL_POSITION_LFE)
+gboolean                gvc_channel_map_can_balance             (GvcChannelMap  *map);
+gboolean                gvc_channel_map_can_fade                (GvcChannelMap  *map);
+gboolean                gvc_channel_map_has_lfe                 (GvcChannelMap  *map);
 
 void                    gvc_channel_map_volume_changed          (GvcChannelMap    *map,
                                                                  const pa_cvolume *cv,
                                                                  gboolean          set);
-const char *            gvc_channel_map_get_mapping             (const GvcChannelMap  *map);
+const char *            gvc_channel_map_get_mapping             (GvcChannelMap  *map);
 
 /* private */
-const pa_cvolume *      gvc_channel_map_get_cvolume             (const GvcChannelMap  *map);
-const pa_channel_map *  gvc_channel_map_get_pa_channel_map      (const GvcChannelMap  *map);
+const pa_cvolume *      gvc_channel_map_get_cvolume             (GvcChannelMap  *map);
+const pa_channel_map *  gvc_channel_map_get_pa_channel_map      (GvcChannelMap  *map);
 G_END_DECLS
 
 #endif /* __GVC_CHANNEL_MAP_H */
diff --git a/gnome-volume-control/src/gvc-combo-box.c b/gnome-volume-control/src/gvc-combo-box.c
index 5e0d82c..d811273 100644
--- a/gnome-volume-control/src/gvc-combo-box.c
+++ b/gnome-volume-control/src/gvc-combo-box.c
@@ -41,7 +41,6 @@ struct GvcComboBoxPrivate
         GtkWidget     *start_box;
         GtkWidget     *end_box;
         GtkWidget     *label;
-        GtkWidget     *button;
         GtkTreeModel  *model;
         GtkWidget     *combobox;
         gboolean       set_called;
@@ -57,15 +56,12 @@ enum {
 
 enum {
         CHANGED,
-        BUTTON_CLICKED,
         LAST_SIGNAL
 };
 
 enum {
         PROP_0,
-        PROP_LABEL,
-        PROP_SHOW_BUTTON,
-        PROP_BUTTON_LABEL
+        PROP_LABEL
 };
 
 static guint signals [LAST_SIGNAL] = { 0, };
@@ -110,12 +106,6 @@ gvc_combo_box_set_property (GObject       *object,
         case PROP_LABEL:
                 gtk_label_set_text_with_mnemonic (GTK_LABEL (self->priv->label), g_value_get_string (value));
                 break;
-        case PROP_BUTTON_LABEL:
-                gtk_button_set_label (GTK_BUTTON (self->priv->button), g_value_get_string (value));
-                break;
-        case PROP_SHOW_BUTTON:
-                gtk_widget_set_visible (self->priv->button, g_value_get_boolean (value));
-                break;
         default:
                 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
                 break;
@@ -135,14 +125,6 @@ gvc_combo_box_get_property (GObject     *object,
                 g_value_set_string (value,
                                     gtk_label_get_text (GTK_LABEL (self->priv->label)));
                 break;
-        case PROP_BUTTON_LABEL:
-                g_value_set_string (value,
-                                    gtk_button_get_label (GTK_BUTTON (self->priv->button)));
-                break;
-        case PROP_SHOW_BUTTON:
-                g_value_set_boolean (value,
-                                     gtk_widget_get_visible (self->priv->button));
-                break;
         default:
                 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
                 break;
@@ -162,23 +144,9 @@ gvc_combo_box_class_init (GvcComboBoxClass *klass)
                                          PROP_LABEL,
                                          g_param_spec_string ("label",
                                                               "label",
-                                                              "The combo box label",
+                                                              "The combo box labale",
                                                               _("_Profile:"),
                                                               G_PARAM_READWRITE|G_PARAM_CONSTRUCT));
-        g_object_class_install_property (object_class,
-                                         PROP_SHOW_BUTTON,
-                                         g_param_spec_boolean ("show-button",
-                                                              "show-button",
-                                                              "Whether to show the button",
-                                                              FALSE,
-                                                              G_PARAM_READWRITE|G_PARAM_CONSTRUCT));
-        g_object_class_install_property (object_class,
-                                         PROP_BUTTON_LABEL,
-                                         g_param_spec_string ("button-label",
-                                                              "button-label",
-                                                              "The button's label",
-                                                              "APPLICATION BUG",
-                                                              G_PARAM_READWRITE|G_PARAM_CONSTRUCT));
         signals [CHANGED] =
                 g_signal_new ("changed",
                               G_TYPE_FROM_CLASS (klass),
@@ -187,14 +155,6 @@ gvc_combo_box_class_init (GvcComboBoxClass *klass)
                               NULL, NULL,
                               g_cclosure_marshal_VOID__STRING,
                               G_TYPE_NONE, 1, G_TYPE_STRING);
-        signals [BUTTON_CLICKED] =
-                g_signal_new ("button-clicked",
-                              G_TYPE_FROM_CLASS (klass),
-                              G_SIGNAL_RUN_LAST,
-                              G_STRUCT_OFFSET (GvcComboBoxClass, button_clicked),
-                              NULL, NULL,
-                              g_cclosure_marshal_VOID__VOID,
-                              G_TYPE_NONE, 0, G_TYPE_NONE);
 
         g_type_class_add_private (klass, sizeof (GvcComboBoxPrivate));
 }
@@ -286,13 +246,6 @@ on_combo_box_changed (GtkComboBox *widget,
 }
 
 static void
-on_combo_box_button_clicked (GtkButton   *button,
-                             GvcComboBox *combo_box)
-{
-        g_signal_emit (combo_box, signals[BUTTON_CLICKED], 0);
-}
-
-static void
 gvc_combo_box_init (GvcComboBox *combo_box)
 {
         GtkWidget *frame;
@@ -334,12 +287,7 @@ gvc_combo_box_init (GvcComboBox *combo_box)
 
         gtk_box_pack_start (GTK_BOX (sbox), combo_box->priv->label, FALSE, FALSE, 0);
 
-        gtk_box_pack_start (GTK_BOX (box), combo_box->priv->combobox, TRUE, TRUE, 0);
-
-        combo_box->priv->button = gtk_button_new_with_label ("APPLICATION BUG");
-        gtk_widget_set_no_show_all (combo_box->priv->button, TRUE);
-        gtk_box_pack_start (GTK_BOX (box), combo_box->priv->button, FALSE, FALSE, 0);
-
+        gtk_box_pack_start (GTK_BOX (box), combo_box->priv->combobox, FALSE, FALSE, 0);
 
         combo_box->priv->end_box = ebox = gtk_hbox_new (FALSE, 6);
         gtk_box_pack_start (GTK_BOX (box), ebox, FALSE, FALSE, 0);
@@ -354,14 +302,11 @@ gvc_combo_box_init (GvcComboBox *combo_box)
 
         gtk_container_add (GTK_CONTAINER (frame), combo_box->priv->drop_box);
         gtk_widget_show_all (frame);
-
         gtk_label_set_mnemonic_widget (GTK_LABEL (combo_box->priv->label),
                                        combo_box->priv->combobox);
 
         g_signal_connect (G_OBJECT (combo_box->priv->combobox), "changed",
                           G_CALLBACK (on_combo_box_changed), combo_box);
-        g_signal_connect (G_OBJECT (combo_box->priv->button), "clicked",
-                          G_CALLBACK (on_combo_box_button_clicked), combo_box);
 }
 
 static void
diff --git a/gnome-volume-control/src/gvc-combo-box.h b/gnome-volume-control/src/gvc-combo-box.h
index f1ffc0d..a325d93 100644
--- a/gnome-volume-control/src/gvc-combo-box.h
+++ b/gnome-volume-control/src/gvc-combo-box.h
@@ -42,9 +42,8 @@ typedef struct
 
 typedef struct
 {
-        GtkHBoxClass            parent_class;
-        void (* changed)        (GvcComboBox *combobox, const char *name);
-        void (* button_clicked) (GvcComboBox *combobox);
+        GtkHBoxClass          parent_class;
+        void (* changed)       (GvcComboBox *combobox, const char *name);
 } GvcComboBoxClass;
 
 GType               gvc_combo_box_get_type            (void);
diff --git a/gnome-volume-control/src/gvc-mixer-card.h b/gnome-volume-control/src/gvc-mixer-card.h
index ad24cd6..3da3edb 100644
--- a/gnome-volume-control/src/gvc-mixer-card.h
+++ b/gnome-volume-control/src/gvc-mixer-card.h
@@ -54,7 +54,6 @@ typedef struct
         char *human_profile;
         char *status;
         guint priority;
-        guint n_sinks, n_sources;
 } GvcMixerCardProfile;
 
 GType                 gvc_mixer_card_get_type          (void);
diff --git a/gnome-volume-control/src/gvc-mixer-control.c b/gnome-volume-control/src/gvc-mixer-control.c
index ee5d5c8..52c7cfd 100644
--- a/gnome-volume-control/src/gvc-mixer-control.c
+++ b/gnome-volume-control/src/gvc-mixer-control.c
@@ -683,7 +683,6 @@ update_sink (GvcMixerControl    *control,
 
         max_volume = pa_cvolume_max (&info->volume);
         gvc_mixer_stream_set_name (stream, info->name);
-        gvc_mixer_stream_set_card_index (stream, info->card);
         gvc_mixer_stream_set_description (stream, info->description);
         gvc_mixer_stream_set_icon_name (stream, "audio-card");
         gvc_mixer_stream_set_volume (stream, (guint)max_volume);
@@ -709,7 +708,7 @@ update_sink (GvcMixerControl    *control,
         }
 
         if (map == NULL)
-                map = (GvcChannelMap *) gvc_mixer_stream_get_channel_map (stream);
+                map = gvc_mixer_stream_get_channel_map (stream);
         gvc_channel_map_volume_changed (map, &info->volume, FALSE);
 }
 
@@ -772,7 +771,6 @@ update_source (GvcMixerControl      *control,
         max_volume = pa_cvolume_max (&info->volume);
 
         gvc_mixer_stream_set_name (stream, info->name);
-        gvc_mixer_stream_set_card_index (stream, info->card);
         gvc_mixer_stream_set_description (stream, info->description);
         gvc_mixer_stream_set_icon_name (stream, "audio-input-microphone");
         gvc_mixer_stream_set_volume (stream, (guint)max_volume);
@@ -1078,8 +1076,6 @@ update_card (GvcMixerControl      *control,
                         profile->profile = g_strdup (pi.name);
                         profile->human_profile = g_strdup (pi.description);
                         profile->status = card_num_streams_to_status (pi.n_sinks, pi.n_sources);
-                        profile->n_sinks = pi.n_sinks;
-                        profile->n_sources = pi.n_sources;
                         profile->priority = pi.priority;
                         list = g_list_prepend (list, profile);
                 }
diff --git a/gnome-volume-control/src/gvc-mixer-dialog.c b/gnome-volume-control/src/gvc-mixer-dialog.c
index e21ef9e..6b8b0b3 100644
--- a/gnome-volume-control/src/gvc-mixer-dialog.c
+++ b/gnome-volume-control/src/gvc-mixer-dialog.c
@@ -42,7 +42,6 @@
 #include "gvc-mixer-dialog.h"
 #include "gvc-sound-theme-chooser.h"
 #include "gvc-level-bar.h"
-#include "gvc-speaker-test.h"
 
 #define SCALE_SIZE 128
 
@@ -223,9 +222,9 @@ port_selection_changed (GvcComboBox *combo_box,
 static void
 update_output_settings (GvcMixerDialog *dialog)
 {
-        GvcMixerStream      *stream;
-        const GvcChannelMap *map;
-        const GList         *ports;
+        GvcMixerStream *stream;
+        GvcChannelMap  *map;
+        const GList    *ports;
 
         g_debug ("Updating output settings");
         if (dialog->priv->output_balance_bar != NULL) {
@@ -305,7 +304,7 @@ update_output_settings (GvcMixerDialog *dialog)
 
         ports = gvc_mixer_stream_get_ports (stream);
         if (ports != NULL) {
-                const GvcMixerStreamPort *port;
+                GvcMixerStreamPort *port;
                 port = gvc_mixer_stream_get_port (stream);
 
                 dialog->priv->output_port_combo = gvc_combo_box_new (_("Co_nnector:"));
@@ -600,7 +599,7 @@ update_input_settings (GvcMixerDialog *dialog)
 
         ports = gvc_mixer_stream_get_ports (stream);
         if (ports != NULL) {
-                const GvcMixerStreamPort *port;
+                GvcMixerStreamPort *port;
                 port = gvc_mixer_stream_get_port (stream);
 
                 dialog->priv->input_port_combo = gvc_combo_box_new (_("Co_nnector:"));
@@ -1101,9 +1100,9 @@ add_stream (GvcMixerDialog *dialog,
                                   G_CALLBACK (on_stream_description_notify),
                                   dialog);
         } else if (GVC_IS_MIXER_SINK (stream)) {
-                GtkTreeModel        *model;
-                GtkTreeIter          iter;
-                const GvcChannelMap *map;
+                GtkTreeModel  *model;
+                GtkTreeIter    iter;
+                GvcChannelMap *map;
 
                 model = gtk_tree_view_get_model (GTK_TREE_VIEW (dialog->priv->output_treeview));
                 gtk_list_store_append (GTK_LIST_STORE (model), &iter);
@@ -1267,9 +1266,6 @@ add_card (GvcMixerDialog *dialog,
                 if (gvc_mixer_card_get_index (selected) == gvc_mixer_card_get_index (card)) {
                         gvc_combo_box_set_active (GVC_COMBO_BOX (dialog->priv->hw_profile_combo),
                                                   profile->profile);
-                        g_object_set (G_OBJECT (dialog->priv->hw_profile_combo),
-                                      "show-button", profile->n_sinks == 1,
-                                      NULL);
                 }
         }
 }
@@ -1502,42 +1498,6 @@ on_profile_changed (GvcComboBox *widget,
 }
 
 static void
-on_test_speakers_clicked (GvcComboBox *widget,
-                          gpointer     user_data)
-{
-        GvcMixerDialog      *dialog = GVC_MIXER_DIALOG (user_data);
-        GvcMixerCard        *card;
-        GvcMixerCardProfile *profile;
-        GtkWidget           *d, *speaker_test, *container;
-        char                *title;
-
-        card = g_object_get_data (G_OBJECT (widget), "card");
-        if (card == NULL) {
-                g_warning ("Could not find card for combobox");
-                return;
-        }
-        profile = gvc_mixer_card_get_profile (card);
-
-        g_debug ("XXX Start speaker testing for profile '%s', card %s XXX",
-                 profile->profile, gvc_mixer_card_get_name (card));
-
-	title = g_strdup_printf (_("Speaker Testing for %s"), gvc_mixer_card_get_name (card));
-        d = gtk_dialog_new_with_buttons (title,
-                                         GTK_WINDOW (dialog),
-                                         GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_NO_SEPARATOR,
-                                         NULL);
-        g_free (title);
-        speaker_test = gvc_speaker_test_new (dialog->priv->mixer_control,
-                                             card);
-        gtk_widget_show (speaker_test);
-        container = gtk_dialog_get_content_area (GTK_DIALOG (d));
-        gtk_container_add (GTK_CONTAINER (container), speaker_test);
-
-        gtk_dialog_run (GTK_DIALOG (d));
-        gtk_widget_destroy (d);
-}
-
-static void
 on_card_selection_changed (GtkTreeSelection *selection,
                            gpointer          user_data)
 {
@@ -1576,23 +1536,17 @@ on_card_selection_changed (GtkTreeSelection *selection,
         current_profile = gvc_mixer_card_get_profile (card);
         profiles = gvc_mixer_card_get_profiles (card);
         dialog->priv->hw_profile_combo = gvc_combo_box_new (_("_Profile:"));
-        g_object_set (G_OBJECT (dialog->priv->hw_profile_combo), "button-label", _("Test Speakers"), NULL);
         gvc_combo_box_set_profiles (GVC_COMBO_BOX (dialog->priv->hw_profile_combo), profiles);
         gvc_combo_box_set_active (GVC_COMBO_BOX (dialog->priv->hw_profile_combo), current_profile->profile);
 
         gtk_box_pack_start (GTK_BOX (dialog->priv->hw_settings_box),
                             dialog->priv->hw_profile_combo,
                             TRUE, TRUE, 6);
-        g_object_set (G_OBJECT (dialog->priv->hw_profile_combo),
-                      "show-button", current_profile->n_sinks == 1,
-                      NULL);
         gtk_widget_show (dialog->priv->hw_profile_combo);
 
         g_object_set_data (G_OBJECT (dialog->priv->hw_profile_combo), "card", card);
         g_signal_connect (G_OBJECT (dialog->priv->hw_profile_combo), "changed",
                           G_CALLBACK (on_profile_changed), dialog);
-        g_signal_connect (G_OBJECT (dialog->priv->hw_profile_combo), "button-clicked",
-                          G_CALLBACK (on_test_speakers_clicked), dialog);
 }
 
 static void
diff --git a/gnome-volume-control/src/gvc-mixer-event-role.c b/gnome-volume-control/src/gvc-mixer-event-role.c
index 6166d1d..69e38ce 100644
--- a/gnome-volume-control/src/gvc-mixer-event-role.c
+++ b/gnome-volume-control/src/gvc-mixer-event-role.c
@@ -58,7 +58,7 @@ update_settings (GvcMixerEventRole *role,
 {
         pa_operation              *o;
         guint                      index;
-        const GvcChannelMap       *map;
+        GvcChannelMap     *map;
         pa_context                *context;
         pa_ext_stream_restore_info info;
 
@@ -87,8 +87,8 @@ update_settings (GvcMixerEventRole *role,
                 return FALSE;
         }
 
-        if (op != NULL)
-                *op = o;
+	if (op != NULL)
+		*op = o;
 
         return TRUE;
 }
diff --git a/gnome-volume-control/src/gvc-mixer-sink-input.c b/gnome-volume-control/src/gvc-mixer-sink-input.c
index 9d4ad2a..35551bb 100644
--- a/gnome-volume-control/src/gvc-mixer-sink-input.c
+++ b/gnome-volume-control/src/gvc-mixer-sink-input.c
@@ -48,12 +48,12 @@ G_DEFINE_TYPE (GvcMixerSinkInput, gvc_mixer_sink_input, GVC_TYPE_MIXER_STREAM)
 static gboolean
 gvc_mixer_sink_input_push_volume (GvcMixerStream *stream, gpointer *op)
 {
-        pa_operation        *o;
-        guint                index;
-        const GvcChannelMap *map;
-        pa_context          *context;
-        const pa_cvolume    *cv;
-        guint                num_channels;
+        pa_operation      *o;
+        guint              index;
+        GvcChannelMap     *map;
+        pa_context        *context;
+        const pa_cvolume  *cv;
+        guint              num_channels;
 
         index = gvc_mixer_stream_get_index (stream);
 
diff --git a/gnome-volume-control/src/gvc-mixer-sink.c b/gnome-volume-control/src/gvc-mixer-sink.c
index 649b840..5e95f63 100644
--- a/gnome-volume-control/src/gvc-mixer-sink.c
+++ b/gnome-volume-control/src/gvc-mixer-sink.c
@@ -48,11 +48,11 @@ G_DEFINE_TYPE (GvcMixerSink, gvc_mixer_sink, GVC_TYPE_MIXER_STREAM)
 static gboolean
 gvc_mixer_sink_push_volume (GvcMixerStream *stream, gpointer *op)
 {
-        pa_operation        *o;
-        guint                index;
-        const GvcChannelMap *map;
-        pa_context          *context;
-        const pa_cvolume    *cv;
+        pa_operation      *o;
+        guint              index;
+        GvcChannelMap     *map;
+        pa_context        *context;
+        const pa_cvolume  *cv;
 
         index = gvc_mixer_stream_get_index (stream);
 
@@ -133,7 +133,7 @@ gvc_mixer_sink_change_port (GvcMixerStream *stream,
 
         return TRUE;
 #else
-        return FALSE;
+	return FALSE;
 #endif /* PA_MICRO > 15 */
 }
 
diff --git a/gnome-volume-control/src/gvc-mixer-source.c b/gnome-volume-control/src/gvc-mixer-source.c
index 309bcb9..d13be9d 100644
--- a/gnome-volume-control/src/gvc-mixer-source.c
+++ b/gnome-volume-control/src/gvc-mixer-source.c
@@ -48,11 +48,11 @@ G_DEFINE_TYPE (GvcMixerSource, gvc_mixer_source, GVC_TYPE_MIXER_STREAM)
 static gboolean
 gvc_mixer_source_push_volume (GvcMixerStream *stream, gpointer *op)
 {
-        pa_operation        *o;
-        guint                index;
-        const GvcChannelMap *map;
-        pa_context          *context;
-        const pa_cvolume    *cv;
+        pa_operation      *o;
+        guint              index;
+        GvcChannelMap     *map;
+        pa_context        *context;
+        const pa_cvolume  *cv;
 
         index = gvc_mixer_stream_get_index (stream);
 
@@ -133,7 +133,7 @@ gvc_mixer_source_change_port (GvcMixerStream *stream,
 
         return TRUE;
 #else
-        return FALSE;
+	return FALSE;
 #endif /* PA_MICRO > 15 */
 }
 
diff --git a/gnome-volume-control/src/gvc-mixer-stream.c b/gnome-volume-control/src/gvc-mixer-stream.c
index 243d773..59c1f3c 100644
--- a/gnome-volume-control/src/gvc-mixer-stream.c
+++ b/gnome-volume-control/src/gvc-mixer-stream.c
@@ -40,7 +40,6 @@ struct GvcMixerStreamPrivate
         pa_context    *pa_context;
         guint          id;
         guint          index;
-        gint           card_index;
         GvcChannelMap *channel_map;
         char          *name;
         char          *description;
@@ -74,7 +73,6 @@ enum
         PROP_CAN_DECIBEL,
         PROP_IS_EVENT_STREAM,
         PROP_IS_VIRTUAL,
-        PROP_CARD_INDEX,
         PROP_PORT,
 };
 
@@ -119,7 +117,7 @@ gvc_mixer_stream_get_id (GvcMixerStream *stream)
         return stream->priv->id;
 }
 
-const GvcChannelMap *
+GvcChannelMap *
 gvc_mixer_stream_get_channel_map (GvcMixerStream *stream)
 {
         g_return_val_if_fail (GVC_IS_MIXER_STREAM (stream), NULL);
@@ -405,7 +403,7 @@ gvc_mixer_stream_set_base_volume (GvcMixerStream *stream,
         return TRUE;
 }
 
-const GvcMixerStreamPort *
+GvcMixerStreamPort *
 gvc_mixer_stream_get_port (GvcMixerStream *stream)
 {
         GList *l;
@@ -491,25 +489,6 @@ gvc_mixer_stream_set_ports (GvcMixerStream *stream,
         return TRUE;
 }
 
-gint
-gvc_mixer_stream_get_card_index (GvcMixerStream *stream)
-{
-        g_return_val_if_fail (GVC_IS_MIXER_STREAM (stream), PA_INVALID_INDEX);
-        return stream->priv->card_index;
-}
-
-gboolean
-gvc_mixer_stream_set_card_index (GvcMixerStream *stream,
-                                 gint            card_index)
-{
-        g_return_val_if_fail (GVC_IS_MIXER_STREAM (stream), FALSE);
-
-        stream->priv->card_index = card_index;
-        g_object_notify (G_OBJECT (stream), "card-index");
-
-        return TRUE;
-}
-
 static void
 gvc_mixer_stream_set_property (GObject       *object,
                                guint          prop_id,
@@ -564,9 +543,6 @@ gvc_mixer_stream_set_property (GObject       *object,
         case PROP_PORT:
                 gvc_mixer_stream_set_port (self, g_value_get_string (value));
                 break;
-        case PROP_CARD_INDEX:
-                self->priv->card_index = g_value_get_long (value);
-                break;
         default:
                 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
                 break;
@@ -629,9 +605,6 @@ gvc_mixer_stream_get_property (GObject     *object,
         case PROP_PORT:
                 g_value_set_string (value, self->priv->port);
                 break;
-        case PROP_CARD_INDEX:
-                g_value_set_long (value, self->priv->card_index);
-                break;
         default:
                 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
                 break;
@@ -842,13 +815,6 @@ gvc_mixer_stream_class_init (GvcMixerStreamClass *klass)
                                                               "The name of the current port for this stream",
                                                               NULL,
                                                               G_PARAM_READWRITE));
-        g_object_class_install_property (gobject_class,
-                                         PROP_CARD_INDEX,
-                                         g_param_spec_long ("card-index",
-                                                             "Card index",
-                                                             "The index of the card for this stream",
-                                                             PA_INVALID_INDEX, G_MAXLONG, PA_INVALID_INDEX,
-                                                             G_PARAM_READWRITE|G_PARAM_CONSTRUCT));
         g_type_class_add_private (klass, sizeof (GvcMixerStreamPrivate));
 }
 
diff --git a/gnome-volume-control/src/gvc-mixer-stream.h b/gnome-volume-control/src/gvc-mixer-stream.h
index bbeb8a3..4ae2d34 100644
--- a/gnome-volume-control/src/gvc-mixer-stream.h
+++ b/gnome-volume-control/src/gvc-mixer-stream.h
@@ -68,8 +68,8 @@ GType               gvc_mixer_stream_get_type        (void);
 pa_context *        gvc_mixer_stream_get_pa_context  (GvcMixerStream *stream);
 guint               gvc_mixer_stream_get_index       (GvcMixerStream *stream);
 guint               gvc_mixer_stream_get_id          (GvcMixerStream *stream);
-const GvcChannelMap *gvc_mixer_stream_get_channel_map(GvcMixerStream *stream);
-const GvcMixerStreamPort *gvc_mixer_stream_get_port  (GvcMixerStream *stream);
+GvcChannelMap *     gvc_mixer_stream_get_channel_map (GvcMixerStream *stream);
+GvcMixerStreamPort *gvc_mixer_stream_get_port        (GvcMixerStream *stream);
 const GList *       gvc_mixer_stream_get_ports       (GvcMixerStream *stream);
 gboolean            gvc_mixer_stream_change_port     (GvcMixerStream *stream,
                                                       const char     *port);
@@ -90,7 +90,6 @@ const char *        gvc_mixer_stream_get_description (GvcMixerStream *stream);
 const char *        gvc_mixer_stream_get_application_id (GvcMixerStream *stream);
 gboolean            gvc_mixer_stream_is_event_stream (GvcMixerStream *stream);
 gboolean            gvc_mixer_stream_is_virtual      (GvcMixerStream *stream);
-gint                gvc_mixer_stream_get_card_index  (GvcMixerStream *stream);
 
 /* private */
 gboolean            gvc_mixer_stream_set_volume      (GvcMixerStream *stream,
@@ -119,8 +118,6 @@ gboolean            gvc_mixer_stream_set_port        (GvcMixerStream *stream,
                                                       const char     *port);
 gboolean            gvc_mixer_stream_set_ports       (GvcMixerStream *stream,
                                                       GList          *ports);
-gboolean            gvc_mixer_stream_set_card_index  (GvcMixerStream *stream,
-                                                      gint            card_index);
 
 G_END_DECLS
 
diff --git a/po/POTFILES.in b/po/POTFILES.in
index c71cda1..62e890f 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -11,7 +11,6 @@ gnome-volume-control/src/gvc-channel-bar.c
 gnome-volume-control/src/gvc-combo-box.c
 gnome-volume-control/src/gvc-mixer-control.c
 gnome-volume-control/src/gvc-mixer-dialog.c
-gnome-volume-control/src/gvc-speaker-test.c
 gnome-volume-control/src/gvc-stream-status-icon.c
 grecord/gnome-sound-recorder.desktop.in.in
 grecord/gnome-sound-recorder.schemas.in.in



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