[gtk+] GtkCustomUnixPaperDialog: don't use a GtkAlignment
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkCustomUnixPaperDialog: don't use a GtkAlignment
- Date: Tue, 7 Jun 2011 02:32:26 +0000 (UTC)
commit 8224287d5c86d00ee46f5a0413235bf984e6f19f
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Jun 6 22:31:31 2011 -0400
GtkCustomUnixPaperDialog: don't use a GtkAlignment
Those are going to be deprecated sometime soon.
Instead, use widget align and margin properties.
gtk/gtkcustompaperunixdialog.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/gtk/gtkcustompaperunixdialog.c b/gtk/gtkcustompaperunixdialog.c
index 6146efb..500ccad 100644
--- a/gtk/gtkcustompaperunixdialog.c
+++ b/gtk/gtkcustompaperunixdialog.c
@@ -931,7 +931,7 @@ static GtkWidget *
wrap_in_frame (const gchar *label,
GtkWidget *child)
{
- GtkWidget *frame, *alignment, *label_widget;
+ GtkWidget *frame, *label_widget;
gchar *bold_text;
label_widget = gtk_label_new (NULL);
@@ -946,15 +946,13 @@ wrap_in_frame (const gchar *label,
frame = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_box_pack_start (GTK_BOX (frame), label_widget, FALSE, FALSE, 0);
- alignment = gtk_alignment_new (0.0, 0.0, 1.0, 1.0);
- gtk_alignment_set_padding (GTK_ALIGNMENT (alignment),
- 0, 0, 12, 0);
- gtk_box_pack_start (GTK_BOX (frame), alignment, FALSE, FALSE, 0);
+ gtk_widget_set_margin_left (child, 12);
+ gtk_widget_set_halign (child, GTK_ALIGN_FILL);
+ gtk_widget_set_valign (child, GTK_ALIGN_FILL);
- gtk_container_add (GTK_CONTAINER (alignment), child);
+ gtk_box_pack_start (GTK_BOX (frame), child, FALSE, FALSE, 0);
gtk_widget_show (frame);
- gtk_widget_show (alignment);
return frame;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]