mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-12 16:10:54 +00:00
libsysprof-gtk: put marks behind a POI toplevel track
This commit is contained in:
@ -416,6 +416,8 @@ sysprof_session_discover_marks (SysprofSession *self,
|
|||||||
GListStore *tracks)
|
GListStore *tracks)
|
||||||
{
|
{
|
||||||
g_autoptr(GListModel) catalogs = NULL;
|
g_autoptr(GListModel) catalogs = NULL;
|
||||||
|
g_autoptr(SysprofTrack) toplevel = NULL;
|
||||||
|
SysprofTrackMarksChart *topchart;
|
||||||
guint n_catalogs;
|
guint n_catalogs;
|
||||||
|
|
||||||
g_assert (SYSPROF_IS_SESSION (self));
|
g_assert (SYSPROF_IS_SESSION (self));
|
||||||
@ -428,6 +430,20 @@ sysprof_session_discover_marks (SysprofSession *self,
|
|||||||
if (n_catalogs == 0)
|
if (n_catalogs == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
toplevel = g_object_new (SYSPROF_TYPE_TRACK,
|
||||||
|
"title", _("Points of Interest"),
|
||||||
|
NULL);
|
||||||
|
topchart = g_new0 (SysprofTrackMarksChart, 1);
|
||||||
|
g_set_weak_pointer (&topchart->session, self);
|
||||||
|
topchart->document = g_object_ref (document);
|
||||||
|
topchart->model = sysprof_document_list_marks (document);
|
||||||
|
g_signal_connect_data (toplevel,
|
||||||
|
"create-chart",
|
||||||
|
G_CALLBACK (create_chart_for_marks),
|
||||||
|
topchart,
|
||||||
|
(GClosureNotify)sysprof_track_marks_chart_free,
|
||||||
|
0);
|
||||||
|
|
||||||
for (guint i = 0; i < n_catalogs; i++)
|
for (guint i = 0; i < n_catalogs; i++)
|
||||||
{
|
{
|
||||||
g_autoptr(GListModel) by_group = g_list_model_get_item (catalogs, i);
|
g_autoptr(GListModel) by_group = g_list_model_get_item (catalogs, i);
|
||||||
@ -453,7 +469,7 @@ sysprof_session_discover_marks (SysprofSession *self,
|
|||||||
chart,
|
chart,
|
||||||
(GClosureNotify)sysprof_track_marks_chart_free,
|
(GClosureNotify)sysprof_track_marks_chart_free,
|
||||||
0);
|
0);
|
||||||
g_list_store_append (tracks, track);
|
_sysprof_track_add_subtrack (toplevel, track);
|
||||||
|
|
||||||
for (guint j = 0; j < n_names; j++)
|
for (guint j = 0; j < n_names; j++)
|
||||||
{
|
{
|
||||||
@ -480,6 +496,8 @@ sysprof_session_discover_marks (SysprofSession *self,
|
|||||||
_sysprof_track_add_subtrack (track, subtrack);
|
_sysprof_track_add_subtrack (track, subtrack);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_list_store_append (tracks, toplevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
Reference in New Issue
Block a user