~ubuntu-branches/ubuntu/trusty/pitivi/trusty

« back to all changes in this revision

Viewing changes to pitivi/ui/effectsconfiguration.py

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2011-07-07 13:43:47 UTC
  • mto: (6.1.9 sid) (1.2.12)
  • mto: This revision was merged to the branch mainline in revision 32.
  • Revision ID: james.westby@ubuntu.com-20110707134347-cari9kxjiakzej9z
Tags: upstream-0.14.1
ImportĀ upstreamĀ versionĀ 0.14.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
#
16
16
# You should have received a copy of the GNU Lesser General Public
17
17
# License along with this program; if not, write to the
18
 
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19
 
# Boston, MA 02111-1307, USA.
20
 
# This program is free software; you can redistribute it and/or modify
21
 
# it under the terms of the GNU General Public License as published by
22
 
# the Free Software Foundation; either version 3, or (at your option)
23
 
# any later version.
 
18
# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
 
19
# Boston, MA 02110-1301, USA.
24
20
 
25
21
import gst
26
22
import gtk
31
27
 
32
28
PROPS_TO_IGNORE = ['name', 'qos', 'silent', 'message']
33
29
 
 
30
 
34
31
class EffectsPropertiesHandling:
35
32
    def __init__(self, action_log):
36
33
        self.cache_dict = {}
69
66
        return self.cache_dict[effect]
70
67
 
71
68
    def cleanCache(self, effect):
72
 
        if self.cache_dict.has_key(effect):
 
69
        if effect in self.cache_dict:
73
70
            conf_ui = self.cache_dict.get(effect)
74
71
            self.cache_dict.pop(effect)
75
72
            return conf_ui
101
98
 
102
99
        #FIXME Workaround in order to make aspectratiocrop working
103
100
        if isinstance(value, gst.Fraction):
104
 
            value = gst.Fraction(int(value.num),int(value.denom))
 
101
            value = gst.Fraction(int(value.num), int(value.denom))
105
102
 
106
103
        if value != self._current_element_values.get(prop.name):
107
104
            self.action_log.begin("Effect property change")