| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<interface> |
| 3 |
<template class="GsmLsof" parent="AdwWindow"> |
| 4 |
<property name="title" translatable="1" context="Window title for Search for Open Files dialog">Search for Open Files</property> |
| 5 |
<property name="default-width">575</property> |
| 6 |
<property name="default-height">400</property> |
| 7 |
<property name="destroy-with-parent">True</property> |
| 8 |
<property name="modal">True</property> |
| 9 |
<binding name="title"> |
| 10 |
<closure type='gchararray' function='format_title'> |
| 11 |
<lookup name="n-items">filtered_model</lookup> |
| 12 |
<lookup name="text">search_entry</lookup> |
| 13 |
</closure> |
| 14 |
</binding> |
| 15 |
<property name="content"> |
| 16 |
<object class="AdwToolbarView"> |
| 17 |
<child type="top"> |
| 18 |
<object class="AdwHeaderBar"> |
| 19 |
<child type="start"> |
| 20 |
<object class="GtkToggleButton" id="search_button"> |
| 21 |
<property name="icon-name">edit-find-symbolic</property> |
| 22 |
<property name="tooltip-text" translatable="yes">Search</property> |
| 23 |
</object> |
| 24 |
</child> |
| 25 |
<child type="end"> |
| 26 |
<object class="GtkButton"> |
| 27 |
<property name="action-name">lsof.refresh</property> |
| 28 |
<property name="icon-name">view-refresh-symbolic</property> |
| 29 |
<property name="tooltip-text" translatable="yes">Refresh</property> |
| 30 |
</object> |
| 31 |
</child> |
| 32 |
</object> |
| 33 |
</child> |
| 34 |
<child type="top"> |
| 35 |
<object class="GtkSearchBar" id="search_bar"> |
| 36 |
<property name="search-mode-enabled" |
| 37 |
bind-source="search_button" |
| 38 |
bind-property="active" |
| 39 |
bind-flags="bidirectional"/> |
| 40 |
<property name="child"> |
| 41 |
<object class="GtkBox"> |
| 42 |
<property name="orientation">vertical</property> |
| 43 |
<child> |
| 44 |
<object class="GtkSearchEntry" id="search_entry"> |
| 45 |
<property name="placeholder-text" translatable="1">Filter files by name</property> |
| 46 |
<property name="width-request">300</property> |
| 47 |
</object> |
| 48 |
</child> |
| 49 |
<child> |
| 50 |
<object class="GtkCheckButton" id="case_button"> |
| 51 |
<property name="label" translatable="yes">Case Insensitive</property> |
| 52 |
</object> |
| 53 |
</child> |
| 54 |
</object> |
| 55 |
</property> |
| 56 |
</object> |
| 57 |
</child> |
| 58 |
<property name="content"> |
| 59 |
<object class="GtkBox"> |
| 60 |
<property name="orientation">vertical</property> |
| 61 |
<child> |
| 62 |
<object class="GtkScrolledWindow"> |
| 63 |
<property name="vexpand">True</property> |
| 64 |
<child> |
| 65 |
<object class="GtkColumnView" id="lsof_view"> |
| 66 |
<property name="model"> |
| 67 |
<object class="GtkNoSelection" id="filtered_model"> |
| 68 |
<property name="model"> |
| 69 |
<object class="GtkFilterListModel"> |
| 70 |
<property name="incremental">True</property> |
| 71 |
<property name="filter"> |
| 72 |
<object class="GtkStringFilter"> |
| 73 |
<binding name="search"> |
| 74 |
<lookup name="text">search_entry</lookup> |
| 75 |
</binding> |
| 76 |
<binding name="ignore-case"> |
| 77 |
<lookup name="active">case_button</lookup> |
| 78 |
</binding> |
| 79 |
<property name="expression"> |
| 80 |
<lookup name="object" type="GsmOpenFile" /> |
| 81 |
</property> |
| 82 |
</object> |
| 83 |
</property> |
| 84 |
<property name="model"> |
| 85 |
<object class="GtkSortListModel"> |
| 86 |
<property name="incremental">True</property> |
| 87 |
<property name="model"> |
| 88 |
<object class="GListStore" id="lsof_store" /> |
| 89 |
</property> |
| 90 |
<binding name="sorter"> |
| 91 |
<lookup name="sorter">lsof_view</lookup> |
| 92 |
</binding> |
| 93 |
</object> |
| 94 |
</property> |
| 95 |
</object> |
| 96 |
</property> |
| 97 |
</object> |
| 98 |
</property> |
| 99 |
<child> |
| 100 |
<object class="GtkColumnViewColumn"> |
| 101 |
<property name="title" translatable="yes">Process</property> |
| 102 |
<property name="expand">True</property> |
| 103 |
<property name="sorter"> |
| 104 |
<object class="GtkStringSorter"> |
| 105 |
<property name="expression"> |
| 106 |
<lookup name="process" type="GsmOpenFile" /> |
| 107 |
</property> |
| 108 |
</object> |
| 109 |
</property> |
| 110 |
<property name="factory"> |
| 111 |
<object class="GtkBuilderListItemFactory"> |
| 112 |
<property name="bytes"><![CDATA[ |
| 113 |
<?xml version="1.0" encoding="UTF-8"?> |
| 114 |
<interface> |
| 115 |
<template class="GtkListItem"> |
| 116 |
<property name="child"> |
| 117 |
<object class="GtkBox"> |
| 118 |
<property name="orientation">horizontal</property> |
| 119 |
<property name="spacing">6</property> |
| 120 |
<child> |
| 121 |
<object class="GtkImage"> |
| 122 |
<binding name="paintable"> |
| 123 |
<lookup name="icon" type="GsmOpenFile"> |
| 124 |
<lookup name="item">GtkListItem</lookup> |
| 125 |
</lookup> |
| 126 |
</binding> |
| 127 |
</object> |
| 128 |
</child> |
| 129 |
<child> |
| 130 |
<object class="GtkLabel"> |
| 131 |
<binding name="label"> |
| 132 |
<lookup name="process" type="GsmOpenFile"> |
| 133 |
<lookup name="item">GtkListItem</lookup> |
| 134 |
</lookup> |
| 135 |
</binding> |
| 136 |
</object> |
| 137 |
</child> |
| 138 |
</object> |
| 139 |
</property> |
| 140 |
</template> |
| 141 |
</interface> |
| 142 |
]]></property> |
| 143 |
</object> |
| 144 |
</property> |
| 145 |
</object> |
| 146 |
</child> |
| 147 |
<child> |
| 148 |
<object class="GtkColumnViewColumn"> |
| 149 |
<property name="title" translatable="yes">PID</property> |
| 150 |
<property name="expand">True</property> |
| 151 |
<property name="sorter"> |
| 152 |
<object class="GtkNumericSorter"> |
| 153 |
<property name="expression"> |
| 154 |
<lookup name="pid" type="GsmOpenFile" /> |
| 155 |
</property> |
| 156 |
</object> |
| 157 |
</property> |
| 158 |
<property name="factory"> |
| 159 |
<object class="GtkBuilderListItemFactory"> |
| 160 |
<property name="bytes"><![CDATA[ |
| 161 |
<?xml version="1.0" encoding="UTF-8"?> |
| 162 |
<interface> |
| 163 |
<template class="GtkListItem"> |
| 164 |
<property name="child"> |
| 165 |
<object class="GtkLabel"> |
| 166 |
<property name="xalign">0</property> |
| 167 |
<binding name="label"> |
| 168 |
<lookup name="pid" type="GsmOpenFile"> |
| 169 |
<lookup name="item">GtkListItem</lookup> |
| 170 |
</lookup> |
| 171 |
</binding> |
| 172 |
</object> |
| 173 |
</property> |
| 174 |
</template> |
| 175 |
</interface> |
| 176 |
]]></property> |
| 177 |
</object> |
| 178 |
</property> |
| 179 |
</object> |
| 180 |
</child> |
| 181 |
<child> |
| 182 |
<object class="GtkColumnViewColumn"> |
| 183 |
<property name="title" translatable="yes">Filename</property> |
| 184 |
<property name="expand">True</property> |
| 185 |
<property name="sorter"> |
| 186 |
<object class="GtkStringSorter"> |
| 187 |
<property name="expression"> |
| 188 |
<lookup name="object" type="GsmOpenFile" /> |
| 189 |
</property> |
| 190 |
</object> |
| 191 |
</property> |
| 192 |
<property name="factory"> |
| 193 |
<object class="GtkBuilderListItemFactory"> |
| 194 |
<property name="bytes"><![CDATA[ |
| 195 |
<?xml version="1.0" encoding="UTF-8"?> |
| 196 |
<interface> |
| 197 |
<template class="GtkListItem"> |
| 198 |
<property name="child"> |
| 199 |
<object class="GtkLabel"> |
| 200 |
<property name="xalign">0</property> |
| 201 |
<binding name="label"> |
| 202 |
<lookup name="object" type="GsmOpenFile"> |
| 203 |
<lookup name="item">GtkListItem</lookup> |
| 204 |
</lookup> |
| 205 |
</binding> |
| 206 |
</object> |
| 207 |
</property> |
| 208 |
</template> |
| 209 |
</interface> |
| 210 |
]]></property> |
| 211 |
</object> |
| 212 |
</property> |
| 213 |
</object> |
| 214 |
</child> |
| 215 |
</object> |
| 216 |
</child> |
| 217 |
</object> |
| 218 |
</child> |
| 219 |
</object> |
| 220 |
</property> |
| 221 |
</object> |
| 222 |
</property> |
| 223 |
<child> |
| 224 |
<object class="GtkShortcutController"> |
| 225 |
<property name="scope">managed</property> |
| 226 |
<child> |
| 227 |
<object class="GtkShortcut"> |
| 228 |
<property name="trigger"><Primary>R</property> |
| 229 |
<property name="action">action(lsof.refresh)</property> |
| 230 |
</object> |
| 231 |
</child> |
| 232 |
<child> |
| 233 |
<object class="GtkShortcut"> |
| 234 |
<property name="trigger">Escape</property> |
| 235 |
<property name="action">action(window.close)</property> |
| 236 |
</object> |
| 237 |
</child> |
| 238 |
</object> |
| 239 |
</child> |
| 240 |
<style> |
| 241 |
<class name="view"/> |
| 242 |
</style> |
| 243 |
</template> |
| 244 |
</interface> |