summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2011-02-02 01:18:32 -0500
committerMatthias Clasen <mclasen@redhat.com>2011-02-02 01:18:32 -0500
commitb9b5e3932c6a09a3559dea209fd4b7968b34c792 (patch)
tree351253c018f25725350198ad52de26a24a1a7e63
parent2.99.3 (diff)
downloadgtk3-classic-build-gtk3-b9b5e3932c6a09a3559dea209fd4b7968b34c792.tar.gz
gtk3-classic-build-gtk3-b9b5e3932c6a09a3559dea209fd4b7968b34c792.tar.bz2
gtk3-classic-build-gtk3-b9b5e3932c6a09a3559dea209fd4b7968b34c792.zip
Pick up a few upstream fixes
-rw-r--r--0001-Fix-another-GtkFixed-regression-in-gtk_fixed_forall.patch36
-rw-r--r--buildable-regression.patch120
-rw-r--r--gtk3.spec5
3 files changed, 161 insertions, 0 deletions
diff --git a/0001-Fix-another-GtkFixed-regression-in-gtk_fixed_forall.patch b/0001-Fix-another-GtkFixed-regression-in-gtk_fixed_forall.patch
new file mode 100644
index 0000000..4aa5d3c
--- /dev/null
+++ b/0001-Fix-another-GtkFixed-regression-in-gtk_fixed_forall.patch
@@ -0,0 +1,36 @@
+From 54c97f3ba2358c60fcc32404b67716e44384fb52 Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <mclasen@redhat.com>
+Date: Wed, 2 Feb 2011 00:40:02 -0500
+Subject: [PATCH 1/2] Fix another GtkFixed regression, in gtk_fixed_forall()
+
+b3f6f67c changed the loop from while() to for() in gtk_fixed_forall(),
+but that's wrong since the callback can have side-effects on the list,
+in case the current child gets removed. And that's the case when the
+widget is destroyed.
+
+Patch by Vincent Untz
+https://bugzilla.gnome.org/show_bug.cgi?id=641196
+---
+ gtk/gtkfixed.c | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+diff --git a/gtk/gtkfixed.c b/gtk/gtkfixed.c
+index fd92cd7..e453005 100644
+--- a/gtk/gtkfixed.c
++++ b/gtk/gtkfixed.c
+@@ -540,9 +540,11 @@ gtk_fixed_forall (GtkContainer *container,
+ GtkFixedChild *child;
+ GList *children;
+
+- for (children = priv->children; children; children = children->next)
++ children = priv->children;
++ while (children)
+ {
+ child = children->data;
++ children = children->next;
+
+ (* callback) (child->widget, callback_data);
+ }
+--
+1.7.3.5
+
diff --git a/buildable-regression.patch b/buildable-regression.patch
new file mode 100644
index 0000000..332ca90
--- /dev/null
+++ b/buildable-regression.patch
@@ -0,0 +1,120 @@
+diff --git a/gtk/gtkcelllayout.c b/gtk/gtkcelllayout.c
+index d0ff6ca..3fd59ad 100644
+--- a/gtk/gtkcelllayout.c
++++ b/gtk/gtkcelllayout.c
+@@ -807,37 +807,35 @@ cell_packing_end_element (GMarkupParseContext *context,
+ CellPackingSubParserData *parser_data = (CellPackingSubParserData*)user_data;
+ GtkCellArea *area;
+
+- /* Append the translated strings */
+- if (parser_data->string->len)
+- {
+- area = gtk_cell_layout_get_area (parser_data->cell_layout);
++ area = gtk_cell_layout_get_area (parser_data->cell_layout);
+
+- if (area)
++ if (area)
++ {
++ /* translate the string */
++ if (parser_data->string->len && parser_data->translatable)
+ {
+- if (parser_data->translatable)
+- {
+- gchar *translated;
+- const gchar* domain;
+-
+- domain = gtk_builder_get_translation_domain (parser_data->builder);
+-
+- translated = _gtk_builder_parser_translate (domain,
+- parser_data->context,
+- parser_data->string->str);
+- g_string_set_size (parser_data->string, 0);
+- g_string_append (parser_data->string, translated);
+- }
+-
+- gtk_cell_layout_buildable_set_cell_property (area,
+- parser_data->builder,
+- parser_data->renderer,
+- parser_data->cell_prop_name,
+- parser_data->string->str);
++ gchar *translated;
++ const gchar* domain;
++
++ domain = gtk_builder_get_translation_domain (parser_data->builder);
++
++ translated = _gtk_builder_parser_translate (domain,
++ parser_data->context,
++ parser_data->string->str);
++ g_string_set_size (parser_data->string, 0);
++ g_string_append (parser_data->string, translated);
+ }
+- else
+- g_warning ("%s does not have an internal GtkCellArea class and cannot apply child cell properties",
+- g_type_name (G_OBJECT_TYPE (parser_data->cell_layout)));
++
++ if (parser_data->cell_prop_name)
++ gtk_cell_layout_buildable_set_cell_property (area,
++ parser_data->builder,
++ parser_data->renderer,
++ parser_data->cell_prop_name,
++ parser_data->string->str);
+ }
++ else
++ g_warning ("%s does not have an internal GtkCellArea class and cannot apply child cell properties",
++ g_type_name (G_OBJECT_TYPE (parser_data->cell_layout)));
+
+ g_string_set_size (parser_data->string, 0);
+ g_free (parser_data->cell_prop_name);
+diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c
+index 5bf6f4d..18f046c 100644
+--- a/gtk/gtkcontainer.c
++++ b/gtk/gtkcontainer.c
+@@ -643,30 +643,28 @@ attributes_end_element (GMarkupParseContext *context,
+ {
+ PackingPropertiesData *parser_data = (PackingPropertiesData*)user_data;
+
+- /* Append the translated strings */
+- if (parser_data->string->len)
++ /* translate the string */
++ if (parser_data->string->len && parser_data->translatable)
+ {
+- if (parser_data->translatable)
+- {
+- gchar *translated;
+- const gchar* domain;
+-
+- domain = gtk_builder_get_translation_domain (parser_data->builder);
+-
+- translated = _gtk_builder_parser_translate (domain,
+- parser_data->context,
+- parser_data->string->str);
+- g_string_set_size (parser_data->string, 0);
+- g_string_append (parser_data->string, translated);
+- }
+-
+- gtk_container_buildable_set_child_property (parser_data->container,
+- parser_data->builder,
+- parser_data->child,
+- parser_data->child_prop_name,
++ gchar *translated;
++ const gchar* domain;
++
++ domain = gtk_builder_get_translation_domain (parser_data->builder);
++
++ translated = _gtk_builder_parser_translate (domain,
++ parser_data->context,
+ parser_data->string->str);
++ g_string_set_size (parser_data->string, 0);
++ g_string_append (parser_data->string, translated);
+ }
+
++ if (parser_data->child_prop_name)
++ gtk_container_buildable_set_child_property (parser_data->container,
++ parser_data->builder,
++ parser_data->child,
++ parser_data->child_prop_name,
++ parser_data->string->str);
++
+ g_string_set_size (parser_data->string, 0);
+ g_free (parser_data->child_prop_name);
+ g_free (parser_data->context);
diff --git a/gtk3.spec b/gtk3.spec
index f54354d..a4adef6 100644
--- a/gtk3.spec
+++ b/gtk3.spec
@@ -19,6 +19,8 @@ URL: http://www.gtk.org
Source: http://download.gnome.org/sources/gtk+/2.99/gtk+-%{version}.tar.bz2
Source1: im-cedilla.conf
Patch0: gtk3-build-fix.patch
+Patch1: 0001-Fix-another-GtkFixed-regression-in-gtk_fixed_forall.patch
+Patch2: buildable-regression.patch
BuildRequires: gnome-common autoconf automake intltool gettext
BuildRequires: atk-devel >= %{atk_version}
@@ -112,6 +114,8 @@ widget toolkit.
%prep
%setup -q -n gtk+-%{version}
%patch0 -p1 -b .build-fix
+%patch1 -p1 -b .fixed-destroy
+%patch2 -p1 -b .buildable-regression
%build
@@ -157,6 +161,7 @@ install -D %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit/xinput.d/im-cedill
rm $RPM_BUILD_ROOT%{_libdir}/*.la
rm $RPM_BUILD_ROOT%{_libdir}/gtk-3.0/*/*.la
rm $RPM_BUILD_ROOT%{_libdir}/gtk-3.0/%{bin_version}/*/*.la
+rm $RPM_BUILD_ROOT%{_libdir}/gtk-3.0/%{bin_version}/engines/libpixmap.so
touch $RPM_BUILD_ROOT%{_libdir}/gtk-3.0/%{bin_version}/immodules.cache
bgstack15