File: gtk2-c89-5.patch

package info (click to toggle)
gtk%2B2.0 2.24.33-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 124,856 kB
  • sloc: ansic: 574,091; makefile: 5,172; sh: 4,624; xml: 1,193; python: 1,117; perl: 749; awk: 49; cpp: 34
file content (58 lines) | stat: -rw-r--r-- 2,633 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
From: Florian Weimer <fweimer@redhat.com>
Date: Sun, 21 Jan 2024 10:37:03 +0100
Subject: gtk2-c89-5

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()
---
 gtk/tests/defaultvalue.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/gtk/tests/defaultvalue.c b/gtk/tests/defaultvalue.c
index 64a113c..b78dcd6 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);