Commit 132d6507 authored by Sébastien Wilmet's avatar Sébastien Wilmet

close confirm dialog: max width for labels

So the labels are not too long.

Calling gtk_window_set_default_size() with a reasonable size doesn't
work, because the natural size of the labels have a higher priority.

https://bugzilla.gnome.org/show_bug.cgi?id=730693
parent fd26dcc5
......@@ -450,6 +450,7 @@ build_single_doc_dialog (GeditCloseConfirmationDialog *dlg)
gtk_misc_set_alignment (GTK_MISC (primary_label), 0.5, 0);
gtk_label_set_selectable (GTK_LABEL (primary_label), TRUE);
gtk_widget_set_can_focus (primary_label, FALSE);
gtk_label_set_max_width_chars (GTK_LABEL (primary_label), 72);
doc_name = gedit_document_get_short_name_for_display (doc);
......@@ -490,6 +491,7 @@ build_single_doc_dialog (GeditCloseConfirmationDialog *dlg)
gtk_misc_set_alignment (GTK_MISC (secondary_label), 0.5, 0);
gtk_label_set_selectable (GTK_LABEL (secondary_label), TRUE);
gtk_widget_set_can_focus (secondary_label, FALSE);
gtk_label_set_max_width_chars (GTK_LABEL (secondary_label), 72);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 10);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment