summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormonsta <[email protected]>2017-04-14 11:39:27 +0300
committermonsta <[email protected]>2017-04-14 11:45:41 +0300
commitf04342f59f722635bb8178a3816f07b54a7319f9 (patch)
treeac3e031f9139b16d3af2f185243aa4d5e63aa598
parentd860cabc1e20dba115aaefdfe781b7011b2f8432 (diff)
downloadpluma-f04342f59f722635bb8178a3816f07b54a7319f9.tar.bz2
pluma-f04342f59f722635bb8178a3816f07b54a7319f9.tar.xz
close confirm dialog: set max width for labels
fixes https://github.com/mate-desktop/pluma/issues/186 picked from: https://git.gnome.org/browse/gedit/commit/?id=90c742f2e97824878563b4bb4bb926048641dc18 https://git.gnome.org/browse/gedit/commit/?id=b783f0134ea33c96f48c528d0a5e763394881e8f
-rw-r--r--pluma/dialogs/pluma-close-confirmation-dialog.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/pluma/dialogs/pluma-close-confirmation-dialog.c b/pluma/dialogs/pluma-close-confirmation-dialog.c
index a0b860f6..361d5ae6 100644
--- a/pluma/dialogs/pluma-close-confirmation-dialog.c
+++ b/pluma/dialogs/pluma-close-confirmation-dialog.c
@@ -513,6 +513,7 @@ build_single_doc_dialog (PlumaCloseConfirmationDialog *dlg)
#endif
gtk_label_set_selectable (GTK_LABEL (primary_label), TRUE);
gtk_widget_set_can_focus (GTK_WIDGET (primary_label), FALSE);
+ gtk_label_set_max_width_chars (GTK_LABEL (primary_label), 72);
doc_name = pluma_document_get_short_name_for_display (doc);
@@ -550,6 +551,7 @@ build_single_doc_dialog (PlumaCloseConfirmationDialog *dlg)
#endif
gtk_label_set_selectable (GTK_LABEL (secondary_label), TRUE);
gtk_widget_set_can_focus (GTK_WIDGET (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), 5);
@@ -710,6 +712,7 @@ build_multiple_docs_dialog (PlumaCloseConfirmationDialog *dlg)
gtk_misc_set_alignment (GTK_MISC (primary_label), 0.0, 0.5);
#endif
gtk_label_set_selectable (GTK_LABEL (primary_label), TRUE);
+ gtk_label_set_max_width_chars (GTK_LABEL (primary_label), 72);
if (priv->disable_save_to_disk)
str = g_strdup_printf (
@@ -743,6 +746,7 @@ build_multiple_docs_dialog (PlumaCloseConfirmationDialog *dlg)
gtk_box_pack_start (GTK_BOX (vbox2), select_label, FALSE, FALSE, 0);
gtk_label_set_line_wrap (GTK_LABEL (select_label), TRUE);
+ gtk_label_set_max_width_chars (GTK_LABEL (select_label), 72);
#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (select_label), 0.0);
#else
@@ -775,6 +779,7 @@ build_multiple_docs_dialog (PlumaCloseConfirmationDialog *dlg)
gtk_misc_set_alignment (GTK_MISC (secondary_label), 0.0, 0.5);
#endif
gtk_label_set_selectable (GTK_LABEL (secondary_label), TRUE);
+ gtk_label_set_max_width_chars (GTK_LABEL (secondary_label), 72);
gtk_label_set_mnemonic_widget (GTK_LABEL (select_label), treeview);