[pitivi] projectsettings: Rearrange the video project settings widgets
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] projectsettings: Rearrange the video project settings widgets
- Date: Wed, 25 Nov 2015 09:54:42 +0000 (UTC)
commit cae334714a708362e6140a470ecfac488206dada
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Mon May 11 10:10:16 2015 +0200
projectsettings: Rearrange the video project settings widgets
Place the size/aspectRatio/framerate groups on top of eachother so they are
easier to distinguish.
Differential Revision: https://phabricator.freedesktop.org/D352
Reviewed-by: Thibault Saunier <tsaunier gnome org>
data/ui/projectsettings.ui | 330 ++++++++++++++++++++++++++------------------
pitivi/project.py | 17 +--
2 files changed, 201 insertions(+), 146 deletions(-)
---
diff --git a/data/ui/projectsettings.ui b/data/ui/projectsettings.ui
index 34b1484..c43b50e 100644
--- a/data/ui/projectsettings.ui
+++ b/data/ui/projectsettings.ui
@@ -113,13 +113,13 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<child>
- <object class="GtkBox" id="hbox4">
+ <object class="GtkBox" id="video_tab">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">12</property>
<property name="spacing">12</property>
<child>
- <object class="GtkBox" id="vbox2">
+ <object class="GtkBox" id="video_preset">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
@@ -273,115 +273,34 @@
</packing>
</child>
<child>
- <object class="GtkGrid" id="video_properties_table">
+ <object class="GtkBox" id="video_details">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="halign">end</property>
- <property name="valign">start</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">12</property>
- <child>
- <object class="GtkLabel" id="label5">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">start</property>
- <property name="margin_start">6</property>
- <property name="label" translatable="yes">Size (pixels):</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">start</property>
- <property name="margin_start">6</property>
- <property name="label" translatable="yes">Aspect Ratio:</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkRadioButton" id="select_dar_radiobutton">
- <property name="label" translatable="yes" comments="DAR is the aspect ratio of the
image being displayed to the viewer. "Display" is used as a noun, not as a verb/action.">Display
aspect ratio</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="halign">start</property>
- <property name="active">True</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled" handler="_selectDarRadiobuttonToggledCb" swapped="no"/>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">4</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBox" id="dar_combo">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="model">model1</property>
- <child>
- <object class="GtkCellRendererText" id="renderer1"/>
- <attributes>
- <attribute name="text">0</attribute>
- </attributes>
- </child>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">5</property>
- </packing>
- </child>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
<child>
- <object class="GtkComboBox" id="par_combo">
+ <object class="GtkBox" id="size_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="model">model2</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkCellRendererText" id="renderer2"/>
- <attributes>
- <attribute name="text">0</attribute>
- </attributes>
+ <object class="GtkLabel" id="label5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="margin_start">6</property>
+ <property name="label" translatable="yes">Size:</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
</child>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">5</property>
- </packing>
- </child>
- <child>
- <object class="GtkRadioButton" id="select_par_radiobutton">
- <property name="label" translatable="yes" comments="PAR is the aspect ratio "of
the pixels", not an aspect ratio "in pixels".">Pixel aspect ratio</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="halign">start</property>
- <property name="draw_indicator">True</property>
- <property name="group">select_dar_radiobutton</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">4</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox" id="vbox3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
<child>
<object class="GtkBox" id="hbox1">
<property name="visible">True</property>
@@ -427,11 +346,23 @@
<property name="position">2</property>
</packing>
</child>
+ <child>
+ <object class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">pixels</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">0</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
@@ -447,55 +378,184 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">1</property>
+ <property name="position">2</property>
</packing>
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- <property name="height">2</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkLabel" id="label18">
+ <object class="GtkBox" id="aspect_ratio_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="halign">start</property>
- <property name="margin_start">6</property>
- <property name="label" translatable="yes">Frame Rate:</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="margin_start">6</property>
+ <property name="label" translatable="yes">Aspect Ratio:</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkGrid" id="aspect_ratio_grid">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">end</property>
+ <property name="valign">start</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
+ <child>
+ <object class="GtkRadioButton" id="select_dar_radiobutton">
+ <property name="label" translatable="yes" comments="DAR is the aspect ratio
of the image being displayed to the viewer. "Display" is used as a noun, not as a
verb/action.">Display aspect ratio</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="halign">start</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="_selectDarRadiobuttonToggledCb"
swapped="no"/>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="dar_combo">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="model">model1</property>
+ <child>
+ <object class="GtkCellRendererText" id="renderer1"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="par_combo">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="model">model2</property>
+ <child>
+ <object class="GtkCellRendererText" id="renderer2"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="select_par_radiobutton">
+ <property name="label" translatable="yes" comments="PAR is the aspect ratio
"of the pixels", not an aspect ratio "in pixels".">Pixel aspect ratio</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="halign">start</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">select_dar_radiobutton</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
- <object class="GtkComboBox" id="frame_rate_combo">
+ <object class="GtkBox" id="frame_rate_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="model">model3</property>
+ <property name="halign">start</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
<child>
- <object class="GtkCellRendererText" id="renderer3"/>
- <attributes>
- <attribute name="text">0</attribute>
- </attributes>
+ <object class="GtkLabel" id="label18">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="margin_start">6</property>
+ <property name="label" translatable="yes">Frame Rate:</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="frame_rate_combo">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="model">model3</property>
+ <child>
+ <object class="GtkCellRendererText" id="renderer3"/>
+ <attributes>
+ <attribute name="text">0</attribute>
+ </attributes>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
</packing>
</child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
</object>
<packing>
<property name="expand">False</property>
@@ -516,13 +576,13 @@
</packing>
</child>
<child>
- <object class="GtkBox" id="hbox3">
+ <object class="GtkBox" id="audio_tab">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">12</property>
<property name="spacing">12</property>
<child>
- <object class="GtkBox" id="vbox1">
+ <object class="GtkBox" id="audio_preset">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
@@ -676,7 +736,7 @@
</packing>
</child>
<child>
- <object class="GtkGrid" id="table7">
+ <object class="GtkGrid" id="audio_details">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="row_spacing">6</property>
diff --git a/pitivi/project.py b/pitivi/project.py
index 4f45fb2..378a69d 100644
--- a/pitivi/project.py
+++ b/pitivi/project.py
@@ -1385,8 +1385,6 @@ class ProjectSettingsDialog():
getObj = self.builder.get_object
self.window = getObj("project-settings-dialog")
- self.video_properties_table = getObj("video_properties_table")
- self.video_properties_table = getObj("video_properties_table")
self.frame_rate_combo = getObj("frame_rate_combo")
self.dar_combo = getObj("dar_combo")
self.par_combo = getObj("par_combo")
@@ -1424,22 +1422,19 @@ class ProjectSettingsDialog():
Create dynamic widgets and
set up the relationships between various widgets
"""
- # Add custom DAR fraction widget.
+ # Add custom fraction widgets for DAR and PAR.
+ aspect_ratio_grid = self.builder.get_object("aspect_ratio_grid")
self.dar_fraction_widget = FractionWidget()
- self.video_properties_table.attach(self.dar_fraction_widget,
- 0, 6, 1, 1)
+ aspect_ratio_grid.attach(self.dar_fraction_widget, 0, 2, 1, 1)
self.dar_fraction_widget.show()
-
- # Add custom PAR fraction widget.
self.par_fraction_widget = FractionWidget()
- self.video_properties_table.attach(self.par_fraction_widget,
- 1, 6, 1, 1)
+ aspect_ratio_grid.attach(self.par_fraction_widget, 1, 2, 1, 1)
self.par_fraction_widget.show()
# Add custom framerate fraction widget.
+ frame_rate_box = self.builder.get_object("frame_rate_box")
self.frame_rate_fraction_widget = FractionWidget()
- self.video_properties_table.attach(self.frame_rate_fraction_widget,
- 1, 2, 1, 1)
+ frame_rate_box.pack_end(self.frame_rate_fraction_widget, True, True, 0)
self.frame_rate_fraction_widget.show()
# Populate comboboxes.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]