You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
2.4 KiB
52 lines
2.4 KiB
Part of this commit upstream:
|
|
|
|
commit ca94ff10ce2ea57bfde7692aaa558b1260c9ff75
|
|
Author: Daniel Boles <dboles.src@gmail.com>
|
|
Date: Fri Jun 29 20:00:06 2018 +0100
|
|
|
|
testsuite/gtk/defaultvalue: Actually build...& fix
|
|
|
|
It looks like this got dropped during the move from autotools and never
|
|
restored. I can see why, since making it work wasn't a hugely fun task!
|
|
|
|
Notes on some less then obvious details:
|
|
* PlacesSidebar is private now and didn't seem to be to be particularly
|
|
easy to adapt to, so this moves to checking for it by name, not TYPE.
|
|
I couldn't find a (fast) better way; if you know how, please clean up
|
|
* added 2 casts to avoid warnings from the new type-propagating ref()
|
|
* GdkClipboard and GdkContentProvider need some properties dodged
|
|
* GtkToolItemGroup is gone
|
|
* fixed indentation and used TypeName:property-name syntax in a print()
|
|
|
|
diff --git a/gtk/tests/defaultvalue.c b/gtk/tests/defaultvalue.c
|
|
index 64a113c955822af0..b78dcd6f59353102 100644
|
|
--- a/gtk/tests/defaultvalue.c
|
|
+++ b/gtk/tests/defaultvalue.c
|
|
@@ -91,13 +91,13 @@ test_type (gconstpointer data)
|
|
klass = g_type_class_ref (type);
|
|
|
|
if (g_type_is_a (type, GTK_TYPE_SETTINGS))
|
|
- instance = g_object_ref (gtk_settings_get_default ());
|
|
+ instance = G_OBJECT (g_object_ref (gtk_settings_get_default ()));
|
|
else if (g_type_is_a (type, GDK_TYPE_PANGO_RENDERER))
|
|
- instance = g_object_ref (gdk_pango_renderer_get_default (gdk_screen_get_default ()));
|
|
+ instance = G_OBJECT (g_object_ref (gdk_pango_renderer_get_default (gdk_screen_get_default ())));
|
|
else if (g_type_is_a (type, GDK_TYPE_PIXMAP))
|
|
- instance = g_object_ref (gdk_pixmap_new (NULL, 1, 1, 1));
|
|
+ instance = G_OBJECT (g_object_ref (gdk_pixmap_new (NULL, 1, 1, 1)));
|
|
else if (g_type_is_a (type, GDK_TYPE_COLORMAP))
|
|
- instance = g_object_ref (gdk_colormap_new (gdk_visual_get_best (), TRUE));
|
|
+ instance = G_OBJECT (g_object_ref (gdk_colormap_new (gdk_visual_get_best (), TRUE)));
|
|
else if (g_type_is_a (type, GDK_TYPE_WINDOW))
|
|
{
|
|
GdkWindowAttr attributes;
|
|
@@ -105,7 +105,7 @@ test_type (gconstpointer data)
|
|
attributes.event_mask = 0;
|
|
attributes.width = 100;
|
|
attributes.height = 100;
|
|
- instance = g_object_ref (gdk_window_new (NULL, &attributes, 0));
|
|
+ instance = G_OBJECT (g_object_ref (gdk_window_new (NULL, &attributes, 0)));
|
|
}
|
|
else
|
|
instance = g_object_new (type, NULL);
|