summaryrefslogtreecommitdiff
path: root/modules/other
diff options
context:
space:
mode:
authorJavier Jardón <jjardon@gnome.org>2010-06-03 09:36:39 +0200
committerJavier Jardón <jjardon@gnome.org>2010-07-13 19:40:47 +0200
commit7f2cc85db96afb9806fc62ce6e32c47e49a9f4d3 (patch)
tree9b4e9a147f29c3ac181d1901579c9dd16a386acc /modules/other
parent80df961edb1557bae3a545e6b18871d7c4c6f566 (diff)
downloadgtk+-7f2cc85db96afb9806fc62ce6e32c47e49a9f4d3.tar.gz
Use accessor functions to access GtkDialog
Diffstat (limited to 'modules/other')
-rw-r--r--modules/other/gail/tests/testimage.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/modules/other/gail/tests/testimage.c b/modules/other/gail/tests/testimage.c
index b0c2243b06..20b7740dc6 100644
--- a/modules/other/gail/tests/testimage.c
+++ b/modules/other/gail/tests/testimage.c
@@ -27,6 +27,7 @@ static void destroy (GtkWidget *widget, gpointer data)
static void _check_arrows (AtkObject *obj)
{
+ GtkWidget *content_area, *action_area;
AtkRole role;
MainDialog *md;
static gint visibleDialog = 0;
@@ -44,26 +45,24 @@ static void _check_arrows (AtkObject *obj)
md->arrow4 = gtk_arrow_new(GTK_ARROW_RIGHT,GTK_SHADOW_OUT);
md->dialog = gtk_dialog_new();
gtk_window_set_modal(GTK_WINDOW(md->dialog), TRUE);
- gtk_box_pack_start(GTK_BOX (GTK_DIALOG (md->dialog)->vbox),
- md->arrow1, TRUE,TRUE, 0);
- gtk_box_pack_start(GTK_BOX (GTK_DIALOG (md->dialog)->vbox),
- md->arrow2, TRUE,TRUE, 0);
- gtk_box_pack_start(GTK_BOX (GTK_DIALOG (md->dialog)->vbox),
- md->arrow3, TRUE,TRUE, 0);
- gtk_box_pack_start(GTK_BOX (GTK_DIALOG (md->dialog)->vbox),
- md->arrow4, TRUE,TRUE, 0);
+
+ content_area = gtk_dialog_get_content_area (GTK_DIALOG (md->dialog));
+ action_area = gtk_dialog_get_action_area (GTK_DIALOG (md->dialog));
+
+ gtk_box_pack_start(GTK_BOX (content_area), md->arrow1, TRUE,TRUE, 0);
+ gtk_box_pack_start(GTK_BOX (content_area), md->arrow2, TRUE,TRUE, 0);
+ gtk_box_pack_start(GTK_BOX (content_area), md->arrow3, TRUE,TRUE, 0);
+ gtk_box_pack_start(GTK_BOX (content_area), md->arrow4, TRUE,TRUE, 0);
g_signal_connect(GTK_OBJECT(md->dialog), "destroy",
G_CALLBACK (destroy), md->dialog);
md->image = GTK_IMAGE(gtk_image_new_from_file("circles.xbm"));
- gtk_box_pack_start(GTK_BOX (GTK_DIALOG (md->dialog)->vbox),
- GTK_WIDGET(md->image), TRUE,TRUE, 0);
+ gtk_box_pack_start(GTK_BOX (content_area), GTK_WIDGET(md->image), TRUE,TRUE, 0);
md->close_button = gtk_button_new_from_stock(GTK_STOCK_CLOSE);
g_signal_connect(GTK_OBJECT(md->close_button), "clicked",
G_CALLBACK (destroy), md->dialog);
- gtk_box_pack_start(GTK_BOX (GTK_DIALOG (md->dialog)->action_area),
- md->close_button, TRUE,TRUE, 0);
+ gtk_box_pack_start(GTK_BOX (action_area), md->close_button, TRUE,TRUE, 0);
gtk_widget_show_all(md->dialog);
visibleDialog = 1;