From cc0be1f949020de1562534fbc31ddf0af4651fe2 Mon Sep 17 00:00:00 2001 From: Diego Celix Date: Sat, 21 May 2011 20:32:00 +0200 Subject: [PATCH] gtk/gtkmessagedialog: gtk_misc_set_alignment Replacing the function gtk_misc_set_alignment () with gtk_widget_set_halign () and gtk_widget_set_valign () in gtk/gtkmessagedialog.c https://bugzilla.gnome.org/show_bug.cgi?id=650762 --- gtk/gtkmessagedialog.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/gtk/gtkmessagedialog.c b/gtk/gtkmessagedialog.c index 14552874b9..e0c8316a21 100644 --- a/gtk/gtkmessagedialog.c +++ b/gtk/gtkmessagedialog.c @@ -338,15 +338,18 @@ gtk_message_dialog_init (GtkMessageDialog *dialog) priv->label = gtk_label_new (NULL); priv->image = gtk_image_new_from_stock (NULL, GTK_ICON_SIZE_DIALOG); - gtk_misc_set_alignment (GTK_MISC (priv->image), 0.5, 0.0); - + gtk_widget_set_halign (priv->image, GTK_ALIGN_CENTER); + gtk_widget_set_valign (priv->image, GTK_ALIGN_START); + gtk_label_set_line_wrap (GTK_LABEL (priv->label), TRUE); gtk_label_set_selectable (GTK_LABEL (priv->label), TRUE); - gtk_misc_set_alignment (GTK_MISC (priv->label), 0.0, 0.0); - + gtk_widget_set_halign (priv->label, GTK_ALIGN_START); + gtk_widget_set_valign (priv->label, GTK_ALIGN_START); + gtk_label_set_line_wrap (GTK_LABEL (priv->secondary_label), TRUE); gtk_label_set_selectable (GTK_LABEL (priv->secondary_label), TRUE); - gtk_misc_set_alignment (GTK_MISC (priv->secondary_label), 0.0, 0.0); + gtk_widget_set_halign (priv->secondary_label, GTK_ALIGN_START); + gtk_widget_set_valign (priv->secondary_label, GTK_ALIGN_START); hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12); priv->message_area = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12); @@ -725,7 +728,8 @@ gtk_message_dialog_set_image (GtkMessageDialog *dialog, if (image == NULL) { image = gtk_image_new_from_stock (NULL, GTK_ICON_SIZE_DIALOG); - gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0); + gtk_widget_set_halign (image, GTK_ALIGN_CENTER); + gtk_widget_set_valign (image, GTK_ALIGN_START); } priv->message_type = GTK_MESSAGE_OTHER;