MCPcopy Create free account
hub / github.com/coreboot/coreboot / text_insert_help

Function text_insert_help

util/kconfig/gconf.c:362–384  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

360
361
362static void text_insert_help(struct menu *menu)
363{
364 GtkTextBuffer *buffer;
365 GtkTextIter start, end;
366 const char *prompt = menu_get_prompt(menu);
367 struct gstr help = str_new();
368
369 menu_get_ext_help(menu, &help);
370
371 buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_w));
372 gtk_text_buffer_get_bounds(buffer, &start, &end);
373 gtk_text_buffer_delete(buffer, &start, &end);
374 gtk_text_view_set_left_margin(GTK_TEXT_VIEW(text_w), 15);
375
376 gtk_text_buffer_get_end_iter(buffer, &end);
377 gtk_text_buffer_insert_with_tags(buffer, &end, prompt, -1, tag1,
378 NULL);
379 gtk_text_buffer_insert_at_cursor(buffer, "\n\n", 2);
380 gtk_text_buffer_get_end_iter(buffer, &end);
381 gtk_text_buffer_insert_with_tags(buffer, &end, str_get(&help), -1, tag2,
382 NULL);
383 str_free(&help);
384}
385
386
387static void text_insert_msg(const char *title, const char *message)

Callers 1

Calls 5

menu_get_promptFunction · 0.85
str_newFunction · 0.85
menu_get_ext_helpFunction · 0.85
str_getFunction · 0.85
str_freeFunction · 0.85

Tested by

no test coverage detected