7 #include "../helpline.h" 26 screen = gtk_widget_get_screen(window);
28 monitor = gdk_screen_get_monitor_at_window(screen, window->window);
30 gdk_screen_get_monitor_geometry(screen, monitor, &rect);
32 width = rect.width * 3 / 4;
33 height = rect.height * 3 / 4;
35 gtk_window_resize(GTK_WINDOW(window), width, height);
41 return "<span fgcolor='red'>";
43 return "<span fgcolor='dark green'>";
47 #ifdef HAVE_GTK_INFO_BAR_SUPPORT 52 GtkWidget *content_area;
54 info_bar = gtk_info_bar_new();
55 gtk_widget_set_no_show_all(info_bar, TRUE);
57 label = gtk_label_new(
"");
58 gtk_widget_show(label);
60 content_area = gtk_info_bar_get_content_area(GTK_INFO_BAR(info_bar));
61 gtk_container_add(GTK_CONTAINER(content_area), label);
63 gtk_info_bar_add_button(GTK_INFO_BAR(info_bar), GTK_STOCK_OK,
65 g_signal_connect(info_bar,
"response",
66 G_CALLBACK(gtk_widget_hide), NULL);
68 pgctx->info_bar = info_bar;
69 pgctx->message_label = label;
80 stbar = gtk_statusbar_new();
82 ctxid = gtk_statusbar_get_context_id(GTK_STATUSBAR(stbar),
void perf_gtk__exit(bool wait_for_ok)
static GtkWidget * perf_gtk__setup_info_bar(void)
void perf_gtk__signal(int sig)
GtkWidget * perf_gtk__setup_statusbar(void)
const char * perf_gtk__get_percent_color(double percent)
static double percent(int st, int tot)
struct perf_gtk_context * pgctx
void perf_gtk__resize_window(GtkWidget *window)