[pitivi: 3/16] Initialize the models of the EncodingDialog comboboxes only once
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi: 3/16] Initialize the models of the EncodingDialog comboboxes only once
- Date: Tue, 7 Jun 2011 16:27:00 +0000 (UTC)
commit d75eb5ff5ff6521fc9c7250946976115397b7b5f
Author: Alex BÄ?luÈ? <alexandru balut gmail com>
Date: Tue May 24 14:10:02 2011 +0200
Initialize the models of the EncodingDialog comboboxes only once
pitivi/ui/encodingdialog.py | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/pitivi/ui/encodingdialog.py b/pitivi/ui/encodingdialog.py
index 35b86cf..f58783b 100644
--- a/pitivi/ui/encodingdialog.py
+++ b/pitivi/ui/encodingdialog.py
@@ -30,7 +30,8 @@ import pango
from gettext import gettext as _
-import pitivi.configure as configure
+from pitivi import configure
+from pitivi.settings import ExportSettings
from pitivi.log.loggable import Loggable
from pitivi.ui.encodingprogress import EncodingProgressDialog
from pitivi.ui.gstwidget import GstElementSettingsDialog
@@ -108,8 +109,6 @@ class EncodingDialog(Renderer, Loggable):
Loggable.__init__(self)
self.app = app
- self.project = project
- self.settings = self.project.getSettings()
self.builder = gtk.Builder()
self.builder.add_from_file(os.path.join(configure.get_ui_dir(),
@@ -130,6 +129,7 @@ class EncodingDialog(Renderer, Loggable):
self.preferred_aencoder = self.settings.aencoder
self.timestarted = 0
+ self._initializeComboboxModels()
self._displaySettings()
self.window.connect("delete-event", self._deleteEventCb)
@@ -158,25 +158,25 @@ class EncodingDialog(Renderer, Loggable):
def _settingsChanged(self, settings):
self.updateResolution()
+ def _initializeComboboxModels(self):
+ self.frame_rate_combo.set_model(frame_rates)
+ self.channels_combo.set_model(audio_channels)
+ self.sample_rate_combo.set_model(audio_rates)
+ self.sample_depth_combo.set_model(audio_depths)
+ self.muxercombobox.set_model(factorylist(ExportSettings.muxers))
+
def _displaySettings(self):
# Video settings
- self.frame_rate_combo.set_model(frame_rates)
set_combo_value(self.frame_rate_combo, self.settings.videorate)
# note: this will trigger an update of the video resolution label
self.scale_spinbutton.set_value(self.settings.render_scale)
# Audio settings
- self.channels_combo.set_model(audio_channels)
set_combo_value(self.channels_combo, self.settings.audiochannels)
-
- self.sample_rate_combo.set_model(audio_rates)
set_combo_value(self.sample_rate_combo, self.settings.audiorate)
-
- self.sample_depth_combo.set_model(audio_depths)
set_combo_value(self.sample_depth_combo, self.settings.audiodepth)
# Muxer
- self.muxercombobox.set_model(factorylist(self.settings.muxers))
# note: this will trigger an update of the codec comboboxes
set_combo_value(self.muxercombobox,
gst.element_factory_find(self.settings.muxer))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]