rpms/gtk2/F-12 select-final-char.patch, NONE, 1.1 gtk2.spec, 1.409, 1.410

Matthias Clasen mclasen at fedoraproject.org
Fri Oct 9 05:14:09 UTC 2009


Author: mclasen

Update of /cvs/pkgs/rpms/gtk2/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv3468

Modified Files:
	gtk2.spec 
Added Files:
	select-final-char.patch 
Log Message:
Make selecting the final char work again


select-final-char.patch:
 gtklabel.c |   28 +++++++++++++---------------
 1 file changed, 13 insertions(+), 15 deletions(-)

--- NEW FILE select-final-char.patch ---
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index 22fc6fb..14afb5e 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -3778,6 +3778,7 @@ get_layout_index (GtkLabel *label,
   gint trailing = 0;
   const gchar *cluster;
   const gchar *cluster_end;
+  gboolean inside;
 
   *index = 0;
 
@@ -3788,24 +3789,21 @@ get_layout_index (GtkLabel *label,
   x *= PANGO_SCALE;
   y *= PANGO_SCALE;
 
-  if (pango_layout_xy_to_index (label->layout,
-                                x, y,
-                                index, &trailing))
-    {
-      cluster = label->text + *index;
-      cluster_end = cluster;
-      while (trailing)
-        {
-          cluster_end = g_utf8_next_char (cluster_end);
-          --trailing;
-        }
-
-      *index += (cluster_end - cluster);
+  inside = pango_layout_xy_to_index (label->layout,
+                                     x, y,
+                                     index, &trailing);
 
-      return TRUE;
+  cluster = label->text + *index;
+  cluster_end = cluster;
+  while (trailing)
+    {
+      cluster_end = g_utf8_next_char (cluster_end);
+      --trailing;
     }
 
-  return FALSE;
+  *index += (cluster_end - cluster);
+
+  return inside;
 }
 
 static void


Index: gtk2.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gtk2/F-12/gtk2.spec,v
retrieving revision 1.409
retrieving revision 1.410
diff -u -p -r1.409 -r1.410
--- gtk2.spec	5 Oct 2009 22:09:18 -0000	1.409
+++ gtk2.spec	9 Oct 2009 05:14:07 -0000	1.410
@@ -17,7 +17,7 @@
 Summary: The GIMP ToolKit (GTK+), a library for creating GUIs for X
 Name: gtk2
 Version: %{base_version}
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: LGPLv2+
 Group: System Environment/Libraries
 Source: http://download.gnome.org/sources/gtk+/2.18/gtk+-%{version}.tar.bz2
@@ -28,6 +28,9 @@ Source3: im-cedilla.conf
 # Biarch changes
 Patch0: gtk+-2.13.5-lib64.patch
 
+# from upstream
+Patch1: select-final-char.patch
+
 BuildRequires: atk-devel >= %{atk_version}
 BuildRequires: pango-devel >= %{pango_version}
 BuildRequires: glib2-devel >= %{glib2_version}
@@ -138,6 +141,7 @@ This package contains developer document
 %setup -q -n gtk+-%{version}
 
 %patch0 -p1 -b .lib64
+%patch1 -p1 -b .select-final-char
 
 %build
 libtoolize --force --copy
@@ -374,6 +378,9 @@ fi
 
 
 %changelog
+* Fri Oct  9 2009 Matthias Clasen <mclasen at redhat.com> - 2.18.2-2
+- Make selecting the final char work again (#528072)
+
 * Mon Oct  5 2009 Matthias Clasen <mclasen at redhat.com> - 2.18.2-1
 - Update to 2.18.2
 




More information about the fedora-extras-commits mailing list