<?xml version="1.0" encoding="UTF-8"?>
<interface>
  <template class="PpsSidebarBookmarks" parent="PpsSidebarPage">
    <property name="child">
      <object class="GtkBox">
        <property name="orientation">vertical</property>
        <child>
          <object class="GtkScrolledWindow" id="swindow">
            <property name="vexpand">True</property>
            <property name="hexpand">True</property>
            <property name="child">
              <object class="GtkTreeView" id="tree_view">
                <property name="model">list-model</property>
                <property name="headers-visible">False</property>
                <signal name="query-tooltip" handler="pps_sidebar_bookmarks_query_tooltip" />
                <child>
                  <object class="GtkTreeViewColumn">
                    <child>
                      <object class="GtkCellRendererText">
                        <property name="ellipsize">end</property>
                        <property name="editable">True</property>
                        <signal name="edited" handler="pps_sidebar_bookmarks_bookmark_renamed" />
                      </object>
                      <attributes>
                        <attribute name="markup">0</attribute>
                      </attributes>
                    </child>
                  </object>
                </child>
                <child internal-child="selection">
                  <object class="GtkTreeSelection" id="selection">
                    <signal name="changed" handler="pps_sidebar_bookmarks_selection_changed" />
                  </object>
                </child>
                <child>
                  <object class="GtkGestureClick">
                    <!-- GDK_BUTTON_SECONDARY -->
                    <property name="button">3</property>
                    <signal name="pressed" handler="pps_sidebar_bookmarks_button_press_cb" />
                  </object>
                </child>
                <style>
                  <class name="navigation-sidebar"/>
                </style>
              </object>
            </property>
          </object>
        </child>

        <child>
          <object class="GtkBox" id="hbox">
            <style>
              <class name="toolbar"/>
              <class name="nested"/>
            </style>
            <property name="orientation">horizontal</property>
            <property name="hexpand">True</property>
            <child>
              <object class="GtkButton" id="add_button">
                <property name="hexpand">True</property>
                <property name="icon-name">list-add-symbolic</property>
                <property name="sensitive">False</property>
                <property name="tooltip-text" translatable="yes">Add Bookmark</property>
                <property name="action-name">doc.add-bookmark</property>
              </object>
            </child>
            <child>
              <object class="GtkButton" id="del_button">
                <property name="hexpand">True</property>
                <property name="icon-name">list-remove-symbolic</property>
                <property name="sensitive">False</property>
                <property name="tooltip-text" translatable="yes">Remove Bookmark</property>
                <signal name="clicked" handler="pps_sidebar_bookmarks_del_clicked" />
              </object>
            </child>
          </object>
        </child>

        <child>
          <object class="GtkPopoverMenu" id="popup">
            <property name="has-arrow">False</property>
            <property name="halign">start</property>
            <property name="menu-model">bookmarks-menu</property>
          </object>
        </child>
      </object>
    </property>
  </template>

  <object class="GtkListStore" id="list-model">
    <columns>
      <column type="gchararray" />
      <column type="gint" />
    </columns>
  </object>

  <menu id="bookmarks-menu">
    <section>
      <item>
        <attribute name="label" translatable="yes">_Open Bookmark</attribute>
        <attribute name="action">bookmarks.open-bookmark</attribute>
      </item>
    </section>
    <section>
      <item>
        <attribute name="label" translatable="yes">_Rename Bookmark</attribute>
        <attribute name="action">bookmarks.rename-bookmark</attribute>
      </item>
      <item>
        <attribute name="label" translatable="yes">_Delete Bookmark</attribute>
        <attribute name="action">bookmarks.delete-bookmark</attribute>
      </item>
    </section>
  </menu>
</interface>
