summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormonsta <[email protected]>2017-04-14 11:39:27 +0300
committermonsta <[email protected]>2017-04-19 13:39:07 +0300
commitb8f2b48ced755aea9547ea4510dd32c62ab62f35 (patch)
tree9ab6793bf61791c29765084299bbc9a3f0c535ac
parent8860f94f475a3b2d66026a8f09e8eff5717e3731 (diff)
downloadpluma-b8f2b48ced755aea9547ea4510dd32c62ab62f35.tar.bz2
pluma-b8f2b48ced755aea9547ea4510dd32c62ab62f35.tar.xz
[GTK+3] close confirm dialog: set max width for labels
fixes https://github.com/mate-desktop/pluma/issues/186 port of d3d252efda9074ee2296ca7f130007f5fc9bc185 to mixed GTK+2/3 code
-rw-r--r--pluma/dialogs/pluma-close-confirmation-dialog.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/pluma/dialogs/pluma-close-confirmation-dialog.c b/pluma/dialogs/pluma-close-confirmation-dialog.c
index 14b75f76..a4d875b0 100644
--- a/pluma/dialogs/pluma-close-confirmation-dialog.c
+++ b/pluma/dialogs/pluma-close-confirmation-dialog.c
@@ -527,6 +527,9 @@ 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);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_label_set_max_width_chars (GTK_LABEL (primary_label), 72);
+#endif
doc_name = pluma_document_get_short_name_for_display (doc);
@@ -564,6 +567,9 @@ 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);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_label_set_max_width_chars (GTK_LABEL (secondary_label), 72);
+#endif
hbox = gtk_hbox_new (FALSE, 12);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
@@ -733,6 +739,9 @@ 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);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_label_set_max_width_chars (GTK_LABEL (primary_label), 72);
+#endif
if (priv->disable_save_to_disk)
str = g_strdup_printf (
@@ -766,6 +775,9 @@ 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);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_label_set_max_width_chars (GTK_LABEL (select_label), 72);
+#endif
#if GTK_CHECK_VERSION (3, 16, 0)
gtk_label_set_xalign (GTK_LABEL (select_label), 0.0);
#else
@@ -798,6 +810,9 @@ 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);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gtk_label_set_max_width_chars (GTK_LABEL (secondary_label), 72);
+#endif
gtk_label_set_mnemonic_widget (GTK_LABEL (select_label), treeview);