[gtk+] gtk/gtkmessagedialog: gtk_misc_set_alignment
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gtk/gtkmessagedialog: gtk_misc_set_alignment
- Date: Fri, 10 Jun 2011 22:18:35 +0000 (UTC)
commit cc0be1f949020de1562534fbc31ddf0af4651fe2
Author: Diego Celix <dcelix gmail com>
Date: Sat May 21 20:32:00 2011 +0200
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 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkmessagedialog.c b/gtk/gtkmessagedialog.c
index 1455287..e0c8316 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]