[nautilus: 1/3] eel/eel-gtk-extensions.c: Remove expander showing error details



commit 28ae2d032bf11c12704f950ab21f33070c14e45b
Author: Alexandru Fazakas <alex fazakas97 yahoo com>
Date:   Wed Dec 20 00:15:52 2017 +0200

    eel/eel-gtk-extensions.c: Remove expander showing error details
    
    Creating directories within read-only ones is not allowed and appropriate
    error messages pop up.
    
    Trying to create a directory within a read-only directory opens a window
    showing the error. Within the window, an expander shows the error details.
    Whenever the expander is clicked, the window moves unexpectedly.
    We need to fix this as the behaviour is not normal and doesn't look good.
    
    In order to fix the issue, we removed the expander and included the error
    details as a label inside the dialog box itself.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=786212

 eel/eel-gtk-extensions.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/eel/eel-gtk-extensions.c b/eel/eel-gtk-extensions.c
index 335aa01b1..eb45cbf6d 100644
--- a/eel/eel-gtk-extensions.c
+++ b/eel/eel-gtk-extensions.c
@@ -293,20 +293,17 @@ void
 eel_gtk_message_dialog_set_details_label (GtkMessageDialog *dialog,
                                           const gchar      *details_text)
 {
-    GtkWidget *content_area, *expander, *label;
-
+    GtkWidget *content_area, *details_container, *label;
     content_area = gtk_message_dialog_get_message_area (dialog);
-    expander = gtk_expander_new_with_mnemonic (_("Show more _details"));
-    gtk_expander_set_spacing (GTK_EXPANDER (expander), 6);
+    details_container = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
 
     label = gtk_label_new (details_text);
     gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
     gtk_label_set_selectable (GTK_LABEL (label), TRUE);
     gtk_label_set_xalign (GTK_LABEL (label), 0);
 
-    gtk_container_add (GTK_CONTAINER (expander), label);
-    gtk_box_pack_start (GTK_BOX (content_area), expander, FALSE, FALSE, 0);
+    gtk_container_add (GTK_CONTAINER (details_container), label);
+    gtk_box_pack_start (GTK_BOX (content_area), details_container, FALSE, FALSE, 0);
 
     gtk_widget_show (label);
-    gtk_widget_show (expander);
 }


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