-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
Namhyung Kim
authored and
Arnaldo Carvalho de Melo
committed
Jun 19, 2012
1 parent
a6b702c
commit e078ba1
Showing
2 changed files
with
91 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters