1
# PiTiVi , Non-linear video editor
3
# ui/projectsettings.py
5
# Copyright (c) 2005, Edward Hervey <bilboed@bilboed.com>
7
# This program is free software; you can redistribute it and/or
8
# modify it under the terms of the GNU Lesser General Public
9
# License as published by the Free Software Foundation; either
10
# version 2.1 of the License, or (at your option) any later version.
12
# This program is distributed in the hope that it will be useful,
13
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
# Lesser General Public License for more details.
17
# You should have received a copy of the GNU Lesser General Public
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.
23
Dialog box for project settings
27
from pitivi.ui.glade import GladeWindow
28
from pitivi.ui.exportsettingswidget import ExportSettingsWidget
30
class ProjectSettingsDialog(GladeWindow):
31
glade_file = "projectsettings.glade"
33
def __init__(self, parent, project):
34
GladeWindow.__init__(self, parent)
35
self.project = project
36
self.expwidget = ExportSettingsWidget(parent)
37
self.widgets["vbox1"].pack_start(self.expwidget)
39
self.expwidget.setSettings(self.project.getSettings().copy())
42
def _fillSettings(self):
44
w["nameentry"].set_text(self.project.name)
45
w["descriptiontextview"].get_buffer().set_text(self.project.description)
47
def updateSettings(self):
48
# apply selected settings to project
52
self.project.name = w["nameentry"].get_text()
53
txtbuffer = w["descriptiontextview"].get_buffer()
54
self.project.description = txtbuffer.get_text(txtbuffer.get_start_iter(),
55
txtbuffer.get_end_iter())
56
self.project.setSettings(self.expwidget.updateSettings())
58
def _responseCb(self, unused_widget, response):
59
# if the response is gtk.RESPONSE_OK update the settings
60
# else destroy yourself !
62
if response == gtk.RESPONSE_OK: