[pitivi] RenderDialog: adjust height when width changes
- From: Edward Hervey <edwardrv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] RenderDialog: adjust height when width changes
- Date: Fri, 10 Dec 2010 17:51:27 +0000 (UTC)
commit cbd6d54554a9b08241d5f7a538611fc4a0f59b1d
Author: Brandon Lewis <brandon_lewis alum berkeley edu>
Date: Fri Nov 19 19:07:54 2010 +0000
RenderDialog: adjust height when width changes
pitivi/ui/encodingdialog.py | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/pitivi/ui/encodingdialog.py b/pitivi/ui/encodingdialog.py
index e4906ea..e42c48b 100644
--- a/pitivi/ui/encodingdialog.py
+++ b/pitivi/ui/encodingdialog.py
@@ -110,6 +110,8 @@ class EncodingDialog(GladeWindow, Renderer):
ellipsize(self.video_encoder_combo)
self.timestarted = 0
+ self._width = 0
+ self._height = 0
self._displaySettings()
self.window.connect("delete-event", self._deleteEventCb)
@@ -165,6 +167,13 @@ class EncodingDialog(GladeWindow, Renderer):
self.settings.getAudioEncoders()))
self.audio_encoder_combo.set_active(0)
+
+ def _widthSpinbuttonChangedCb(self, button):
+ self._width = int(self.width_spinbutton.get_value())
+ self._height = int(self.settings.heightForWidth(self._width))
+ self.height_label.set_text(_("x %d pixels") % self._height)
+
+ self.settings.setVideoProperties(width=self._width, height=self._height)
def _videoSettingsButtonClickedCb(self, button):
self._elementSettingsDialog(self.video_encoder_combo,
'vcodecsettings')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]