76
76
GtkWidget *output_balance_bar;
77
77
GtkWidget *output_fade_bar;
78
78
GtkWidget *output_lfe_bar;
79
GtkWidget *output_port_combo;
79
GtkWidget *output_profile_combo;
80
GtkWidget *input_profile_combo;
80
81
GtkWidget *input_treeview;
81
82
GtkWidget *input_settings_box;
82
83
GtkWidget *sound_theme_chooser;
724
725
stop_monitor_stream_for_source (dialog);
727
// Not ideal but for now destroy the combo and recreate below.
728
if (dialog->priv->input_profile_combo != NULL) {
729
gtk_container_remove (GTK_CONTAINER (dialog->priv->input_settings_box),
730
dialog->priv->input_profile_combo);
731
dialog->priv->input_profile_combo = NULL;
727
734
GvcMixerStream *stream;
728
735
const GvcChannelMap *map;
731
738
stream = gvc_mixer_control_get_stream_from_device (dialog->priv->mixer_control,
734
740
if (stream == NULL) {
735
741
g_warning ("active_input_update - couldn't find a stream from the supposed active input");
736
742
gtk_widget_set_sensitive (dialog->priv->input_bar,
740
747
// Set the label accordingly
741
748
gtk_label_set_label (GTK_LABEL(dialog->priv->selected_input_label),
742
749
g_strdup_printf("Settings for %s",
755
762
create_monitor_stream_for_source (dialog, stream);
756
763
// remove any previous stream that might have been pointed at
757
764
// the static input bar and connect new signals from new stream.
758
bar_set_stream (dialog, dialog->priv->input_bar, stream);
765
bar_set_stream (dialog, dialog->priv->input_bar, stream);
767
GList* profiles = NULL;
768
profiles = gvc_mixer_ui_device_get_profiles (active_input);
770
if (profiles != NULL){
771
dialog->priv->input_profile_combo = gvc_combo_box_new (_("Mode:"));
772
gvc_combo_box_set_profiles (GVC_COMBO_BOX (dialog->priv->input_profile_combo),
776
disabled = gvc_mixer_ui_device_determine_profile_sensitivity (active_input);
780
GvcMixerCardProfile *p;
781
profs = gvc_mixer_ui_device_get_profiles (active_input);
782
// We can be sure that its just one profile in the list when it's disabled
783
p = g_list_last (profs)->data;
784
gvc_combo_box_set_active (GVC_COMBO_BOX (dialog->priv->input_profile_combo),
788
gvc_combo_box_set_active (GVC_COMBO_BOX (dialog->priv->input_profile_combo),
789
gvc_mixer_control_get_active_profile_from_ui_device (dialog->priv->mixer_control,
792
g_object_set_data (G_OBJECT (dialog->priv->input_profile_combo),
795
g_signal_connect (G_OBJECT (dialog->priv->input_profile_combo), "changed",
796
G_CALLBACK (profile_selection_changed), dialog);
798
gtk_box_pack_start (GTK_BOX (dialog->priv->input_settings_box),
799
dialog->priv->input_profile_combo,
802
if (dialog->priv->size_group != NULL) {
803
gvc_combo_box_set_size_group (GVC_COMBO_BOX (dialog->priv->input_profile_combo),
804
dialog->priv->size_group, FALSE);
806
gtk_widget_show (dialog->priv->input_profile_combo);
807
gtk_widget_set_sensitive (dialog->priv->input_profile_combo,
761
812
/* active_output_update
805
856
}while (gtk_tree_model_iter_next (model, &iter));
807
858
// Not ideal but for now destroy the combo and recreate below.
808
if (dialog->priv->output_port_combo != NULL) {
859
if (dialog->priv->output_profile_combo != NULL) {
809
860
gtk_container_remove (GTK_CONTAINER (dialog->priv->output_settings_box),
810
dialog->priv->output_port_combo);
811
dialog->priv->output_port_combo = NULL;
861
dialog->priv->output_profile_combo);
862
dialog->priv->output_profile_combo = NULL;
814
865
GvcMixerStream *stream;
879
930
profiles = gvc_mixer_ui_device_get_profiles (active_output);
881
932
if (profiles != NULL) {
882
dialog->priv->output_port_combo = gvc_combo_box_new (_("Mode:"));
883
gvc_combo_box_set_profiles (GVC_COMBO_BOX (dialog->priv->output_port_combo),
933
dialog->priv->output_profile_combo = gvc_combo_box_new (_("Mode:"));
934
gvc_combo_box_set_profiles (GVC_COMBO_BOX (dialog->priv->output_profile_combo),
886
937
gboolean disabled;
892
943
profs = gvc_mixer_ui_device_get_profiles (active_output);
893
944
// We can be sure that its just one profile in the list when it's disabled
894
945
p = g_list_last (profs)->data;
895
gvc_combo_box_set_active (GVC_COMBO_BOX (dialog->priv->output_port_combo),
946
gvc_combo_box_set_active (GVC_COMBO_BOX (dialog->priv->output_profile_combo),
899
gvc_combo_box_set_active (GVC_COMBO_BOX (dialog->priv->output_port_combo),
950
gvc_combo_box_set_active (GVC_COMBO_BOX (dialog->priv->output_profile_combo),
900
951
gvc_mixer_control_get_active_profile_from_ui_device (dialog->priv->mixer_control,
903
g_object_set_data (G_OBJECT (dialog->priv->output_port_combo),
954
g_object_set_data (G_OBJECT (dialog->priv->output_profile_combo),
906
g_signal_connect (G_OBJECT (dialog->priv->output_port_combo), "changed",
957
g_signal_connect (G_OBJECT (dialog->priv->output_profile_combo), "changed",
907
958
G_CALLBACK (profile_selection_changed), dialog);
909
960
gtk_box_pack_start (GTK_BOX (dialog->priv->output_settings_box),
910
dialog->priv->output_port_combo,
961
dialog->priv->output_profile_combo,
913
964
if (dialog->priv->size_group != NULL) {
914
gvc_combo_box_set_size_group (GVC_COMBO_BOX (dialog->priv->output_port_combo),
965
gvc_combo_box_set_size_group (GVC_COMBO_BOX (dialog->priv->output_profile_combo),
915
966
dialog->priv->size_group, FALSE);
917
gtk_widget_show (dialog->priv->output_port_combo);
918
gtk_widget_set_sensitive (dialog->priv->output_port_combo,
968
gtk_widget_show (dialog->priv->output_profile_combo);
969
gtk_widget_set_sensitive (dialog->priv->output_profile_combo,
1806
1857
FALSE, FALSE, 3);
1807
1858
gtk_widget_show (self->priv->input_bar);
1809
gtk_container_add (GTK_CONTAINER (box), self->priv->input_settings_box);
1813
1861
/* Creating a box and try to deal using the same size group. */
1814
1862
GtkWidget *input_level_box;
1842
1890
self->priv->input_level_bar,
1843
1891
TRUE, TRUE, 10);
1894
self->priv->input_profile_combo = gvc_combo_box_new (_("Modes:"));
1895
g_signal_connect (G_OBJECT (self->priv->input_profile_combo), "changed",
1896
G_CALLBACK (profile_selection_changed), self);
1897
gtk_box_pack_start (GTK_BOX (self->priv->input_settings_box),
1898
self->priv->input_profile_combo,
1901
if (self->priv->size_group != NULL) {
1902
gvc_combo_box_set_size_group (GVC_COMBO_BOX (self->priv->input_profile_combo),
1903
self->priv->size_group, FALSE);
1905
gtk_widget_show (self->priv->input_profile_combo);
1908
gtk_container_add (GTK_CONTAINER (box), self->priv->input_settings_box);
1846
1910
/* Output page */
1847
1911
self->priv->output_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
1922
1986
gtk_widget_show (self->priv->output_lfe_bar);
1925
self->priv->output_port_combo = gvc_combo_box_new (_("Modes:"));
1926
g_signal_connect (G_OBJECT (self->priv->output_port_combo), "changed",
1989
self->priv->output_profile_combo = gvc_combo_box_new (_("Modes:"));
1990
g_signal_connect (G_OBJECT (self->priv->output_profile_combo), "changed",
1927
1991
G_CALLBACK (profile_selection_changed), self);
1928
1992
gtk_box_pack_start (GTK_BOX (self->priv->output_settings_box),
1929
self->priv->output_port_combo,
1993
self->priv->output_profile_combo,
1930
1994
TRUE, FALSE, 3);
1932
1996
if (self->priv->size_group != NULL) {
1933
gvc_combo_box_set_size_group (GVC_COMBO_BOX (self->priv->output_port_combo),
1997
gvc_combo_box_set_size_group (GVC_COMBO_BOX (self->priv->output_profile_combo),
1934
1998
self->priv->size_group, FALSE);
1936
gtk_widget_show (self->priv->output_port_combo);
2000
gtk_widget_show (self->priv->output_profile_combo);
1938
2002
/* Creating a box and try to deal using the same size group. */
1939
2003
test_sound_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);