[gedit] close confirm dialog: max width for labels



commit 90c742f2e97824878563b4bb4bb926048641dc18
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Mon May 26 15:31:56 2014 +0200

    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

 gedit/gedit-close-confirmation-dialog.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gedit/gedit-close-confirmation-dialog.c b/gedit/gedit-close-confirmation-dialog.c
index d677865..d0d2be1 100644
--- a/gedit/gedit-close-confirmation-dialog.c
+++ b/gedit/gedit-close-confirmation-dialog.c
@@ -435,6 +435,7 @@ build_single_doc_dialog (GeditCloseConfirmationDialog *dlg)
        gtk_widget_set_valign (primary_label, GTK_ALIGN_START);
        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);
 
@@ -474,6 +475,7 @@ build_single_doc_dialog (GeditCloseConfirmationDialog *dlg)
        gtk_widget_set_valign (secondary_label, GTK_ALIGN_START);
        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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]