~cjcurran/+junk/soundnua-gtk-warnings

« back to all changes in this revision

Viewing changes to soundnua/gvc-mixer-ui-device.c

  • Committer: Conor Curran
  • Date: 2012-03-22 16:12:54 UTC
  • Revision ID: conor.curran@canonical.com-20120322161254-4j8hudgw9wo4iaty
make sure to disable ui elements for a device that has no sink source

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
        // This member tries to capture whether pulse is ready to use this device
 
43
        gboolean                        disabled;
42
44
};
43
45
 
44
46
enum
182
184
        self->priv->port_name = NULL;
183
185
        self->priv->disable_profile_swapping = FALSE;
184
186
        self->priv->user_preferred_profile = NULL;
 
187
        self->priv->disabled = TRUE;
185
188
        return object;
186
189
}
187
190
 
647
650
        return dev->priv->type == UiDeviceOutput;       
648
651
}
649
652
 
 
653
gboolean
 
654
gvc_mixer_ui_device_is_disabled (GvcMixerUIDevice* device)
 
655
{
 
656
        return device->priv->disabled;  
 
657
}
 
658
 
 
659
void
 
660
gvc_mixer_ui_device_enable (GvcMixerUIDevice* device)
 
661
{
 
662
        device->priv->disabled = FALSE; 
 
663
}
 
664
 
 
665
void
 
666
gvc_mixer_ui_device_disable (GvcMixerUIDevice* device)
 
667
{
 
668
        device->priv->disabled = TRUE;  
 
669
}
 
670