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.
This commit is contained in:
Christian Hergert
2016-09-27 16:44:23 -07:00
parent 984fac73b6
commit ad130db3d6

View File

@ -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