Example #1
0
    def test_project_settings(self):
        window = Gtk.Window()
        dialog = ProjectSettingsDialog(parent_window=window,
                                       project=self.project,
                                       app=self.app)

        def assert_meta(title, author, year):
            self.assertEqual(self.project.name, title)
            self.assertEqual(self.project.author, author)
            self.assertEqual(self.project.year, year)

        dialog.title_entry.set_text("t1")
        dialog.author_entry.set_text("a1")
        dialog.year_spinbutton.set_value(2001)
        dialog.updateProject()
        assert_meta("t1", "a1", "2001")

        dialog.title_entry.set_text("t2")
        dialog.author_entry.set_text("a2")
        dialog.year_spinbutton.set_value(2002)
        dialog.updateProject()
        assert_meta("t2", "a2", "2002")

        self.action_log.undo()
        assert_meta("t1", "a1", "2001")

        self.action_log.redo()
        assert_meta("t2", "a2", "2002")
Example #2
0
 def _projectSettingsButtonClickedCb(self, button):
     from pitivi.project import ProjectSettingsDialog
     dialog = ProjectSettingsDialog(self.window, self.project)
     dialog.window.run()
Example #3
0
 def show_project_settings_dialog(self):
     project = self.app.project_manager.current_project
     dialog = ProjectSettingsDialog(self.app.gui, project, self.app)
     dialog.window.run()
     self.update_title()