[pitivi] Shift the asset related buttons into a new toolbar at the bottom of medialibrary.
- From: Alexandru Băluț <alexbalut src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] Shift the asset related buttons into a new toolbar at the bottom of medialibrary.
- Date: Mon, 1 Mar 2021 20:58:44 +0000 (UTC)
commit 9901428ecd72e281f7231788a1730f62f70558f2
Author: AsociTon <asociton outlook com>
Date: Tue Aug 4 12:40:23 2020 +0530
Shift the asset related buttons into a new toolbar at the bottom of medialibrary.
data/ui/medialibrary.ui | 138 ++++++++++++++++++++++++++++--------------------
pitivi/medialibrary.py | 8 ++-
2 files changed, 86 insertions(+), 60 deletions(-)
---
diff --git a/data/ui/medialibrary.ui b/data/ui/medialibrary.ui
index 27940eafe..a1ec30bb6 100644
--- a/data/ui/medialibrary.ui
+++ b/data/ui/medialibrary.ui
@@ -1,84 +1,106 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.20.0 -->
+<!-- Generated with glade 3.36.0 -->
<interface>
<requires lib="gtk+" version="3.10"/>
- <object class="GtkToolbar" id="medialibrary_toolbar">
+ <object class="GtkBox" id="medialibrary_bottom_toolbar_container">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="show_arrow">False</property>
- <property name="icon_size">1</property>
- <child>
- <object class="GtkToolButton" id="media_import_button">
+ <child type="center">
+ <object class="GtkToolbar" id="medialibrary_bottom_toolbar">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="tooltip_markup" translatable="yes">Add media files to your project</property>
- <property name="is_important">True</property>
- <property name="label" translatable="yes">Import</property>
- <property name="use_underline">True</property>
- <property name="icon_name">list-add-symbolic</property>
- <signal name="clicked" handler="_import_sources_cb" swapped="no"/>
- <child internal-child="accessible">
- <object class="AtkObject" id="media_import_button-atkobject">
- <property name="AtkObject::accessible-name">media_import_button</property>
+ <property name="halign">center</property>
+ <property name="valign">center</property>
+ <property name="show_arrow">False</property>
+ <property name="icon_size">1</property>
+ <child>
+ <object class="GtkToolButton" id="media_remove_button">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="tooltip_text" translatable="yes">Remove selected clips from the
project</property>
+ <property name="action_name">medialibrary.remove-assets</property>
+ <property name="label" translatable="yes">_Remove from Project</property>
+ <property name="use_underline">True</property>
+ <property name="icon_name">list-remove-symbolic</property>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="media_remove_button-atkobject">
+ <property name="AtkObject::accessible-name">media_remove_button</property>
+ </object>
+ </child>
</object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
</child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="homogeneous">True</property>
- </packing>
- </child>
- <child>
- <object class="GtkToolButton" id="media_remove_button">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip_text" translatable="yes">Remove selected clips from the project</property>
- <property name="action_name">medialibrary.remove-assets</property>
- <property name="label" translatable="yes">_Remove from Project</property>
- <property name="use_underline">True</property>
- <property name="icon_name">list-remove-symbolic</property>
- <child internal-child="accessible">
- <object class="AtkObject" id="media_remove_button-atkobject">
- <property name="AtkObject::accessible-name">media_remove_button</property>
+ <child>
+ <object class="GtkToolButton" id="media_props_button">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="tooltip_text" translatable="yes">Clip properties...</property>
+ <property name="use_underline">True</property>
+ <property name="icon_name">document-properties-symbolic</property>
+ <signal name="clicked" handler="_clip_properties_cb" swapped="no"/>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="media_props_button-atkobject">
+ <property name="AtkObject::accessible-name">media_props_button</property>
+ </object>
+ </child>
</object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
</child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="homogeneous">True</property>
- </packing>
- </child>
- <child>
- <object class="GtkToolButton" id="media_props_button">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip_text" translatable="yes">Clip properties...</property>
- <property name="use_underline">True</property>
- <property name="icon_name">document-properties-symbolic</property>
- <signal name="clicked" handler="_clip_properties_cb" swapped="no"/>
- <child internal-child="accessible">
- <object class="AtkObject" id="media_props_button-atkobject">
- <property name="AtkObject::accessible-name">media_props_button</property>
+ <child>
+ <object class="GtkToolButton" id="media_insert_button">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="tooltip_text" translatable="yes">Insert the selected clips at the end of the
timeline</property>
+ <property name="action_name">medialibrary.insert-assets-at-end</property>
+ <property name="label" translatable="yes">Insert at _End of Timeline</property>
+ <property name="use_underline">True</property>
+ <property name="icon_name">insert-object-symbolic</property>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="media_insert_button-atkobject">
+ <property name="AtkObject::accessible-name">media_insert_button</property>
+ </object>
+ </child>
</object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="homogeneous">True</property>
+ </packing>
</child>
</object>
<packing>
<property name="expand">False</property>
- <property name="homogeneous">True</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
</packing>
</child>
<child>
- <object class="GtkToolButton" id="media_insert_button">
+ <placeholder/>
+ </child>
+ </object>
+ <object class="GtkToolbar" id="medialibrary_toolbar">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="show_arrow">False</property>
+ <property name="icon_size">1</property>
+ <child>
+ <object class="GtkToolButton" id="media_import_button">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="tooltip_text" translatable="yes">Insert the selected clips at the end of the
timeline</property>
- <property name="action_name">medialibrary.insert-assets-at-end</property>
- <property name="label" translatable="yes">Insert at _End of Timeline</property>
+ <property name="tooltip_markup" translatable="yes">Add media files to your project</property>
+ <property name="is_important">True</property>
+ <property name="label" translatable="yes">Import</property>
<property name="use_underline">True</property>
- <property name="icon_name">insert-object-symbolic</property>
+ <property name="icon_name">list-add-symbolic</property>
+ <signal name="clicked" handler="_import_sources_cb" swapped="no"/>
<child internal-child="accessible">
- <object class="AtkObject" id="media_insert_button-atkobject">
- <property name="AtkObject::accessible-name">media_insert_button</property>
+ <object class="AtkObject" id="media_import_button-atkobject">
+ <property name="AtkObject::accessible-name">media_import_button</property>
</object>
</child>
</object>
diff --git a/pitivi/medialibrary.py b/pitivi/medialibrary.py
index 4f6b1a6c0..31989810e 100644
--- a/pitivi/medialibrary.py
+++ b/pitivi/medialibrary.py
@@ -518,9 +518,13 @@ class MediaLibraryWidget(Gtk.Box, Loggable):
toolbar = builder.get_object("medialibrary_toolbar")
toolbar.get_style_context().add_class(Gtk.STYLE_CLASS_INLINE_TOOLBAR)
self._import_button = builder.get_object("media_import_button")
- self._clipprops_button = builder.get_object("media_props_button")
self._listview_button = builder.get_object("media_listview_button")
self.search_entry = builder.get_object("media_search_entry")
+ bottom_toolbar_container = builder.get_object("medialibrary_bottom_toolbar_container")
+ bottom_toolbar = builder.get_object("medialibrary_bottom_toolbar")
+ bg_color = bottom_toolbar_container.get_style_context().get_background_color(Gtk.StateFlags.NORMAL)
+ bottom_toolbar.override_background_color(Gtk.StateFlags.NORMAL, bg_color)
+ self._clipprops_button = builder.get_object("media_props_button")
self.scrollwin = Gtk.ScrolledWindow()
self.scrollwin.set_policy(
@@ -590,7 +594,6 @@ class MediaLibraryWidget(Gtk.Box, Loggable):
# Set the state of the view mode toggle button.
self._listview_button.set_active(self.clip_view == ViewType.LIST)
- # Make sure the proper view is displayed.
self.scrollwin.show_all()
# Add all the child widgets.
@@ -600,6 +603,7 @@ class MediaLibraryWidget(Gtk.Box, Loggable):
self.pack_start(self._import_warning_infobar, False, False, 0)
self.pack_start(self.scrollwin, True, True, 0)
self.pack_start(self._progressbar, False, False, 0)
+ self.pack_start(bottom_toolbar_container, False, False, 0)
def create_iconview_widget_func(self, item):
box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]