mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-12 16:10:54 +00:00
sysprof: add search bar to the D-Bus view
For now this only supports searching in the sender, destination, path, interface and method fields. And will match if any of these fields contain the search term as substring. In the future it may be nice to allow searching individual fields as well as filter based on enum fields.
This commit is contained in:
committed by
Christian Hergert
parent
27bf90c287
commit
1b853b1623
@ -56,6 +56,20 @@
|
|||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox">
|
||||||
|
<child>
|
||||||
|
<object class="GtkSearchEntry" id="filter_search_entry">
|
||||||
|
<property name="placeholder-text" translatable="yes">Filter Events</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>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkSeparator"/>
|
<object class="GtkSeparator"/>
|
||||||
</child>
|
</child>
|
||||||
@ -81,19 +95,83 @@
|
|||||||
<lookup name="sorter">column_view</lookup>
|
<lookup name="sorter">column_view</lookup>
|
||||||
</binding>
|
</binding>
|
||||||
<property name="model">
|
<property name="model">
|
||||||
<object class="SysprofTimeFilterModel">
|
<object class="GtkFilterListModel">
|
||||||
<binding name="time-span">
|
<property name="model">
|
||||||
<lookup name="selected-time" type="SysprofSession">
|
<object class="SysprofTimeFilterModel">
|
||||||
<lookup name="session">SysprofDBusSection</lookup>
|
<binding name="time-span">
|
||||||
</lookup>
|
<lookup name="selected-time" type="SysprofSession">
|
||||||
</binding>
|
<lookup name="session">SysprofDBusSection</lookup>
|
||||||
<binding name="model">
|
</lookup>
|
||||||
<lookup name="dbus-messages" type="SysprofDocument">
|
</binding>
|
||||||
<lookup name="document" type="SysprofSession">
|
<binding name="model">
|
||||||
<lookup name="session">SysprofDBusSection</lookup>
|
<lookup name="dbus-messages" type="SysprofDocument">
|
||||||
</lookup>
|
<lookup name="document" type="SysprofSession">
|
||||||
</lookup>
|
<lookup name="session">SysprofDBusSection</lookup>
|
||||||
</binding>
|
</lookup>
|
||||||
|
</lookup>
|
||||||
|
</binding>
|
||||||
|
</object>
|
||||||
|
</property>
|
||||||
|
<property name="filter">
|
||||||
|
<object class="GtkAnyFilter">
|
||||||
|
<!-- support searching in all fields -->
|
||||||
|
<child>
|
||||||
|
<object class="GtkStringFilter">
|
||||||
|
<property name="match-mode">substring</property>
|
||||||
|
<property name="expression">
|
||||||
|
<lookup name="sender" type="SysprofDocumentDBusMessage" />
|
||||||
|
</property>
|
||||||
|
<binding name="search">
|
||||||
|
<lookup name="text">filter_search_entry</lookup>
|
||||||
|
</binding>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkStringFilter">
|
||||||
|
<property name="match-mode">substring</property>
|
||||||
|
<property name="expression">
|
||||||
|
<lookup name="destination" type="SysprofDocumentDBusMessage" />
|
||||||
|
</property>
|
||||||
|
<binding name="search">
|
||||||
|
<lookup name="text">filter_search_entry</lookup>
|
||||||
|
</binding>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkStringFilter">
|
||||||
|
<property name="match-mode">substring</property>
|
||||||
|
<property name="expression">
|
||||||
|
<lookup name="path" type="SysprofDocumentDBusMessage" />
|
||||||
|
</property>
|
||||||
|
<binding name="search">
|
||||||
|
<lookup name="text">filter_search_entry</lookup>
|
||||||
|
</binding>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkStringFilter">
|
||||||
|
<property name="match-mode">substring</property>
|
||||||
|
<property name="expression">
|
||||||
|
<lookup name="interface" type="SysprofDocumentDBusMessage" />
|
||||||
|
</property>
|
||||||
|
<binding name="search">
|
||||||
|
<lookup name="text">filter_search_entry</lookup>
|
||||||
|
</binding>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkStringFilter">
|
||||||
|
<property name="match-mode">substring</property>
|
||||||
|
<property name="expression">
|
||||||
|
<lookup name="member" type="SysprofDocumentDBusMessage" />
|
||||||
|
</property>
|
||||||
|
<binding name="search">
|
||||||
|
<lookup name="text">filter_search_entry</lookup>
|
||||||
|
</binding>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</property>
|
||||||
</object>
|
</object>
|
||||||
</property>
|
</property>
|
||||||
</object>
|
</object>
|
||||||
|
|||||||
Reference in New Issue
Block a user