~ubuntu-branches/ubuntu/precise/gnome-control-center/precise-updates

« back to all changes in this revision

Viewing changes to panels/sound-nua/gvc-mixer-dialog.c

  • Committer: Package Import Robot
  • Author(s): Sebastien Bacher, Jeremy Bicha, Ken VanDine
  • Date: 2012-02-15 23:16:31 UTC
  • mfrom: (1.1.56)
  • Revision ID: package-import@ubuntu.com-20120215231631-vk7me0mhofpsq0hp
Tags: 1:3.3.5-0ubuntu1
* Upload the new serie, that will bring in quite some fixes, we revert
  some problematic or risky changes as well
* The new version includes those fixes:
  - "Change Password in User Accounts panel focuses "New password" field, 
     skipping "Current password"" (lp: #821759)
  - The dialog to add online accounts should have a title 
    (lp: #822380)
  - "Remove Profile" button clickable in Color panel when 
     no profile selected (lp: #869603)
  - Move Removable Media into System Info (lp: #835880)
  - Sound preferences: mouse scrolling balance only works for right.
    (lp: #918017)
  - gnome-control-center SIGSEGV in actualize_printers_list() 
    (lp: #903009)
  - selecting preffered applications is not an info (lp: #890143)
  - Add a keyboard shortcut by default for take screenshot of a selection"
    (lp: #625518)
* debian/patches/revert_git_datetime_port.patch:
  - revert use of datetimed, we don't use systemd and ubuntu-system-service 
    doesn't support it yet
* debian/patches/revert_git_drop_library.patch:
  - consolidate "01_allow_external_panels.patch", don't drop the library
    we use it from other components on ubuntu, the patch will be improved
    later to not use a copy of files like it does in that version
* debian/patches/revert_git_stop_using_gconf.patch,
  debian/patches/revert_ua_gsettings.patch,
  debian/patches/revert_git_keyboard_gsettings.patch:
  - revert keyboard porting to gsettings, compiz still use gconf and we
    didn't update gnome-shell to the new serie (yet)

[ Jeremy Bicha ]
* New upstream release (Thanks Rico Tzchichholz!)
* debian/control.in:
  - Bump minimum dependency versions and add libwacom dependency
* debian/rules: Build without -Wl,-z,defs
* debian/watch: Watch for unstable releases
* Refreshed patches:
  - 01_allow_external_panels.patch
  - 04_add_theme_selection.patch
  - 50_ubuntu_systemwide_prefs.patch
  - 58_ubuntu_icon_views_redesign.patch
  - 59_install_gcm_components_on_demand.patch
  - 91_configure_cheese.patch
* Dropped upstream patches:
  - 00git_handle_media_dialog_close.patch
  - 03_show_wacom_under_unity.patch
  - 90_git_sound_tab_order.patch
  - 91_git_build_use_fontconfig.patch
  - 92_git_minimal_output_height.patch
  - 93_change_window_role_on_panel_change.patch
  - 94_git_adding_shortcuts.patch
  - 95_git_ctrlw_shortcut.patch
  - git_extra_keywords.patch

[ Ken VanDine ]
* debian/patches/96_sound_nua_panel.patch
  - refreshed with latest changes from ronoc

Show diffs side-by-side

added added

removed removed

Lines of Context:
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;
723
724
 
724
725
        stop_monitor_stream_for_source (dialog);
725
726
 
 
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;
 
732
        }
726
733
 
727
734
        GvcMixerStream       *stream;  
728
735
        const GvcChannelMap  *map;
730
737
  
731
738
        stream = gvc_mixer_control_get_stream_from_device (dialog->priv->mixer_control, 
732
739
                                                           active_input); 
733
 
 
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, 
737
743
                                          FALSE);                
738
744
                return;
739
745
        }
 
746
 
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);   
 
766
 
 
767
        GList* profiles = NULL;
 
768
        profiles = gvc_mixer_ui_device_get_profiles (active_input);
 
769
 
 
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),
 
773
                                            profiles);
 
774
                                
 
775
                gboolean disabled;
 
776
                disabled = gvc_mixer_ui_device_determine_profile_sensitivity (active_input);
 
777
 
 
778
                if (disabled){
 
779
                        GList *profs;
 
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), 
 
785
                                                                 p->profile);                        
 
786
                }
 
787
                else{
 
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,
 
790
                                                                                               active_input));
 
791
                }
 
792
                g_object_set_data (G_OBJECT (dialog->priv->input_profile_combo),
 
793
                                   "uidevice",
 
794
                                   active_input);
 
795
                g_signal_connect (G_OBJECT (dialog->priv->input_profile_combo), "changed",
 
796
                                  G_CALLBACK (profile_selection_changed), dialog);
 
797
 
 
798
                gtk_box_pack_start (GTK_BOX (dialog->priv->input_settings_box),
 
799
                                    dialog->priv->input_profile_combo,
 
800
                                    TRUE, FALSE, 6);
 
801
 
 
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);
 
805
                }
 
806
                gtk_widget_show (dialog->priv->input_profile_combo);                
 
807
                gtk_widget_set_sensitive (dialog->priv->input_profile_combo, 
 
808
                                           !disabled);
 
809
        }
759
810
}
760
811
 
761
812
/* active_output_update
805
856
        }while (gtk_tree_model_iter_next (model, &iter));
806
857
        
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;
812
863
        }
813
864
 
814
865
        GvcMixerStream       *stream;  
879
930
        profiles = gvc_mixer_ui_device_get_profiles (active_output);
880
931
 
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),
884
935
                                            profiles);
885
936
                                
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), 
896
947
                                                                 p->profile);                        
897
948
                }
898
949
                else{
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,
901
952
                                                                                               active_output));
902
953
                }
903
 
                g_object_set_data (G_OBJECT (dialog->priv->output_port_combo),
 
954
                g_object_set_data (G_OBJECT (dialog->priv->output_profile_combo),
904
955
                                   "uidevice",
905
956
                                   active_output);
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);
908
959
 
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,
911
962
                                    TRUE, FALSE, 6);
912
963
 
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);
916
967
                }
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, 
919
970
                                           !disabled);
920
971
        }
921
972
 
1806
1857
                            FALSE, FALSE, 3);
1807
1858
        gtk_widget_show (self->priv->input_bar);
1808
1859
        
1809
 
        gtk_container_add (GTK_CONTAINER (box), self->priv->input_settings_box);
1810
 
        
1811
 
        
1812
1860
 
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);
1844
1892
 
 
1893
        
 
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,
 
1899
                            TRUE, FALSE, 3);
 
1900
 
 
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);
 
1904
        }
 
1905
        gtk_widget_show (self->priv->input_profile_combo);
 
1906
        
 
1907
        
 
1908
        gtk_container_add (GTK_CONTAINER (box), self->priv->input_settings_box);
1845
1909
 
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);
1923
1987
                
1924
1988
 
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);
1931
1995
 
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);
1935
1999
        }
1936
 
        gtk_widget_show (self->priv->output_port_combo);
 
2000
        gtk_widget_show (self->priv->output_profile_combo);
1937
2001
 
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);