~ubuntu-branches/ubuntu/oneiric/rhythmbox/oneiric-proposed

« back to all changes in this revision

Viewing changes to plugins/replaygain/replaygain/__init__.py

  • Committer: Bazaar Package Importer
  • Author(s): Rico Tzschichholz
  • Date: 2011-07-29 16:41:38 UTC
  • mfrom: (1.1.58 upstream)
  • Revision ID: james.westby@ubuntu.com-20110729164138-idf7lxgujh1rjto5
Tags: 2.90.1~20110802-0ubuntu1
* New upstream git snapshot up to commit
  5371a53f180007f7998720acf8d7d3376376a39d
* reverted commit "visualizer: new clutter-based visualizer plugin"
  (082eaf958b60e3830f1607114353d777c930d616) to prevent universe dependencies
* debian/control.in:
  - rename gir-package to gir1.2-rb-3.0
  - add libdiscid0-dev, libpeas-dev (>= 0.7.3)
  - drop libgnome-media-profiles-dev
  - bump gstreamer dependencies (>= 0.10.32)
  - comment rhythmbox-plugin-coherence package since it disabled upstream
* debian/*.install:
  - update for new source
* debian/patches:
  - refreshed as needed
  - drop 00git-daap-password-handling.patch and 00git-dacp-enums.patch
  - fix 05_hide_on_quit.patch (LP: #780747)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# -*- Mode: python; coding: utf-8; tab-width: 8; indent-tabs-mode: t; -*-
2
 
#
3
 
# Copyright (C) 2010 Jonathan Matthew
4
 
#
5
 
# This program is free software; you can redistribute it and/or modify
6
 
# it under the terms of the GNU General Public License as published by
7
 
# the Free Software Foundation; either version 2, or (at your option)
8
 
# any later version.
9
 
#
10
 
# The Rhythmbox authors hereby grant permission for non-GPL compatible
11
 
# GStreamer plugins to be used and distributed together with GStreamer
12
 
# and Rhythmbox. This permission is above and beyond the permissions granted
13
 
# by the GPL license by which Rhythmbox is covered. If you modify this code
14
 
# you may extend this exception to your version of the code, but you are not
15
 
# obligated to do so. If you do not wish to do so, delete this exception
16
 
# statement from your version.
17
 
#
18
 
# This program is distributed in the hope that it will be useful,
19
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
20
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21
 
# GNU General Public License for more details.
22
 
#
23
 
# You should have received a copy of the GNU General Public License
24
 
# along with this program; if not, write to the Free Software
25
 
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA.
26
 
#
27
 
 
28
 
import rb
29
 
from gi.repository import RB
30
 
 
31
 
from config import ReplayGainConfigDialog
32
 
from player import ReplayGainPlayer
33
 
 
34
 
class ReplayGainPlugin(RB.Plugin):
35
 
 
36
 
        def __init__ (self):
37
 
                RB.Plugin.__init__ (self)
38
 
                self.config_dialog = None
39
 
 
40
 
        def activate (self, shell):
41
 
                self.player = ReplayGainPlayer(shell)
42
 
 
43
 
        def deactivate (self, shell):
44
 
                self.config_dialog = None
45
 
                self.player.deactivate()
46
 
                self.player = None
47
 
 
48
 
        def create_configure_dialog(self, dialog=None):
49
 
                if self.config_dialog is None:
50
 
                        self.config_dialog = ReplayGainConfigDialog(self)
51
 
                        self.config_dialog.connect('response', self.config_dialog_response_cb)
52
 
 
53
 
                self.config_dialog.present()
54
 
                return self.config_dialog
55
 
 
56
 
        def config_dialog_response_cb(self, dialog, response):
57
 
                dialog.hide()