forked from AuroraMiddleware/gtk
builder: Use different construct-only property
The window type is going away, so use the css name instead.
This commit is contained in:
parent
264967b764
commit
fb856d96cd
@ -828,7 +828,7 @@ test_construct_only_property (void)
|
|||||||
const gchar buffer[] =
|
const gchar buffer[] =
|
||||||
"<interface>"
|
"<interface>"
|
||||||
" <object class=\"GtkWindow\" id=\"window1\">"
|
" <object class=\"GtkWindow\" id=\"window1\">"
|
||||||
" <property name=\"type\">popup</property>"
|
" <property name=\"css-name\">amazing</property>"
|
||||||
" </object>"
|
" </object>"
|
||||||
"</interface>";
|
"</interface>";
|
||||||
const gchar buffer2[] =
|
const gchar buffer2[] =
|
||||||
@ -839,12 +839,10 @@ test_construct_only_property (void)
|
|||||||
" </object>"
|
" </object>"
|
||||||
"</interface>";
|
"</interface>";
|
||||||
GObject *widget, *tagtable, *textbuffer;
|
GObject *widget, *tagtable, *textbuffer;
|
||||||
GtkWindowType type;
|
|
||||||
|
|
||||||
builder = builder_new_from_string (buffer, -1, NULL);
|
builder = builder_new_from_string (buffer, -1, NULL);
|
||||||
widget = gtk_builder_get_object (builder, "window1");
|
widget = gtk_builder_get_object (builder, "window1");
|
||||||
g_object_get (widget, "type", &type, NULL);
|
g_assert_cmpstr (gtk_widget_get_css_name (GTK_WIDGET (widget)), ==, "amazing");
|
||||||
g_assert (type == GTK_WINDOW_POPUP);
|
|
||||||
|
|
||||||
gtk_widget_destroy (GTK_WIDGET (widget));
|
gtk_widget_destroy (GTK_WIDGET (widget));
|
||||||
g_object_unref (builder);
|
g_object_unref (builder);
|
||||||
|
Loading…
Reference in New Issue
Block a user