gnome-control-center/panels/search/cc-search-locations-dialog.ui
velsinki ce584b3b67 search-locations-dialog: Add placeholder for custom locations
If there are no Other Locations added, the list shows empty which looks
odd.

Fix this by adding a simple placeholder to the GtkListBox.

Fixes #2869
2024-02-09 15:43:43 +00:00

106 lines
5 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<template class="CcSearchLocationsDialog" parent="AdwWindow">
<property name="modal">True</property>
<property name="width-request">360</property>
<property name="height-request">294</property>
<property name="default-width">640</property>
<property name="default-height">576</property>
<property name="hide-on-close">True</property>
<property name="title" translatable="yes">Search Locations</property>
<property name="content">
<object class="AdwToolbarView">
<child type="top">
<object class="AdwHeaderBar"/>
</child>
<property name="content">
<object class="AdwPreferencesPage">
<property name="description" translatable="yes">Filesystem locations which are searched by system apps, such as Files</property>
<child>
<object class="AdwPreferencesGroup" id="places_group">
<property name="title" translatable="yes">Default Locations</property>
<child>
<object class="GtkListBox" id="places_list">
<property name="selection-mode">none</property>
<signal name="keynav-failed" handler="keynav_failed_cb" object="CcSearchLocationsDialog" swapped="yes"/>
<accessibility>
<relation name="labelled-by">places_group</relation>
</accessibility>
<style>
<class name="boxed-list"/>
</style>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup" id="bookmarks_group">
<property name="title" translatable="yes">Bookmarked Locations</property>
<child>
<object class="GtkListBox" id="bookmarks_list">
<property name="selection-mode">none</property>
<signal name="keynav-failed" handler="keynav_failed_cb" object="CcSearchLocationsDialog" swapped="yes"/>
<accessibility>
<relation name="labelled-by">bookmarks_group</relation>
</accessibility>
<style>
<class name="boxed-list"/>
</style>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup" id="others_group">
<property name="title" translatable="yes">Custom Locations</property>
<property name="header-suffix">
<object class="GtkButton" id="locations_add">
<property name="valign">center</property>
<property name="child">
<object class="AdwButtonContent">
<property name="icon-name">list-add-symbolic</property>
<property name="label" translatable="yes">_Add Location…</property>
<property name="use-underline">True</property>
</object>
</property>
<signal name="clicked" handler="add_button_clicked" object="CcSearchLocationsDialog" swapped="yes"/>
<style>
<class name="flat"/>
</style>
</object>
</property>
<child>
<object class="GtkListBox" id="others_list">
<property name="selection-mode">none</property>
<signal name="keynav-failed" handler="keynav_failed_cb" object="CcSearchLocationsDialog" swapped="yes"/>
<accessibility>
<relation name="labelled-by">others_group</relation>
</accessibility>
<style>
<class name="boxed-list"/>
</style>
<child type="placeholder">
<object class="GtkLabel">
<property name="margin-start">18</property>
<property name="margin-end">18</property>
<property name="margin-top">18</property>
<property name="margin-bottom">18</property>
<property name="label" translatable="yes">No custom search locations</property>
<property name="wrap">true</property>
<property name="max-width-chars">50</property>
<style>
<class name="dim-label" />
</style>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</property>
</object>
</property>
</template>
</interface>