~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-04-25 19:07:55 UTC
  • Revision ID: conor.curran@canonical.com-20120425190755-392flwy25qcju0dp
remove the g_prints in prep for sru

Show diffs side-by-side

added added

removed removed

Lines of Context:
322
322
void
323
323
gvc_mixer_ui_device_set_profiles (GvcMixerUIDevice *device, const GList *in_profiles)
324
324
{
325
 
        g_print ("\n SET PROFILES %s", gvc_mixer_ui_device_get_description(device));
 
325
        g_debug ("\n SET PROFILES %s", gvc_mixer_ui_device_get_description(device));
326
326
                
327
327
        gint profile_count;
328
328
        GList* t;
351
351
                if (g_strcmp0 (p->profile, "off") == 0) 
352
352
                        continue;
353
353
 
354
 
                g_print ("\n Attempt to split profile, p->profile %s on device %s \n",
 
354
                g_debug ("\n Attempt to split profile, p->profile %s on device %s \n",
355
355
                                 p->profile,
356
356
                                 gvc_mixer_ui_device_get_description (device));
357
357
 
363
363
                count = g_strv_length (modified);
364
364
                // It's a profile that only handles one direction, cache it and move on
365
365
                if (count == 1){
366
 
                        g_print ("\n Single profile, key %s against value %s for device %s \n",
 
366
                        g_debug ("\n Single profile, key %s against value %s for device %s \n",
367
367
                                         p->profile,
368
368
                                         modified[0],
369
369
                                         gvc_mixer_ui_device_get_description (device));
376
376
 
377
377
                if (device->priv->type == UiDeviceOutput) {
378
378
                        if (g_str_has_prefix (modified[0], "output")){
379
 
                                g_print ("\n Found an output profile - storing key %s against value %s for device %s \n",
 
379
                                g_debug ("\n Found an output profile - storing key %s against value %s for device %s \n",
380
380
                                                   p->profile,
381
381
                                                   modified[0],
382
382
                                                   gvc_mixer_ui_device_get_description (device));
387
387
                }
388
388
                else{
389
389
                        if (g_str_has_prefix (modified[1], "input")){
390
 
                                g_print ("\n Found an input profile - storing key %s against value %s for device %s \n",
 
390
                                g_debug ("\n Found an input profile - storing key %s against value %s for device %s \n",
391
391
                                          p->profile, modified[1], gvc_mixer_ui_device_get_description (device));
392
392
                                g_hash_table_insert (profile_descriptions,
393
393
                                                     g_strdup (p->profile),
413
413
                        n = g_list_next (t);
414
414
                        next_prof = n->data;
415
415
                        identical = g_strcmp0 (prof, next_prof) == 0; 
416
 
                        g_print ("try to compare %s with %s", prof, next_prof);
 
416
                        g_debug ("try to compare %s with %s", prof, next_prof);
417
417
                }
418
418
                if (!identical){
419
419
                        break;
421
421
        }
422
422
        g_list_free (shortened_profiles);
423
423
 
424
 
        g_print ("\n device->priv->disable_profile_swapping = %i \n", 
 
424
        g_debug ("\n device->priv->disable_profile_swapping = %i \n", 
425
425
                  identical);
426
426
 
427
427
        device->priv->disable_profile_swapping = identical;
440
440
                        gchar* short_name;
441
441
                        short_name = g_hash_table_lookup (profile_descriptions, p->profile);
442
442
 
443
 
                        g_print ("\n Not identical - examine  %s -> %s \n\n", short_name, p->profile);
 
443
                        g_debug ("\n Not identical - examine  %s -> %s \n\n", short_name, p->profile);
444
444
                        
445
445
                        // If we have already populated for this short name - trust our prioritisation below and move on.
446
446
                        if (g_hash_table_contains (device->priv->profiles, short_name) == TRUE){
447
 
                                g_print ("\n already populated for %s => ignore %s \n", short_name, p->profile);
 
447
                                g_debug ("\n already populated for %s => ignore %s \n", short_name, p->profile);
448
448
                                continue;
449
449
                        }               
450
450
 
476
476
 
477
477
                        GvcMixerCardProfile* priority_profile = g_list_last(ordered)->data;
478
478
 
479
 
                        g_print ("\n Sensitive combo - Populate the profile combo with profile %s against short name %s",
 
479
                        g_debug ("\n Sensitive combo - Populate the profile combo with profile %s against short name %s",
480
480
                                  priority_profile->profile, short_name);
481
481
 
482
482
                        g_hash_table_insert (device->priv->profiles,
520
520
                        // we just need to take the last one as this will have the highest priority
521
521
                        p = g_list_last (in_profiles)->data;
522
522
                        if (p != NULL && p->human_profile != NULL)
523
 
                                g_print ("\n fail to match on profile %s \n", p->human_profile);
 
523
                                g_debug ("\n fail to match on profile %s \n", p->human_profile);
524
524
                                g_hash_table_insert (device->priv->profiles, 
525
525
                                                     p->human_profile,
526
526
                                                     p);                
530
530
        GList* final_keys;
531
531
        final_keys = g_hash_table_get_keys (device->priv->profiles);
532
532
        GList* o;
533
 
        g_print ("\n\n Profile population \n FOR DEVICE %s", gvc_mixer_ui_device_get_description (device));
 
533
        g_debug ("\n\n Profile population \n FOR DEVICE %s", gvc_mixer_ui_device_get_description (device));
534
534
        for (o = final_keys; o != NULL; o = o->next){
535
535
                gchar* key;
536
536
                key = o->data;
537
537
                GvcMixerCardProfile* l;
538
538
                l = g_hash_table_lookup (device->priv->profiles, key);
539
 
                g_print ("\n key %s against \n profile %s \n", 
 
539
                g_debug ("\n key %s against \n profile %s \n", 
540
540
                        key,
541
541
                        l->profile);
542
542
        }