summaryrefslogtreecommitdiff
path: root/recipes/gtk+/gtk+-2.10.14
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/gtk+/gtk+-2.10.14
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/gtk+/gtk+-2.10.14')
-rw-r--r--recipes/gtk+/gtk+-2.10.14/automake-lossage.patch24
-rw-r--r--recipes/gtk+/gtk+-2.10.14/cell-renderer-edit-focus.patch30
-rw-r--r--recipes/gtk+/gtk+-2.10.14/combo-arrow-size.patch66
-rw-r--r--recipes/gtk+/gtk+-2.10.14/disable-print.patch50
-rw-r--r--recipes/gtk+/gtk+-2.10.14/disable-tooltips.patch11
-rw-r--r--recipes/gtk+/gtk+-2.10.14/gnome-bug-341177.patch217
-rw-r--r--recipes/gtk+/gtk+-2.10.14/gtk+-handhelds.patch149
-rw-r--r--recipes/gtk+/gtk+-2.10.14/hardcoded_libtool.patch29
-rw-r--r--recipes/gtk+/gtk+-2.10.14/integer-pixops.patch348
-rw-r--r--recipes/gtk+/gtk+-2.10.14/menu-deactivate.patch51
-rw-r--r--recipes/gtk+/gtk+-2.10.14/migration.patch611
-rw-r--r--recipes/gtk+/gtk+-2.10.14/no-demos.patch10
-rw-r--r--recipes/gtk+/gtk+-2.10.14/no-xwc.patch151
-rw-r--r--recipes/gtk+/gtk+-2.10.14/plana-pixops.patch569
-rw-r--r--recipes/gtk+/gtk+-2.10.14/range-no-redraw.patch41
-rw-r--r--recipes/gtk+/gtk+-2.10.14/run-iconcache.patch19
-rw-r--r--recipes/gtk+/gtk+-2.10.14/scroll-timings.patch11
-rw-r--r--recipes/gtk+/gtk+-2.10.14/scrolled-placement.patch35
-rw-r--r--recipes/gtk+/gtk+-2.10.14/single-click.patch56
-rw-r--r--recipes/gtk+/gtk+-2.10.14/small-gtkfilechooser.patch222
-rw-r--r--recipes/gtk+/gtk+-2.10.14/small-gtkfilesel.patch267
-rw-r--r--recipes/gtk+/gtk+-2.10.14/spinbutton.patch130
-rw-r--r--recipes/gtk+/gtk+-2.10.14/toggle-font.diff100
-rw-r--r--recipes/gtk+/gtk+-2.10.14/treeview-checkbox-size.patch100
24 files changed, 3297 insertions, 0 deletions
diff --git a/recipes/gtk+/gtk+-2.10.14/automake-lossage.patch b/recipes/gtk+/gtk+-2.10.14/automake-lossage.patch
new file mode 100644
index 0000000000..0d423ddbb9
--- /dev/null
+++ b/recipes/gtk+/gtk+-2.10.14/automake-lossage.patch
@@ -0,0 +1,24 @@
+--- gtk+-2.4.1/docs/tutorial/Makefile.am~ 2003-05-06 22:54:20.000000000 +0100
++++ gtk+-2.4.1/docs/tutorial/Makefile.am 2004-05-08 12:31:41.000000000 +0100
+@@ -52,21 +52,5 @@
+
+ dist-hook: html
+ cp -Rp $(srcdir)/html $(distdir)
+-else
+-html:
+- echo "***"
+- echo "*** Warning: Tutorial not built"
+- echo "***"
+-
+-pdf:
+- echo "***"
+- echo "*** Warning: Tutorial not built"
+- echo "***"
+-
+-dist-hook:
+- echo "***"
+- echo "*** Warning: Tutorial not built"
+- echo "*** DISTRIBUTION IS INCOMPLETE"
+- echo "***"
+ endif
+
diff --git a/recipes/gtk+/gtk+-2.10.14/cell-renderer-edit-focus.patch b/recipes/gtk+/gtk+-2.10.14/cell-renderer-edit-focus.patch
new file mode 100644
index 0000000000..aa7e276bec
--- /dev/null
+++ b/recipes/gtk+/gtk+-2.10.14/cell-renderer-edit-focus.patch
@@ -0,0 +1,30 @@
+Index: gtk/gtkcellrenderertext.c
+===================================================================
+--- gtk/gtkcellrenderertext.c (revision 18557)
++++ gtk/gtkcellrenderertext.c (working copy)
+@@ -1794,13 +1794,24 @@ gtk_cell_renderer_text_focus_out_event (
+ gpointer data)
+ {
+ GtkCellRendererTextPrivate *priv;
++ GtkSettings *settings;
++ gboolean in_touchscreen_mode = FALSE;
+
+ priv = GTK_CELL_RENDERER_TEXT_GET_PRIVATE (data);
+
+ if (priv->in_entry_menu)
+ return FALSE;
+
+- GTK_ENTRY (entry)->editing_canceled = TRUE;
++ if (gtk_widget_has_screen (entry))
++ settings = gtk_settings_get_for_screen (gtk_widget_get_screen (entry));
++ else
++ settings = gtk_settings_get_default ();
++
++ g_object_get (G_OBJECT (settings),
++ "gtk-touchscreen-mode", &in_touchscreen_mode,
++ NULL);
++
++ GTK_ENTRY (entry)->editing_canceled = !in_touchscreen_mode;
+ gtk_cell_editable_editing_done (GTK_CELL_EDITABLE (entry));
+ gtk_cell_editable_remove_widget (GTK_CELL_EDITABLE (entry));
+
diff --git a/recipes/gtk+/gtk+-2.10.14/combo-arrow-size.patch b/recipes/gtk+/gtk+-2.10.14/combo-arrow-size.patch
new file mode 100644
index 0000000000..ec408a5f28
--- /dev/null
+++ b/recipes/gtk+/gtk+-2.10.14/combo-arrow-size.patch
@@ -0,0 +1,66 @@
+Index: gtk/gtkcombobox.c
+===================================================================
+--- gtk/gtkcombobox.c.orig 2007-08-21 11:10:15.000000000 +0000
++++ gtk/gtkcombobox.c 2007-08-21 11:13:00.000000000 +0000
+@@ -692,6 +692,25 @@
+ FALSE,
+ GTK_PARAM_READABLE));
+
++ /**
++ * GtkComboBox:arrow-size:
++ *
++ * Sets the minimum size of the arrow in the combo box. Note
++ * that the arrow size is coupled to the font size, so in case
++ * a larger font is used, the arrow will be larger than set
++ * by arrow size.
++ *
++ * Since: 2.12
++ */
++ gtk_widget_class_install_style_property (widget_class,
++ g_param_spec_int ("arrow-size",
++ P_("Arrow Size"),
++ P_("The minimum size of the arrow in the combo box"),
++ 0,
++ G_MAXINT,
++ 15,
++ GTK_PARAM_READABLE));
++
+ g_type_class_add_private (object_class, sizeof (GtkComboBoxPrivate));
+ }
+
+@@ -1926,8 +1945,13 @@
+ {
+ GtkComboBox *combo_box = GTK_COMBO_BOX (widget);
+ gint focus_width, focus_pad;
++ gint font_size;
++ gint arrow_size;
+ GtkAllocation child;
+ GtkRequisition req;
++ PangoContext *context;
++ PangoFontMetrics *metrics;
++ PangoFontDescription *font_desc;
+ gboolean is_rtl = gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL;
+
+ widget->allocation = *allocation;
+@@ -1935,8 +1959,21 @@
+ gtk_widget_style_get (GTK_WIDGET (widget),
+ "focus-line-width", &focus_width,
+ "focus-padding", &focus_pad,
++ "arrow-size", &arrow_size,
+ NULL);
+
++ font_desc = GTK_BIN (widget)->child->style->font_desc;
++ context = gtk_widget_get_pango_context (widget);
++ metrics = pango_context_get_metrics (context, font_desc,
++ pango_context_get_language (context));
++ font_size = PANGO_PIXELS (pango_font_metrics_get_ascent (metrics) +
++ pango_font_metrics_get_descent (metrics));
++ pango_font_metrics_unref (metrics);
++
++ arrow_size = MAX (arrow_size, font_size);
++
++ gtk_widget_set_size_request (combo_box->priv->arrow, arrow_size, arrow_size);
++
+ if (!combo_box->priv->tree_view)
+ {
+ if (combo_box->priv->cell_view)
diff --git a/recipes/gtk+/gtk+-2.10.14/disable-print.patch b/recipes/gtk+/gtk+-2.10.14/disable-print.patch
new file mode 100644
index 0000000000..1067773f12
--- /dev/null
+++ b/recipes/gtk+/gtk+-2.10.14/disable-print.patch
@@ -0,0 +1,50 @@
+--- gtk+-2.10.0/configure.in~ 2006-07-05 18:11:44.000000000 +0200
++++ gtk+-2.10.0/configure.in 2006-07-05 18:11:44.000000000 +0200
+@@ -1539,26 +1539,27 @@
+ # Printing system checks
+ ################################################################
+
+-AC_PATH_PROG(CUPS_CONFIG, cups-config, no)
+-if test "x$CUPS_CONFIG" != "xno"; then
+- CUPS_CFLAGS=`cups-config --cflags | sed 's/-O[0-9]*//' | sed 's/-m[^\t]*//g'`
+- CUPS_LIBS=`cups-config --libs`
+-
+- CUPS_API_VERSION=`cups-config --api-version`
+- CUPS_API_MAJOR=`echo -n $CUPS_API_VERSION | awk -F. '{print $1}'`
+- CUPS_API_MINOR=`echo -n $CUPS_API_VERSION | awk -F. '{print $2}'`
+-
+- if test $CUPS_API_MAJOR -gt 1 -o \
+- $CUPS_API_MAJOR -eq 1 -a $CUPS_API_MINOR -ge 2; then
+- AC_DEFINE(HAVE_CUPS_API_1_2)
+- fi
+-
+- AC_SUBST(CUPS_API_MAJOR)
+- AC_SUBST(CUPS_API_MINOR)
+- AC_SUBST(CUPS_CFLAGS)
+- AC_SUBST(CUPS_LIBS)
+-fi
+-AM_CONDITIONAL(HAVE_CUPS, test "x$CUPS_CONFIG" != "xno")
++#AC_PATH_PROG(CUPS_CONFIG, cups-config, no)
++#if test "x$CUPS_CONFIG" != "xno"; then
++# CUPS_CFLAGS=`cups-config --cflags | sed 's/-O[0-9]*//' | sed 's/-m[^\t]*//g'`
++# CUPS_LIBS=`cups-config --libs`
++#
++# CUPS_API_VERSION=`cups-config --api-version`
++# CUPS_API_MAJOR=`echo -n $CUPS_API_VERSION | awk -F. '{print $1}'`
++# CUPS_API_MINOR=`echo -n $CUPS_API_VERSION | awk -F. '{print $2}'`
++#
++# if test $CUPS_API_MAJOR -gt 1 -o \
++# $CUPS_API_MAJOR -eq 1 -a $CUPS_API_MINOR -ge 2; then
++# AC_DEFINE(HAVE_CUPS_API_1_2)
++# fi
++#
++# AC_SUBST(CUPS_API_MAJOR)
++# AC_SUBST(CUPS_API_MINOR)
++# AC_SUBST(CUPS_CFLAGS)
++# AC_SUBST(CUPS_LIBS)
++#fi
++#AM_CONDITIONAL(HAVE_CUPS, test "x$CUPS_CONFIG" != "xno")
++AM_CONDITIONAL(HAVE_CUPS,false)
+
+ gtk_save_cppflags="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $GTK_DEP_CFLAGS"
diff --git a/recipes/gtk+/gtk+-2.10.14/disable-tooltips.patch b/recipes/gtk+/gtk+-2.10.14/disable-tooltips.patch
new file mode 100644
index 0000000000..d71d839c3c
--- /dev/null
+++ b/recipes/gtk+/gtk+-2.10.14/disable-tooltips.patch
@@ -0,0 +1,11 @@
+--- gtk+-2.4.3/gtk/gtktooltips.c.old 2004-07-04 18:52:04.000000000 +0100
++++ gtk+-2.4.3/gtk/gtktooltips.c 2004-07-04 18:52:08.000000000 +0100
+@@ -118,7 +118,7 @@
+ tooltips->tips_data_list = NULL;
+
+ tooltips->delay = DEFAULT_DELAY;
+- tooltips->enabled = TRUE;
++ tooltips->enabled = FALSE;
+ tooltips->timer_tag = 0;
+ tooltips->use_sticky_delay = FALSE;
+ tooltips->last_popdown.tv_sec = -1;
diff --git a/recipes/gtk+/gtk+-2.10.14/gnome-bug-341177.patch b/recipes/gtk+/gtk+-2.10.14/gnome-bug-341177.patch
new file mode 100644
index 0000000000..c31868462a
--- /dev/null
+++ b/recipes/gtk+/gtk+-2.10.14/gnome-bug-341177.patch
@@ -0,0 +1,217 @@
+diff -uprN gtk+-2.8.13.org/gdk-pixbuf/pixops/pixops.c gtk+-2.8.13.INNER_LOOP/gdk-pixbuf/pixops/pixops.c
+--- gtk+-2.8.13.org/gdk-pixbuf/pixops/pixops.c Tue Jul 12 18:58:57 2005
++++ gtk+-2.8.13.INNER_LOOP/gdk-pixbuf/pixops/pixops.c Tue May 9 17:30:53 2006
+@@ -71,35 +71,24 @@ get_check_shift (int check_size)
+ return check_shift;
+ }
+
+-static void
+-pixops_scale_nearest (guchar *dest_buf,
+- int render_x0,
+- int render_y0,
+- int render_x1,
+- int render_y1,
+- int dest_rowstride,
+- int dest_channels,
+- gboolean dest_has_alpha,
+- const guchar *src_buf,
+- int src_width,
+- int src_height,
+- int src_rowstride,
+- int src_channels,
+- gboolean src_has_alpha,
+- double scale_x,
+- double scale_y)
+-{
+- int i;
+- int x;
+- int x_step = (1 << SCALE_SHIFT) / scale_x;
+- int y_step = (1 << SCALE_SHIFT) / scale_y;
+- int xmax, xstart, xstop, x_pos, y_pos;
+- const guchar *p;
++typedef struct { guchar a,b,c; } b3;
++extern void BUG_bad_size_of_struct_b3(void);
+
+-#define INNER_LOOP(SRC_CHANNELS,DEST_CHANNELS,ASSIGN_PIXEL) \
++#define INNER_LOOP_PREP() \
++ do { \
++ x = render_x0 * x_step + x_step / 2; \
+ xmax = x + (render_x1 - render_x0) * x_step; \
+ xstart = MIN (0, xmax); \
+ xstop = MIN (src_width << SCALE_SHIFT, xmax); \
++ } while(0)
++
++#define INNER_LOOP_BODY(SRC_CHANNELS,DEST_CHANNELS,ASSIGN_PIXEL)\
++ do { \
++ y_pos = ((i + render_y0) * y_step + y_step / 2) >> SCALE_SHIFT; \
++ y_pos = CLAMP (y_pos, 0, src_height - 1); \
++ src = src_buf + y_pos * src_rowstride; \
++ dest = dest_buf + i * dest_rowstride; \
++ x = render_x0 * x_step + x_step / 2; \
+ p = src + (CLAMP (x, xstart, xstop) >> SCALE_SHIFT) * SRC_CHANNELS; \
+ while (x < xstart) \
+ { \
+@@ -121,42 +110,58 @@ pixops_scale_nearest (guchar *des
+ ASSIGN_PIXEL; \
+ dest += DEST_CHANNELS; \
+ x += x_step; \
+- }
++ } \
++ } while(0)
+
+- for (i = 0; i < (render_y1 - render_y0); i++)
+- {
+- const guchar *src;
+- guchar *dest;
+- y_pos = ((i + render_y0) * y_step + y_step / 2) >> SCALE_SHIFT;
+- y_pos = CLAMP (y_pos, 0, src_height - 1);
+- src = src_buf + y_pos * src_rowstride;
+- dest = dest_buf + i * dest_rowstride;
++static void
++pixops_scale_nearest (guchar *dest_buf,
++ int render_x0,
++ int render_y0,
++ int render_x1,
++ int render_y1,
++ int dest_rowstride,
++ int dest_channels,
++ gboolean dest_has_alpha,
++ const guchar *src_buf,
++ int src_width,
++ int src_height,
++ int src_rowstride,
++ int src_channels,
++ gboolean src_has_alpha,
++ double scale_x,
++ double scale_y)
++{
++ int i;
++ int x;
++ int x_step = (1 << SCALE_SHIFT) / scale_x;
++ int y_step = (1 << SCALE_SHIFT) / scale_y;
++ int xmax, xstart, xstop, x_pos, y_pos;
++ const guchar *p;
+
+- x = render_x0 * x_step + x_step / 2;
++ const guchar *src;
++ guchar *dest;
+
+- if (src_channels == 3)
+- {
+- if (dest_channels == 3)
+- {
+- INNER_LOOP (3, 3, dest[0]=p[0];dest[1]=p[1];dest[2]=p[2]);
+- }
+- else
+- {
+- INNER_LOOP (3, 4, dest[0]=p[0];dest[1]=p[1];dest[2]=p[2];dest[3]=0xff);
+- }
+- }
+- else if (src_channels == 4)
+- {
+- if (dest_channels == 3)
+- {
+- INNER_LOOP (4, 3, dest[0]=p[0];dest[1]=p[1];dest[2]=p[2]);
+- }
+- else
+- {
+- guint32 *p32;
+- INNER_LOOP(4, 4, p32=(guint32*)dest;*p32=*((guint32*)p));
+- }
+- }
++ if(sizeof(b3) != 3) BUG_bad_size_of_struct_b3();
++
++ INNER_LOOP_PREP();
++
++ if (src_channels == 3)
++ {
++ if (dest_channels == 3)
++ for (i = 0; i < (render_y1 - render_y0); i++)
++ INNER_LOOP_BODY (3, 3, *(b3*)dest = *(b3*)p);
++ else
++ for (i = 0; i < (render_y1 - render_y0); i++)
++ INNER_LOOP_BODY (3, 4, (*(b3*)dest = *(b3*)p, dest[3]=0xff) );
++ }
++ else if (src_channels == 4)
++ {
++ if (dest_channels == 3)
++ for (i = 0; i < (render_y1 - render_y0); i++)
++ INNER_LOOP_BODY (4, 3, *(b3*)dest = *(b3*)p);
++ else
++ for (i = 0; i < (render_y1 - render_y0); i++)
++ INNER_LOOP_BODY (4, 4, *(guint32*)dest = *((guint32*)p));
+ }
+ }
+
+@@ -187,18 +192,14 @@ pixops_composite_nearest (guchar
+ const guchar *p;
+ unsigned int a0;
+
++ INNER_LOOP_PREP();
++
+ for (i = 0; i < (render_y1 - render_y0); i++)
+ {
+ const guchar *src;
+ guchar *dest;
+- y_pos = ((i + render_y0) * y_step + y_step / 2) >> SCALE_SHIFT;
+- y_pos = CLAMP (y_pos, 0, src_height - 1);
+- src = src_buf + y_pos * src_rowstride;
+- dest = dest_buf + i * dest_rowstride;
+-
+- x = render_x0 * x_step + x_step / 2;
+
+- INNER_LOOP(src_channels, dest_channels,
++ INNER_LOOP_BODY(src_channels, dest_channels,
+ if (src_has_alpha)
+ a0 = (p[3] * overall_alpha) / 0xff;
+ else
+@@ -209,9 +210,7 @@ pixops_composite_nearest (guchar
+ case 0:
+ break;
+ case 255:
+- dest[0] = p[0];
+- dest[1] = p[1];
+- dest[2] = p[2];
++ *(b3*)dest = *(b3*)p;
+ if (dest_has_alpha)
+ dest[3] = 0xff;
+ break;
+@@ -279,17 +278,12 @@ pixops_composite_color_nearest (guchar
+ const guchar *p;
+ unsigned int a0;
+
++ INNER_LOOP_PREP();
++
+ for (i = 0; i < (render_y1 - render_y0); i++)
+ {
+ const guchar *src;
+ guchar *dest;
+- y_pos = ((i + render_y0) * y_step + y_step / 2) >> SCALE_SHIFT;
+- y_pos = CLAMP (y_pos, 0, src_height - 1);
+- src = src_buf + y_pos * src_rowstride;
+- dest = dest_buf + i * dest_rowstride;
+-
+- x = render_x0 * x_step + x_step / 2;
+-
+
+ if (((i + check_y) >> check_shift) & 1)
+ {
+@@ -313,7 +307,7 @@ pixops_composite_color_nearest (guchar
+ }
+
+ j = 0;
+- INNER_LOOP(src_channels, dest_channels,
++ INNER_LOOP_BODY(src_channels, dest_channels,
+ if (src_has_alpha)
+ a0 = (p[3] * overall_alpha + 0xff) >> 8;
+ else
+@@ -372,7 +366,8 @@ pixops_composite_color_nearest (guchar
+ );
+ }
+ }
+-#undef INNER_LOOP
++#undef INNER_LOOP_BODY
++#undef INNER_LOOP_PREP
+
+ static void
+ composite_pixel (guchar *dest, int dest_x, int dest_channels, int dest_has_alpha,
diff --git a/recipes/gtk+/gtk+-2.10.14/gtk+-handhelds.patch b/recipes/gtk+/gtk+-2.10.14/gtk+-handhelds.patch
new file mode 100644
index 0000000000..1ea86ce6b2
--- /dev/null
+++ b/recipes/gtk+/gtk+-2.10.14/gtk+-handhelds.patch
@@ -0,0 +1,149 @@
+Index: gtk+-2.10.6/gtk/gtkarrow.c
+===================================================================
+--- gtk+-2.10.6.orig/gtk/gtkarrow.c 2006-05-14 05:25:28.000000000 +0100
++++ gtk+-2.10.6/gtk/gtkarrow.c 2006-11-14 12:03:45.000000000 +0000
+@@ -31,7 +31,7 @@
+ #include "gtkintl.h"
+ #include "gtkalias.h"
+
+-#define MIN_ARROW_SIZE 15
++#define MIN_ARROW_SIZE 7
+
+ enum {
+ PROP_0,
+@@ -53,6 +53,8 @@
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec);
++static void gtk_arrow_size_request (GtkWidget *arrow,
++ GtkRequisition *requisition);
+
+
+ G_DEFINE_TYPE (GtkArrow, gtk_arrow, GTK_TYPE_MISC)
+@@ -88,6 +90,7 @@
+ GTK_PARAM_READWRITE));
+
+ widget_class->expose_event = gtk_arrow_expose;
++ widget_class->size_request = gtk_arrow_size_request;
+ }
+
+ static void
+@@ -143,13 +146,18 @@
+ }
+
+ static void
++gtk_arrow_size_request (GtkWidget *arrow,
++ GtkRequisition *requisition)
++{
++ requisition->width = MIN_ARROW_SIZE + GTK_MISC (arrow)->xpad * 2;
++ requisition->height = MIN_ARROW_SIZE + GTK_MISC (arrow)->ypad * 2;
++}
++
++static void
+ gtk_arrow_init (GtkArrow *arrow)
+ {
+ GTK_WIDGET_SET_FLAGS (arrow, GTK_NO_WINDOW);
+
+- GTK_WIDGET (arrow)->requisition.width = MIN_ARROW_SIZE + GTK_MISC (arrow)->xpad * 2;
+- GTK_WIDGET (arrow)->requisition.height = MIN_ARROW_SIZE + GTK_MISC (arrow)->ypad * 2;
+-
+ arrow->arrow_type = GTK_ARROW_RIGHT;
+ arrow->shadow_type = GTK_SHADOW_OUT;
+ }
+Index: gtk+-2.10.6/gtk/gtkentry.c
+===================================================================
+--- gtk+-2.10.6.orig/gtk/gtkentry.c 2006-11-14 12:03:45.000000000 +0000
++++ gtk+-2.10.6/gtk/gtkentry.c 2006-11-14 12:07:02.000000000 +0000
+@@ -577,6 +577,18 @@
+ 0.0,
+ GTK_PARAM_READWRITE));
+
++ // Added by gtk+-handhelds.patch
++ gtk_widget_class_install_style_property (widget_class,
++ g_param_spec_int ("min_width",
++ P_("Minimum width"),
++ P_("Minimum width of the entry field"),
++ 0,
++ G_MAXINT,
++ MIN_ENTRY_WIDTH,
++ G_PARAM_READABLE));
++
++
++
+ /**
+ * GtkEntry:truncate-multiline:
+ *
+@@ -1286,7 +1298,7 @@
+ {
+ GtkEntry *entry = GTK_ENTRY (widget);
+ PangoFontMetrics *metrics;
+- gint xborder, yborder;
++ gint xborder, yborder, min_width;
+ GtkBorder inner_border;
+ PangoContext *context;
+
+@@ -1302,8 +1314,10 @@
+ _gtk_entry_get_borders (entry, &xborder, &yborder);
+ _gtk_entry_effective_inner_border (entry, &inner_border);
+
++ gtk_widget_style_get (widget, "min_width", &min_width, NULL);
++
+ if (entry->width_chars < 0)
+- requisition->width = MIN_ENTRY_WIDTH + xborder * 2 + inner_border.left + inner_border.right;
++ requisition->width = min_width + xborder * 2 + inner_border.left + inner_border.right;
+ else
+ {
+ gint char_width = pango_font_metrics_get_approximate_char_width (metrics);
+Index: gtk+-2.10.6/gtk/gtkrange.c
+===================================================================
+--- gtk+-2.10.6.orig/gtk/gtkrange.c 2006-11-14 12:03:44.000000000 +0000
++++ gtk+-2.10.6/gtk/gtkrange.c 2006-11-14 12:07:40.000000000 +0000
+@@ -197,6 +197,7 @@
+ static gboolean gtk_range_key_press (GtkWidget *range,
+ GdkEventKey *event);
+
++static GdkAtom recognize_protocols_atom, atom_atom;
+
+ static guint signals[LAST_SIGNAL];
+
+@@ -213,6 +214,9 @@
+ object_class = (GtkObjectClass*) class;
+ widget_class = (GtkWidgetClass*) class;
+
++ recognize_protocols_atom = gdk_atom_intern ("RECOGNIZE_PROTOCOLS", FALSE);
++ atom_atom = gdk_atom_intern ("ATOM", FALSE);
++
+ gobject_class->set_property = gtk_range_set_property;
+ gobject_class->get_property = gtk_range_get_property;
+ gobject_class->finalize = gtk_range_finalize;
+@@ -1020,6 +1024,12 @@
+ &attributes, attributes_mask);
+ gdk_window_set_user_data (range->event_window, range);
+
++ gdk_property_change (range->event_window,
++ recognize_protocols_atom,
++ atom_atom,
++ 32, GDK_PROP_MODE_REPLACE,
++ NULL, 0);
++
+ widget->style = gtk_style_attach (widget->style, widget->window);
+ }
+
+@@ -1569,7 +1579,7 @@
+
+ /* ignore presses when we're already doing something else. */
+ if (range->layout->grab_location != MOUSE_OUTSIDE)
+- return FALSE;
++ return TRUE;
+
+ range->layout->mouse_x = event->x;
+ range->layout->mouse_y = event->y;
+@@ -1778,7 +1788,7 @@
+ return TRUE;
+ }
+
+- return FALSE;
++ return TRUE;
+ }
+
+ /**
diff --git a/recipes/gtk+/gtk+-2.10.14/hardcoded_libtool.patch b/recipes/gtk+/gtk+-2.10.14/hardcoded_libtool.patch
new file mode 100644
index 0000000000..6adb0cfef6
--- /dev/null
+++ b/recipes/gtk+/gtk+-2.10.14/hardcoded_libtool.patch
@@ -0,0 +1,29 @@
+--- /tmp/configure.in 2007-01-08 17:50:49.000000000 +0100
++++ gtk+-2.10.7/configure.in 2007-01-08 17:52:33.495251000 +0100
+@@ -371,7 +371,7 @@
+ case $enable_explicit_deps in
+ auto)
+ export SED
+- deplibs_check_method=`(./libtool --config; echo 'eval echo $deplibs_check_method') | sh`
++ deplibs_check_method=`(./$host_alias-libtool --config; echo 'eval echo $deplibs_check_method') | sh`
+ if test "x$deplibs_check_method" '!=' xpass_all || test "x$enable_static" = xyes ; then
+ enable_explicit_deps=yes
+ else
+@@ -773,7 +773,7 @@
+ dnl Now we check to see if our libtool supports shared lib deps
+ dnl (in a rather ugly way even)
+ if $dynworks; then
+- pixbuf_libtool_config="${CONFIG_SHELL-/bin/sh} ./libtool --config"
++ pixbuf_libtool_config="${CONFIG_SHELL-/bin/sh} ./$host_alias-libtool --config"
+ pixbuf_deplibs_check=`$pixbuf_libtool_config | \
+ grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \
+ sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'`
+@@ -1611,7 +1611,7 @@
+ # We are using gmodule-no-export now, but I'm leaving the stripping
+ # code in place for now, since pango and atk still require gmodule.
+ export SED
+-export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
++export_dynamic=`(./$host_alias-libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
+ if test -n "$export_dynamic"; then
+ GDK_PIXBUF_DEP_LIBS=`echo $GDK_PIXBUF_DEP_LIBS | sed -e "s/$export_dynamic//"`
+ GDK_PIXBUF_XLIB_DEP_LIBS=`echo $GDK_PIXBUF_XLIB_DEP_LIBS | sed -e "s/$export_dynamic//"`
diff --git a/recipes/gtk+/gtk+-2.10.14/integer-pixops.patch b/recipes/gtk+/gtk+-2.10.14/integer-pixops.patch
new file mode 100644
index 0000000000..490a60dd8a
--- /dev/null
+++ b/recipes/gtk+/gtk+-2.10.14/integer-pixops.patch
@@ -0,0 +1,348 @@
+--- /tmp/config.h.in 2006-12-23 00:00:38.000000000 +0100
++++ gtk+-2.10.6/config.h.in 2006-12-23 00:01:05.632227000 +0100
+@@ -253,3 +253,7 @@
+
+ /* Define to `int' if <sys/types.h> doesn't define. */
+ #undef uid_t
++
++/* Define to use integer math rather than floating point where possible. */
++#undef ENABLE_INTEGER_PIXOPS
++
+--- /tmp/configure.in 2006-12-23 00:02:16.000000000 +0100
++++ gtk+-2.10.6/configure.in 2006-12-23 00:05:11.172227000 +0100
+@@ -203,6 +203,15 @@
+ [AC_HELP_STRING([--disable-rebuilds],
+ [disable all source autogeneration rules])],,
+ [enable_rebuilds=yes])
++AC_ARG_ENABLE(integer-pixops,
++ [AC_HELP_STRING([--enable-integer-pixops],
++ [use integer math where possible])],,
++ [enable_integer_pixops=no])
++
++if test "x$enable_integer_pixops" = "xyes"; then
++ AC_DEFINE(ENABLE_INTEGER_PIXOPS)
++fi
++
+ AC_ARG_ENABLE(visibility,
+ [AC_HELP_STRING([--disable-visibility],
+ [don't use ELF visibility attributes])],,
+--- /tmp/pixops.c 2006-12-23 10:04:02.000000000 +0100
++++ gtk+-2.10.6/gdk-pixbuf/pixops/pixops.c 2006-12-23 10:04:21.772227000 +0100
+@@ -28,6 +28,10 @@
+ #define SUBSAMPLE_MASK ((1 << SUBSAMPLE_BITS)-1)
+ #define SCALE_SHIFT 16
+
++#ifdef ENABLE_INTEGER_PIXOPS
++#define FRAC 0x10000ULL
++#endif
++
+ typedef struct _PixopsFilter PixopsFilter;
+ typedef struct _PixopsFilterDimension PixopsFilterDimension;
+
+@@ -972,6 +976,29 @@
+ (*pixel_func) (dest, dest_x, dest_channels, dest_has_alpha, src_has_alpha, check_size, color1, color2, r, g, b, a);
+ }
+
++#ifdef ENABLE_INTEGER_PIXOPS
++
++static void
++correct_total (int *weights,
++ int n_x,
++ int n_y,
++ int total,
++ unsigned long overall_alpha)
++{
++ int correction = (int)(overall_alpha - total);
++ int i;
++ for (i = n_x * n_y - 1; i >= 0; i--)
++ {
++ if (*(weights + i) + correction >= 0)
++ {
++ *(weights + i) += correction;
++ break;
++ }
++ }
++}
++
++#else
++
+ static void
+ correct_total (int *weights,
+ int n_x,
+@@ -998,6 +1025,8 @@
+ }
+ }
+
++#endif
++
+ static int *
+ make_filter_table (PixopsFilter *filter)
+ {
+@@ -1026,7 +1055,11 @@
+ *(pixel_weights + n_x * i + j) = weight;
+ }
+
+- correct_total (pixel_weights, n_x, n_y, total, filter->overall_alpha);
++#ifdef ENABLE_INTEGER_PIXOPS
++ correct_total (pixel_weights, n_x, n_y, total, overall_alpha * FRAC);
++#else
++ correct_total (pixel_weights, n_x, n_y, total, overall_alpha);
++#endif
+ }
+
+ return weights;
+@@ -1178,6 +1211,93 @@
+ /* Compute weights for reconstruction by replication followed by
+ * sampling with a box filter
+ */
++#ifdef ENABLE_INTEGER_PIXOPS
++
++static void
++tile_make_weights (PixopsFilter *filter, double x_scale_d, double y_scale_d, double overall_alpha_d)
++{
++ int i_offset, j_offset;
++ unsigned long x_scale = x_scale_d * FRAC;
++ unsigned long y_scale = y_scale_d * FRAC;
++ unsigned long overall_alpha = overall_alpha_d * FRAC;
++ unsigned long x_scale_r = FRAC / x_scale;
++ unsigned long y_scale_r = FRAC / y_scale;
++
++ int n_x = ceil(1/x_scale_d + 1);
++ int n_y = ceil(1/y_scale_d + 1);
++
++ filter->x_offset = 0;
++ filter->y_offset = 0;
++ filter->n_x = n_x;
++ filter->n_y = n_y;
++ filter->weights = g_new (int, SUBSAMPLE * SUBSAMPLE * n_x * n_y);
++
++ for (i_offset=0; i_offset<SUBSAMPLE; i_offset++)
++ for (j_offset=0; j_offset<SUBSAMPLE; j_offset++)
++ {
++ int *pixel_weights = filter->weights + ((i_offset*SUBSAMPLE) + j_offset) * n_x * n_y;
++ unsigned long x = j_offset * FRAC / SUBSAMPLE;
++ unsigned long y = i_offset * FRAC / SUBSAMPLE;
++ int i,j;
++ int total = 0;
++
++ for (i = 0; i < n_y; i++)
++ {
++ unsigned long tw, th;
++
++ if (i < y)
++ {
++
++ if (i + FRAC > y)
++ th = MIN(i+FRAC, y + y_scale_r) - y;
++ else
++ th = 0;
++ }
++ else
++ {
++ if (y + FRAC/y_scale > i)
++ th = MIN(i+FRAC, y + y_scale_r) - i;
++ else
++ th = 0;
++ }
++
++ for (j = 0; j < n_x; j++)
++ {
++ int weight;
++
++ if (j < x)
++ {
++ if (j + FRAC > x)
++ tw = MIN(j+FRAC, x + x_scale_r) - x;
++ else
++ tw = 0;
++ }
++ else
++ {
++ if (x + FRAC/x_scale > j)
++ tw = MIN(j+FRAC, x + x_scale_r) - j;
++ else
++ tw = 0;
++ }
++
++ {
++ unsigned long lweight = (tw * x_scale) / FRAC;
++ lweight = (lweight * th) / FRAC;
++ lweight = (lweight * y_scale) / FRAC;
++ lweight = (lweight * overall_alpha) / FRAC;
++ weight = lweight;
++ }
++ total += weight;
++ *(pixel_weights + n_x * i + j) = weight;
++ }
++ }
++
++ correct_total (pixel_weights, n_x, n_y, total, overall_alpha);
++ }
++}
++
++#else
++
+ static void
+ tile_make_weights (PixopsFilterDimension *dim,
+ double scale)
+@@ -1216,10 +1336,151 @@
+ }
+ }
+
++#endif
++
+ /* Compute weights for a filter that, for minification
+ * is the same as 'tiles', and for magnification, is bilinear
+ * reconstruction followed by a sampling with a delta function.
+ */
++#ifdef ENABLE_INTEGER_PIXOPS
++
++static void
++bilinear_magnify_make_weights (PixopsFilter *filter, double x_scale_d, double y_scale_d, double overall_alpha_d)
++{
++ int i_offset, j_offset;
++ unsigned long *x_weights, *y_weights;
++ int n_x, n_y;
++ unsigned long x_scale = x_scale_d * FRAC;
++ unsigned long y_scale = y_scale_d * FRAC;
++ unsigned long overall_alpha = overall_alpha_d * FRAC;
++ unsigned long x_scale_r = (FRAC / x_scale_d);
++ unsigned long y_scale_r = (FRAC / y_scale_d);
++
++ if (x_scale > FRAC) /* Bilinear */
++ {
++ n_x = 2;
++ filter->x_offset = 0.5 * (1/x_scale_d - 1);
++ }
++ else /* Tile */
++ {
++ n_x = ceil(1.0 + 1.0/x_scale_d);
++ filter->x_offset = 0.0;
++ }
++
++ if (y_scale > FRAC) /* Bilinear */
++ {
++ n_y = 2;
++ filter->y_offset = 0.5 * (1/y_scale_d - 1);
++ }
++ else /* Tile */
++ {
++ n_y = ceil(1.0 + 1.0/y_scale_d);
++ filter->y_offset = 0.0;
++ }
++
++ filter->n_y = n_y;
++ filter->n_x = n_x;
++ filter->weights = g_new (int, SUBSAMPLE * SUBSAMPLE * n_x * n_y);
++
++ x_weights = g_new (unsigned long, n_x);
++ y_weights = g_new (unsigned long, n_y);
++
++ for (i_offset=0; i_offset<SUBSAMPLE; i_offset++)
++ for (j_offset=0; j_offset<SUBSAMPLE; j_offset++)
++ {
++ int *pixel_weights = filter->weights + ((i_offset*SUBSAMPLE) + j_offset) * n_x * n_y;
++ unsigned long x = j_offset * FRAC / SUBSAMPLE;
++ unsigned long y = i_offset * FRAC / SUBSAMPLE;
++ int i,j;
++ int total = 0;
++
++ if (x_scale > FRAC) /* Bilinear */
++ {
++ for (i = 0; i < n_x; i++)
++ {
++ /* x_weights[i] = ((i == 0) ? (1 - x) : x) / x_scale; */
++ unsigned long w = (((i == 0) ? (FRAC - x) : x) * x_scale_r);
++ x_weights[i] = w / FRAC;
++ }
++ }
++ else /* Tile */
++ {
++ /* x
++ * ---------|--.-|----|--.-|------- SRC
++ * ------------|---------|--------- DEST
++ */
++ for (i = 0; i < n_x; i++)
++ {
++ if (i < x)
++ {
++ if (i + 1 > x)
++ x_weights[i] = MIN(FRAC*(i+1), FRAC * x + (((unsigned long long)(FRAC * FRAC)) / (unsigned long)x_scale)) - (x * FRAC);
++ else
++ x_weights[i] = 0;
++ }
++ else
++ {
++ if (x + 1/x_scale > i)
++ x_weights[i] = MIN(FRAC*(i+1), FRAC * x + (((unsigned long long)(FRAC * FRAC)) / (unsigned long)x_scale)) - (i * FRAC);
++ else
++ x_weights[i] = 0;
++ }
++ }
++ }
++
++ if (y_scale > FRAC) /* Bilinear */
++ {
++ for (i = 0; i < n_y; i++)
++ {
++ unsigned long w = ((unsigned long)((i == 0) ? (FRAC - y) : y) * y_scale_r);
++ y_weights[i] = w / FRAC;
++ }
++ }
++ else /* Tile */
++ {
++ /* y
++ * ---------|--.-|----|--.-|------- SRC
++ * ------------|---------|--------- DEST
++ */
++ for (i = 0; i < n_y; i++)
++ {
++ if (i < y)
++ {
++ if (i + 1 > y)
++ y_weights[i] = MIN(FRAC*(i+1), FRAC * y + (FRAC * FRAC / (unsigned long)y_scale)) - (y * FRAC);
++ else
++ y_weights[i] = 0;
++ }
++ else
++ {
++ if (y + 1/y_scale > i)
++ y_weights[i] = MIN(FRAC*(i+1), FRAC * y + (FRAC * FRAC / (unsigned long)y_scale)) - (i * FRAC);
++ else
++ y_weights[i] = 0;
++ }
++ }
++ }
++
++ for (i = 0; i < n_y; i++)
++ for (j = 0; j < n_x; j++)
++ {
++ unsigned long long weight = (x_weights[j] * x_scale) / FRAC;
++ weight = (weight * y_weights[i]) / FRAC;
++ weight = (weight * y_scale) / FRAC;
++ weight = (weight * overall_alpha) / FRAC;
++ *(pixel_weights + n_x * i + j) = (unsigned long)weight;
++ total += (unsigned long)weight;
++ }
++
++ correct_total (pixel_weights, n_x, n_y, total, overall_alpha);
++ }
++
++ g_free (x_weights);
++ g_free (y_weights);
++}
++
++#else
++
+ static void
+ bilinear_magnify_make_weights (PixopsFilterDimension *dim,
+ double scale)
+@@ -1283,6 +1544,8 @@
+ }
+ }
+
++#endif
++
+ /* Computes the integral from b0 to b1 of
+ *
+ * f(x) = x; 0 <= x < 1
diff --git a/recipes/gtk+/gtk+-2.10.14/menu-deactivate.patch b/recipes/gtk+/gtk+-2.10.14/menu-deactivate.patch
new file mode 100644
index 0000000000..cfb8849e9f
--- /dev/null
+++ b/recipes/gtk+/gtk+-2.10.14/menu-deactivate.patch
@@ -0,0 +1,51 @@
+--- gtk+-2.10.0/gtk/gtkmenushell.c.orig 2006-07-05 17:17:34.000000000 +0200
++++ gtk+-2.10.0/gtk/gtkmenushell.c 2006-07-05 17:19:01.000000000 +0200
+@@ -42,7 +42,7 @@
+ #include "gtkintl.h"
+ #include "gtkalias.h"
+
+-#define MENU_SHELL_TIMEOUT 500
++#define MENU_SHELL_TIMEOUT 2000
+
+ #define PACK_DIRECTION(m) \
+ (GTK_IS_MENU_BAR (m) \
+@@ -203,6 +203,8 @@
+
+ G_DEFINE_TYPE (GtkMenuShell, gtk_menu_shell, GTK_TYPE_CONTAINER)
+
++static int last_crossing_time;
++
+ static void
+ gtk_menu_shell_class_init (GtkMenuShellClass *klass)
+ {
+@@ -517,6 +519,7 @@
+ gtk_grab_add (GTK_WIDGET (menu_shell));
+ menu_shell->have_grab = TRUE;
+ menu_shell->active = TRUE;
++ last_crossing_time = 0;
+ }
+ }
+
+@@ -669,6 +672,13 @@
+ menu_shell->activate_time = 0;
+ deactivate = FALSE;
+ }
++
++ if (last_crossing_time != 0
++ && ((event->time - last_crossing_time) < 500))
++ {
++ last_crossing_time = 0;
++ deactivate = FALSE;
++ }
+
+ if (deactivate)
+ {
+@@ -716,6 +726,8 @@
+ {
+ menu_item = gtk_get_event_widget ((GdkEvent*) event);
+
++ last_crossing_time = event->time;
++
+ if (!menu_item ||
+ (GTK_IS_MENU_ITEM (menu_item) &&
+ !_gtk_menu_item_is_selectable (menu_item)))
diff --git a/recipes/gtk+/gtk+-2.10.14/migration.patch b/recipes/gtk+/gtk+-2.10.14/migration.patch
new file mode 100644
index 0000000000..4ee786e688
--- /dev/null
+++ b/recipes/gtk+/gtk+-2.10.14/migration.patch
@@ -0,0 +1,611 @@
+Index: configure.in
+===================================================================
+--- configure.in.orig 2006-10-03 17:54:09.000000000 +0100
++++ configure.in 2006-10-30 12:58:33.000000000 +0000
+@@ -1529,6 +1529,16 @@
+ GTK_EXTRA_CFLAGS="$msnative_struct"
+ fi
+
++AC_ARG_ENABLE(display-migration,
++ [AC_HELP_STRING([--enable-display-migration],
++ [include support for GPE_CHANGE_DISPLAY protocol])],
++ enable_migration=yes, enable_migration=no)
++if test "$enable_migration" = "yes"; then
++ AC_DEFINE([ENABLE_MIGRATION], 1, [Define if display migration is enabled])
++ GTK_DEP_LIBS="$GTK_DEP_LIBS -lgcrypt"
++fi
++AM_CONDITIONAL(ENABLE_MIGRATION, test $enable_migration = "yes")
++
+ AC_SUBST(GTK_PACKAGES)
+ AC_SUBST(GTK_EXTRA_LIBS)
+ AC_SUBST(GTK_EXTRA_CFLAGS)
+Index: gtk/Makefile.am
+===================================================================
+--- gtk/Makefile.am.orig 2006-10-02 18:27:53.000000000 +0100
++++ gtk/Makefile.am 2006-10-30 12:59:14.000000000 +0000
+@@ -589,6 +589,11 @@
+ gtkwindow-decorate.c \
+ gtkwindow.c \
+ $(gtk_clipboard_dnd_c_sources)
++
++if ENABLE_MIGRATION
++gtk_base_c_sources += gtkmigration.c
++endif
++
+ gtk_c_sources = $(gtk_base_c_sources)
+ gtk_all_c_sources = $(gtk_base_c_sources)
+
+Index: gtk/gtkmain.c
+===================================================================
+--- gtk/gtkmain.c.orig 2006-09-03 06:31:21.000000000 +0100
++++ gtk/gtkmain.c 2006-10-30 12:56:34.000000000 +0000
+@@ -507,6 +507,10 @@
+ _gtk_accel_map_init ();
+ _gtk_rc_init ();
+
++#ifdef ENABLE_MIGRATION
++ gtk_migration_init ();
++#endif
++
+ /* Set the 'initialized' flag.
+ */
+ gtk_initialized = TRUE;
+Index: gtk/gtkmigration.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ gtk/gtkmigration.c 2006-10-30 12:56:34.000000000 +0000
+@@ -0,0 +1,529 @@
++/*
++ * Copyright (C) 2003, 2005 Philip Blundell <philb@gnu.org>
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation; either version
++ * 2 of the License, or (at your option) any later version.
++ */
++
++#include <stdlib.h>
++#include <ctype.h>
++#include <libintl.h>
++#include <string.h>
++#include <assert.h>
++
++#include <X11/X.h>
++#include <X11/Xlib.h>
++#include <X11/Xatom.h>
++
++#include <gcrypt.h>
++
++#include "gtk.h"
++#include "gdk.h"
++#include "x11/gdkx.h"
++
++#define _(x) gettext(x)
++
++static GdkAtom string_gdkatom, display_change_gdkatom;
++static GdkAtom rsa_challenge_gdkatom;
++
++#define DISPLAY_CHANGE_SUCCESS 0
++#define DISPLAY_CHANGE_UNABLE_TO_CONNECT 1
++#define DISPLAY_CHANGE_NO_SUCH_SCREEN 2
++#define DISPLAY_CHANGE_AUTHENTICATION_BAD 3
++#define DISPLAY_CHANGE_INDETERMINATE_ERROR 4
++
++static gboolean no_auth;
++
++static GSList *all_widgets;
++
++static gboolean gtk_migration_initialised;
++
++#define CHALLENGE_LEN 64
++
++gchar *gtk_migration_auth_challenge_string;
++
++static unsigned char challenge_bytes[CHALLENGE_LEN];
++static unsigned long challenge_seq;
++
++#define hexbyte(x) ((x) >= 10 ? (x) + 'a' - 10 : (x) + '0')
++
++struct rsa_key
++{
++ gcry_mpi_t n, e, d, p, q, u;
++};
++
++static gcry_mpi_t
++mpi_from_sexp (gcry_sexp_t r, char *tag)
++{
++ gcry_sexp_t s = gcry_sexp_find_token (r, tag, 0);
++ return gcry_sexp_nth_mpi (s, 1, GCRYMPI_FMT_USG);
++}
++
++static char *
++hex_from_mpi (gcry_mpi_t m)
++{
++ char *buf;
++ gcry_mpi_aprint (GCRYMPI_FMT_HEX, (void *)&buf, NULL, m);
++ return buf;
++}
++
++static void
++gtk_migration_crypt_create_hash (char *display, char *challenge, size_t len, char *result)
++{
++ size_t dlen = strlen (display);
++ gchar *buf = g_malloc (dlen + 1 + len);
++ strcpy (buf, display);
++ memcpy (buf + dlen + 1, challenge, len);
++ gcry_md_hash_buffer (GCRY_MD_SHA1, result, buf, len + dlen + 1);
++ g_free (buf);
++}
++
++static int
++do_encode_md (const unsigned char *digest, size_t digestlen, int algo,
++ unsigned int nbits, gcry_mpi_t *r_val)
++{
++ int nframe = (nbits+7) / 8;
++ unsigned char *frame;
++ int i, n;
++ unsigned char asn[100];
++ size_t asnlen;
++
++ asnlen = sizeof(asn);
++ if (gcry_md_algo_info (algo, GCRYCTL_GET_ASNOID, asn, &asnlen))
++ return -1;
++
++ if (digestlen + asnlen + 4 > nframe )
++ return -1;
++
++ /* We encode the MD in this way:
++ *
++ * 0 1 PAD(n bytes) 0 ASN(asnlen bytes) MD(len bytes)
++ *
++ * PAD consists of FF bytes.
++ */
++ frame = g_malloc (nframe);
++ n = 0;
++ frame[n++] = 0;
++ frame[n++] = 1; /* block type */
++ i = nframe - digestlen - asnlen -3 ;
++ assert ( i > 1 );
++ memset ( frame+n, 0xff, i ); n += i;
++ frame[n++] = 0;
++ memcpy ( frame+n, asn, asnlen ); n += asnlen;
++ memcpy ( frame+n, digest, digestlen ); n += digestlen;
++ assert ( n == nframe );
++
++ gcry_mpi_scan (r_val, GCRYMPI_FMT_USG, frame, nframe, &nframe);
++ g_free (frame);
++ return 0;
++}
++
++static gboolean
++gtk_migration_crypt_check_signature (struct rsa_key *k, char *hash, char *sigbuf)
++{
++ gcry_mpi_t mpi, mpi2;
++ gcry_sexp_t data, sig, key;
++ int rc;
++
++ do_encode_md (hash, 20, GCRY_MD_SHA1, 1024, &mpi);
++
++ gcry_sexp_build (&data, NULL, "(data (value %m))", mpi);
++
++ gcry_mpi_release (mpi);
++
++ gcry_sexp_build (&key, NULL, "(public-key (rsa (n %m) (e %m)))", k->n, k->e);
++
++ if (gcry_mpi_scan (&mpi2, GCRYMPI_FMT_HEX, sigbuf, 0, NULL))
++ {
++ gcry_sexp_release (data);
++ return FALSE;
++ }
++
++ gcry_sexp_build (&sig, NULL, "(sig-val (rsa (s %m)))", mpi2);
++
++ rc = gcry_pk_verify (sig, data, key);
++
++ gcry_sexp_release (data);
++ gcry_sexp_release (key);
++ gcry_sexp_release (sig);
++ gcry_mpi_release (mpi2);
++
++ if (rc)
++ return FALSE;
++
++ return TRUE;
++}
++
++static void
++gtk_migration_auth_update_challenge (void)
++{
++ int i;
++ unsigned char *p;
++
++ if (gtk_migration_auth_challenge_string == NULL)
++ gtk_migration_auth_challenge_string = g_malloc ((CHALLENGE_LEN * 2) + 9);
++
++ p = gtk_migration_auth_challenge_string;
++
++ for (i = 0; i < CHALLENGE_LEN; i++)
++ {
++ *p++ = hexbyte (challenge_bytes[i] >> 4);
++ *p++ = hexbyte (challenge_bytes[i] & 15);
++ }
++
++ sprintf (p, "%08lx", challenge_seq++);
++}
++
++static void
++gtk_migration_auth_generate_challenge (void)
++{
++ gcry_randomize (challenge_bytes, sizeof (challenge_bytes), GCRY_STRONG_RANDOM);
++ gtk_migration_auth_update_challenge ();
++}
++
++static struct rsa_key *
++parse_pubkey (char *s)
++{
++ struct rsa_key *r;
++ gcry_mpi_t n, e;
++ gchar *sp;
++
++ sp = strtok (s, " \n");
++ gcry_mpi_scan (&e, GCRYMPI_FMT_HEX, sp, 0, NULL);
++ sp = strtok (NULL, " \n");
++ gcry_mpi_scan (&n, GCRYMPI_FMT_HEX, sp, 0, NULL);
++
++ r = g_malloc0 (sizeof (struct rsa_key));
++ r->e = e;
++ r->n = n;
++ return r;
++}
++
++static struct rsa_key *
++lookup_pubkey (u_int32_t id)
++{
++ const gchar *home_dir = g_get_home_dir ();
++ gchar *filename = g_strdup_printf ("%s/.gpe/migrate/public", home_dir);
++ FILE *fp = fopen (filename, "r");
++ struct rsa_key *r = NULL;
++
++ if (fp)
++ {
++ while (!feof (fp))
++ {
++ char buffer[4096];
++ if (fgets (buffer, 4096, fp))
++ {
++ char *p;
++ u_int32_t this_id = strtoul (buffer, &p, 16);
++ if (p != buffer && *p == ' ')
++ {
++#ifdef DEBUG
++ fprintf (stderr, "found id %x\n", this_id);
++#endif
++ if (this_id == id)
++ {
++ r = parse_pubkey (++p);
++ break;
++ }
++ }
++ }
++ }
++ fclose (fp);
++ }
++
++ g_free (filename);
++ return r;
++}
++
++static void
++free_pubkey (struct rsa_key *k)
++{
++ gcry_mpi_release (k->n);
++ gcry_mpi_release (k->e);
++
++ g_free (k);
++}
++
++static gboolean
++gtk_migration_auth_validate_request (char *display, char *data)
++{
++ u_int32_t key_id;
++ char *ep;
++ char *p;
++ struct rsa_key *k;
++ char hash[20];
++ gboolean rc;
++
++ p = strchr (data, ' ');
++ if (p == NULL)
++ return FALSE;
++ *p++ = 0;
++
++ key_id = strtoul (data, &ep, 16);
++ if (*ep)
++ return FALSE;
++
++ k = lookup_pubkey (key_id);
++ if (k == NULL)
++ return FALSE;
++
++ gtk_migration_crypt_create_hash (display, gtk_migration_auth_challenge_string,
++ strlen (gtk_migration_auth_challenge_string), hash);
++
++ rc = gtk_migration_crypt_check_signature (k, hash, p);
++
++ free_pubkey (k);
++
++ return rc;
++}
++
++static int
++do_change_display (GtkWidget *w, char *display_name)
++{
++ GdkDisplay *newdisplay;
++ guint screen_nr = 1;
++ guint i;
++
++ if (display_name[0] == 0)
++ return DISPLAY_CHANGE_INDETERMINATE_ERROR;
++
++ i = strlen (display_name) - 1;
++ while (i > 0 && isdigit (display_name[i]))
++ i--;
++
++ if (display_name[i] == '.')
++ {
++ screen_nr = atoi (display_name + i + 1);
++ display_name[i] = 0;
++ }
++
++ newdisplay = gdk_display_open (display_name);
++ if (newdisplay)
++ {
++ GdkScreen *screen = gdk_display_get_screen (newdisplay, screen_nr);
++ if (screen)
++ {
++ gtk_window_set_screen (GTK_WINDOW (w), screen);
++ gdk_display_manager_set_default_display (gdk_display_manager_get (),
++ newdisplay);
++ return DISPLAY_CHANGE_SUCCESS;
++ }
++ else
++ return DISPLAY_CHANGE_NO_SUCH_SCREEN;
++ }
++
++ return DISPLAY_CHANGE_UNABLE_TO_CONNECT;
++}
++
++static void
++set_challenge_on_window (GdkWindow *window)
++{
++ gdk_property_change (window, rsa_challenge_gdkatom, string_gdkatom,
++ 8, GDK_PROP_MODE_REPLACE, gtk_migration_auth_challenge_string,
++ strlen (gtk_migration_auth_challenge_string));
++}
++
++static void
++update_challenge_on_windows (void)
++{
++ GSList *i;
++
++ gtk_migration_auth_update_challenge ();
++
++ for (i = all_widgets; i; i = i->next)
++ {
++ GtkWidget *w = GTK_WIDGET (i->data);
++ if (w->window)
++ set_challenge_on_window (w->window);
++ }
++}
++
++static void
++reset_state (GdkWindow *window)
++{
++ gdk_property_change (window, display_change_gdkatom, string_gdkatom,
++ 8, GDK_PROP_MODE_REPLACE, NULL, 0);
++}
++
++static void
++generate_response (GdkDisplay *gdisplay, Display *dpy, Window window, int code)
++{
++ XClientMessageEvent ev;
++ Atom atom = gdk_x11_atom_to_xatom_for_display (gdisplay,
++ display_change_gdkatom);
++
++ memset (&ev, 0, sizeof (ev));
++
++ ev.type = ClientMessage;
++ ev.window = window;
++ ev.message_type = atom;
++ ev.format = 32;
++
++ ev.data.l[0] = window;
++ ev.data.l[1] = code;
++
++ XSendEvent (dpy, DefaultRootWindow (dpy), False, SubstructureNotifyMask, (XEvent *)&ev);
++}
++
++static int
++handle_request (GdkWindow *gwindow, char *prop)
++{
++ GtkWidget *widget;
++ char *target, *auth_method, *auth_data;
++ char *p;
++
++ target = prop;
++ auth_method = "NULL";
++ auth_data = NULL;
++
++ p = strchr (prop, ' ');
++ if (p)
++ {
++ *p = 0;
++ auth_method = ++p;
++
++ p = strchr (p, ' ');
++ if (p)
++ {
++ *p = 0;
++ auth_data = ++p;
++ }
++ }
++
++ if (no_auth == FALSE)
++ {
++ if (!strcasecmp (auth_method, "null"))
++ return DISPLAY_CHANGE_AUTHENTICATION_BAD;
++ else if (!strcasecmp (auth_method, "rsa-sig"))
++ {
++ if (gtk_migration_auth_validate_request (target, auth_data) == FALSE)
++ return DISPLAY_CHANGE_AUTHENTICATION_BAD;
++ }
++ else
++ return DISPLAY_CHANGE_AUTHENTICATION_BAD;
++ }
++
++ gdk_window_get_user_data (gwindow, (gpointer*) &widget);
++
++ if (widget)
++ return do_change_display (widget, target);
++
++ return DISPLAY_CHANGE_INDETERMINATE_ERROR;
++}
++
++static GdkFilterReturn
++filter_func (GdkXEvent *xevp, GdkEvent *ev, gpointer p)
++{
++ XPropertyEvent *xev = (XPropertyEvent *)xevp;
++
++ if (xev->type == PropertyNotify)
++ {
++ GdkDisplay *gdisplay;
++ Atom atom;
++
++ gdisplay = gdk_x11_lookup_xdisplay (xev->display);
++ if (gdisplay)
++ {
++ atom = gdk_x11_atom_to_xatom_for_display (gdisplay, display_change_gdkatom);
++
++ if (xev->atom == atom)
++ {
++ GdkWindow *gwindow;
++
++ gwindow = gdk_window_lookup_for_display (gdisplay, xev->window);
++
++ if (gwindow)
++ {
++ GdkAtom actual_type;
++ gint actual_format;
++ gint actual_length;
++ unsigned char *prop = NULL;
++
++ if (gdk_property_get (gwindow, display_change_gdkatom, string_gdkatom,
++ 0, G_MAXLONG, FALSE, &actual_type, &actual_format,
++ &actual_length, &prop))
++ {
++ if (actual_length != 0)
++ {
++ if (actual_type == string_gdkatom && actual_length > 8)
++ {
++ gchar *buf = g_malloc (actual_length + 1);
++ int rc;
++
++ memcpy (buf, prop, actual_length);
++ buf[actual_length] = 0;
++
++ rc = handle_request (gwindow, buf);
++
++ g_free (buf);
++ generate_response (gdisplay, xev->display, xev->window, rc);
++
++ if (rc == DISPLAY_CHANGE_SUCCESS)
++ update_challenge_on_windows ();
++ }
++
++ reset_state (gwindow);
++ }
++ }
++
++ if (prop)
++ g_free (prop);
++ }
++ }
++
++ return GDK_FILTER_REMOVE;
++ }
++ }
++
++ return GDK_FILTER_CONTINUE;
++}
++
++static void
++unrealize_window (GtkWidget *w)
++{
++ all_widgets = g_slist_remove (all_widgets, w);
++}
++
++void
++gtk_migration_mark_window (GtkWidget *w)
++{
++ if (! gtk_migration_initialised)
++ {
++ g_warning ("gtk_migration not initialised yet");
++ return;
++ }
++
++ if (GTK_WIDGET_REALIZED (w))
++ {
++ GdkWindow *window = w->window;
++
++ gdk_window_add_filter (window, filter_func, NULL);
++
++ reset_state (window);
++ set_challenge_on_window (window);
++
++ all_widgets = g_slist_append (all_widgets, w);
++
++ g_signal_connect (G_OBJECT (w), "unrealize", G_CALLBACK (unrealize_window), NULL);
++ }
++ else
++ g_signal_connect (G_OBJECT (w), "realize", G_CALLBACK (gtk_migration_mark_window), NULL);
++}
++
++void
++gtk_migration_init (void)
++{
++ if (getenv ("GPE_DISPLAY_MIGRATION_NO_AUTH") != NULL)
++ no_auth = TRUE;
++
++ string_gdkatom = gdk_atom_intern ("STRING", FALSE);
++ display_change_gdkatom = gdk_atom_intern ("_GPE_DISPLAY_CHANGE", FALSE);
++ rsa_challenge_gdkatom = gdk_atom_intern ("_GPE_DISPLAY_CHANGE_RSA_CHALLENGE", FALSE);
++
++ gtk_migration_auth_generate_challenge ();
++
++ gtk_migration_initialised = TRUE;
++}
+Index: gtk/gtkwindow.c
+===================================================================
+--- gtk/gtkwindow.c.orig 2006-10-03 16:51:46.000000000 +0100
++++ gtk/gtkwindow.c 2006-10-30 12:56:34.000000000 +0000
+@@ -50,6 +50,9 @@
+ #include "x11/gdkx.h"
+ #endif
+
++extern void gtk_migration_mark_window (GtkWidget *w);
++
++
+ enum {
+ SET_FOCUS,
+ FRAME_EVENT,
+@@ -823,6 +826,10 @@
+
+ g_signal_connect (window->screen, "composited_changed",
+ G_CALLBACK (gtk_window_on_composited_changed), window);
++
++#ifdef ENABLE_MIGRATION
++ gtk_migration_mark_window (window);
++#endif
+ }
+
+ static void
diff --git a/recipes/gtk+/gtk+-2.10.14/no-demos.patch b/recipes/gtk+/gtk+-2.10.14/no-demos.patch
new file mode 100644
index 0000000000..0fc4c48d1a
--- /dev/null
+++ b/recipes/gtk+/gtk+-2.10.14/no-demos.patch
@@ -0,0 +1,10 @@
+--- gtk+-2.10.1/Makefile.am.orig 2006-08-08 12:37:30.000000000 +0100
++++ gtk+-2.10.1/Makefile.am 2006-08-08 12:37:48.000000000 +0100
+@@ -1,6 +1,6 @@
+ ## Makefile.am for GTK+
+
+-SRC_SUBDIRS = gdk-pixbuf gdk gtk modules demos tests perf contrib
++SRC_SUBDIRS = gdk-pixbuf gdk gtk modules tests perf contrib
+ SUBDIRS = po po-properties $(SRC_SUBDIRS) docs m4macros
+
+ # require automake 1.4
diff --git a/recipes/gtk+/gtk+-2.10.14/no-xwc.patch b/recipes/gtk+/gtk+-2.10.14/no-xwc.patch
new file mode 100644
index 0000000000..affb4a303e
--- /dev/null
+++ b/recipes/gtk+/gtk+-2.10.14/no-xwc.patch
@@ -0,0 +1,151 @@
+diff -urNd ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c
+--- ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c 2004-11-30 14:57:14 +00:00
++++ gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c 2005-01-02 15:38:06 +00:00
+@@ -576,12 +576,14 @@
+ GDK_GC_GET_XGC (gc), x, y, (XChar2b *) text, text_length / 2);
+ }
+ }
++#ifdef HAVE_XWC
+ else if (font->type == GDK_FONT_FONTSET)
+ {
+ XFontSet fontset = (XFontSet) GDK_FONT_XFONT (font);
+ XmbDrawString (xdisplay, impl->xid,
+ fontset, GDK_GC_GET_XGC (gc), x, y, text, text_length);
+ }
++#endif
+ else
+ g_error("undefined font type\n");
+ }
+@@ -613,6 +615,7 @@
+ GDK_GC_GET_XGC (gc), x, y, text_8bit, text_length);
+ g_free (text_8bit);
+ }
++#ifdef HAVE_XWC
+ else if (font->type == GDK_FONT_FONTSET)
+ {
+ if (sizeof(GdkWChar) == sizeof(wchar_t))
+@@ -633,6 +636,7 @@
+ g_free (text_wchar);
+ }
+ }
++#endif
+ else
+ g_error("undefined font type\n");
+ }
+diff -urNd ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkfont-x11.c gtk+-2.6.0/gdk/x11/gdkfont-x11.c
+--- ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkfont-x11.c 2004-08-26 01:23:46 +01:00
++++ gtk+-2.6.0/gdk/x11/gdkfont-x11.c 2005-01-02 15:45:39 +00:00
+@@ -525,10 +525,12 @@
+ width = XTextWidth16 (xfont, (XChar2b *) text, text_length / 2);
+ }
+ break;
++#ifdef HAVE_XWC
+ case GDK_FONT_FONTSET:
+ fontset = (XFontSet) private->xfont;
+ width = XmbTextEscapement (fontset, text, text_length);
+ break;
++#endif
+ default:
+ width = 0;
+ }
+@@ -578,6 +580,7 @@
+ width = 0;
+ }
+ break;
++#ifdef HAVE_XWC
+ case GDK_FONT_FONTSET:
+ if (sizeof(GdkWChar) == sizeof(wchar_t))
+ {
+@@ -595,6 +598,7 @@
+ g_free (text_wchar);
+ }
+ break;
++#endif
+ default:
+ width = 0;
+ }
+@@ -667,6 +671,7 @@
+ if (descent)
+ *descent = overall.descent;
+ break;
++#ifdef HAVE_XWC
+ case GDK_FONT_FONTSET:
+ fontset = (XFontSet) private->xfont;
+ XmbTextExtents (fontset, text, text_length, &ink, &logical);
+@@ -681,6 +686,7 @@
+ if (descent)
+ *descent = ink.y + ink.height;
+ break;
++#endif
+ }
+
+ }
+@@ -753,6 +759,7 @@
+ *descent = overall.descent;
+ break;
+ }
++#ifdef HAVE_XWC
+ case GDK_FONT_FONTSET:
+ fontset = (XFontSet) private->xfont;
+
+@@ -780,6 +787,7 @@
+ if (descent)
+ *descent = ink.y + ink.height;
+ break;
++#endif
+ }
+
+ }
+diff -urNd ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkim-x11.c gtk+-2.6.0/gdk/x11/gdkim-x11.c
+--- ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkim-x11.c 2004-11-17 00:55:10 +00:00
++++ gtk+-2.6.0/gdk/x11/gdkim-x11.c 2005-01-02 15:42:04 +00:00
+@@ -48,6 +48,7 @@
+ void
+ _gdk_x11_initialize_locale (void)
+ {
++#ifdef HAVE_XWC
+ wchar_t result;
+ gchar *current_locale;
+ static char *last_locale = NULL;
+@@ -93,7 +94,8 @@
+ GDK_NOTE (XIM,
+ g_message ("%s multi-byte string functions.",
+ gdk_use_mb ? "Using" : "Not using"));
+-
++#endif
++
+ return;
+ }
+
+@@ -136,6 +138,7 @@
+ {
+ gchar *mbstr;
+
++#ifdef HAVE_XWC
+ if (gdk_use_mb)
+ {
+ GdkDisplay *display = find_a_display ();
+@@ -178,6 +181,7 @@
+ XFree (tpr.value);
+ }
+ else
++#endif
+ {
+ gint length = 0;
+ gint i;
+@@ -210,6 +214,7 @@
+ gint
+ gdk_mbstowcs (GdkWChar *dest, const gchar *src, gint dest_max)
+ {
++#ifdef HAVE_XWC
+ if (gdk_use_mb)
+ {
+ GdkDisplay *display = find_a_display ();
+@@ -242,6 +247,7 @@
+ return len_cpy;
+ }
+ else
++#endif
+ {
+ gint i;
+
diff --git a/recipes/gtk+/gtk+-2.10.14/plana-pixops.patch b/recipes/gtk+/gtk+-2.10.14/plana-pixops.patch
new file mode 100644
index 0000000000..21fe4879c5
--- /dev/null
+++ b/recipes/gtk+/gtk+-2.10.14/plana-pixops.patch
@@ -0,0 +1,569 @@
+diff -urN gtk+-2.10.9.orig/config.h.in gtk+-2.10.9-integer-pixops/config.h.in
+--- gtk+-2.10.9.orig/config.h.in 2007-01-22 09:01:23.000000000 -0700
++++ gtk+-2.10.9-integer-pixops/config.h.in 2007-02-10 12:15:39.000000000 -0700
+@@ -259,3 +259,7 @@
+
+ /* Define to `int' if <sys/types.h> doesn't define. */
+ #undef uid_t
++
++/* Define to use integer math rather than floating point where possible. */
++#undef ENABLE_INTEGER_PIXOPS
++
+diff -urN gtk+-2.10.9.orig/configure.in gtk+-2.10.9-integer-pixops/configure.in
+--- gtk+-2.10.9.orig/configure.in 2007-01-22 08:59:41.000000000 -0700
++++ gtk+-2.10.9-integer-pixops/configure.in 2007-02-10 12:15:39.000000000 -0700
+@@ -203,6 +203,15 @@
+ [AC_HELP_STRING([--disable-rebuilds],
+ [disable all source autogeneration rules])],,
+ [enable_rebuilds=yes])
++AC_ARG_ENABLE(integer-pixops,
++ [AC_HELP_STRING([--enable-integer-pixops],
++ [use integer math where possible])],,
++ [enable_integer_pixops=no])
++
++if test "x$enable_integer_pixops" = "xyes"; then
++ AC_DEFINE(ENABLE_INTEGER_PIXOPS)
++fi
++
+ AC_ARG_ENABLE(visibility,
+ [AC_HELP_STRING([--disable-visibility],
+ [don't use ELF visibility attributes])],,
+diff -urN gtk+-2.10.9.orig/gdk-pixbuf/pixops/pixops.c gtk+-2.10.9-integer-pixops/gdk-pixbuf/pixops/pixops.c
+--- gtk+-2.10.9.orig/gdk-pixbuf/pixops/pixops.c 2007-01-22 08:50:43.000000000 -0700
++++ gtk+-2.10.9-integer-pixops/gdk-pixbuf/pixops/pixops.c 2007-02-12 01:00:23.000000000 -0700
+@@ -28,21 +28,42 @@
+ #define SUBSAMPLE_MASK ((1 << SUBSAMPLE_BITS)-1)
+ #define SCALE_SHIFT 16
+
++/* TODO: Add a FLOOR() and CEIL() macro to handle normalized values) */
++/* TODO: Get rid of standard C numeric types (ie. int). Replace with glib types */
++#ifdef ENABLE_INTEGER_PIXOPS
++/* The bigger the value of FRAC is, the better the accuracy. Be wary of
++ overflows, though */
++#define FRAC 0x10000ULL
++#define NORMALIZE(d) (d * FRAC)
++#define UNNORMALIZE(t,i) ((t)(i) / FRAC)
++#define FLOOR(i) (int)((i) / FRAC)
++#define CEIL(i) (((i) - 1) / FRAC + 1)
++#define DOUBLE_TYPE gint32
++#define BIG_DOUBLE_TYPE gint64
++#else
++#define NORMALIZE(d) (d)
++#define UNNORMALIZE(t,i) (t)(i)
++#define FLOOR(i) floor(i)
++#define CEIL(i) ceil(i)
++#define DOUBLE_TYPE double
++#define BIG_DOUBLE_TYPE double
++#endif
++
+ typedef struct _PixopsFilter PixopsFilter;
+ typedef struct _PixopsFilterDimension PixopsFilterDimension;
+
+ struct _PixopsFilterDimension
+ {
+ int n;
+- double offset;
+- double *weights;
++ BIG_DOUBLE_TYPE offset;
++ DOUBLE_TYPE *weights;
+ };
+
+ struct _PixopsFilter
+ {
+ PixopsFilterDimension x;
+ PixopsFilterDimension y;
+- double overall_alpha;
++ gint32 overall_alpha; /* Normalized: alpha * 255; Not sure why original devs chose 255 */
+ };
+
+ typedef guchar *(*PixopsLineFunc) (int *weights, int n_x, int n_y,
+@@ -86,13 +107,13 @@
+ int src_rowstride,
+ int src_channels,
+ gboolean src_has_alpha,
+- double scale_x,
+- double scale_y)
++ DOUBLE_TYPE scale_x,
++ DOUBLE_TYPE scale_y)
+ {
+ int i;
+ int x;
+- int x_step = (1 << SCALE_SHIFT) / scale_x;
+- int y_step = (1 << SCALE_SHIFT) / scale_y;
++ int x_step = NORMALIZE((1 << SCALE_SHIFT)) / scale_x;
++ int y_step = NORMALIZE((1 << SCALE_SHIFT)) / scale_y;
+ int xmax, xstart, xstop, x_pos, y_pos;
+ const guchar *p;
+
+@@ -175,14 +196,14 @@
+ int src_rowstride,
+ int src_channels,
+ gboolean src_has_alpha,
+- double scale_x,
+- double scale_y,
++ DOUBLE_TYPE scale_x,
++ DOUBLE_TYPE scale_y,
+ int overall_alpha)
+ {
+ int i;
+ int x;
+- int x_step = (1 << SCALE_SHIFT) / scale_x;
+- int y_step = (1 << SCALE_SHIFT) / scale_y;
++ int x_step = NORMALIZE((1 << SCALE_SHIFT)) / scale_x;
++ int y_step = NORMALIZE((1 << SCALE_SHIFT)) / scale_y;
+ int xmax, xstart, xstop, x_pos, y_pos;
+ const guchar *p;
+ unsigned int a0;
+@@ -260,8 +281,8 @@
+ int src_rowstride,
+ int src_channels,
+ gboolean src_has_alpha,
+- double scale_x,
+- double scale_y,
++ DOUBLE_TYPE scale_x,
++ DOUBLE_TYPE scale_y,
+ int overall_alpha,
+ int check_x,
+ int check_y,
+@@ -271,8 +292,8 @@
+ {
+ int i, j;
+ int x;
+- int x_step = (1 << SCALE_SHIFT) / scale_x;
+- int y_step = (1 << SCALE_SHIFT) / scale_y;
++ int x_step = NORMALIZE((1 << SCALE_SHIFT)) / scale_x;
++ int y_step = NORMALIZE((1 << SCALE_SHIFT)) / scale_y;
+ int r1, g1, b1, r2, g2, b2;
+ int check_shift = get_check_shift (check_size);
+ int xmax, xstart, xstop, x_pos, y_pos;
+@@ -977,9 +998,9 @@
+ int n_x,
+ int n_y,
+ int total,
+- double overall_alpha)
++ gint32 overall_alpha)
+ {
+- int correction = (int)(0.5 + 65536 * overall_alpha) - total;
++ int correction = (int)(0.5 + 65536 / 255 * overall_alpha) - total;
+ int remaining, c, d, i;
+
+ if (correction != 0)
+@@ -1009,7 +1030,7 @@
+ for (i_offset=0; i_offset < SUBSAMPLE; i_offset++)
+ for (j_offset=0; j_offset < SUBSAMPLE; j_offset++)
+ {
+- double weight;
++ DOUBLE_TYPE weight;
+ int *pixel_weights = weights + ((i_offset*SUBSAMPLE) + j_offset) * n_x * n_y;
+ int total = 0;
+ int i, j;
+@@ -1017,13 +1038,15 @@
+ for (i=0; i < n_y; i++)
+ for (j=0; j < n_x; j++)
+ {
+- weight = filter->x.weights[(j_offset * n_x) + j] *
++ weight = UNNORMALIZE(DOUBLE_TYPE, filter->x.weights[(j_offset * n_x) + j] *
+ filter->y.weights[(i_offset * n_y) + i] *
+- filter->overall_alpha * 65536 + 0.5;
++ filter->overall_alpha * 65536 / 255) + NORMALIZE(0.5);
++ /* Wonder how I should treat the "+ 0.5" for scientific
++ rouding off */
+
+- total += (int)weight;
++ total += UNNORMALIZE(int, weight);
+
+- *(pixel_weights + n_x * i + j) = weight;
++ *(pixel_weights + n_x * i + j) = UNNORMALIZE(int, weight);
+ }
+
+ correct_total (pixel_weights, n_x, n_y, total, filter->overall_alpha);
+@@ -1047,8 +1070,8 @@
+ int src_rowstride,
+ int src_channels,
+ gboolean src_has_alpha,
+- double scale_x,
+- double scale_y,
++ DOUBLE_TYPE scale_x,
++ DOUBLE_TYPE scale_y,
+ int check_x,
+ int check_y,
+ int check_size,
+@@ -1064,12 +1087,13 @@
+ guchar **line_bufs = g_new (guchar *, filter->y.n);
+ int *filter_weights = make_filter_table (filter);
+
+- int x_step = (1 << SCALE_SHIFT) / scale_x; /* X step in source (fixed point) */
+- int y_step = (1 << SCALE_SHIFT) / scale_y; /* Y step in source (fixed point) */
++ int x_step = NORMALIZE((1 << SCALE_SHIFT)) / scale_x; /* X step in source (fixed point) */
++ int y_step = NORMALIZE((1 << SCALE_SHIFT)) / scale_y; /* Y step in source (fixed point) */
+
+ int check_shift = check_size ? get_check_shift (check_size) : 0;
+
+- int scaled_x_offset = floor (filter->x.offset * (1 << SCALE_SHIFT));
++ /* Possible overflow when scale-shifting which is why offset is BIG_DOUBLE_TYPE */
++ int scaled_x_offset = FLOOR(filter->x.offset * (1 << SCALE_SHIFT));
+
+ /* Compute the index where we run off the end of the source buffer. The furthest
+ * source pixel we access at index i is:
+@@ -1087,7 +1111,7 @@
+ int run_end_index = MYDIV (run_end_x + x_step - 1, x_step) - render_x0;
+ run_end_index = MIN (run_end_index, render_x1 - render_x0);
+
+- y = render_y0 * y_step + floor (filter->y.offset * (1 << SCALE_SHIFT));
++ y = render_y0 * y_step + FLOOR(filter->y.offset * (1 << SCALE_SHIFT));
+ for (i = 0; i < (render_y1 - render_y0); i++)
+ {
+ int dest_x;
+@@ -1180,37 +1204,37 @@
+ */
+ static void
+ tile_make_weights (PixopsFilterDimension *dim,
+- double scale)
++ DOUBLE_TYPE scale)
+ {
+- int n = ceil (1 / scale + 1);
+- double *pixel_weights = g_new (double, SUBSAMPLE * n);
++ int n = CEIL(NORMALIZE(NORMALIZE(1)) / scale + NORMALIZE(1)); /* Another possible overflow */
++ DOUBLE_TYPE *pixel_weights = g_new (DOUBLE_TYPE, SUBSAMPLE * n);
+ int offset;
+ int i;
+-
++
+ dim->n = n;
+- dim->offset = 0;
++ dim->offset = NORMALIZE(0);
+ dim->weights = pixel_weights;
+
+ for (offset = 0; offset < SUBSAMPLE; offset++)
+ {
+- double x = (double)offset / SUBSAMPLE;
+- double a = x + 1 / scale;
++ DOUBLE_TYPE x = (DOUBLE_TYPE)NORMALIZE(offset) / SUBSAMPLE;
++ DOUBLE_TYPE a = x + NORMALIZE(NORMALIZE(1)) / scale;
+
+ for (i = 0; i < n; i++)
+ {
+- if (i < x)
++ if (NORMALIZE(i) < x)
+ {
+- if (i + 1 > x)
+- *(pixel_weights++) = (MIN (i + 1, a) - x) * scale;
++ if (NORMALIZE(i + 1) > x)
++ *(pixel_weights++) = UNNORMALIZE(DOUBLE_TYPE, (MIN(NORMALIZE(i + 1), a) - x) * scale);
+ else
+- *(pixel_weights++) = 0;
++ *(pixel_weights++) = NORMALIZE(0);
+ }
+ else
+ {
+- if (a > i)
+- *(pixel_weights++) = (MIN (i + 1, a) - i) * scale;
++ if (a > NORMALIZE(i))
++ *(pixel_weights++) = UNNORMALIZE(DOUBLE_TYPE, (MIN(NORMALIZE(i + 1), a) - i) * scale);
+ else
+- *(pixel_weights++) = 0;
++ *(pixel_weights++) = NORMALIZE(0);
+ }
+ }
+ }
+@@ -1222,41 +1246,44 @@
+ */
+ static void
+ bilinear_magnify_make_weights (PixopsFilterDimension *dim,
+- double scale)
++ DOUBLE_TYPE scale)
+ {
+- double *pixel_weights;
++ DOUBLE_TYPE *pixel_weights;
+ int n;
+ int offset;
+ int i;
+
+- if (scale > 1.0) /* Linear */
++ if (scale > NORMALIZE(1.0)) /* Linear */
+ {
+ n = 2;
+- dim->offset = 0.5 * (1 / scale - 1);
++ dim->offset = NORMALIZE(NORMALIZE(0.5) / (scale - NORMALIZE(1)));
+ }
+ else /* Tile */
+ {
+- n = ceil (1.0 + 1.0 / scale);
+- dim->offset = 0.0;
++ n = CEIL(NORMALIZE(1.0) + NORMALIZE(NORMALIZE(1.0)) / scale);
++ dim->offset = NORMALIZE(0.0);
+ }
+-
++
+ dim->n = n;
+- dim->weights = g_new (double, SUBSAMPLE * n);
++ dim->weights = g_new (DOUBLE_TYPE, SUBSAMPLE * n);
+
+ pixel_weights = dim->weights;
+
+ for (offset=0; offset < SUBSAMPLE; offset++)
+ {
+- double x = (double)offset / SUBSAMPLE;
++ DOUBLE_TYPE x = (DOUBLE_TYPE)NORMALIZE(offset) / SUBSAMPLE;
+
+- if (scale > 1.0) /* Linear */
++ if (scale > NORMALIZE(1.0)) /* Linear */
+ {
+ for (i = 0; i < n; i++)
+- *(pixel_weights++) = (((i == 0) ? (1 - x) : x) / scale) * scale;
++ /* In the original, what is the point of dividing by scale then multiplying by scale? */
++ /* *(pixel_weights++) = (((i == 0) ? (1 - x) : x) / scale) * scale;*/
++ /* *(pixel_weights++) = i == 0 ? NORMALIZE(1) - x : x; */
++ *(pixel_weights++) = (((i == 0) ? NORMALIZE(1) - x : x) / scale) * scale;
+ }
+ else /* Tile */
+ {
+- double a = x + 1 / scale;
++ DOUBLE_TYPE a = x + NORMALIZE(NORMALIZE(1)) / scale;
+
+ /* x
+ * ---------|--.-|----|--.-|------- SRC
+@@ -1264,19 +1291,19 @@
+ */
+ for (i = 0; i < n; i++)
+ {
+- if (i < x)
++ if (NORMALIZE(i) < x)
+ {
+- if (i + 1 > x)
+- *(pixel_weights++) = (MIN (i + 1, a) - x) * scale;
++ if (NORMALIZE(i + 1) > x)
++ *(pixel_weights++) = UNNORMALIZE(DOUBLE_TYPE, (MIN(NORMALIZE(i + 1), a) - x) * scale);
+ else
+- *(pixel_weights++) = 0;
++ *(pixel_weights++) = NORMALIZE(0);
+ }
+ else
+ {
+- if (a > i)
+- *(pixel_weights++) = (MIN (i + 1, a) - i) * scale;
++ if (a > NORMALIZE(i))
++ *(pixel_weights++) = UNNORMALIZE(DOUBLE_TYPE, (MIN(NORMALIZE(i + 1), a) - i) * scale);
+ else
+- *(pixel_weights++) = 0;
++ *(pixel_weights++) = NORMALIZE(0);
+ }
+ }
+ }
+@@ -1291,14 +1318,14 @@
+ * We combine two of these to compute the convolution of
+ * a box filter with a triangular spike.
+ */
+-static double
+-linear_box_half (double b0, double b1)
++static DOUBLE_TYPE
++linear_box_half (DOUBLE_TYPE b0, DOUBLE_TYPE b1)
+ {
+- double a0, a1;
+- double x0, x1;
++ DOUBLE_TYPE a0, a1;
++ DOUBLE_TYPE x0, x1;
+
+- a0 = 0.;
+- a1 = 1.;
++ a0 = NORMALIZE(0.);
++ a1 = NORMALIZE(1.);
+
+ if (a0 < b0)
+ {
+@@ -1308,7 +1335,7 @@
+ x1 = MIN (a1, b1);
+ }
+ else
+- return 0;
++ return NORMALIZE(0);
+ }
+ else
+ {
+@@ -1318,10 +1345,10 @@
+ x1 = MIN (a1, b1);
+ }
+ else
+- return 0;
++ return NORMALIZE(0);
+ }
+
+- return 0.5 * (x1*x1 - x0*x0);
++ return UNNORMALIZE(DOUBLE_TYPE, NORMALIZE(0.5) * UNNORMALIZE(DOUBLE_TYPE, (x1*x1 - x0*x0)));
+ }
+
+ /* Compute weights for reconstructing with bilinear
+@@ -1329,28 +1356,28 @@
+ */
+ static void
+ bilinear_box_make_weights (PixopsFilterDimension *dim,
+- double scale)
++ DOUBLE_TYPE scale)
+ {
+- int n = ceil (1/scale + 3.0);
+- double *pixel_weights = g_new (double, SUBSAMPLE * n);
+- double w;
++ int n = CEIL(NORMALIZE(NORMALIZE(1))/scale + NORMALIZE(3.0));
++ DOUBLE_TYPE *pixel_weights = g_new (DOUBLE_TYPE, SUBSAMPLE * n);
++ DOUBLE_TYPE w;
+ int offset, i;
+
+- dim->offset = -1.0;
++ dim->offset = NORMALIZE(-1.0);
+ dim->n = n;
+ dim->weights = pixel_weights;
+
+ for (offset = 0; offset < SUBSAMPLE; offset++)
+ {
+- double x = (double)offset / SUBSAMPLE;
+- double a = x + 1 / scale;
++ DOUBLE_TYPE x = (DOUBLE_TYPE)NORMALIZE(offset) / SUBSAMPLE;
++ DOUBLE_TYPE a = x + NORMALIZE(NORMALIZE(1)) / scale;
+
+ for (i = 0; i < n; i++)
+ {
+- w = linear_box_half (0.5 + i - a, 0.5 + i - x);
+- w += linear_box_half (1.5 + x - i, 1.5 + a - i);
++ w = linear_box_half (NORMALIZE(0.5) + NORMALIZE(i) - a, NORMALIZE(0.5) + NORMALIZE(i) - x);
++ w += linear_box_half (NORMALIZE(1.5) - NORMALIZE(i) + x, NORMALIZE(1.5) - NORMALIZE(i) + a);
+
+- *(pixel_weights++) = w * scale;
++ *(pixel_weights++) = UNNORMALIZE(DOUBLE_TYPE, w * scale);
+ }
+ }
+ }
+@@ -1358,8 +1385,8 @@
+ static void
+ make_weights (PixopsFilter *filter,
+ PixopsInterpType interp_type,
+- double scale_x,
+- double scale_y)
++ DOUBLE_TYPE scale_x,
++ DOUBLE_TYPE scale_y)
+ {
+ switch (interp_type)
+ {
+@@ -1399,8 +1426,8 @@
+ int src_rowstride,
+ int src_channels,
+ gboolean src_has_alpha,
+- double scale_x,
+- double scale_y,
++ double scale_x_d,
++ double scale_y_d,
+ PixopsInterpType interp_type,
+ int overall_alpha,
+ int check_x,
+@@ -1409,6 +1436,8 @@
+ guint32 color1,
+ guint32 color2)
+ {
++ DOUBLE_TYPE scale_x = NORMALIZE(scale_x_d);
++ DOUBLE_TYPE scale_y = NORMALIZE(scale_y_d);
+ PixopsFilter filter;
+ PixopsLineFunc line_func;
+
+@@ -1419,7 +1448,7 @@
+ g_return_if_fail (!(dest_channels == 3 && dest_has_alpha));
+ g_return_if_fail (!(src_channels == 3 && src_has_alpha));
+
+- if (scale_x == 0 || scale_y == 0)
++ if (scale_x == NORMALIZE(0) || scale_y == NORMALIZE(0))
+ return;
+
+ if (!src_has_alpha && overall_alpha == 255)
+@@ -1427,7 +1456,7 @@
+ _pixops_scale (dest_buf, render_x0, render_y0, render_x1, render_y1,
+ dest_rowstride, dest_channels, dest_has_alpha,
+ src_buf, src_width, src_height, src_rowstride, src_channels,
+- src_has_alpha, scale_x, scale_y, interp_type);
++ src_has_alpha, UNNORMALIZE(double, scale_x), UNNORMALIZE(double, scale_y), interp_type);
+ return;
+ }
+
+@@ -1441,7 +1470,8 @@
+ return;
+ }
+
+- filter.overall_alpha = overall_alpha / 255.;
++ /* filter.overall_alpha = overall_alpha / 255.; /* Why is it 255 instead of 256? */
++ filter.overall_alpha = overall_alpha;
+ make_weights (&filter, interp_type, scale_x, scale_y);
+
+ #ifdef USE_MMX
+@@ -1501,11 +1531,13 @@
+ int src_rowstride,
+ int src_channels,
+ gboolean src_has_alpha,
+- double scale_x,
+- double scale_y,
++ double scale_x_d,
++ double scale_y_d,
+ PixopsInterpType interp_type,
+ int overall_alpha)
+ {
++ DOUBLE_TYPE scale_x = NORMALIZE(scale_x_d);
++ DOUBLE_TYPE scale_y = NORMALIZE(scale_y_d);
+ PixopsFilter filter;
+ PixopsLineFunc line_func;
+
+@@ -1516,7 +1548,7 @@
+ g_return_if_fail (!(dest_channels == 3 && dest_has_alpha));
+ g_return_if_fail (!(src_channels == 3 && src_has_alpha));
+
+- if (scale_x == 0 || scale_y == 0)
++ if (scale_x == NORMALIZE(0) || scale_y == NORMALIZE(0))
+ return;
+
+ if (!src_has_alpha && overall_alpha == 255)
+@@ -1524,7 +1556,7 @@
+ _pixops_scale (dest_buf, render_x0, render_y0, render_x1, render_y1,
+ dest_rowstride, dest_channels, dest_has_alpha,
+ src_buf, src_width, src_height, src_rowstride, src_channels,
+- src_has_alpha, scale_x, scale_y, interp_type);
++ src_has_alpha, UNNORMALIZE(double, scale_x), UNNORMALIZE(double, scale_y), interp_type);
+ return;
+ }
+
+@@ -1537,7 +1569,7 @@
+ return;
+ }
+
+- filter.overall_alpha = overall_alpha / 255.;
++ filter.overall_alpha = overall_alpha;
+ make_weights (&filter, interp_type, scale_x, scale_y);
+
+ if (filter.x.n == 2 && filter.y.n == 2 &&
+@@ -1578,10 +1610,12 @@
+ int src_rowstride,
+ int src_channels,
+ gboolean src_has_alpha,
+- double scale_x,
+- double scale_y,
++ double scale_x_d,
++ double scale_y_d,
+ PixopsInterpType interp_type)
+ {
++ DOUBLE_TYPE scale_x = NORMALIZE(scale_x_d);
++ DOUBLE_TYPE scale_y = NORMALIZE(scale_y_d);
+ PixopsFilter filter;
+ PixopsLineFunc line_func;
+
+@@ -1593,7 +1627,7 @@
+ g_return_if_fail (!(src_channels == 3 && src_has_alpha));
+ g_return_if_fail (!(src_has_alpha && !dest_has_alpha));
+
+- if (scale_x == 0 || scale_y == 0)
++ if (scale_x == NORMALIZE(0) || scale_y == NORMALIZE(0))
+ return;
+
+ if (interp_type == PIXOPS_INTERP_NEAREST)
+@@ -1605,7 +1639,7 @@
+ return;
+ }
+
+- filter.overall_alpha = 1.0;
++ filter.overall_alpha = 255;
+ make_weights (&filter, interp_type, scale_x, scale_y);
+
+ if (filter.x.n == 2 && filter.y.n == 2 && dest_channels == 3 && src_channels == 3)
diff --git a/recipes/gtk+/gtk+-2.10.14/range-no-redraw.patch b/recipes/gtk+/gtk+-2.10.14/range-no-redraw.patch
new file mode 100644
index 0000000000..e3603d7700
--- /dev/null
+++ b/recipes/gtk+/gtk+-2.10.14/range-no-redraw.patch
@@ -0,0 +1,41 @@
+Index: gtk/gtkrange.c
+===================================================================
+--- gtk/gtkrange.c (revision 18523)
++++ gtk/gtkrange.c (working copy)
+@@ -99,6 +99,8 @@
+
+ GtkSensitivityType lower_sensitivity;
+ GtkSensitivityType upper_sensitivity;
++
++ guint motion_idle;
+ };
+
+
+@@ -1721,6 +1723,16 @@
+ &handled);
+ }
+
++static gboolean
++update_slider_position_idle (GtkRange *range)
++{
++ update_slider_position (range, range->layout->mouse_x,range->layout->mouse_y);
++
++ range->layout->motion_idle = 0;
++
++ return FALSE;
++}
++
+ static void
+ stop_scrolling (GtkRange *range)
+ {
+@@ -1860,8 +1872,8 @@
+ if (gtk_range_update_mouse_location (range))
+ gtk_widget_queue_draw (widget);
+
+- if (range->layout->grab_location == MOUSE_SLIDER)
+- update_slider_position (range, x, y);
++ if (range->layout->grab_location == MOUSE_SLIDER && !range->layout->motion_idle)
++ range->layout->motion_idle = g_idle_add ((GSourceFunc)update_slider_position_idle, range);
+
+ /* We handled the event if the mouse was in the range_rect */
+ return range->layout->mouse_location != MOUSE_OUTSIDE;
diff --git a/recipes/gtk+/gtk+-2.10.14/run-iconcache.patch b/recipes/gtk+/gtk+-2.10.14/run-iconcache.patch
new file mode 100644
index 0000000000..ac15e9ab24
--- /dev/null
+++ b/recipes/gtk+/gtk+-2.10.14/run-iconcache.patch
@@ -0,0 +1,19 @@
+--- /tmp/Makefile.am 2007-01-08 17:44:47.000000000 +0100
++++ gtk+-2.10.7/gtk/Makefile.am 2007-01-08 17:45:17.025251000 +0100
+@@ -1128,11 +1128,11 @@
+ ./gtk-update-icon-cache
+ endif
+
+-gtkbuiltincache.h: @REBUILD@ stamp-icons
+- $(MAKE) $(AM_MAKEFLAGS) gtk-update-icon-cache$(EXEEXT)
+- $(gtk_update_icon_cache_program) --force --ignore-theme-index \
+- --source builtin_icons stock-icons > gtkbuiltincache.h.tmp && \
+- mv gtkbuiltincache.h.tmp gtkbuiltincache.h
++#gtkbuiltincache.h: @REBUILD@ stamp-icons
++# $(MAKE) $(AM_MAKEFLAGS) gtk-update-icon-cache$(EXEEXT)
++# $(gtk_update_icon_cache_program) --force --ignore-theme-index \
++# --source builtin_icons stock-icons > gtkbuiltincache.h.tmp && \
++# mv gtkbuiltincache.h.tmp gtkbuiltincache.h
+
+ EXTRA_DIST += \
+ $(STOCK_ICONS) \
diff --git a/recipes/gtk+/gtk+-2.10.14/scroll-timings.patch b/recipes/gtk+/gtk+-2.10.14/scroll-timings.patch
new file mode 100644
index 0000000000..3f823a7880
--- /dev/null
+++ b/recipes/gtk+/gtk+-2.10.14/scroll-timings.patch
@@ -0,0 +1,11 @@
+--- gtk+-2.10.0/gtk/gtkrange.c.orig 2006-07-05 12:41:39.000000000 +0200
++++ gtk+-2.10.0/gtk/gtkrange.c 2006-07-05 12:41:58.000000000 +0200
+@@ -39,7 +39,7 @@
+ #include "gtkalias.h"
+
+ #define SCROLL_DELAY_FACTOR 5 /* Scroll repeat multiplier */
+-#define UPDATE_DELAY 300 /* Delay for queued update */
++#define UPDATE_DELAY 1000 /* Delay for queued update */
+
+ enum {
+ PROP_0,
diff --git a/recipes/gtk+/gtk+-2.10.14/scrolled-placement.patch b/recipes/gtk+/gtk+-2.10.14/scrolled-placement.patch
new file mode 100644
index 0000000000..09ded531ea
--- /dev/null
+++ b/recipes/gtk+/gtk+-2.10.14/scrolled-placement.patch
@@ -0,0 +1,35 @@
+Index: gtk/gtkscrolledwindow.c
+===================================================================
+--- gtk/gtkscrolledwindow.c (revision 18493)
++++ gtk/gtkscrolledwindow.c (working copy)
+@@ -885,7 +885,7 @@
+ if (GTK_IS_SCROLLED_WINDOW (widget))
+ {
+ gtk_scrolled_window_update_real_placement (GTK_SCROLLED_WINDOW (widget));
+- gtk_widget_queue_draw (widget);
++ gtk_widget_queue_resize (widget);
+ }
+ else if (GTK_IS_CONTAINER (widget))
+ gtk_container_forall (GTK_CONTAINER (widget), traverse_container, NULL);
+Index: gdk/x11/gdksettings.c
+===================================================================
+--- gdk/x11/gdksettings.c (revision 18493)
++++ gdk/x11/gdksettings.c (working copy)
+@@ -65,7 +65,8 @@
+ "Xft/RGBA\0" "gtk-xft-rgba\0"
+ "Xft/DPI\0" "gtk-xft-dpi\0"
+ "Net/FallbackIconTheme\0" "gtk-fallback-icon-theme\0"
+- "Gtk/TouchscreenMode\0" "gtk-touchscreen-mode\0";
++ "Gtk/TouchscreenMode\0" "gtk-touchscreen-mode\0"
++ "Gtk/ScrolledWindowPlacement\0" "gtk-scrolled-window-placement\0";
+
+ static const struct
+ {
+@@ -107,5 +108,6 @@
+ { 1197, 1206 },
+ { 1219, 1227 },
+ { 1239, 1261 },
+- { 1285, 1305 }
++ { 1285, 1305 },
++ { 1326, 1354 }
+ };
diff --git a/recipes/gtk+/gtk+-2.10.14/single-click.patch b/recipes/gtk+/gtk+-2.10.14/single-click.patch
new file mode 100644
index 0000000000..250f1629f5
--- /dev/null
+++ b/recipes/gtk+/gtk+-2.10.14/single-click.patch
@@ -0,0 +1,56 @@
+Index: gtk+-2.10.6/gtk/gtkcalendar.c
+===================================================================
+--- gtk+-2.10.6.orig/gtk/gtkcalendar.c
++++ gtk+-2.10.6/gtk/gtkcalendar.c
+@@ -2482,9 +2482,11 @@ calendar_main_button_press (GtkCalendar
+ }
+
+ calendar_select_and_focus_day (calendar, day);
+- }
++
++ // This change causes the calendar to disappear after choosing a day
++/* }
+ else if (event->type == GDK_2BUTTON_PRESS)
+- {
++ {*/
+ priv->in_drag = 0;
+ if (day_month == MONTH_CURRENT)
+ g_signal_emit (calendar,
+Index: gtk+-2.10.6/gtk/gtkfilesel.c
+===================================================================
+--- gtk+-2.10.6.orig/gtk/gtkfilesel.c
++++ gtk+-2.10.6/gtk/gtkfilesel.c
+@@ -2426,6 +2426,33 @@ gtk_file_selection_file_changed (GtkTree
+ if (fs->last_selected != NULL)
+ g_free (fs->last_selected);
+
++ // Single-click directory entry
++ if (new_names->len == 1)
++ {
++ GtkTreeView *tree_view;
++ GtkTreeModel *model;
++ GtkTreePath *path;
++ GtkTreeIter iter;
++ gboolean is_file;
++
++ tree_view = gtk_tree_selection_get_tree_view (selection);
++
++ if (gtk_tree_selection_get_selected (selection, &model, &iter))
++ {
++ path = gtk_tree_model_get_path (model, &iter);
++ gtk_tree_model_get (model, &iter, ISFILE_COLUMN, &is_file, -1);
++
++ if (!is_file)
++ {
++ gtk_file_selection_dir_activate (tree_view, path,
++ gtk_tree_view_get_column (tree_view, DIR_COLUMN),
++ user_data);
++ }
++
++ gtk_tree_path_free (path);
++ }
++ }
++
+ fs->last_selected = g_strdup (g_ptr_array_index (new_names, index));
+ filename = get_real_filename (fs->last_selected, FALSE);
+
diff --git a/recipes/gtk+/gtk+-2.10.14/small-gtkfilechooser.patch b/recipes/gtk+/gtk+-2.10.14/small-gtkfilechooser.patch
new file mode 100644
index 0000000000..7681f1170f
--- /dev/null
+++ b/recipes/gtk+/gtk+-2.10.14/small-gtkfilechooser.patch
@@ -0,0 +1,222 @@
+diff -ur gtk+-2.10.14.org/gtk/gtkfilechooserdefault.c gtk+-2.10.14/gtk/gtkfilechooserdefault.c
+--- gtk+-2.10.14.org/gtk/gtkfilechooserdefault.c 2007-07-16 22:44:17.000000000 +0300
++++ gtk+-2.10.14/gtk/gtkfilechooserdefault.c 2008-01-05 01:32:58.000000000 +0200
+@@ -243,7 +243,9 @@
+ /* Icon size for if we can't get it from the theme */
+ #define FALLBACK_ICON_SIZE 16
+
+-#define PREVIEW_HBOX_SPACING 12
++#define PREVIEW_HBOX_SPACING 2
++#define NORMAL_SPACING 2
++#define DOUBLE_SPACING 2
+ #define NUM_LINES 45
+ #define NUM_CHARS 60
+
+@@ -425,6 +427,17 @@
+ static void location_switch_to_path_bar (GtkFileChooserDefault *impl);
+ static void settings_load (GtkFileChooserDefault *impl);
+
++int
++_gtk_is_pda_mode()
++{
++ /* PDA mode is when we have small screen width, plus small overall screen area
++ too. What we want to do when it is active is to prefer vertical packing over
++ horizontal (so we can show user filenames of as long length as possible), yet
++ still layout vertical space in such way so user can be able to see as many
++ files as possible. And of course, we save space overall - no big spacings and
++ borders. */
++ return gdk_screen_width() < 490;
++}
+
+
+ /* Drag and drop interface declarations */
+@@ -689,7 +702,7 @@
+ impl->pending_select_paths = NULL;
+ impl->location_mode = LOCATION_MODE_PATH_BAR;
+
+- gtk_box_set_spacing (GTK_BOX (impl), 12);
++ gtk_box_set_spacing (GTK_BOX (impl), DOUBLE_SPACING);
+
+ impl->tooltips = gtk_tooltips_new ();
+ g_object_ref_sink (impl->tooltips);
+@@ -3603,8 +3616,9 @@
+ GtkWidget *vbox;
+ GtkWidget *hbox;
+ GtkWidget *widget;
++ gboolean is_pda = _gtk_is_pda_mode();
+
+- vbox = gtk_vbox_new (FALSE, 6);
++ vbox = (is_pda?gtk_hbox_new:gtk_vbox_new) (FALSE, NORMAL_SPACING);
+ gtk_widget_show (vbox);
+
+ /* Shortcuts tree */
+@@ -3614,7 +3628,7 @@
+
+ /* Box for buttons */
+
+- hbox = gtk_hbox_new (TRUE, 6);
++ hbox = (is_pda?gtk_vbox_new:gtk_hbox_new) (TRUE, NORMAL_SPACING);
+ gtk_size_group_add_widget (size_group, hbox);
+ gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
+ gtk_widget_show (hbox);
+@@ -3622,7 +3636,7 @@
+ /* Add bookmark button */
+
+ impl->browse_shortcuts_add_button = button_new (impl,
+- _("_Add"),
++ "",
+ GTK_STOCK_ADD,
+ FALSE,
+ TRUE,
+@@ -3634,14 +3648,22 @@
+ /* Remove bookmark button */
+
+ impl->browse_shortcuts_remove_button = button_new (impl,
+- _("_Remove"),
++ "",
+ GTK_STOCK_REMOVE,
+ FALSE,
+ TRUE,
+ G_CALLBACK (remove_bookmark_button_clicked_cb));
++ if (!is_pda) {
++ /* Remove button is pretty reduntant, as that choice is available from popup menu (and would
++ be intuitively expected to be there; compare that with the "Add to shortucts" in popup
++ in files pane - most users would never try that and never new what shortcuts are).
++ If we suspect we can be short of screen space (PDA device is what often has portrait
++ layout), don't pack it, to allow more visually pleasing layout when minimizing location
++ pane. Note that we still instantiate it, as it is referenced thruout the code. */
+ gtk_box_pack_start (GTK_BOX (hbox), impl->browse_shortcuts_remove_button, TRUE, TRUE, 0);
+ gtk_tooltips_set_tip (impl->tooltips, impl->browse_shortcuts_remove_button,
+ _("Remove the selected bookmark"), NULL);
++ }
+
+ return vbox;
+ }
+@@ -4221,7 +4243,7 @@
+ GtkWidget *hbox;
+ GtkWidget *widget;
+
+- vbox = gtk_vbox_new (FALSE, 6);
++ vbox = gtk_vbox_new (FALSE, NORMAL_SPACING);
+ gtk_widget_show (vbox);
+
+ /* Box for lists and preview */
+@@ -4237,13 +4259,13 @@
+
+ /* Preview */
+
+- impl->preview_box = gtk_vbox_new (FALSE, 12);
++ impl->preview_box = gtk_vbox_new (FALSE, DOUBLE_SPACING);
+ gtk_box_pack_start (GTK_BOX (hbox), impl->preview_box, FALSE, FALSE, 0);
+ /* Don't show preview box initially */
+
+ /* Filter combo */
+
+- impl->filter_combo_hbox = gtk_hbox_new (FALSE, 12);
++ impl->filter_combo_hbox = gtk_hbox_new (FALSE, DOUBLE_SPACING);
+
+ widget = filter_create (impl);
+
+@@ -4336,13 +4358,13 @@
+
+ location_switch_to_path_bar (impl);
+
+- vbox = gtk_vbox_new (FALSE, 12);
++ vbox = gtk_vbox_new (FALSE, DOUBLE_SPACING);
+
+ table = gtk_table_new (2, 2, FALSE);
+ gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
+ gtk_widget_show (table);
+- gtk_table_set_row_spacings (GTK_TABLE (table), 12);
+- gtk_table_set_col_spacings (GTK_TABLE (table), 12);
++ gtk_table_set_row_spacings (GTK_TABLE (table), DOUBLE_SPACING);
++ gtk_table_set_col_spacings (GTK_TABLE (table), DOUBLE_SPACING);
+
+ /* Label */
+
+@@ -4653,10 +4675,10 @@
+
+ /* size group is used by the [+][-] buttons and the filter combo */
+ size_group = gtk_size_group_new (GTK_SIZE_GROUP_VERTICAL);
+- vbox = gtk_vbox_new (FALSE, 12);
++ vbox = gtk_vbox_new (FALSE, DOUBLE_SPACING);
+
+ /* Location widgets */
+- hbox = gtk_hbox_new (FALSE, 12);
++ hbox = gtk_hbox_new (FALSE, DOUBLE_SPACING);
+ gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
+ gtk_widget_show (hbox);
+
+@@ -4678,7 +4700,7 @@
+
+ /* Box for the location label and entry */
+
+- impl->location_entry_box = gtk_hbox_new (FALSE, 12);
++ impl->location_entry_box = gtk_hbox_new (FALSE, DOUBLE_SPACING);
+ gtk_box_pack_start (GTK_BOX (vbox), impl->location_entry_box, FALSE, FALSE, 0);
+
+ impl->location_label = gtk_label_new_with_mnemonic (_("_Location:"));
+@@ -4686,12 +4708,16 @@
+ gtk_box_pack_start (GTK_BOX (impl->location_entry_box), impl->location_label, FALSE, FALSE, 0);
+
+ /* Paned widget */
+- hpaned = gtk_hpaned_new ();
++ if (_gtk_is_pda_mode())
++ hpaned = gtk_vpaned_new ();
++ else
++ hpaned = gtk_hpaned_new ();
++
+ gtk_widget_show (hpaned);
+ gtk_box_pack_start (GTK_BOX (vbox), hpaned, TRUE, TRUE, 0);
+
+ widget = shortcuts_pane_create (impl, size_group);
+- gtk_paned_pack1 (GTK_PANED (hpaned), widget, FALSE, FALSE);
++ gtk_paned_pack1 (GTK_PANED (hpaned), widget, FALSE, TRUE); /* Shortcuts can shrink beyond requested size */
+ widget = file_pane_create (impl, size_group);
+ gtk_paned_pack2 (GTK_PANED (hpaned), widget, TRUE, FALSE);
+
+diff -ur gtk+-2.10.14.org/gtk/gtkfilechooserdialog.c gtk+-2.10.14/gtk/gtkfilechooserdialog.c
+--- gtk+-2.10.14.org/gtk/gtkfilechooserdialog.c 2007-07-16 22:44:16.000000000 +0300
++++ gtk+-2.10.14/gtk/gtkfilechooserdialog.c 2008-01-05 01:28:35.000000000 +0200
+@@ -32,8 +32,12 @@
+
+ #include <stdarg.h>
+
++#define NORMAL_SPACING 2
++#define DOUBLE_SPACING 2
++
+ #define GTK_FILE_CHOOSER_DIALOG_GET_PRIVATE(o) (GTK_FILE_CHOOSER_DIALOG (o)->priv)
+
++extern int _gtk_is_pda_mode(void);
+ static void gtk_file_chooser_dialog_finalize (GObject *object);
+
+ static GObject* gtk_file_chooser_dialog_constructor (GType type,
+@@ -162,8 +166,13 @@
+
+ gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
+
+- if (width)
+- *width = MIN (*width, (monitor.width * 3) / 4);
++ if (width) {
++ if (_gtk_is_pda_mode())
++ /* If width is physically small, use it all */
++ *width = monitor.width;
++ else
++ *width = MIN (*width, (monitor.width * 3) / 4);
++ }
+
+ if (height)
+ *height = MIN (*height, (monitor.height * 3) / 4);
+@@ -430,8 +439,8 @@
+ * http://developer.gnome.org/projects/gup/hig/1.0/windows.html#alert-spacing
+ */
+
+- gtk_container_set_border_width (GTK_CONTAINER (dialog->vbox), 12);
+- gtk_box_set_spacing (GTK_BOX (dialog->vbox), 24);
++ gtk_container_set_border_width (GTK_CONTAINER (dialog->vbox), DOUBLE_SPACING);
++ gtk_box_set_spacing (GTK_BOX (dialog->vbox), DOUBLE_SPACING * 2);
+
+ gtk_container_set_border_width (GTK_CONTAINER (dialog->action_area), 0);
+ gtk_box_set_spacing (GTK_BOX (dialog->action_area), 6);
+Only in gtk+-2.10.14/.pc/migration.patch/gtk: gtkmigration.c
+Only in gtk+-2.10.14: small-gtkfilechooser.patch
diff --git a/recipes/gtk+/gtk+-2.10.14/small-gtkfilesel.patch b/recipes/gtk+/gtk+-2.10.14/small-gtkfilesel.patch
new file mode 100644
index 0000000000..20bf4cf366
--- /dev/null
+++ b/recipes/gtk+/gtk+-2.10.14/small-gtkfilesel.patch
@@ -0,0 +1,267 @@
+diff -urNd ../gtk+-2.4.4-r5/gtk+-2.4.4/gtk/gtkfilesel.c gtk+-2.4.4/gtk/gtkfilesel.c
+--- ../gtk+-2.4.4-r5/gtk+-2.4.4/gtk/gtkfilesel.c 2004-07-10 05:02:10.000000000 +0100
++++ gtk+-2.4.4/gtk/gtkfilesel.c 2004-09-13 13:40:09.000000000 +0100
+@@ -68,6 +68,7 @@
+ #include "gtkprivate.h"
+ #include "gtkscrolledwindow.h"
+ #include "gtkstock.h"
++#include "gtksignal.h"
+ #include "gtktreeselection.h"
+ #include "gtktreeview.h"
+ #include "gtkvbox.h"
+@@ -77,6 +78,7 @@
+ #include "gtkmessagedialog.h"
+ #include "gtkdnd.h"
+ #include "gtkeventbox.h"
++#include "gtkimage.h"
+
+ #undef GTK_DISABLE_DEPRECATED
+ #include "gtkoptionmenu.h"
+@@ -245,7 +247,8 @@
+ };
+
+ enum {
+- DIR_COLUMN
++ DIR_COLUMN,
++ ISFILE_COLUMN
+ };
+
+ enum {
+@@ -400,6 +403,12 @@
+ GtkTreePath *path,
+ GtkTreeViewColumn *column,
+ gpointer user_data);
++
++static void gtk_file_selection_activate (GtkTreeView *tree_view,
++ GtkTreePath *path,
++ GtkTreeViewColumn *column,
++ gpointer user_data);
++
+ static void gtk_file_selection_file_changed (GtkTreeSelection *selection,
+ gpointer user_data);
+ static void gtk_file_selection_dir_activate (GtkTreeView *tree_view,
+@@ -419,6 +428,7 @@
+ static void gtk_file_selection_create_dir (GtkWidget *widget, gpointer data);
+ static void gtk_file_selection_delete_file (GtkWidget *widget, gpointer data);
+ static void gtk_file_selection_rename_file (GtkWidget *widget, gpointer data);
++static void gtk_file_selection_style_set (GtkWidget *widget, GtkStyle *prev_style);
+
+ static void free_selected_names (GPtrArray *names);
+
+@@ -578,6 +588,23 @@
+ G_PARAM_WRITABLE));
+ object_class->destroy = gtk_file_selection_destroy;
+ widget_class->map = gtk_file_selection_map;
++ widget_class->style_set = gtk_file_selection_style_set;
++
++ gtk_widget_class_install_style_property (widget_class,
++ g_param_spec_boolean ("show_fileops_default",
++ _("Show fileop buttons by default"),
++ _("Whether file operation buttons are shown by default"),
++ TRUE,
++ G_PARAM_READABLE));
++
++ gtk_widget_class_install_style_property (widget_class,
++ g_param_spec_int ("border_width",
++ _("Border width"),
++ _("Width of border around the main dialog area"),
++ 0,
++ G_MAXINT,
++ 10,
++ G_PARAM_READABLE));
+ }
+
+ static void gtk_file_selection_set_property (GObject *object,
+@@ -649,7 +676,29 @@
+ gtk_widget_grab_default (widget);
+ return FALSE;
+ }
+-
++
++static void
++gtk_file_selection_style_set (GtkWidget *filesel,
++ GtkStyle *prev_style)
++{
++ gboolean show_fileops;
++ gint border_width;
++
++ gtk_widget_style_get (filesel,
++ "show_fileops_default",
++ &show_fileops,
++ "border_width",
++ &border_width,
++ NULL);
++
++ gtk_container_set_border_width (GTK_CONTAINER (filesel), border_width);
++
++ if (show_fileops)
++ gtk_file_selection_show_fileop_buttons (GTK_FILE_SELECTION (filesel));
++ else
++ gtk_file_selection_hide_fileop_buttons (GTK_FILE_SELECTION (filesel));
++}
++
+ static void
+ gtk_file_selection_init (GtkFileSelection *filesel)
+ {
+@@ -674,17 +723,15 @@
+
+ /* The dialog-sized vertical box */
+ filesel->main_vbox = dialog->vbox;
+- gtk_container_set_border_width (GTK_CONTAINER (filesel), 10);
+
+ /* The horizontal box containing create, rename etc. buttons */
+ filesel->button_area = gtk_hbutton_box_new ();
+ gtk_button_box_set_layout (GTK_BUTTON_BOX (filesel->button_area), GTK_BUTTONBOX_START);
+- gtk_box_set_spacing (GTK_BOX (filesel->button_area), 0);
+ gtk_box_pack_start (GTK_BOX (filesel->main_vbox), filesel->button_area,
+ FALSE, FALSE, 0);
+ gtk_widget_show (filesel->button_area);
+
+- gtk_file_selection_show_fileop_buttons (filesel);
++ gtk_file_selection_style_set (GTK_WIDGET (filesel), NULL);
+
+ /* hbox for pulldown menu */
+ pulldown_hbox = gtk_hbox_new (TRUE, 5);
+@@ -723,25 +770,32 @@
+
+ /* The directories list */
+
+- model = gtk_list_store_new (1, G_TYPE_STRING);
++ model = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_BOOLEAN); /* MA */
+ filesel->dir_list = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model));
+ g_object_unref (model);
+
+- column = gtk_tree_view_column_new_with_attributes (_("Folders"),
++ column = gtk_tree_view_column_new_with_attributes (/*_("Folders")*/ NULL,
+ gtk_cell_renderer_text_new (),
+ "text", DIR_COLUMN,
+ NULL);
+ label = gtk_label_new_with_mnemonic (_("Fol_ders"));
+ gtk_label_set_mnemonic_widget (GTK_LABEL (label), filesel->dir_list);
+ gtk_widget_show (label);
+- gtk_tree_view_column_set_widget (column, label);
++
++ /* gtk_tree_view_column_set_widget (column, label); */
++ gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (filesel->dir_list), FALSE);
++
+ gtk_tree_view_column_set_sizing (column, GTK_TREE_VIEW_COLUMN_AUTOSIZE);
+ gtk_tree_view_append_column (GTK_TREE_VIEW (filesel->dir_list), column);
+
+ gtk_widget_set_size_request (filesel->dir_list,
+ DIR_LIST_WIDTH, DIR_LIST_HEIGHT);
+ g_signal_connect (filesel->dir_list, "row_activated",
+- G_CALLBACK (gtk_file_selection_dir_activate), filesel);
++ G_CALLBACK (gtk_file_selection_activate), filesel);
++
++ g_signal_connect (gtk_tree_view_get_selection (GTK_TREE_VIEW (filesel->dir_list)), "changed",
++ G_CALLBACK (gtk_file_selection_file_changed), filesel);
++
+
+ /* gtk_clist_column_titles_passive (GTK_CLIST (filesel->dir_list)); */
+
+@@ -758,41 +812,6 @@
+ gtk_widget_show (filesel->dir_list);
+ gtk_widget_show (scrolled_win);
+
+- /* The files list */
+- model = gtk_list_store_new (1, G_TYPE_STRING);
+- filesel->file_list = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model));
+- g_object_unref (model);
+-
+- column = gtk_tree_view_column_new_with_attributes (_("Files"),
+- gtk_cell_renderer_text_new (),
+- "text", FILE_COLUMN,
+- NULL);
+- label = gtk_label_new_with_mnemonic (_("_Files"));
+- gtk_label_set_mnemonic_widget (GTK_LABEL (label), filesel->file_list);
+- gtk_widget_show (label);
+- gtk_tree_view_column_set_widget (column, label);
+- gtk_tree_view_column_set_sizing (column, GTK_TREE_VIEW_COLUMN_AUTOSIZE);
+- gtk_tree_view_append_column (GTK_TREE_VIEW (filesel->file_list), column);
+-
+- gtk_widget_set_size_request (filesel->file_list,
+- FILE_LIST_WIDTH, FILE_LIST_HEIGHT);
+- g_signal_connect (filesel->file_list, "row_activated",
+- G_CALLBACK (gtk_file_selection_file_activate), filesel);
+- g_signal_connect (gtk_tree_view_get_selection (GTK_TREE_VIEW (filesel->file_list)), "changed",
+- G_CALLBACK (gtk_file_selection_file_changed), filesel);
+-
+- /* gtk_clist_column_titles_passive (GTK_CLIST (filesel->file_list)); */
+-
+- scrolled_win = gtk_scrolled_window_new (NULL, NULL);
+- gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_win), GTK_SHADOW_IN);
+- gtk_container_add (GTK_CONTAINER (scrolled_win), filesel->file_list);
+- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win),
+- GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
+- gtk_container_set_border_width (GTK_CONTAINER (scrolled_win), 0);
+- gtk_container_add (GTK_CONTAINER (list_container), scrolled_win);
+- gtk_widget_show (filesel->file_list);
+- gtk_widget_show (scrolled_win);
+-
+ /* action area for packing buttons into. */
+ filesel->action_area = gtk_hbox_new (TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (filesel->main_vbox), filesel->action_area,
+@@ -2008,6 +2027,23 @@
+ }
+
+ static void
++gtk_file_selection_activate (GtkTreeView *tree_view,
++ GtkTreePath *path,
++ GtkTreeViewColumn *column,
++ gpointer user_data)
++{
++ GtkTreeModel *model = gtk_tree_view_get_model (tree_view);
++ GtkTreeIter iter;
++ gboolean is_file;
++
++ gtk_tree_model_get_iter (model, &iter, path);
++ gtk_tree_model_get (model, &iter, ISFILE_COLUMN, &is_file, -1);
++
++ if (! is_file)
++ gtk_file_selection_dir_activate (tree_view, path, column, user_data);
++}
++
++static void
+ gtk_file_selection_file_activate (GtkTreeView *tree_view,
+ GtkTreePath *path,
+ GtkTreeViewColumn *column,
+@@ -2103,7 +2139,6 @@
+ PossibleCompletion* poss;
+ GtkTreeIter iter;
+ GtkListStore *dir_model;
+- GtkListStore *file_model;
+ gchar* filename;
+ gchar* rem_path = rel_path;
+ gchar* sel_text;
+@@ -2125,10 +2160,8 @@
+ g_assert (cmpl_state->reference_dir);
+
+ dir_model = GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (fs->dir_list)));
+- file_model = GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (fs->file_list)));
+
+ gtk_list_store_clear (dir_model);
+- gtk_list_store_clear (file_model);
+
+ /* Set the dir list to include ./ and ../ */
+ gtk_list_store_append (dir_model, &iter);
+@@ -2150,13 +2183,17 @@
+ strcmp (filename, ".." G_DIR_SEPARATOR_S) != 0)
+ {
+ gtk_list_store_append (dir_model, &iter);
+- gtk_list_store_set (dir_model, &iter, DIR_COLUMN, filename, -1);
++ gtk_list_store_set (dir_model, &iter,
++ DIR_COLUMN, filename,
++ ISFILE_COLUMN, FALSE, -1);
+ }
+ }
+ else
+ {
+- gtk_list_store_append (file_model, &iter);
+- gtk_list_store_set (file_model, &iter, DIR_COLUMN, filename, -1);
++ gtk_list_store_append (dir_model, &iter);
++ gtk_list_store_set (dir_model, &iter,
++ DIR_COLUMN, filename,
++ ISFILE_COLUMN, TRUE, -1);
+ }
+ }
+
diff --git a/recipes/gtk+/gtk+-2.10.14/spinbutton.patch b/recipes/gtk+/gtk+-2.10.14/spinbutton.patch
new file mode 100644
index 0000000000..c26dc6d93c
--- /dev/null
+++ b/recipes/gtk+/gtk+-2.10.14/spinbutton.patch
@@ -0,0 +1,130 @@
+Index: gtk+-2.10.6/gtk/gtkspinbutton.c
+===================================================================
+--- gtk+-2.10.6.orig/gtk/gtkspinbutton.c
++++ gtk+-2.10.6/gtk/gtkspinbutton.c
+@@ -682,7 +682,7 @@ gtk_spin_button_size_allocate (GtkWidget
+
+ spin = GTK_SPIN_BUTTON (widget);
+ arrow_size = spin_button_get_arrow_size (spin);
+- panel_width = arrow_size + 2 * widget->style->xthickness;
++ panel_width = (2 * arrow_size) + 4 * widget->style->xthickness;
+
+ widget->allocation = *allocation;
+
+@@ -815,19 +815,16 @@ gtk_spin_button_draw_arrow (GtkSpinButto
+ {
+ width = spin_button_get_arrow_size (spin_button) + 2 * widget->style->xthickness;
+
++ y = widget->style->ythickness;
++ height = widget->requisition.height - (2 * y);
++
+ if (arrow_type == GTK_ARROW_UP)
+ {
+ x = 0;
+- y = 0;
+-
+- height = widget->requisition.height / 2;
+ }
+ else
+ {
+- x = 0;
+- y = widget->requisition.height / 2;
+-
+- height = (widget->requisition.height + 1) / 2;
++ x = width;
+ }
+
+ if (spin_button_at_limit (spin_button, arrow_type))
+@@ -857,32 +854,17 @@ gtk_spin_button_draw_arrow (GtkSpinButto
+ shadow_type = GTK_SHADOW_OUT;
+ }
+ }
+-
++
+ gtk_paint_box (widget->style, spin_button->panel,
+ state_type, shadow_type,
+ NULL, widget,
+- (arrow_type == GTK_ARROW_UP)? "spinbutton_up" : "spinbutton_down",
++ NULL,
+ x, y, width, height);
+
+ height = widget->requisition.height;
+
+- if (arrow_type == GTK_ARROW_DOWN)
+- {
+- y = height / 2;
+- height = height - y - 2;
+- }
+- else
+- {
+- y = 2;
+- height = height / 2 - 2;
+- }
+-
+ width -= 3;
+-
+- if (widget && gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
+- x = 2;
+- else
+- x = 1;
++ height -= 3;
+
+ w = width / 2;
+ w -= w % 2 - 1; /* force odd */
+@@ -1062,7 +1044,7 @@ gtk_spin_button_button_press (GtkWidget
+ if (GTK_ENTRY (widget)->editable)
+ gtk_spin_button_update (spin);
+
+- if (event->y <= widget->requisition.height / 2)
++ if (event->x <= (spin_button_get_arrow_size (spin) + widget->style->xthickness))
+ {
+ if (event->button == 1)
+ start_spinning (spin, GTK_ARROW_UP, spin->adjustment->step_increment);
+@@ -1097,44 +1079,11 @@ gtk_spin_button_button_release (GtkWidge
+
+ arrow_size = spin_button_get_arrow_size (spin);
+
+- if (event->button == spin->button)
+- {
+- int click_child = spin->click_child;
++ gtk_spin_button_stop_spinning (spin);
+
+- gtk_spin_button_stop_spinning (spin);
+-
+- if (event->button == 3)
+- {
+- if (event->y >= 0 && event->x >= 0 &&
+- event->y <= widget->requisition.height &&
+- event->x <= arrow_size + 2 * widget->style->xthickness)
+- {
+- if (click_child == GTK_ARROW_UP &&
+- event->y <= widget->requisition.height / 2)
+- {
+- gdouble diff;
+-
+- diff = spin->adjustment->upper - spin->adjustment->value;
+- if (diff > EPSILON)
+- gtk_spin_button_real_spin (spin, diff);
+- }
+- else if (click_child == GTK_ARROW_DOWN &&
+- event->y > widget->requisition.height / 2)
+- {
+- gdouble diff;
+-
+- diff = spin->adjustment->value - spin->adjustment->lower;
+- if (diff > EPSILON)
+- gtk_spin_button_real_spin (spin, -diff);
+- }
+- }
+- }
+- spin_button_redraw (spin);
++ spin_button_redraw (spin);
+
+- return TRUE;
+- }
+- else
+- return GTK_WIDGET_CLASS (gtk_spin_button_parent_class)->button_release_event (widget, event);
++ return TRUE;
+ }
+
+ static gint
diff --git a/recipes/gtk+/gtk+-2.10.14/toggle-font.diff b/recipes/gtk+/gtk+-2.10.14/toggle-font.diff
new file mode 100644
index 0000000000..928da72430
--- /dev/null
+++ b/recipes/gtk+/gtk+-2.10.14/toggle-font.diff
@@ -0,0 +1,100 @@
+Index: gtk/gtkcellrenderertoggle.c
+===================================================================
+--- gtk/gtkcellrenderertoggle.c (revision 18523)
++++ gtk/gtkcellrenderertoggle.c (working copy)
+@@ -71,6 +71,8 @@
+ PROP_INDICATOR_SIZE
+ };
+
++/* This is a hard-coded default which promptly gets overridden by a size
++ calculated from the font size. */
+ #define TOGGLE_WIDTH 12
+
+ static guint toggle_cell_signals[LAST_SIGNAL] = { 0 };
+@@ -80,8 +82,9 @@
+ typedef struct _GtkCellRendererTogglePrivate GtkCellRendererTogglePrivate;
+ struct _GtkCellRendererTogglePrivate
+ {
+- gint indicator_size;
+-
++ gint indicator_size; /* This is the real size */
++ gint override_size; /* This is the size set from the indicator-size property */
++ GtkWidget *cached_widget;
+ guint inconsistent : 1;
+ };
+
+@@ -104,6 +107,7 @@
+ GTK_CELL_RENDERER (celltoggle)->ypad = 2;
+
+ priv->indicator_size = TOGGLE_WIDTH;
++ priv->override_size = 0;
+ priv->inconsistent = FALSE;
+ }
+
+@@ -210,7 +214,7 @@
+ g_value_set_boolean (value, celltoggle->radio);
+ break;
+ case PROP_INDICATOR_SIZE:
+- g_value_set_int (value, priv->indicator_size);
++ g_value_set_int (value, priv->override_size ? priv->override_size : priv->indicator_size);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
+@@ -245,7 +249,7 @@
+ celltoggle->radio = g_value_get_boolean (value);
+ break;
+ case PROP_INDICATOR_SIZE:
+- priv->indicator_size = g_value_get_int (value);
++ priv->override_size = g_value_get_int (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
+@@ -273,6 +277,27 @@
+ }
+
+ static void
++on_widget_style_set (GtkWidget *widget, GtkStyle *previous, gpointer user_data)
++{
++ GtkCellRendererTogglePrivate *priv = user_data;
++ PangoContext *context;
++ PangoFontMetrics *metrics;
++ int height;
++
++ context = gtk_widget_get_pango_context (widget);
++ metrics = pango_context_get_metrics (context,
++ widget->style->font_desc,
++ pango_context_get_language (context));
++
++ height = pango_font_metrics_get_ascent (metrics) +
++ pango_font_metrics_get_descent (metrics);
++
++ pango_font_metrics_unref (metrics);
++
++ priv->indicator_size = PANGO_PIXELS (height * 0.85);
++}
++
++static void
+ gtk_cell_renderer_toggle_get_size (GtkCellRenderer *cell,
+ GtkWidget *widget,
+ GdkRectangle *cell_area,
+@@ -287,6 +312,20 @@
+
+ priv = GTK_CELL_RENDERER_TOGGLE_GET_PRIVATE (cell);
+
++ if (priv->override_size) {
++ priv->indicator_size = priv->override_size;
++ } else if (priv->cached_widget != widget) {
++ if (priv->cached_widget) {
++ g_object_remove_weak_pointer (widget, &priv->cached_widget);
++ g_signal_handlers_disconnect_by_func (priv->cached_widget, on_widget_style_set, priv);
++ }
++ priv->cached_widget = widget;
++ g_object_add_weak_pointer (widget, &priv->cached_widget);
++ g_signal_connect (widget, "style-set", on_widget_style_set, priv);
++
++ on_widget_style_set (widget, NULL, priv);
++ }
++
+ calc_width = (gint) cell->xpad * 2 + priv->indicator_size;
+ calc_height = (gint) cell->ypad * 2 + priv->indicator_size;
+
diff --git a/recipes/gtk+/gtk+-2.10.14/treeview-checkbox-size.patch b/recipes/gtk+/gtk+-2.10.14/treeview-checkbox-size.patch
new file mode 100644
index 0000000000..ab3c208ee5
--- /dev/null
+++ b/recipes/gtk+/gtk+-2.10.14/treeview-checkbox-size.patch
@@ -0,0 +1,100 @@
+Index: gtk/gtkcellrenderertoggle.c
+===================================================================
+--- gtk/gtkcellrenderertoggle.c (revision 18523)
++++ gtk/gtkcellrenderertoggle.c (working copy)
+@@ -71,6 +71,8 @@
+ PROP_INDICATOR_SIZE
+ };
+
++/* This is a hard-coded default which promptly gets overridden by a size
++ calculated from the font size. */
+ #define TOGGLE_WIDTH 12
+
+ static guint toggle_cell_signals[LAST_SIGNAL] = { 0 };
+@@ -80,8 +82,9 @@
+ typedef struct _GtkCellRendererTogglePrivate GtkCellRendererTogglePrivate;
+ struct _GtkCellRendererTogglePrivate
+ {
+- gint indicator_size;
+-
++ gint indicator_size; /* This is the real size */
++ gint override_size; /* This is the size set from the indicator-size property */
++ GtkWidget *cached_widget;
+ guint inconsistent : 1;
+ };
+
+@@ -104,6 +107,7 @@
+ GTK_CELL_RENDERER (celltoggle)->ypad = 2;
+
+ priv->indicator_size = TOGGLE_WIDTH;
++ priv->override_size = 0;
+ priv->inconsistent = FALSE;
+ }
+
+@@ -210,7 +214,7 @@
+ g_value_set_boolean (value, celltoggle->radio);
+ break;
+ case PROP_INDICATOR_SIZE:
+- g_value_set_int (value, priv->indicator_size);
++ g_value_set_int (value, priv->override_size ? priv->override_size : priv->indicator_size);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
+@@ -245,7 +249,7 @@
+ celltoggle->radio = g_value_get_boolean (value);
+ break;
+ case PROP_INDICATOR_SIZE:
+- priv->indicator_size = g_value_get_int (value);
++ priv->override_size = g_value_get_int (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
+@@ -273,6 +277,27 @@
+ }
+
+ static void
++on_widget_style_set (GtkWidget *widget, GtkStyle *previous, gpointer user_data)
++{
++ GtkCellRendererTogglePrivate *priv = user_data;
++ PangoContext *context;
++ PangoFontMetrics *metrics;
++ int height;
++
++ context = gtk_widget_get_pango_context (widget);
++ metrics = pango_context_get_metrics (context,
++ widget->style->font_desc,
++ pango_context_get_language (context));
++
++ height = pango_font_metrics_get_ascent (metrics) +
++ pango_font_metrics_get_descent (metrics);
++
++ pango_font_metrics_unref (metrics);
++
++ priv->indicator_size = PANGO_PIXELS (height * 0.85);
++}
++
++static void
+ gtk_cell_renderer_toggle_get_size (GtkCellRenderer *cell,
+ GtkWidget *widget,
+ GdkRectangle *cell_area,
+@@ -287,6 +312,20 @@
+
+ priv = GTK_CELL_RENDERER_TOGGLE_GET_PRIVATE (cell);
+
++ if (priv->override_size) {
++ priv->indicator_size = priv->override_size;
++ } else if (priv->cached_widget != widget) {
++ if (priv->cached_widget) {
++ g_object_remove_weak_pointer (G_OBJECT (widget), (gpointer*)&priv->cached_widget);
++ g_signal_handlers_disconnect_by_func (priv->cached_widget, on_widget_style_set, priv);
++ }
++ priv->cached_widget = widget;
++ g_object_add_weak_pointer (G_OBJECT (widget), (gpointer*)&priv->cached_widget);
++ g_signal_connect (widget, "style-set", G_CALLBACK (on_widget_style_set), priv);
++
++ on_widget_style_set (widget, NULL, priv);
++ }
++
+ calc_width = (gint) cell->xpad * 2 + priv->indicator_size;
+ calc_height = (gint) cell->ypad * 2 + priv->indicator_size;
+