/* gcc -g -O0 `pkg-config --cflags --libs gtk+-3.0` test.c -o test && ./test */

#include <gtk/gtk.h>

int main(int argc, char **argv)
{
	GtkWidget *dialog, *action_area, *content_area;
	GtkWidget *container, *widget;
	PangoAttribute *attr;
	PangoAttrList *list;

	g_type_init ();
	gtk_init (&argc, &argv);
	
	dialog = g_object_new (GTK_TYPE_DIALOG, NULL);

	gtk_window_set_title (GTK_WINDOW (dialog), " ");

	action_area = gtk_dialog_get_action_area (GTK_DIALOG (dialog));
	content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));

	gtk_widget_ensure_style (GTK_WIDGET (dialog));
	gtk_container_set_border_width (GTK_CONTAINER (action_area), 12);
	gtk_container_set_border_width (GTK_CONTAINER (content_area), 0);

	gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), TRUE);

	gtk_box_pack_end (GTK_BOX (action_area), gtk_button_new_with_mnemonic ("_OK"), FALSE, FALSE, 0);
	gtk_box_pack_end (GTK_BOX (action_area), gtk_button_new_with_mnemonic ("_Cancel"), FALSE, FALSE, 0);
	gtk_widget_show_all (action_area);

	widget = gtk_hbox_new (FALSE, 12);
	gtk_container_set_border_width (GTK_CONTAINER (widget), 12);
	gtk_box_pack_start (GTK_BOX (content_area), widget, FALSE, FALSE, 0);
	gtk_widget_show (widget);

	container = widget;

	widget = gtk_image_new_from_stock (GTK_STOCK_DIALOG_QUESTION, GTK_ICON_SIZE_DIALOG);
	gtk_misc_set_alignment (GTK_MISC (widget), 0.0, 0.0);
	gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
	gtk_widget_show (widget);

	widget = gtk_vbox_new (FALSE, 12);
	gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
	gtk_widget_show (widget);

	container = widget;

	list = pango_attr_list_new ();
	attr = pango_attr_scale_new (PANGO_SCALE_LARGE);
	pango_attr_list_insert (list, attr);
	attr = pango_attr_weight_new (PANGO_WEIGHT_BOLD);
	pango_attr_list_insert (list, attr);

	widget = gtk_label_new ("Are you sure you want to permanently remove all the deleted messages in folder \"Inbox/some/subfolder/in/it/probably\"? But the text itself can be even longer, which makes it look like this...");
	gtk_label_set_attributes (GTK_LABEL (widget), list);
	gtk_label_set_line_wrap (GTK_LABEL (widget), TRUE);
	gtk_label_set_selectable (GTK_LABEL (widget), TRUE);
	gtk_misc_set_alignment (GTK_MISC (widget), 0.0, 0.0);
	gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
	gtk_widget_set_can_focus (widget, FALSE);
	gtk_widget_show (widget);

	widget = gtk_label_new ("If you continue, you will not be able to recover these messages.");
	gtk_label_set_line_wrap (GTK_LABEL (widget), TRUE);
	gtk_label_set_selectable (GTK_LABEL (widget), TRUE);
	gtk_misc_set_alignment (GTK_MISC (widget), 0.0, 0.0);
	gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0);
	gtk_widget_set_can_focus (widget, FALSE);
	gtk_widget_show (widget);

	pango_attr_list_unref (list);

	widget = gtk_check_button_new_with_mnemonic ("_Do not show this message again");
	//gtk_container_set_border_width ((GtkContainer *)widget, 12);
	gtk_box_pack_start (GTK_BOX (content_area), widget, FALSE, FALSE, 0);
	gtk_widget_show (widget);

	gtk_dialog_run (GTK_DIALOG (dialog));
	gtk_widget_destroy (dialog);

	return 0;
}
