[pitivi] Use the GTK3 "inline" style for toolbars under presets listviews
- From: Jean-FranÃois Fortin Tam <jfft src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] Use the GTK3 "inline" style for toolbars under presets listviews
- Date: Sun, 2 Sep 2012 04:01:05 +0000 (UTC)
commit 11a4166c01f52b2d68f348254b92190ceb04ebf3
Author: Jean-FranÃois Fortin Tam <nekohayo gmail com>
Date: Thu Aug 9 11:46:34 2012 -0400
Use the GTK3 "inline" style for toolbars under presets listviews
Also replace labels by tooltips and fix spacing.
data/ui/projectsettings.ui | 74 +++++++++++++++++++------------------------
data/ui/renderingdialog.ui | 36 +++++++++------------
pitivi/project.py | 6 +++
pitivi/render.py | 4 ++
4 files changed, 59 insertions(+), 61 deletions(-)
---
diff --git a/data/ui/projectsettings.ui b/data/ui/projectsettings.ui
index 6887a13..1ef0a2d 100644
--- a/data/ui/projectsettings.ui
+++ b/data/ui/projectsettings.ui
@@ -127,7 +127,6 @@
<object class="GtkVBox" id="vbox2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label11">
<property name="visible">True</property>
@@ -197,6 +196,7 @@
<object class="GtkScrolledWindow" id="scrolledwindow2">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="hscrollbar_policy">never</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkTreeView" id="video_preset_treeview">
@@ -215,72 +215,68 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox5">
+ <object class="GtkToolbar" id="video_presets_toolbar">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">6</property>
+ <property name="show_arrow">False</property>
<child>
- <object class="GtkButton" id="add_video_preset_button">
- <property name="label">gtk-add</property>
+ <object class="GtkToolButton" id="add_video_preset_button">
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="tooltip_text" translatable="yes">Create a new preset</property>
<property name="use_action_appearance">False</property>
- <property name="use_stock">True</property>
+ <property name="stock_id">gtk-add</property>
<signal name="clicked" handler="_addVideoPresetButtonClickedCb" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
+ <property name="homogeneous">True</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="remove_video_preset_button">
- <property name="label">gtk-remove</property>
+ <object class="GtkToolButton" id="remove_video_preset_button">
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
+ <property name="tooltip_text" translatable="yes">Remove the selected preset</property>
<property name="use_action_appearance">False</property>
- <property name="use_stock">True</property>
+ <property name="stock_id">gtk-remove</property>
<signal name="clicked" handler="_removeVideoPresetButtonClickedCb" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
+ <property name="homogeneous">True</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="save_video_preset_button">
- <property name="label">gtk-save</property>
+ <object class="GtkToolButton" id="save_video_preset_button">
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
+ <property name="tooltip_text" translatable="yes">Save changes to the currently selected preset</property>
<property name="use_action_appearance">False</property>
- <property name="use_stock">True</property>
+ <property name="stock_id">gtk-save</property>
<signal name="clicked" handler="_saveVideoPresetButtonClickedCb" swapped="no"/>
</object>
<packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">2</property>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
</object>
<packing>
- <property name="expand">False</property>
+ <property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
@@ -289,6 +285,7 @@
<object class="GtkTable" id="video_properties_table">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="halign">end</property>
<property name="valign">start</property>
<property name="n_rows">7</property>
<property name="n_columns">2</property>
@@ -559,7 +556,6 @@
<object class="GtkVBox" id="vbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label10">
<property name="visible">True</property>
@@ -647,61 +643,57 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox6">
+ <object class="GtkToolbar" id="audio_presets_toolbar">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">6</property>
<child>
- <object class="GtkButton" id="add_audio_preset_button">
- <property name="label">gtk-add</property>
+ <object class="GtkToolButton" id="add_audio_preset_button">
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
+ <property name="tooltip_text" translatable="yes">Create a new preset</property>
<property name="use_action_appearance">False</property>
- <property name="use_stock">True</property>
+ <property name="stock_id">gtk-add</property>
<signal name="clicked" handler="_addAudioPresetButtonClickedCb" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
+ <property name="homogeneous">True</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="remove_audio_preset_button">
- <property name="label">gtk-remove</property>
+ <object class="GtkToolButton" id="remove_audio_preset_button">
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
+ <property name="tooltip_text" translatable="yes">Remove the selected preset</property>
<property name="use_action_appearance">False</property>
- <property name="use_stock">True</property>
+ <property name="stock_id">gtk-remove</property>
<signal name="clicked" handler="_removeAudioPresetButtonClickedCb" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
+ <property name="homogeneous">True</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="save_audio_preset_button">
- <property name="label">gtk-save</property>
+ <object class="GtkToolButton" id="save_audio_preset_button">
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
+ <property name="tooltip_text" translatable="yes">Save changes to the currently selected preset</property>
<property name="use_action_appearance">False</property>
- <property name="use_stock">True</property>
+ <property name="stock_id">gtk-save</property>
<signal name="clicked" handler="_saveAudioPresetButtonClickedCb" swapped="no"/>
</object>
<packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">2</property>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
</packing>
</child>
</object>
diff --git a/data/ui/renderingdialog.ui b/data/ui/renderingdialog.ui
index aa35820..fbda1b2 100644
--- a/data/ui/renderingdialog.ui
+++ b/data/ui/renderingdialog.ui
@@ -135,7 +135,6 @@
<object class="GtkVBox" id="vbox4">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label11">
<property name="visible">True</property>
@@ -223,66 +222,63 @@
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox2">
+ <object class="GtkToolbar" id="render_presets_toolbar">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">6</property>
+ <property name="show_arrow">False</property>
<child>
- <object class="GtkButton" id="add_render_preset_button">
- <property name="label">gtk-add</property>
+ <object class="GtkToolButton" id="add_render_preset_button">
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
+ <property name="tooltip_text" translatable="yes">Create a new preset</property>
<property name="use_action_appearance">False</property>
- <property name="use_stock">True</property>
+ <property name="stock_id">gtk-add</property>
<signal name="clicked" handler="_addRenderPresetButtonClickedCb" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
+ <property name="homogeneous">True</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="remove_render_preset_button">
- <property name="label">gtk-remove</property>
+ <object class="GtkToolButton" id="remove_render_preset_button">
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
+ <property name="tooltip_text" translatable="yes">Remove the selected preset</property>
<property name="use_action_appearance">False</property>
- <property name="use_stock">True</property>
+ <property name="stock_id">gtk-remove</property>
<signal name="clicked" handler="_removeRenderPresetButtonClickedCb" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
+ <property name="homogeneous">True</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="save_render_preset_button">
- <property name="label">gtk-save</property>
+ <object class="GtkToolButton" id="save_render_preset_button">
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
+ <property name="tooltip_text" translatable="yes">Save changes to the currently selected preset</property>
<property name="use_action_appearance">False</property>
- <property name="use_stock">True</property>
+ <property name="stock_id">gtk-save</property>
<signal name="clicked" handler="_saveRenderPresetButtonClickedCb" swapped="no"/>
</object>
<packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">2</property>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
diff --git a/pitivi/project.py b/pitivi/project.py
index 83a6259..4d15728 100644
--- a/pitivi/project.py
+++ b/pitivi/project.py
@@ -727,6 +727,12 @@ class ProjectSettingsDialog():
self.wg.addEdge(self.sample_rate_combo, self.save_audio_preset_button)
self.wg.addEdge(self.sample_depth_combo, self.save_audio_preset_button)
+ # Set the shading style in the contextual toolbars below presets
+ video_presets_toolbar = self.builder.get_object("video_presets_toolbar")
+ audio_presets_toolbar = self.builder.get_object("audio_presets_toolbar")
+ video_presets_toolbar.get_style_context().add_class("inline-toolbar")
+ audio_presets_toolbar.get_style_context().add_class("inline-toolbar")
+
self.updateUI()
self.createAudioNoPreset(self.audio_presets)
diff --git a/pitivi/render.py b/pitivi/render.py
index f44519b..e5fbef0 100644
--- a/pitivi/render.py
+++ b/pitivi/render.py
@@ -413,6 +413,10 @@ class RenderDialog(Loggable):
icon = os.path.join(configure.get_pixmap_dir(), "pitivi-render-16.png")
self.window.set_icon_from_file(icon)
+ # Set the shading style in the toolbar below presets
+ presets_toolbar = self.builder.get_object("render_presets_toolbar")
+ presets_toolbar.get_style_context().add_class("inline-toolbar")
+
# FIXME: re-enable this widget when bug #637078 is implemented
self.selected_only_button.destroy()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]