mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-12 16:10:54 +00:00
visualizers: limit mark rows to 30
This commit is contained in:
@ -243,7 +243,6 @@ handle_capture_results (GObject *object,
|
|||||||
{
|
{
|
||||||
SpVisualizerList *self = (SpVisualizerList *)object;
|
SpVisualizerList *self = (SpVisualizerList *)object;
|
||||||
Discovery *state;
|
Discovery *state;
|
||||||
GHashTableIter iter;
|
|
||||||
const gchar *key;
|
const gchar *key;
|
||||||
|
|
||||||
g_assert (SP_IS_VISUALIZER_LIST (self));
|
g_assert (SP_IS_VISUALIZER_LIST (self));
|
||||||
@ -265,18 +264,23 @@ handle_capture_results (GObject *object,
|
|||||||
gtk_container_add (GTK_CONTAINER (self), row);
|
gtk_container_add (GTK_CONTAINER (self), row);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_hash_table_iter_init (&iter, state->mark_groups);
|
if (g_hash_table_size (state->mark_groups) < 30)
|
||||||
|
|
||||||
while (g_hash_table_iter_next (&iter, (gpointer *)&key, NULL))
|
|
||||||
{
|
{
|
||||||
GtkWidget *row = g_object_new (SP_TYPE_MARK_VISUALIZER_ROW,
|
GHashTableIter iter;
|
||||||
"group", key,
|
|
||||||
"title", key,
|
g_hash_table_iter_init (&iter, state->mark_groups);
|
||||||
"height-request", 75,
|
|
||||||
"selectable", FALSE,
|
while (g_hash_table_iter_next (&iter, (gpointer *)&key, NULL))
|
||||||
"visible", TRUE,
|
{
|
||||||
NULL);
|
GtkWidget *row = g_object_new (SP_TYPE_MARK_VISUALIZER_ROW,
|
||||||
gtk_container_add (GTK_CONTAINER (self), row);
|
"group", key,
|
||||||
|
"title", key,
|
||||||
|
"height-request", 75,
|
||||||
|
"selectable", FALSE,
|
||||||
|
"visible", TRUE,
|
||||||
|
NULL);
|
||||||
|
gtk_container_add (GTK_CONTAINER (self), row);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user