<?xml version="1.0" encoding="UTF-8"?>
<interface>
  <template class="SysprofFilesSection" parent="SysprofSection">
    <property name="title" translatable="yes">Files</property>
    <child>
      <object class="GtkBox">
        <property name="orientation">vertical</property>
        <child>
          <object class="GtkScrolledWindow">
            <property name="vexpand">true</property>
            <child>
              <object class="GtkColumnView" id="column_view">
                <signal name="activate" handler="sysprof_files_section_activate_cb" swapped="true"/>
                <property name="show-row-separators">true</property>
                <style>
                  <class name="data-table"/>
                </style>
                <property name="model">
                  <object class="GtkSingleSelection">
                    <property name="model">
                      <object class="GtkFilterListModel">
                        <property name="model">
                          <object class="GtkSortListModel">
                            <binding name="sorter">
                              <lookup name="sorter">column_view</lookup>
                            </binding>
                            <binding name="model">
                              <lookup name="files" type="SysprofDocument">
                                <lookup name="document" type="SysprofSession">
                                  <lookup name="session">SysprofFilesSection</lookup>
                                </lookup>
                              </lookup>
                            </binding>
                          </object>
                        </property>
                        <property name="filter">
                          <object class="GtkStringFilter">
                            <property name="match-mode">substring</property>
                            <property name="expression">
                              <lookup name="path" type="SysprofDocumentFile"/>
                            </property>
                            <binding name="search">
                              <lookup name="text">filter_search_entry</lookup>
                            </binding>
                          </object>
                        </property>
                      </object>
                    </property>
                  </object>
                </property>
                <child>
                  <object class="GtkColumnViewColumn" id="path_column">
                    <property name="title" translatable="yes">Path</property>
                    <property name="expand">true</property>
                    <property name="sorter">
                      <object class="GtkStringSorter">
                        <property name="expression">
                          <lookup name="path" type="SysprofDocumentFile"/>
                        </property>
                      </object>
                    </property>
                    <property name="factory">
                      <object class="GtkBuilderListItemFactory">
                        <property name="bytes"><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<interface>
  <template class="GtkListItem">
    <property name="child">
      <object class="GtkLabel">
        <property name="xalign">0</property>
        <binding name="label">
          <lookup name="path" type="SysprofDocumentFile">
            <lookup name="item">GtkListItem</lookup>
          </lookup>
        </binding>
      </object>
    </property>
  </template>
</interface>
]]>
                        </property>
                      </object>
                    </property>
                  </object>
                </child>
                <child>
                  <object class="GtkColumnViewColumn" id="compressed_column">
                    <property name="title" translatable="yes">Compressed</property>
                    <property name="sorter">
                      <object class="GtkNumericSorter">
                        <property name="expression">
                          <lookup name="is-compressed" type="SysprofDocumentFile"/>
                        </property>
                      </object>
                    </property>
                    <property name="factory">
                      <object class="GtkBuilderListItemFactory">
                        <property name="bytes"><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<interface>
  <template class="GtkListItem">
    <property name="child">
      <object class="GtkImage">
        <property name="icon-name">object-select-symbolic</property>
        <binding name="visible">
          <lookup name="is-compressed" type="SysprofDocumentFile">
            <lookup name="item">GtkListItem</lookup>
          </lookup>
        </binding>
      </object>
    </property>
  </template>
</interface>
]]>
                        </property>
                      </object>
                    </property>
                  </object>
                </child>
                <child>
                  <object class="GtkColumnViewColumn" id="size_column">
                    <property name="title" translatable="yes">Size</property>
                    <property name="sorter">
                      <object class="GtkNumericSorter">
                        <property name="expression">
                          <lookup name="size" type="SysprofDocumentFile"/>
                        </property>
                      </object>
                    </property>
                    <property name="factory">
                      <object class="GtkBuilderListItemFactory">
                        <property name="bytes"><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<interface>
  <template class="GtkListItem">
    <property name="child">
      <object class="GtkLabel">
        <property name="xalign">1</property>
        <property name="width-chars">8</property>
        <binding name="label">
          <closure type="gchararray" function="format_size">
            <lookup name="size" type="SysprofDocumentFile">
              <lookup name="item">GtkListItem</lookup>
            </lookup>
          </closure>
        </binding>
      </object>
    </property>
  </template>
</interface>
]]>
                        </property>
                      </object>
                    </property>
                  </object>
                </child>
              </object>
            </child>
          </object>
        </child>
        <child>
          <object class="GtkBox">
            <child>
              <object class="GtkSearchEntry" id="filter_search_entry">
                <property name="placeholder-text" translatable="yes">Filter Files</property>
                <property name="margin-top">3</property>
                <property name="margin-bottom">3</property>
                <property name="margin-start">3</property>
                <property name="margin-end">3</property>
                <property name="hexpand">true</property>
              </object>
            </child>
          </object>
        </child>
      </object>
    </child>
  </template>
</interface>
