summaryrefslogtreecommitdiffstats
path: root/tools/perf/ui/gtk/setup.c
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@gmail.com>2012-05-29 13:23:02 +0900
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-06-19 13:06:19 -0300
commite078ba14dff5c315ce19a978574883f417d2cfa0 (patch)
tree81fefb44d9ea360e3a943f58e088ba97039a2148 /tools/perf/ui/gtk/setup.c
parenta6b702c117f839023814c1e03453c701d26de522 (diff)
downloadop-kernel-dev-e078ba14dff5c315ce19a978574883f417d2cfa0.zip
op-kernel-dev-e078ba14dff5c315ce19a978574883f417d2cfa0.tar.gz
perf ui/gtk: Use struct perf_error_ops
Define and use perf_gtk_eops to provide a GTK2 message dialog for error reporting and a info_bar for warning. As GtkInfoBar requires recent GTK+ libraries, provides a fallback implementation using statusbar widget too. Signed-off-by: Namhyung Kim <namhyung@gmail.com> Acked-by: Pekka Enberg <penberg@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Pekka Enberg <penberg@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1338265382-6872-8-git-send-email-namhyung@gmail.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/ui/gtk/setup.c')
-rw-r--r--tools/perf/ui/gtk/setup.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/perf/ui/gtk/setup.c b/tools/perf/ui/gtk/setup.c
index 8295299..92879ce 100644
--- a/tools/perf/ui/gtk/setup.c
+++ b/tools/perf/ui/gtk/setup.c
@@ -1,12 +1,17 @@
#include "gtk.h"
#include "../../util/cache.h"
+#include "../../util/debug.h"
+
+extern struct perf_error_ops perf_gtk_eops;
int perf_gtk__init(void)
{
+ perf_error__register(&perf_gtk_eops);
return gtk_init_check(NULL, NULL) ? 0 : -1;
}
void perf_gtk__exit(bool wait_for_ok __used)
{
+ perf_error__unregister(&perf_gtk_eops);
gtk_main_quit();
}
OpenPOWER on IntegriCloud