~nathwill-deactivatedaccount-deactivatedaccount/ubuntu/precise/gnome-control-center/fix-lp-978118

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Ken VanDine, Sebastien Bacher
  • Date: 2012-02-10 14:57:36 UTC
  • Revision ID: package-import@ubuntu.com-20120210145736-jncyehqpozbmph9c
Tags: 1:3.2.2-2ubuntu8
[ Sebastien Bacher ]
* debian/patches/git_extra_keywords.patch:
  - list "preferences" as a keyword for system settings (lp: #921039)

* debian/patches/96_sound_nua_panel.patch
  - Updated with latest changes from ronoc:
    * protect against null in_profiles in the device
    * ensure when swapping profiles on a sink that is not the pulse server 
      default that is reset as the default sink when the appropriate new 
      stream is created after the profile swap - head melt

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
        GList*                  supported_profiles;
38
38
        UiDeviceDirection       type;
39
39
        GHashTable*             profiles;
40
 
        gboolean                        disable_profile_swapping;
41
 
        gchar*                          user_preferred_profile;
 
40
        gboolean                disable_profile_swapping;
 
41
        gchar*                  user_preferred_profile;
42
42
};
43
43
 
44
44
enum
324
324
        gint profile_count;
325
325
        GList* t;
326
326
        GHashTable *profile_descriptions;
 
327
        if (in_profiles == NULL)
 
328
                return;
327
329
 
328
330
        device->priv->supported_profiles = in_profiles;
329
331
                
483
485
                // We can't find the ideal profile for the insensitive combo
484
486
                // just pick the one with the highest priority.
485
487
                if (!matched){  
486
 
                        GvcMixerCardProfile* p;
 
488
                        GvcMixerCardProfile* p = NULL;
487
489
                        // Since the profile list was already sorted on card port creation
488
490
                        // we just need to take the last one as this will have the highest priority
489
491
                        p = g_list_last (in_profiles)->data;
490
 
                        g_hash_table_insert (device->priv->profiles, 
491
 
                                             "tmp",
492
 
                                             p);                        
 
492
                        if (p != NULL)
 
493
                                g_hash_table_insert (device->priv->profiles, 
 
494
                                                     "tmp",
 
495
                                                      p);                       
493
496
                }
494
497
        }
495
498
 
558
561
}
559
562
 
560
563
const gchar*
 
564
gvc_mixer_ui_device_get_origin (GvcMixerUIDevice *op)
 
565
{
 
566
        return op->priv->second_line_desc;
 
567
}
 
568
 
 
569
const gchar*
561
570
gvc_mixer_ui_device_get_user_preferred_profile (GvcMixerUIDevice *dev)
562
571
{
563
572
        return dev->priv->user_preferred_profile;