~ubuntu-branches/ubuntu/karmic/pommed/karmic

« back to all changes in this revision

Viewing changes to gpomme/gpomme.c

  • Committer: Bazaar Package Importer
  • Author(s): Julien BLACHE
  • Date: 2007-11-18 13:47:18 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20071118134718-xanyixemly8hvan8
Tags: 1.11~dfsg-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * gpomme - GTK application for use with pommed
3
3
 *
4
 
 * $Id: gpomme.c 341 2007-07-26 15:49:44Z jblache $
 
4
 * $Id: gpomme.c 378 2007-11-16 21:50:10Z jblache $
5
5
 *
6
6
 * Copyright (C) 2006 Soeren SONNENBURG <debian@nn7.de>
7
7
 * Copyright (C) 2006-2007 Julien BLACHE <jb@jblache.org>
30
30
#include <unistd.h>
31
31
#include <signal.h>
32
32
 
33
 
#include <linux/inotify.h>
34
 
#include "inotify-syscalls.h"
 
33
#ifndef NO_SYS_INOTIFY_H
 
34
# include <sys/inotify.h>
 
35
#else
 
36
# include <linux/inotify.h>
 
37
# include "inotify-syscalls.h"
 
38
#endif
35
39
 
36
40
#include <libintl.h>
37
41
 
41
45
 
42
46
#include "gpomme.h"
43
47
#include "theme.h"
44
 
#include "audio.h"
45
48
#include "conffile.h"
46
49
 
47
50
#include "../dbus-client/dbus-client.h"
373
376
          ratio = (double)cur / (double)max;
374
377
 
375
378
          if (!mbp.muted)
376
 
            {
377
 
              show_window(IMG_AUDIO_VOL_ON, _("Sound volume"), ratio);
378
 
              audio_command(AUDIO_CLICK);
379
 
            }
 
379
            show_window(IMG_AUDIO_VOL_ON, _("Sound volume"), ratio);
380
380
          else
381
381
            show_window(IMG_AUDIO_VOL_OFF, _("Sound volume (muted)"), ratio);
382
382
        }
450
450
static void
451
451
usage(void)
452
452
{
453
 
  printf("gpomme v" M_VERSION " ($Rev: 341 $) graphical client for pommed\n");
 
453
  printf("gpomme v" M_VERSION " ($Rev: 378 $) graphical client for pommed\n");
454
454
  printf("Copyright (C) 2006-2007 Julien BLACHE <jb@jblache.org> and others\n");
455
455
 
456
456
  printf("Usage:\n");
494
494
            break;
495
495
 
496
496
          case 'v':
497
 
            printf("gpomme v" M_VERSION " ($Rev: 341 $) graphical client for pommed\n");
 
497
            printf("gpomme v" M_VERSION " ($Rev: 378 $) graphical client for pommed\n");
498
498
            printf("Copyright (C) 2006-2007 Julien BLACHE <jb@jblache.org> and others\n");
499
499
 
500
500
            exit(0);
515
515
  signal(SIGINT, sig_int_term_handler);
516
516
  signal(SIGTERM, sig_int_term_handler);
517
517
 
518
 
  ret = audio_init_thread();
519
 
  if (ret < 0)
520
 
    printf("Failed to create audio thread\n");
521
 
 
522
518
  create_window();
523
519
 
524
520
  g_timeout_add(100, mbp_check_events, NULL);
525
521
 
526
522
  gtk_main();
527
523
 
528
 
 
529
524
  close(cfg_ifd);
530
525
 
531
 
  audio_command(AUDIO_COMMAND_QUIT);
532
 
  audio_cleanup();
533
 
 
534
526
  mbp_dbus_cleanup();
535
527
 
536
528
  return 0;