[gtk+/wip/baedert/box: 38/68] testsuite/gtk: Use a GtkMenuButton to test exposing objects
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/box: 38/68] testsuite/gtk: Use a GtkMenuButton to test exposing objects
- Date: Mon, 17 Oct 2016 15:44:37 +0000 (UTC)
commit cf2c212d0755c6b56876f2c1ad04f586059c8e84
Author: Timm Bäder <mail baedert org>
Date: Fri Oct 14 16:01:26 2016 +0200
testsuite/gtk: Use a GtkMenuButton to test exposing objects
testsuite/gtk/builder.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/testsuite/gtk/builder.c b/testsuite/gtk/builder.c
index 1f9c6ec..888f9d5 100644
--- a/testsuite/gtk/builder.c
+++ b/testsuite/gtk/builder.c
@@ -2520,20 +2520,20 @@ test_expose_object (void)
{
GtkBuilder *builder;
GError *error = NULL;
- GtkWidget *image;
+ GtkWidget *menu;
GObject *obj;
const gchar buffer[] =
"<interface>"
- " <object class=\"GtkButton\" id=\"button\">"
- " <property name=\"image\">external_image</property>"
+ " <object class=\"GtkMenuButton\" id=\"button\">"
+ " <property name=\"popup\">external_menu</property>"
" <signal name=\"clicked\" handler=\"on_button_clicked\" object=\"builder\" swapped=\"no\"/>"
" <signal name=\"clicked\" handler=\"on_button_clicked_swapped\" object=\"builder\"/>"
" </object>"
"</interface>";
- image = gtk_image_new ();
+ menu = gtk_menu_new ();
builder = gtk_builder_new ();
- gtk_builder_expose_object (builder, "external_image", G_OBJECT (image));
+ gtk_builder_expose_object (builder, "external_menu", G_OBJECT (menu));
gtk_builder_expose_object (builder, "builder", G_OBJECT (builder));
gtk_builder_add_from_string (builder, buffer, -1, &error);
g_assert (error == NULL);
@@ -2541,7 +2541,7 @@ test_expose_object (void)
obj = gtk_builder_get_object (builder, "button");
g_assert (GTK_IS_BUTTON (obj));
- g_assert (gtk_button_get_image (GTK_BUTTON (obj)) == image);
+ g_assert (gtk_menu_button_get_popup (GTK_MENU_BUTTON (obj)) == GTK_MENU (menu));
/* Connect signals and fake clicked event */
gtk_builder_connect_signals (builder, NULL);
@@ -2551,7 +2551,7 @@ test_expose_object (void)
g_assert (external_object_swapped == G_OBJECT (builder));
g_object_unref (builder);
- g_object_unref (image);
+ g_object_unref (menu);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]