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

« back to all changes in this revision

Viewing changes to pitivi/projectmanager.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:
16
16
#
17
17
# You should have received a copy of the GNU Lesser General Public
18
18
# License along with this program; if not, write to the
19
 
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20
 
# Boston, MA 02111-1307, USA.
 
19
# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
 
20
# Boston, MA 02110-1301, USA.
21
21
 
22
22
from gettext import gettext as _
23
23
import gobject
37
37
from pitivi.timeline.track import Track
38
38
from pitivi.undo import UndoableAction
39
39
 
 
40
 
40
41
class ProjectSettingsChanged(UndoableAction):
41
42
 
42
43
    def __init__(self, project, old, new):
52
53
        self.project.setSettings(self.oldsettings)
53
54
        self._undone()
54
55
 
 
56
 
55
57
class ProjectLogObserver(UndoableAction):
56
58
 
57
59
    def __init__(self, log):
69
71
        self.log.push(action)
70
72
        self.log.commit()
71
73
 
 
74
 
72
75
class ProjectManager(Signallable, Loggable):
73
76
    __signals__ = {
74
77
        "new-project-loading": ["uri"],
80
83
        "closing-project": ["project"],
81
84
        "project-closed": ["project"],
82
85
        "missing-uri": ["formatter", "uri", "factory"],
83
 
        "reverting-to-saved":["project"],
 
86
        "reverting-to-saved": ["project"],
84
87
    }
85
88
 
86
89
    def __init__(self, avalaible_effects={}):
156
159
        if self.current is None:
157
160
            return True
158
161
 
159
 
        if self.emit("closing-project", self.current) == False:
 
162
        if not self.emit("closing-project", self.current):
160
163
            return False
161
164
 
162
165
        self.emit("project-closed", self.current)