diff --git a/src/client/components/components-inspector-log-view.vala b/src/client/components/components-inspector-log-view.vala index 7b75813c..7e2fa5ea 100644 --- a/src/client/components/components-inspector-log-view.vala +++ b/src/client/components/components-inspector-log-view.vala @@ -189,6 +189,12 @@ public class Components.InspectorLogView : Gtk.Grid { this.logs_view.set_model(this.logs_filter); } + /** Clears all log records from the view. */ + public void clear() { + this.logs_store.clear(); + this.first_pending = null; + } + /** {@inheritDoc} */ public override void destroy() { if (this.listener_installed) { diff --git a/src/client/components/components-inspector.vala b/src/client/components/components-inspector.vala index 0a803154..730f0410 100644 --- a/src/client/components/components-inspector.vala +++ b/src/client/components/components-inspector.vala @@ -60,9 +60,15 @@ public class Components.Inspector : Gtk.ApplicationWindow { [GtkChild] private Gtk.ToggleButton play_button; + [GtkChild] + private Gtk.Button mark_button; + [GtkChild] private Gtk.ToggleButton search_button; + [GtkChild] + private Gtk.Button clear_button; + private InspectorLogView log_pane; private InspectorSystemView system_pane; @@ -169,6 +175,8 @@ public class Components.Inspector : Gtk.ApplicationWindow { uint logs_selected = this.log_pane.count_selected_records(); this.copy_button.set_sensitive(!logs_visible || logs_selected > 0); this.play_button.set_visible(logs_visible); + this.mark_button.set_visible(logs_visible); + this.clear_button.set_visible(logs_visible); this.search_button.set_visible(logs_visible); } @@ -177,6 +185,16 @@ public class Components.Inspector : Gtk.ApplicationWindow { update_ui(); } + [GtkCallback] + private void on_mark_clicked() { + debug("---- 8< ---- %s ---- 8< ----", this.title); + } + + [GtkCallback] + private void on_clear_clicked() { + this.log_pane.clear(); + } + private void on_copy_clicked() { GLib.MemoryOutputStream bytes = new GLib.MemoryOutputStream.resizable(); GLib.DataOutputStream out = new GLib.DataOutputStream(bytes); diff --git a/ui/components-inspector.ui b/ui/components-inspector.ui index 6cc06fe8..d5248406 100644 --- a/ui/components-inspector.ui +++ b/ui/components-inspector.ui @@ -1,8 +1,7 @@ - + -