]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/blame - tools/perf/ui/gtk/helpline.c
perf ui/gtk: Use helpline API in browser
[mirror_ubuntu-focal-kernel.git] / tools / perf / ui / gtk / helpline.c
CommitLineData
4bb1646a
NK
1#include "gtk.h"
2#include "../helpline.h"
3
4static void gtk_helpline_pop(void)
5{
6 if (!perf_gtk__is_active_context(pgctx))
7 return;
8
9 gtk_statusbar_pop(GTK_STATUSBAR(pgctx->statbar),
10 pgctx->statbar_ctx_id);
11}
12
13static void gtk_helpline_push(const char *msg)
14{
15 if (!perf_gtk__is_active_context(pgctx))
16 return;
17
18 gtk_statusbar_push(GTK_STATUSBAR(pgctx->statbar),
19 pgctx->statbar_ctx_id, msg);
20}
21
22static struct ui_helpline gtk_helpline_fns = {
23 .pop = gtk_helpline_pop,
24 .push = gtk_helpline_push,
25};
26
27void perf_gtk__init_helpline(void)
28{
29 helpline_fns = &gtk_helpline_fns;
30}