~ubuntu-branches/ubuntu/feisty/libgnome/feisty

« back to all changes in this revision

Viewing changes to libgnome/gnome-sound.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2006-11-15 15:52:31 UTC
  • mfrom: (1.1.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20061115155231-gbp2xt8ns20vf1vh
Tags: 2.17.0-0ubuntu1
* New upstream version:
  - Enable a11y by default in devel releases 
  - Don't check for null before calling g_free/g_strdup
  - Improve strings in error messages and other places
  - GThread initialization fix 
* debian/patches/08_dont_force_a11y_activation.patch:
  - don't force a11y activation
* debian/patches/09_run_app_message_fix.patch:
  - fixed with the new version

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
 
40
40
#ifdef HAVE_ESD
41
41
static char *esound_hostname = NULL;
42
 
static gboolean esound_hostname_null_ok = FALSE;
43
42
static int gnome_sound_connection = -1;
44
43
#endif
45
44
 
284
283
    }
285
284
  fclose (f);
286
285
  g_free (s);
287
 
  if (s->data)
288
 
    g_free (s->data);
 
286
  g_free (s->data);
289
287
 
290
288
  return NULL;
291
289
}
300
298
use_sound (void)
301
299
{
302
300
  if (gnome_sound_connection == -1){
303
 
    if (esound_hostname || esound_hostname_null_ok){
304
301
      gnome_sound_connection = esd_open_sound (esound_hostname);
305
302
      if (gnome_sound_connection == -1){
306
303
        g_free (esound_hostname);
307
304
        esound_hostname = NULL;
308
 
        esound_hostname_null_ok = FALSE;
309
305
        return FALSE;
310
306
      }
311
307
    }
312
 
  }
313
308
  return TRUE;
314
309
}
315
310
#endif
522
517
#ifdef HAVE_ESD
523
518
        srand(time(NULL));
524
519
        g_free (esound_hostname);
 
520
        esound_hostname = NULL;
525
521
        if (hostname)
526
522
                esound_hostname = g_strdup (hostname);
527
 
        else
528
 
                esound_hostname_null_ok = TRUE;
529
523
#endif
530
524
}
531
525
 
540
534
#ifdef HAVE_ESD
541
535
        g_free (esound_hostname);
542
536
        esound_hostname = NULL;
 
537
 
543
538
        if(gnome_sound_connection >= 0){
544
539
                esd_close(gnome_sound_connection);
545
540
                gnome_sound_connection = -1;