[nautilus] file-conflict-dialog: use widget properties instead of GtkAlignment



commit 470235f9349e5244ed5060006b015afb0c47b346
Author: Ernestas Kulik <ernestas kulik gmail com>
Date:   Sun Apr 17 12:41:22 2016 +0300

    file-conflict-dialog: use widget properties instead of GtkAlignment
    
    GtkAlignment has been deprecated since GTK+ 3.14 and the use of
    halign, valign and margin properties is encouraged.
    
    This commit aligns widgets by use of said properties instead of the
    GtkAlignment widget.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=762238

 src/nautilus-file-conflict-dialog.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/src/nautilus-file-conflict-dialog.c b/src/nautilus-file-conflict-dialog.c
index 91b7fb2..bfce4c9 100644
--- a/src/nautilus-file-conflict-dialog.c
+++ b/src/nautilus-file-conflict-dialog.c
@@ -470,7 +470,7 @@ reset_button_clicked_cb (GtkButton *w,
 static void
 nautilus_file_conflict_dialog_init (NautilusFileConflictDialog *fcd)
 {
-       GtkWidget *hbox, *vbox, *vbox2, *alignment;
+       GtkWidget *hbox, *vbox, *vbox2;
        GtkWidget *widget, *dialog_area;
        NautilusFileConflictDialogDetails *details;
        GtkDialog *dialog;
@@ -500,11 +500,10 @@ nautilus_file_conflict_dialog_init (NautilusFileConflictDialog *fcd)
        details->titles_vbox = widget;
 
        /* Setup the hboxes to pack file infos into */
-       alignment = gtk_alignment_new (0.0, 0.0, 0.0, 0.0);
-       g_object_set (alignment, "left-padding", 12, NULL);
        vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
-       gtk_container_add (GTK_CONTAINER (alignment), vbox2);
-       gtk_box_pack_start (GTK_BOX (vbox), alignment, FALSE, FALSE, 0);
+       gtk_widget_set_halign (vbox2, GTK_ALIGN_START);
+       gtk_widget_set_margin_start (vbox2, 12);
+       gtk_box_pack_start (GTK_BOX (vbox), vbox2, FALSE, FALSE, 0);
 
        hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
        gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
@@ -537,7 +536,7 @@ nautilus_file_conflict_dialog_init (NautilusFileConflictDialog *fcd)
        g_signal_connect (widget, "clicked",
                          G_CALLBACK (reset_button_clicked_cb), dialog);
 
-       gtk_widget_show_all (alignment);
+       gtk_widget_show_all (vbox2);
 
 
        /* Setup the checkbox to apply the action to all files */


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