[sysprof] window: notify the user when no valid samples were collected
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof] window: notify the user when no valid samples were collected
- Date: Sat, 16 Apr 2016 01:11:51 +0000 (UTC)
commit 36008c4ab4a39f0512837bdee93a3686d611806d
Author: Christian Hergert <christian hergert me>
Date: Fri Apr 15 18:11:31 2016 -0700
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.
src/sp-window.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/sp-window.c b/src/sp-window.c
index 36c0e8f..2cf5805 100644
--- a/src/sp-window.c
+++ b/src/sp-window.c
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]