Namhyung Kim | 4bb1646 | 2012-08-16 17:14:52 +0900 | [diff] [blame^] | 1 | #include "gtk.h" |
| 2 | #include "../helpline.h" |
| 3 | |
| 4 | static 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 | |
| 13 | static 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 | |
| 22 | static struct ui_helpline gtk_helpline_fns = { |
| 23 | .pop = gtk_helpline_pop, |
| 24 | .push = gtk_helpline_push, |
| 25 | }; |
| 26 | |
| 27 | void perf_gtk__init_helpline(void) |
| 28 | { |
| 29 | helpline_fns = >k_helpline_fns; |
| 30 | } |