[sysprof/wip/visualizers] cpu-visualizer-row: hide if no counters were found
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof/wip/visualizers] cpu-visualizer-row: hide if no counters were found
- Date: Tue, 27 Sep 2016 23:44:56 +0000 (UTC)
commit ad130db3d6e1f5d49188fe3bbe2729f91b060b27
Author: Christian Hergert <chergert redhat com>
Date: Tue Sep 27 16:44:23 2016 -0700
cpu-visualizer-row: hide if no counters were found
If we failed to locate any counters, then there isn't much we
can show the user here. So just hide the row.
lib/sp-cpu-visualizer-row.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/lib/sp-cpu-visualizer-row.c b/lib/sp-cpu-visualizer-row.c
index 7a74639..121ebf9 100644
--- a/lib/sp-cpu-visualizer-row.c
+++ b/lib/sp-cpu-visualizer-row.c
@@ -102,6 +102,9 @@ complete_counters (GObject *object,
sp_line_visualizer_row_add_counter (SP_LINE_VISUALIZER_ROW (self), counter_id);
}
}
+
+ /* Hide ourself if we failed to locate counters */
+ gtk_widget_set_visible (GTK_WIDGET (self), counters != NULL && counters->len > 0);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]