window: notify the user when no valid samples were collected

If we failed to collect any samples in the target profile, let the user
know why the callgraph is empty.
This commit is contained in:
Christian Hergert
2016-04-15 18:11:31 -07:00
parent ceeb29b0e6
commit 36008c4ab4

View File

@ -212,6 +212,11 @@ sp_window_build_profile_cb (GObject *object,
sp_callgraph_view_set_profile (self->callgraph_view, SP_CALLGRAPH_PROFILE (profile));
sp_window_set_state (self, SP_WINDOW_STATE_BROWSING);
if (sp_callgraph_view_get_n_functions (self->callgraph_view) == 0)
sp_window_notify_user (self,
GTK_MESSAGE_WARNING,
_("Not enough samples were collected to generate a callgraph"));
}
static void