[gtk+] Fix the builder tests
- From: Johan Dahlin <johan src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtk+] Fix the builder tests
- Date: Thu, 10 Dec 2009 14:35:07 +0000 (UTC)
commit 6879032113bf72aa28272fc198339b0d6c62388e
Author: Johan Dahlin <johan gnome org>
Date: Thu Dec 10 12:04:14 2009 -0200
Fix the builder tests
gtk/tests/builder.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/gtk/tests/builder.c b/gtk/tests/builder.c
index 2ae604d..be24c36 100644
--- a/gtk/tests/builder.c
+++ b/gtk/tests/builder.c
@@ -1008,7 +1008,8 @@ test_children (void)
button = gtk_builder_get_object (builder, "button1");
g_assert (button != NULL);
g_assert (GTK_IS_BUTTON (button));
- g_assert (strcmp (GTK_WIDGET (GTK_WIDGET (button)->parent)->name, "window1") == 0);
+ g_assert (GTK_WIDGET(button)->parent != NULL);
+ g_assert (strcmp (gtk_buildable_get_name (GTK_BUILDABLE (GTK_WIDGET (button)->parent)), "window1") == 0);
gtk_widget_destroy (GTK_WIDGET (window));
g_object_unref (builder);
@@ -1024,10 +1025,9 @@ test_children (void)
vbox = gtk_builder_get_object (builder, "dialog1-vbox");
g_assert (vbox != NULL);
g_assert (GTK_IS_VBOX (vbox));
- g_assert (GTK_WIDGET (vbox)->parent != NULL);
- g_assert (strcmp (GTK_WIDGET (GTK_WIDGET (vbox)->parent)->name, "dialog1") == 0);
+ g_assert (strcmp (gtk_buildable_get_name (GTK_BUILDABLE (GTK_WIDGET (vbox)->parent)), "dialog1") == 0);
g_assert (GTK_CONTAINER (vbox)->border_width == 10);
- g_assert (strcmp (GTK_WIDGET (GTK_DIALOG (dialog)->vbox)->name, "dialog1-vbox") == 0);
+ g_assert (strcmp (gtk_buildable_get_name (GTK_BUILDABLE (GTK_DIALOG (dialog)->vbox)), "dialog1-vbox") == 0);
action_area = gtk_builder_get_object (builder, "dialog1-action_area");
g_assert (action_area != NULL);
@@ -1035,8 +1035,8 @@ test_children (void)
g_assert (GTK_WIDGET (action_area)->parent != NULL);
g_assert (GTK_CONTAINER (action_area)->border_width == 20);
g_assert (GTK_DIALOG (dialog)->action_area != NULL);
- g_assert (GTK_WIDGET (GTK_DIALOG (dialog)->action_area)->name != NULL);
- g_assert (strcmp (GTK_WIDGET (GTK_DIALOG (dialog)->action_area)->name, "dialog1-action_area") == 0);
+ g_assert (gtk_buildable_get_name (GTK_BUILDABLE (GTK_DIALOG (dialog)->action_area)) != NULL);
+ g_assert (strcmp (gtk_buildable_get_name (GTK_BUILDABLE (GTK_DIALOG (dialog)->action_area)), "dialog1-action_area") == 0);
gtk_widget_destroy (GTK_WIDGET (dialog));
g_object_unref (builder);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]