Commit 9901428e authored by Abhishek Kumar Singh's avatar Abhishek Kumar Singh 👁 Committed by Alexandru Băluț
Browse files

Shift the asset related buttons into a new toolbar at the bottom of medialibrary.

parent a85c9dfc
<?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>
......
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment