diff options
author | Kalev Lember <kalevlember@gmail.com> | 2014-05-30 22:38:44 +0200 |
---|---|---|
committer | Kalev Lember <kalevlember@gmail.com> | 2014-05-30 22:38:44 +0200 |
commit | d743173952f55f2d61a63d6428b6c4df80d04a5c (patch) | |
tree | ff054f3bda0a5ad528385a8c9f5aa98b320d5fd2 | |
parent | Backport two fixes from git master (diff) | |
download | gtk3-classic-build-gtk3-d743173952f55f2d61a63d6428b6c4df80d04a5c.tar.gz gtk3-classic-build-gtk3-d743173952f55f2d61a63d6428b6c4df80d04a5c.tar.bz2 gtk3-classic-build-gtk3-d743173952f55f2d61a63d6428b6c4df80d04a5c.zip |
Backport a GtkBuilder fix to ensure types get fully initialized
-rw-r--r-- | 0003-GtkBuilder-Ensure-types-are-fully-initialized.patch | 39 | ||||
-rw-r--r-- | gtk3.spec | 7 |
2 files changed, 45 insertions, 1 deletions
diff --git a/0003-GtkBuilder-Ensure-types-are-fully-initialized.patch b/0003-GtkBuilder-Ensure-types-are-fully-initialized.patch new file mode 100644 index 0000000..f7fa0d4 --- /dev/null +++ b/0003-GtkBuilder-Ensure-types-are-fully-initialized.patch @@ -0,0 +1,39 @@ +From 6de6656d1f8d762093fe9d73f2713380573b9e39 Mon Sep 17 00:00:00 2001 +From: Matthias Clasen <mclasen@redhat.com> +Date: Fri, 30 May 2014 12:39:07 -0400 +Subject: [PATCH] GtkBuilder: Ensure types are fully initialized + +Just calling get_type() does not ensure that the signals, properties +and everything else gets set up properly. Ensure it is, by calling +g_type_class_ref() before using the type. This fixes the testcase +added in the previous commit. +--- + gtk/gtkbuilder.c | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/gtk/gtkbuilder.c b/gtk/gtkbuilder.c +index f6e5c52..60927df 100644 +--- a/gtk/gtkbuilder.c ++++ b/gtk/gtkbuilder.c +@@ -2275,10 +2275,17 @@ GType + gtk_builder_get_type_from_name (GtkBuilder *builder, + const gchar *type_name) + { ++ GType type; ++ + g_return_val_if_fail (GTK_IS_BUILDER (builder), G_TYPE_INVALID); + g_return_val_if_fail (type_name != NULL, G_TYPE_INVALID); + +- return GTK_BUILDER_GET_CLASS (builder)->get_type_from_name (builder, type_name); ++ type = GTK_BUILDER_GET_CLASS (builder)->get_type_from_name (builder, type_name); ++ ++ if (G_TYPE_IS_CLASSED (type)) ++ g_type_class_unref (g_type_class_ref (type)); ++ ++ return type; + } + + GQuark +-- +2.0.0 + @@ -17,7 +17,7 @@ Summary: The GIMP ToolKit (GTK+), a library for creating GUIs for X Name: gtk3 Version: 3.13.2 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPLv2+ Group: System Environment/Libraries URL: http://www.gtk.org @@ -27,6 +27,7 @@ Source: http://download.gnome.org/sources/gtk+/3.13/gtk+-%{version}.tar.xz # Backports from git master Patch1: 0001-eventcontroller-Ensure-controllers-stay-alive-during.patch Patch2: 0002-Revert-GtkMisc-Keep-gtk_misc_set_alignment-working.patch +Patch3: 0003-GtkBuilder-Ensure-types-are-fully-initialized.patch BuildRequires: gnome-common autoconf automake intltool gettext BuildRequires: atk-devel >= %{atk_version} @@ -144,6 +145,7 @@ the functionality of the installed %{name} package. %setup -q -n gtk+-%{version} %patch1 -p1 %patch2 -p1 +%patch3 -p1 %build @@ -309,6 +311,9 @@ gtk-query-immodules-3.0-%{__isa_bits} --update-cache %{_datadir}/installed-tests %changelog +* Fri May 30 2014 Kalev Lember <kalevlember@gmail.com> - 3.13.2-3 +- Backport a GtkBuilder fix to ensure types get fully initialized + * Fri May 30 2014 Kalev Lember <kalevlember@gmail.com> - 3.13.2-2 - Backport two fixes from git master |