summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2011-04-04 12:04:16 -0400
committerMatthias Clasen <mclasen@redhat.com>2011-04-04 12:04:16 -0400
commitf7570ff5d37af5661dd406391c590c63266df7e0 (patch)
tree6f7c3f878f72a7171ce5d7335243cc35555b5aef
parent3.0.8 (diff)
downloadgtk3-classic-build-gtk3-f7570ff5d37af5661dd406391c590c63266df7e0.tar.gz
gtk3-classic-build-gtk3-f7570ff5d37af5661dd406391c590c63266df7e0.tar.bz2
gtk3-classic-build-gtk3-f7570ff5d37af5661dd406391c590c63266df7e0.zip
Add forgotten backport for grid flipping
-rw-r--r--0001-GtkGrid-Add-forgotten-RTL-flipping.patch43
-rw-r--r--gtk3.spec9
2 files changed, 51 insertions, 1 deletions
diff --git a/0001-GtkGrid-Add-forgotten-RTL-flipping.patch b/0001-GtkGrid-Add-forgotten-RTL-flipping.patch
new file mode 100644
index 0000000..42dcd06
--- /dev/null
+++ b/0001-GtkGrid-Add-forgotten-RTL-flipping.patch
@@ -0,0 +1,43 @@
+From 20ab58d79910d1829dadfbb717c354cf74a043b1 Mon Sep 17 00:00:00 2001
+From: Matthias Clasen <mclasen@redhat.com>
+Date: Wed, 30 Mar 2011 02:24:00 -0400
+Subject: [PATCH] GtkGrid: Add forgotten RTL flipping
+
+How did we manage to add a non-RTL savy container in GTK+ 3.0 ?
+---
+ gtk/gtkgrid.c | 4 ++++
+ tests/testgrid.c | 3 +++
+ 2 files changed, 7 insertions(+), 0 deletions(-)
+
+diff --git a/gtk/gtkgrid.c b/gtk/gtkgrid.c
+index bd305f6..56f6c16 100644
+--- a/gtk/gtkgrid.c
++++ b/gtk/gtkgrid.c
+@@ -1207,6 +1207,10 @@ gtk_grid_request_allocate_children (GtkGridRequest *request)
+ child_allocation.width = MAX (1, width);
+ child_allocation.height = MAX (1, height);
+
++ if (gtk_widget_get_direction (GTK_WIDGET (request->grid)) == GTK_TEXT_DIR_RTL)
++ child_allocation.x = allocation.x + allocation.width
++ - (child_allocation.x - allocation.x) - child_allocation.width;
++
+ gtk_widget_size_allocate (child->widget, &child_allocation);
+ }
+ }
+diff --git a/tests/testgrid.c b/tests/testgrid.c
+index a59aefe..f9e85bb 100644
+--- a/tests/testgrid.c
++++ b/tests/testgrid.c
+@@ -252,6 +252,9 @@ main (int argc, char *argv[])
+ {
+ gtk_init (NULL, NULL);
+
++ if (g_getenv ("RTL"))
++ gtk_widget_set_default_direction (GTK_TEXT_DIR_RTL);
++
+ simple_grid ();
+ text_grid ();
+ box_comparison ();
+--
+1.7.4.2
+
diff --git a/gtk3.spec b/gtk3.spec
index c81f7cb..01dc0e4 100644
--- a/gtk3.spec
+++ b/gtk3.spec
@@ -11,7 +11,7 @@
Summary: The GIMP ToolKit (GTK+), a library for creating GUIs for X
Name: gtk3
Version: 3.0.8
-Release: 1%{?dist}
+Release: 2%{?dist}
License: LGPLv2+
Group: System Environment/Libraries
URL: http://www.gtk.org
@@ -19,6 +19,9 @@ URL: http://www.gtk.org
Source: http://download.gnome.org/sources/gtk+/3.0/gtk+-%{version}.tar.bz2
Source1: im-cedilla.conf
+# upstream fix
+Patch0: 0001-GtkGrid-Add-forgotten-RTL-flipping.patch
+
BuildRequires: gnome-common autoconf automake intltool gettext
BuildRequires: atk-devel >= %{atk_version}
BuildRequires: glib2-devel >= %{glib2_version}
@@ -110,6 +113,7 @@ widget toolkit.
%prep
%setup -q -n gtk+-%{version}
+%patch0 -p1 -b .grid-flipping
%build
@@ -239,6 +243,9 @@ gtk-query-immodules-3.0-%{__isa_bits} --update-cache
%{_datadir}/gtk-doc
%changelog
+* Mon Apr 4 2011 Matthias Clasen <mclasen@redhat.com> - 3.0.8-2
+- Add a missed backport
+
* Sun Apr 3 2011 Matthias Clasen <mclasen@redhat.com> - 3.0.8-1
- Update to 3.0.8
bgstack15