[rhythmbox] replace gtk_misc_set_alignment with halign and valign



commit 2ffaba2bdef79dbd20d8f0e8c2efb1519dfc857d
Author: Jonathan Matthew <jonathan d14n org>
Date:   Sun Sep 11 20:42:41 2016 +1000

    replace gtk_misc_set_alignment with halign and valign

 widgets/rb-alert-dialog.c |   12 ++++++++----
 widgets/rb-header.c       |    9 ++++++---
 2 files changed, 14 insertions(+), 7 deletions(-)
---
diff --git a/widgets/rb-alert-dialog.c b/widgets/rb-alert-dialog.c
index 1e9694d..4c12c15 100644
--- a/widgets/rb-alert-dialog.c
+++ b/widgets/rb-alert-dialog.c
@@ -136,20 +136,24 @@ rb_alert_dialog_init (RBAlertDialog *dialog)
        dialog->details->secondary_label = gtk_label_new (NULL);
        dialog->details->details_label = gtk_label_new (NULL);
        dialog->details->image = gtk_image_new_from_icon_name ("broken-image", GTK_ICON_SIZE_DIALOG);
-       gtk_misc_set_alignment (GTK_MISC (dialog->details->image), 0.5, 0.0);
+       gtk_widget_set_halign (dialog->details->image, GTK_ALIGN_CENTER);
+       gtk_widget_set_valign (dialog->details->image, GTK_ALIGN_START);
 
        gtk_label_set_line_wrap (GTK_LABEL (dialog->details->primary_label), TRUE);
        gtk_label_set_selectable (GTK_LABEL (dialog->details->primary_label), TRUE);
        gtk_label_set_use_markup (GTK_LABEL (dialog->details->primary_label), TRUE);
-       gtk_misc_set_alignment (GTK_MISC (dialog->details->primary_label), 0.0, 0.5);
+       gtk_widget_set_halign (dialog->details->primary_label, GTK_ALIGN_START);
+       gtk_widget_set_valign (dialog->details->primary_label, GTK_ALIGN_CENTER);
 
        gtk_label_set_line_wrap (GTK_LABEL (dialog->details->secondary_label), TRUE);
        gtk_label_set_selectable (GTK_LABEL (dialog->details->secondary_label), TRUE);
-       gtk_misc_set_alignment (GTK_MISC (dialog->details->secondary_label), 0.0, 0.5);
+       gtk_widget_set_halign (dialog->details->secondary_label, GTK_ALIGN_START);
+       gtk_widget_set_valign (dialog->details->secondary_label, GTK_ALIGN_CENTER);
 
        gtk_label_set_line_wrap (GTK_LABEL (dialog->details->details_label), TRUE);
        gtk_label_set_selectable (GTK_LABEL (dialog->details->details_label), TRUE);
-       gtk_misc_set_alignment (GTK_MISC (dialog->details->details_label), 0.0, 0.5);
+       gtk_widget_set_halign (dialog->details->details_label, GTK_ALIGN_START);
+       gtk_widget_set_valign (dialog->details->details_label, GTK_ALIGN_CENTER);
 
        hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
        gtk_container_set_border_width (GTK_CONTAINER (hbox), 5);
diff --git a/widgets/rb-header.c b/widgets/rb-header.c
index c47e936..c37a53c 100644
--- a/widgets/rb-header.c
+++ b/widgets/rb-header.c
@@ -343,7 +343,8 @@ rb_header_constructed (GObject *object)
        gtk_label_set_use_markup (GTK_LABEL (header->priv->song), TRUE);
        gtk_label_set_selectable (GTK_LABEL (header->priv->song), TRUE);
        gtk_label_set_ellipsize (GTK_LABEL (header->priv->song), PANGO_ELLIPSIZE_END);
-       gtk_misc_set_alignment (GTK_MISC (header->priv->song), 0.0, 0.5);
+       gtk_widget_set_halign (header->priv->song, GTK_ALIGN_START);
+       gtk_widget_set_valign (header->priv->song, GTK_ALIGN_CENTER);
        g_signal_connect_object (header->priv->song,
                                 "button-press-event",
                                 G_CALLBACK (label_button_press_cb),
@@ -355,7 +356,8 @@ rb_header_constructed (GObject *object)
        gtk_label_set_selectable (GTK_LABEL (header->priv->details), TRUE);
        gtk_label_set_ellipsize (GTK_LABEL (header->priv->details), PANGO_ELLIPSIZE_END);
        gtk_widget_set_hexpand (header->priv->details, TRUE);
-       gtk_misc_set_alignment (GTK_MISC (header->priv->details), 0.0, 0.5);
+       gtk_widget_set_halign (header->priv->details, GTK_ALIGN_START);
+       gtk_widget_set_valign (header->priv->details, GTK_ALIGN_CENTER);
        g_signal_connect_object (header->priv->details,
                                 "button-press-event",
                                 G_CALLBACK (label_button_press_cb),
@@ -369,7 +371,8 @@ rb_header_constructed (GObject *object)
        gtk_label_set_selectable (GTK_LABEL (header->priv->not_playing), TRUE);
        gtk_label_set_ellipsize (GTK_LABEL (header->priv->not_playing), PANGO_ELLIPSIZE_END);
        gtk_widget_set_hexpand (header->priv->not_playing, TRUE);
-       gtk_misc_set_alignment (GTK_MISC (header->priv->not_playing), 0.0, 0.5);
+       gtk_widget_set_halign (header->priv->not_playing, GTK_ALIGN_START);
+       gtk_widget_set_valign (header->priv->not_playing, GTK_ALIGN_CENTER);
        gtk_container_add (GTK_CONTAINER (header->priv->songbox), header->priv->not_playing);
        g_signal_connect_object (header->priv->not_playing,
                                 "button-press-event",


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