summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross@openedhand.com>2007-09-03 09:35:01 +0000
committerRoss Burton <ross@openedhand.com>2007-09-03 09:35:01 +0000
commita4a82d661c5c2e866a38c339cd7a82ebed394831 (patch)
tree55025a42b1b04d599eb97d957fbe555865d88750
parentd392c1c19cc5f865d412c8deec2c61826d48a6e4 (diff)
downloadpoky-a4a82d661c5c2e866a38c339cd7a82ebed394831.tar.gz
Remove patches which are not used, or should not be used
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2672 311d38ba-8fff-0310-9ca6-ca027cbcb966
-rw-r--r--meta/packages/gtk+/gtk+-2.10.14/automake-lossage.patch24
-rw-r--r--meta/packages/gtk+/gtk+-2.10.14/disable-tooltips.patch11
-rw-r--r--meta/packages/gtk+/gtk+-2.10.14/gtk+-handhelds.patch149
-rw-r--r--meta/packages/gtk+/gtk+-2.10.14/migration.patch611
-rw-r--r--meta/packages/gtk+/gtk+-2.10.14/no-xwc.patch151
-rw-r--r--meta/packages/gtk+/gtk+-2.10.14/scroll-timings.patch11
-rw-r--r--meta/packages/gtk+/gtk+-2.10.14/single-click.patch56
-rw-r--r--meta/packages/gtk+/gtk+-2.10.14/spinbutton.patch130
-rw-r--r--meta/packages/gtk+/gtk+_2.10.14.bb12
9 files changed, 2 insertions, 1153 deletions
diff --git a/meta/packages/gtk+/gtk+-2.10.14/automake-lossage.patch b/meta/packages/gtk+/gtk+-2.10.14/automake-lossage.patch
deleted file mode 100644
index 0d423ddbb9..0000000000
--- a/meta/packages/gtk+/gtk+-2.10.14/automake-lossage.patch
+++ /dev/null
@@ -1,24 +0,0 @@
1--- gtk+-2.4.1/docs/tutorial/Makefile.am~ 2003-05-06 22:54:20.000000000 +0100
2+++ gtk+-2.4.1/docs/tutorial/Makefile.am 2004-05-08 12:31:41.000000000 +0100
3@@ -52,21 +52,5 @@
4
5 dist-hook: html
6 cp -Rp $(srcdir)/html $(distdir)
7-else
8-html:
9- echo "***"
10- echo "*** Warning: Tutorial not built"
11- echo "***"
12-
13-pdf:
14- echo "***"
15- echo "*** Warning: Tutorial not built"
16- echo "***"
17-
18-dist-hook:
19- echo "***"
20- echo "*** Warning: Tutorial not built"
21- echo "*** DISTRIBUTION IS INCOMPLETE"
22- echo "***"
23 endif
24
diff --git a/meta/packages/gtk+/gtk+-2.10.14/disable-tooltips.patch b/meta/packages/gtk+/gtk+-2.10.14/disable-tooltips.patch
deleted file mode 100644
index d71d839c3c..0000000000
--- a/meta/packages/gtk+/gtk+-2.10.14/disable-tooltips.patch
+++ /dev/null
@@ -1,11 +0,0 @@
1--- gtk+-2.4.3/gtk/gtktooltips.c.old 2004-07-04 18:52:04.000000000 +0100
2+++ gtk+-2.4.3/gtk/gtktooltips.c 2004-07-04 18:52:08.000000000 +0100
3@@ -118,7 +118,7 @@
4 tooltips->tips_data_list = NULL;
5
6 tooltips->delay = DEFAULT_DELAY;
7- tooltips->enabled = TRUE;
8+ tooltips->enabled = FALSE;
9 tooltips->timer_tag = 0;
10 tooltips->use_sticky_delay = FALSE;
11 tooltips->last_popdown.tv_sec = -1;
diff --git a/meta/packages/gtk+/gtk+-2.10.14/gtk+-handhelds.patch b/meta/packages/gtk+/gtk+-2.10.14/gtk+-handhelds.patch
deleted file mode 100644
index 1ea86ce6b2..0000000000
--- a/meta/packages/gtk+/gtk+-2.10.14/gtk+-handhelds.patch
+++ /dev/null
@@ -1,149 +0,0 @@
1Index: gtk+-2.10.6/gtk/gtkarrow.c
2===================================================================
3--- gtk+-2.10.6.orig/gtk/gtkarrow.c 2006-05-14 05:25:28.000000000 +0100
4+++ gtk+-2.10.6/gtk/gtkarrow.c 2006-11-14 12:03:45.000000000 +0000
5@@ -31,7 +31,7 @@
6 #include "gtkintl.h"
7 #include "gtkalias.h"
8
9-#define MIN_ARROW_SIZE 15
10+#define MIN_ARROW_SIZE 7
11
12 enum {
13 PROP_0,
14@@ -53,6 +53,8 @@
15 guint prop_id,
16 GValue *value,
17 GParamSpec *pspec);
18+static void gtk_arrow_size_request (GtkWidget *arrow,
19+ GtkRequisition *requisition);
20
21
22 G_DEFINE_TYPE (GtkArrow, gtk_arrow, GTK_TYPE_MISC)
23@@ -88,6 +90,7 @@
24 GTK_PARAM_READWRITE));
25
26 widget_class->expose_event = gtk_arrow_expose;
27+ widget_class->size_request = gtk_arrow_size_request;
28 }
29
30 static void
31@@ -143,13 +146,18 @@
32 }
33
34 static void
35+gtk_arrow_size_request (GtkWidget *arrow,
36+ GtkRequisition *requisition)
37+{
38+ requisition->width = MIN_ARROW_SIZE + GTK_MISC (arrow)->xpad * 2;
39+ requisition->height = MIN_ARROW_SIZE + GTK_MISC (arrow)->ypad * 2;
40+}
41+
42+static void
43 gtk_arrow_init (GtkArrow *arrow)
44 {
45 GTK_WIDGET_SET_FLAGS (arrow, GTK_NO_WINDOW);
46
47- GTK_WIDGET (arrow)->requisition.width = MIN_ARROW_SIZE + GTK_MISC (arrow)->xpad * 2;
48- GTK_WIDGET (arrow)->requisition.height = MIN_ARROW_SIZE + GTK_MISC (arrow)->ypad * 2;
49-
50 arrow->arrow_type = GTK_ARROW_RIGHT;
51 arrow->shadow_type = GTK_SHADOW_OUT;
52 }
53Index: gtk+-2.10.6/gtk/gtkentry.c
54===================================================================
55--- gtk+-2.10.6.orig/gtk/gtkentry.c 2006-11-14 12:03:45.000000000 +0000
56+++ gtk+-2.10.6/gtk/gtkentry.c 2006-11-14 12:07:02.000000000 +0000
57@@ -577,6 +577,18 @@
58 0.0,
59 GTK_PARAM_READWRITE));
60
61+ // Added by gtk+-handhelds.patch
62+ gtk_widget_class_install_style_property (widget_class,
63+ g_param_spec_int ("min_width",
64+ P_("Minimum width"),
65+ P_("Minimum width of the entry field"),
66+ 0,
67+ G_MAXINT,
68+ MIN_ENTRY_WIDTH,
69+ G_PARAM_READABLE));
70+
71+
72+
73 /**
74 * GtkEntry:truncate-multiline:
75 *
76@@ -1286,7 +1298,7 @@
77 {
78 GtkEntry *entry = GTK_ENTRY (widget);
79 PangoFontMetrics *metrics;
80- gint xborder, yborder;
81+ gint xborder, yborder, min_width;
82 GtkBorder inner_border;
83 PangoContext *context;
84
85@@ -1302,8 +1314,10 @@
86 _gtk_entry_get_borders (entry, &xborder, &yborder);
87 _gtk_entry_effective_inner_border (entry, &inner_border);
88
89+ gtk_widget_style_get (widget, "min_width", &min_width, NULL);
90+
91 if (entry->width_chars < 0)
92- requisition->width = MIN_ENTRY_WIDTH + xborder * 2 + inner_border.left + inner_border.right;
93+ requisition->width = min_width + xborder * 2 + inner_border.left + inner_border.right;
94 else
95 {
96 gint char_width = pango_font_metrics_get_approximate_char_width (metrics);
97Index: gtk+-2.10.6/gtk/gtkrange.c
98===================================================================
99--- gtk+-2.10.6.orig/gtk/gtkrange.c 2006-11-14 12:03:44.000000000 +0000
100+++ gtk+-2.10.6/gtk/gtkrange.c 2006-11-14 12:07:40.000000000 +0000
101@@ -197,6 +197,7 @@
102 static gboolean gtk_range_key_press (GtkWidget *range,
103 GdkEventKey *event);
104
105+static GdkAtom recognize_protocols_atom, atom_atom;
106
107 static guint signals[LAST_SIGNAL];
108
109@@ -213,6 +214,9 @@
110 object_class = (GtkObjectClass*) class;
111 widget_class = (GtkWidgetClass*) class;
112
113+ recognize_protocols_atom = gdk_atom_intern ("RECOGNIZE_PROTOCOLS", FALSE);
114+ atom_atom = gdk_atom_intern ("ATOM", FALSE);
115+
116 gobject_class->set_property = gtk_range_set_property;
117 gobject_class->get_property = gtk_range_get_property;
118 gobject_class->finalize = gtk_range_finalize;
119@@ -1020,6 +1024,12 @@
120 &attributes, attributes_mask);
121 gdk_window_set_user_data (range->event_window, range);
122
123+ gdk_property_change (range->event_window,
124+ recognize_protocols_atom,
125+ atom_atom,
126+ 32, GDK_PROP_MODE_REPLACE,
127+ NULL, 0);
128+
129 widget->style = gtk_style_attach (widget->style, widget->window);
130 }
131
132@@ -1569,7 +1579,7 @@
133
134 /* ignore presses when we're already doing something else. */
135 if (range->layout->grab_location != MOUSE_OUTSIDE)
136- return FALSE;
137+ return TRUE;
138
139 range->layout->mouse_x = event->x;
140 range->layout->mouse_y = event->y;
141@@ -1778,7 +1788,7 @@
142 return TRUE;
143 }
144
145- return FALSE;
146+ return TRUE;
147 }
148
149 /**
diff --git a/meta/packages/gtk+/gtk+-2.10.14/migration.patch b/meta/packages/gtk+/gtk+-2.10.14/migration.patch
deleted file mode 100644
index 4ee786e688..0000000000
--- a/meta/packages/gtk+/gtk+-2.10.14/migration.patch
+++ /dev/null
@@ -1,611 +0,0 @@
1Index: configure.in
2===================================================================
3--- configure.in.orig 2006-10-03 17:54:09.000000000 +0100
4+++ configure.in 2006-10-30 12:58:33.000000000 +0000
5@@ -1529,6 +1529,16 @@
6 GTK_EXTRA_CFLAGS="$msnative_struct"
7 fi
8
9+AC_ARG_ENABLE(display-migration,
10+ [AC_HELP_STRING([--enable-display-migration],
11+ [include support for GPE_CHANGE_DISPLAY protocol])],
12+ enable_migration=yes, enable_migration=no)
13+if test "$enable_migration" = "yes"; then
14+ AC_DEFINE([ENABLE_MIGRATION], 1, [Define if display migration is enabled])
15+ GTK_DEP_LIBS="$GTK_DEP_LIBS -lgcrypt"
16+fi
17+AM_CONDITIONAL(ENABLE_MIGRATION, test $enable_migration = "yes")
18+
19 AC_SUBST(GTK_PACKAGES)
20 AC_SUBST(GTK_EXTRA_LIBS)
21 AC_SUBST(GTK_EXTRA_CFLAGS)
22Index: gtk/Makefile.am
23===================================================================
24--- gtk/Makefile.am.orig 2006-10-02 18:27:53.000000000 +0100
25+++ gtk/Makefile.am 2006-10-30 12:59:14.000000000 +0000
26@@ -589,6 +589,11 @@
27 gtkwindow-decorate.c \
28 gtkwindow.c \
29 $(gtk_clipboard_dnd_c_sources)
30+
31+if ENABLE_MIGRATION
32+gtk_base_c_sources += gtkmigration.c
33+endif
34+
35 gtk_c_sources = $(gtk_base_c_sources)
36 gtk_all_c_sources = $(gtk_base_c_sources)
37
38Index: gtk/gtkmain.c
39===================================================================
40--- gtk/gtkmain.c.orig 2006-09-03 06:31:21.000000000 +0100
41+++ gtk/gtkmain.c 2006-10-30 12:56:34.000000000 +0000
42@@ -507,6 +507,10 @@
43 _gtk_accel_map_init ();
44 _gtk_rc_init ();
45
46+#ifdef ENABLE_MIGRATION
47+ gtk_migration_init ();
48+#endif
49+
50 /* Set the 'initialized' flag.
51 */
52 gtk_initialized = TRUE;
53Index: gtk/gtkmigration.c
54===================================================================
55--- /dev/null 1970-01-01 00:00:00.000000000 +0000
56+++ gtk/gtkmigration.c 2006-10-30 12:56:34.000000000 +0000
57@@ -0,0 +1,529 @@
58+/*
59+ * Copyright (C) 2003, 2005 Philip Blundell <philb@gnu.org>
60+ *
61+ * This program is free software; you can redistribute it and/or
62+ * modify it under the terms of the GNU General Public License
63+ * as published by the Free Software Foundation; either version
64+ * 2 of the License, or (at your option) any later version.
65+ */
66+
67+#include <stdlib.h>
68+#include <ctype.h>
69+#include <libintl.h>
70+#include <string.h>
71+#include <assert.h>
72+
73+#include <X11/X.h>
74+#include <X11/Xlib.h>
75+#include <X11/Xatom.h>
76+
77+#include <gcrypt.h>
78+
79+#include "gtk.h"
80+#include "gdk.h"
81+#include "x11/gdkx.h"
82+
83+#define _(x) gettext(x)
84+
85+static GdkAtom string_gdkatom, display_change_gdkatom;
86+static GdkAtom rsa_challenge_gdkatom;
87+
88+#define DISPLAY_CHANGE_SUCCESS 0
89+#define DISPLAY_CHANGE_UNABLE_TO_CONNECT 1
90+#define DISPLAY_CHANGE_NO_SUCH_SCREEN 2
91+#define DISPLAY_CHANGE_AUTHENTICATION_BAD 3
92+#define DISPLAY_CHANGE_INDETERMINATE_ERROR 4
93+
94+static gboolean no_auth;
95+
96+static GSList *all_widgets;
97+
98+static gboolean gtk_migration_initialised;
99+
100+#define CHALLENGE_LEN 64
101+
102+gchar *gtk_migration_auth_challenge_string;
103+
104+static unsigned char challenge_bytes[CHALLENGE_LEN];
105+static unsigned long challenge_seq;
106+
107+#define hexbyte(x) ((x) >= 10 ? (x) + 'a' - 10 : (x) + '0')
108+
109+struct rsa_key
110+{
111+ gcry_mpi_t n, e, d, p, q, u;
112+};
113+
114+static gcry_mpi_t
115+mpi_from_sexp (gcry_sexp_t r, char *tag)
116+{
117+ gcry_sexp_t s = gcry_sexp_find_token (r, tag, 0);
118+ return gcry_sexp_nth_mpi (s, 1, GCRYMPI_FMT_USG);
119+}
120+
121+static char *
122+hex_from_mpi (gcry_mpi_t m)
123+{
124+ char *buf;
125+ gcry_mpi_aprint (GCRYMPI_FMT_HEX, (void *)&buf, NULL, m);
126+ return buf;
127+}
128+
129+static void
130+gtk_migration_crypt_create_hash (char *display, char *challenge, size_t len, char *result)
131+{
132+ size_t dlen = strlen (display);
133+ gchar *buf = g_malloc (dlen + 1 + len);
134+ strcpy (buf, display);
135+ memcpy (buf + dlen + 1, challenge, len);
136+ gcry_md_hash_buffer (GCRY_MD_SHA1, result, buf, len + dlen + 1);
137+ g_free (buf);
138+}
139+
140+static int
141+do_encode_md (const unsigned char *digest, size_t digestlen, int algo,
142+ unsigned int nbits, gcry_mpi_t *r_val)
143+{
144+ int nframe = (nbits+7) / 8;
145+ unsigned char *frame;
146+ int i, n;
147+ unsigned char asn[100];
148+ size_t asnlen;
149+
150+ asnlen = sizeof(asn);
151+ if (gcry_md_algo_info (algo, GCRYCTL_GET_ASNOID, asn, &asnlen))
152+ return -1;
153+
154+ if (digestlen + asnlen + 4 > nframe )
155+ return -1;
156+
157+ /* We encode the MD in this way:
158+ *
159+ * 0 1 PAD(n bytes) 0 ASN(asnlen bytes) MD(len bytes)
160+ *
161+ * PAD consists of FF bytes.
162+ */
163+ frame = g_malloc (nframe);
164+ n = 0;
165+ frame[n++] = 0;
166+ frame[n++] = 1; /* block type */
167+ i = nframe - digestlen - asnlen -3 ;
168+ assert ( i > 1 );
169+ memset ( frame+n, 0xff, i ); n += i;
170+ frame[n++] = 0;
171+ memcpy ( frame+n, asn, asnlen ); n += asnlen;
172+ memcpy ( frame+n, digest, digestlen ); n += digestlen;
173+ assert ( n == nframe );
174+
175+ gcry_mpi_scan (r_val, GCRYMPI_FMT_USG, frame, nframe, &nframe);
176+ g_free (frame);
177+ return 0;
178+}
179+
180+static gboolean
181+gtk_migration_crypt_check_signature (struct rsa_key *k, char *hash, char *sigbuf)
182+{
183+ gcry_mpi_t mpi, mpi2;
184+ gcry_sexp_t data, sig, key;
185+ int rc;
186+
187+ do_encode_md (hash, 20, GCRY_MD_SHA1, 1024, &mpi);
188+
189+ gcry_sexp_build (&data, NULL, "(data (value %m))", mpi);
190+
191+ gcry_mpi_release (mpi);
192+
193+ gcry_sexp_build (&key, NULL, "(public-key (rsa (n %m) (e %m)))", k->n, k->e);
194+
195+ if (gcry_mpi_scan (&mpi2, GCRYMPI_FMT_HEX, sigbuf, 0, NULL))
196+ {
197+ gcry_sexp_release (data);
198+ return FALSE;
199+ }
200+
201+ gcry_sexp_build (&sig, NULL, "(sig-val (rsa (s %m)))", mpi2);
202+
203+ rc = gcry_pk_verify (sig, data, key);
204+
205+ gcry_sexp_release (data);
206+ gcry_sexp_release (key);
207+ gcry_sexp_release (sig);
208+ gcry_mpi_release (mpi2);
209+
210+ if (rc)
211+ return FALSE;
212+
213+ return TRUE;
214+}
215+
216+static void
217+gtk_migration_auth_update_challenge (void)
218+{
219+ int i;
220+ unsigned char *p;
221+
222+ if (gtk_migration_auth_challenge_string == NULL)
223+ gtk_migration_auth_challenge_string = g_malloc ((CHALLENGE_LEN * 2) + 9);
224+
225+ p = gtk_migration_auth_challenge_string;
226+
227+ for (i = 0; i < CHALLENGE_LEN; i++)
228+ {
229+ *p++ = hexbyte (challenge_bytes[i] >> 4);
230+ *p++ = hexbyte (challenge_bytes[i] & 15);
231+ }
232+
233+ sprintf (p, "%08lx", challenge_seq++);
234+}
235+
236+static void
237+gtk_migration_auth_generate_challenge (void)
238+{
239+ gcry_randomize (challenge_bytes, sizeof (challenge_bytes), GCRY_STRONG_RANDOM);
240+ gtk_migration_auth_update_challenge ();
241+}
242+
243+static struct rsa_key *
244+parse_pubkey (char *s)
245+{
246+ struct rsa_key *r;
247+ gcry_mpi_t n, e;
248+ gchar *sp;
249+
250+ sp = strtok (s, " \n");
251+ gcry_mpi_scan (&e, GCRYMPI_FMT_HEX, sp, 0, NULL);
252+ sp = strtok (NULL, " \n");
253+ gcry_mpi_scan (&n, GCRYMPI_FMT_HEX, sp, 0, NULL);
254+
255+ r = g_malloc0 (sizeof (struct rsa_key));
256+ r->e = e;
257+ r->n = n;
258+ return r;
259+}
260+
261+static struct rsa_key *
262+lookup_pubkey (u_int32_t id)
263+{
264+ const gchar *home_dir = g_get_home_dir ();
265+ gchar *filename = g_strdup_printf ("%s/.gpe/migrate/public", home_dir);
266+ FILE *fp = fopen (filename, "r");
267+ struct rsa_key *r = NULL;
268+
269+ if (fp)
270+ {
271+ while (!feof (fp))
272+ {
273+ char buffer[4096];
274+ if (fgets (buffer, 4096, fp))
275+ {
276+ char *p;
277+ u_int32_t this_id = strtoul (buffer, &p, 16);
278+ if (p != buffer && *p == ' ')
279+ {
280+#ifdef DEBUG
281+ fprintf (stderr, "found id %x\n", this_id);
282+#endif
283+ if (this_id == id)
284+ {
285+ r = parse_pubkey (++p);
286+ break;
287+ }
288+ }
289+ }
290+ }
291+ fclose (fp);
292+ }
293+
294+ g_free (filename);
295+ return r;
296+}
297+
298+static void
299+free_pubkey (struct rsa_key *k)
300+{
301+ gcry_mpi_release (k->n);
302+ gcry_mpi_release (k->e);
303+
304+ g_free (k);
305+}
306+
307+static gboolean
308+gtk_migration_auth_validate_request (char *display, char *data)
309+{
310+ u_int32_t key_id;
311+ char *ep;
312+ char *p;
313+ struct rsa_key *k;
314+ char hash[20];
315+ gboolean rc;
316+
317+ p = strchr (data, ' ');
318+ if (p == NULL)
319+ return FALSE;
320+ *p++ = 0;
321+
322+ key_id = strtoul (data, &ep, 16);
323+ if (*ep)
324+ return FALSE;
325+
326+ k = lookup_pubkey (key_id);
327+ if (k == NULL)
328+ return FALSE;
329+
330+ gtk_migration_crypt_create_hash (display, gtk_migration_auth_challenge_string,
331+ strlen (gtk_migration_auth_challenge_string), hash);
332+
333+ rc = gtk_migration_crypt_check_signature (k, hash, p);
334+
335+ free_pubkey (k);
336+
337+ return rc;
338+}
339+
340+static int
341+do_change_display (GtkWidget *w, char *display_name)
342+{
343+ GdkDisplay *newdisplay;
344+ guint screen_nr = 1;
345+ guint i;
346+
347+ if (display_name[0] == 0)
348+ return DISPLAY_CHANGE_INDETERMINATE_ERROR;
349+
350+ i = strlen (display_name) - 1;
351+ while (i > 0 && isdigit (display_name[i]))
352+ i--;
353+
354+ if (display_name[i] == '.')
355+ {
356+ screen_nr = atoi (display_name + i + 1);
357+ display_name[i] = 0;
358+ }
359+
360+ newdisplay = gdk_display_open (display_name);
361+ if (newdisplay)
362+ {
363+ GdkScreen *screen = gdk_display_get_screen (newdisplay, screen_nr);
364+ if (screen)
365+ {
366+ gtk_window_set_screen (GTK_WINDOW (w), screen);
367+ gdk_display_manager_set_default_display (gdk_display_manager_get (),
368+ newdisplay);
369+ return DISPLAY_CHANGE_SUCCESS;
370+ }
371+ else
372+ return DISPLAY_CHANGE_NO_SUCH_SCREEN;
373+ }
374+
375+ return DISPLAY_CHANGE_UNABLE_TO_CONNECT;
376+}
377+
378+static void
379+set_challenge_on_window (GdkWindow *window)
380+{
381+ gdk_property_change (window, rsa_challenge_gdkatom, string_gdkatom,
382+ 8, GDK_PROP_MODE_REPLACE, gtk_migration_auth_challenge_string,
383+ strlen (gtk_migration_auth_challenge_string));
384+}
385+
386+static void
387+update_challenge_on_windows (void)
388+{
389+ GSList *i;
390+
391+ gtk_migration_auth_update_challenge ();
392+
393+ for (i = all_widgets; i; i = i->next)
394+ {
395+ GtkWidget *w = GTK_WIDGET (i->data);
396+ if (w->window)
397+ set_challenge_on_window (w->window);
398+ }
399+}
400+
401+static void
402+reset_state (GdkWindow *window)
403+{
404+ gdk_property_change (window, display_change_gdkatom, string_gdkatom,
405+ 8, GDK_PROP_MODE_REPLACE, NULL, 0);
406+}
407+
408+static void
409+generate_response (GdkDisplay *gdisplay, Display *dpy, Window window, int code)
410+{
411+ XClientMessageEvent ev;
412+ Atom atom = gdk_x11_atom_to_xatom_for_display (gdisplay,
413+ display_change_gdkatom);
414+
415+ memset (&ev, 0, sizeof (ev));
416+
417+ ev.type = ClientMessage;
418+ ev.window = window;
419+ ev.message_type = atom;
420+ ev.format = 32;
421+
422+ ev.data.l[0] = window;
423+ ev.data.l[1] = code;
424+
425+ XSendEvent (dpy, DefaultRootWindow (dpy), False, SubstructureNotifyMask, (XEvent *)&ev);
426+}
427+
428+static int
429+handle_request (GdkWindow *gwindow, char *prop)
430+{
431+ GtkWidget *widget;
432+ char *target, *auth_method, *auth_data;
433+ char *p;
434+
435+ target = prop;
436+ auth_method = "NULL";
437+ auth_data = NULL;
438+
439+ p = strchr (prop, ' ');
440+ if (p)
441+ {
442+ *p = 0;
443+ auth_method = ++p;
444+
445+ p = strchr (p, ' ');
446+ if (p)
447+ {
448+ *p = 0;
449+ auth_data = ++p;
450+ }
451+ }
452+
453+ if (no_auth == FALSE)
454+ {
455+ if (!strcasecmp (auth_method, "null"))
456+ return DISPLAY_CHANGE_AUTHENTICATION_BAD;
457+ else if (!strcasecmp (auth_method, "rsa-sig"))
458+ {
459+ if (gtk_migration_auth_validate_request (target, auth_data) == FALSE)
460+ return DISPLAY_CHANGE_AUTHENTICATION_BAD;
461+ }
462+ else
463+ return DISPLAY_CHANGE_AUTHENTICATION_BAD;
464+ }
465+
466+ gdk_window_get_user_data (gwindow, (gpointer*) &widget);
467+
468+ if (widget)
469+ return do_change_display (widget, target);
470+
471+ return DISPLAY_CHANGE_INDETERMINATE_ERROR;
472+}
473+
474+static GdkFilterReturn
475+filter_func (GdkXEvent *xevp, GdkEvent *ev, gpointer p)
476+{
477+ XPropertyEvent *xev = (XPropertyEvent *)xevp;
478+
479+ if (xev->type == PropertyNotify)
480+ {
481+ GdkDisplay *gdisplay;
482+ Atom atom;
483+
484+ gdisplay = gdk_x11_lookup_xdisplay (xev->display);
485+ if (gdisplay)
486+ {
487+ atom = gdk_x11_atom_to_xatom_for_display (gdisplay, display_change_gdkatom);
488+
489+ if (xev->atom == atom)
490+ {
491+ GdkWindow *gwindow;
492+
493+ gwindow = gdk_window_lookup_for_display (gdisplay, xev->window);
494+
495+ if (gwindow)
496+ {
497+ GdkAtom actual_type;
498+ gint actual_format;
499+ gint actual_length;
500+ unsigned char *prop = NULL;
501+
502+ if (gdk_property_get (gwindow, display_change_gdkatom, string_gdkatom,
503+ 0, G_MAXLONG, FALSE, &actual_type, &actual_format,
504+ &actual_length, &prop))
505+ {
506+ if (actual_length != 0)
507+ {
508+ if (actual_type == string_gdkatom && actual_length > 8)
509+ {
510+ gchar *buf = g_malloc (actual_length + 1);
511+ int rc;
512+
513+ memcpy (buf, prop, actual_length);
514+ buf[actual_length] = 0;
515+
516+ rc = handle_request (gwindow, buf);
517+
518+ g_free (buf);
519+ generate_response (gdisplay, xev->display, xev->window, rc);
520+
521+ if (rc == DISPLAY_CHANGE_SUCCESS)
522+ update_challenge_on_windows ();
523+ }
524+
525+ reset_state (gwindow);
526+ }
527+ }
528+
529+ if (prop)
530+ g_free (prop);
531+ }
532+ }
533+
534+ return GDK_FILTER_REMOVE;
535+ }
536+ }
537+
538+ return GDK_FILTER_CONTINUE;
539+}
540+
541+static void
542+unrealize_window (GtkWidget *w)
543+{
544+ all_widgets = g_slist_remove (all_widgets, w);
545+}
546+
547+void
548+gtk_migration_mark_window (GtkWidget *w)
549+{
550+ if (! gtk_migration_initialised)
551+ {
552+ g_warning ("gtk_migration not initialised yet");
553+ return;
554+ }
555+
556+ if (GTK_WIDGET_REALIZED (w))
557+ {
558+ GdkWindow *window = w->window;
559+
560+ gdk_window_add_filter (window, filter_func, NULL);
561+
562+ reset_state (window);
563+ set_challenge_on_window (window);
564+
565+ all_widgets = g_slist_append (all_widgets, w);
566+
567+ g_signal_connect (G_OBJECT (w), "unrealize", G_CALLBACK (unrealize_window), NULL);
568+ }
569+ else
570+ g_signal_connect (G_OBJECT (w), "realize", G_CALLBACK (gtk_migration_mark_window), NULL);
571+}
572+
573+void
574+gtk_migration_init (void)
575+{
576+ if (getenv ("GPE_DISPLAY_MIGRATION_NO_AUTH") != NULL)
577+ no_auth = TRUE;
578+
579+ string_gdkatom = gdk_atom_intern ("STRING", FALSE);
580+ display_change_gdkatom = gdk_atom_intern ("_GPE_DISPLAY_CHANGE", FALSE);
581+ rsa_challenge_gdkatom = gdk_atom_intern ("_GPE_DISPLAY_CHANGE_RSA_CHALLENGE", FALSE);
582+
583+ gtk_migration_auth_generate_challenge ();
584+
585+ gtk_migration_initialised = TRUE;
586+}
587Index: gtk/gtkwindow.c
588===================================================================
589--- gtk/gtkwindow.c.orig 2006-10-03 16:51:46.000000000 +0100
590+++ gtk/gtkwindow.c 2006-10-30 12:56:34.000000000 +0000
591@@ -50,6 +50,9 @@
592 #include "x11/gdkx.h"
593 #endif
594
595+extern void gtk_migration_mark_window (GtkWidget *w);
596+
597+
598 enum {
599 SET_FOCUS,
600 FRAME_EVENT,
601@@ -823,6 +826,10 @@
602
603 g_signal_connect (window->screen, "composited_changed",
604 G_CALLBACK (gtk_window_on_composited_changed), window);
605+
606+#ifdef ENABLE_MIGRATION
607+ gtk_migration_mark_window (window);
608+#endif
609 }
610
611 static void
diff --git a/meta/packages/gtk+/gtk+-2.10.14/no-xwc.patch b/meta/packages/gtk+/gtk+-2.10.14/no-xwc.patch
deleted file mode 100644
index affb4a303e..0000000000
--- a/meta/packages/gtk+/gtk+-2.10.14/no-xwc.patch
+++ /dev/null
@@ -1,151 +0,0 @@
1diff -urNd ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c
2--- ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c 2004-11-30 14:57:14 +00:00
3+++ gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c 2005-01-02 15:38:06 +00:00
4@@ -576,12 +576,14 @@
5 GDK_GC_GET_XGC (gc), x, y, (XChar2b *) text, text_length / 2);
6 }
7 }
8+#ifdef HAVE_XWC
9 else if (font->type == GDK_FONT_FONTSET)
10 {
11 XFontSet fontset = (XFontSet) GDK_FONT_XFONT (font);
12 XmbDrawString (xdisplay, impl->xid,
13 fontset, GDK_GC_GET_XGC (gc), x, y, text, text_length);
14 }
15+#endif
16 else
17 g_error("undefined font type\n");
18 }
19@@ -613,6 +615,7 @@
20 GDK_GC_GET_XGC (gc), x, y, text_8bit, text_length);
21 g_free (text_8bit);
22 }
23+#ifdef HAVE_XWC
24 else if (font->type == GDK_FONT_FONTSET)
25 {
26 if (sizeof(GdkWChar) == sizeof(wchar_t))
27@@ -633,6 +636,7 @@
28 g_free (text_wchar);
29 }
30 }
31+#endif
32 else
33 g_error("undefined font type\n");
34 }
35diff -urNd ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkfont-x11.c gtk+-2.6.0/gdk/x11/gdkfont-x11.c
36--- ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkfont-x11.c 2004-08-26 01:23:46 +01:00
37+++ gtk+-2.6.0/gdk/x11/gdkfont-x11.c 2005-01-02 15:45:39 +00:00
38@@ -525,10 +525,12 @@
39 width = XTextWidth16 (xfont, (XChar2b *) text, text_length / 2);
40 }
41 break;
42+#ifdef HAVE_XWC
43 case GDK_FONT_FONTSET:
44 fontset = (XFontSet) private->xfont;
45 width = XmbTextEscapement (fontset, text, text_length);
46 break;
47+#endif
48 default:
49 width = 0;
50 }
51@@ -578,6 +580,7 @@
52 width = 0;
53 }
54 break;
55+#ifdef HAVE_XWC
56 case GDK_FONT_FONTSET:
57 if (sizeof(GdkWChar) == sizeof(wchar_t))
58 {
59@@ -595,6 +598,7 @@
60 g_free (text_wchar);
61 }
62 break;
63+#endif
64 default:
65 width = 0;
66 }
67@@ -667,6 +671,7 @@
68 if (descent)
69 *descent = overall.descent;
70 break;
71+#ifdef HAVE_XWC
72 case GDK_FONT_FONTSET:
73 fontset = (XFontSet) private->xfont;
74 XmbTextExtents (fontset, text, text_length, &ink, &logical);
75@@ -681,6 +686,7 @@
76 if (descent)
77 *descent = ink.y + ink.height;
78 break;
79+#endif
80 }
81
82 }
83@@ -753,6 +759,7 @@
84 *descent = overall.descent;
85 break;
86 }
87+#ifdef HAVE_XWC
88 case GDK_FONT_FONTSET:
89 fontset = (XFontSet) private->xfont;
90
91@@ -780,6 +787,7 @@
92 if (descent)
93 *descent = ink.y + ink.height;
94 break;
95+#endif
96 }
97
98 }
99diff -urNd ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkim-x11.c gtk+-2.6.0/gdk/x11/gdkim-x11.c
100--- ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkim-x11.c 2004-11-17 00:55:10 +00:00
101+++ gtk+-2.6.0/gdk/x11/gdkim-x11.c 2005-01-02 15:42:04 +00:00
102@@ -48,6 +48,7 @@
103 void
104 _gdk_x11_initialize_locale (void)
105 {
106+#ifdef HAVE_XWC
107 wchar_t result;
108 gchar *current_locale;
109 static char *last_locale = NULL;
110@@ -93,7 +94,8 @@
111 GDK_NOTE (XIM,
112 g_message ("%s multi-byte string functions.",
113 gdk_use_mb ? "Using" : "Not using"));
114-
115+#endif
116+
117 return;
118 }
119
120@@ -136,6 +138,7 @@
121 {
122 gchar *mbstr;
123
124+#ifdef HAVE_XWC
125 if (gdk_use_mb)
126 {
127 GdkDisplay *display = find_a_display ();
128@@ -178,6 +181,7 @@
129 XFree (tpr.value);
130 }
131 else
132+#endif
133 {
134 gint length = 0;
135 gint i;
136@@ -210,6 +214,7 @@
137 gint
138 gdk_mbstowcs (GdkWChar *dest, const gchar *src, gint dest_max)
139 {
140+#ifdef HAVE_XWC
141 if (gdk_use_mb)
142 {
143 GdkDisplay *display = find_a_display ();
144@@ -242,6 +247,7 @@
145 return len_cpy;
146 }
147 else
148+#endif
149 {
150 gint i;
151
diff --git a/meta/packages/gtk+/gtk+-2.10.14/scroll-timings.patch b/meta/packages/gtk+/gtk+-2.10.14/scroll-timings.patch
deleted file mode 100644
index 3f823a7880..0000000000
--- a/meta/packages/gtk+/gtk+-2.10.14/scroll-timings.patch
+++ /dev/null
@@ -1,11 +0,0 @@
1--- gtk+-2.10.0/gtk/gtkrange.c.orig 2006-07-05 12:41:39.000000000 +0200
2+++ gtk+-2.10.0/gtk/gtkrange.c 2006-07-05 12:41:58.000000000 +0200
3@@ -39,7 +39,7 @@
4 #include "gtkalias.h"
5
6 #define SCROLL_DELAY_FACTOR 5 /* Scroll repeat multiplier */
7-#define UPDATE_DELAY 300 /* Delay for queued update */
8+#define UPDATE_DELAY 1000 /* Delay for queued update */
9
10 enum {
11 PROP_0,
diff --git a/meta/packages/gtk+/gtk+-2.10.14/single-click.patch b/meta/packages/gtk+/gtk+-2.10.14/single-click.patch
deleted file mode 100644
index 250f1629f5..0000000000
--- a/meta/packages/gtk+/gtk+-2.10.14/single-click.patch
+++ /dev/null
@@ -1,56 +0,0 @@
1Index: gtk+-2.10.6/gtk/gtkcalendar.c
2===================================================================
3--- gtk+-2.10.6.orig/gtk/gtkcalendar.c
4+++ gtk+-2.10.6/gtk/gtkcalendar.c
5@@ -2482,9 +2482,11 @@ calendar_main_button_press (GtkCalendar
6 }
7
8 calendar_select_and_focus_day (calendar, day);
9- }
10+
11+ // This change causes the calendar to disappear after choosing a day
12+/* }
13 else if (event->type == GDK_2BUTTON_PRESS)
14- {
15+ {*/
16 priv->in_drag = 0;
17 if (day_month == MONTH_CURRENT)
18 g_signal_emit (calendar,
19Index: gtk+-2.10.6/gtk/gtkfilesel.c
20===================================================================
21--- gtk+-2.10.6.orig/gtk/gtkfilesel.c
22+++ gtk+-2.10.6/gtk/gtkfilesel.c
23@@ -2426,6 +2426,33 @@ gtk_file_selection_file_changed (GtkTree
24 if (fs->last_selected != NULL)
25 g_free (fs->last_selected);
26
27+ // Single-click directory entry
28+ if (new_names->len == 1)
29+ {
30+ GtkTreeView *tree_view;
31+ GtkTreeModel *model;
32+ GtkTreePath *path;
33+ GtkTreeIter iter;
34+ gboolean is_file;
35+
36+ tree_view = gtk_tree_selection_get_tree_view (selection);
37+
38+ if (gtk_tree_selection_get_selected (selection, &model, &iter))
39+ {
40+ path = gtk_tree_model_get_path (model, &iter);
41+ gtk_tree_model_get (model, &iter, ISFILE_COLUMN, &is_file, -1);
42+
43+ if (!is_file)
44+ {
45+ gtk_file_selection_dir_activate (tree_view, path,
46+ gtk_tree_view_get_column (tree_view, DIR_COLUMN),
47+ user_data);
48+ }
49+
50+ gtk_tree_path_free (path);
51+ }
52+ }
53+
54 fs->last_selected = g_strdup (g_ptr_array_index (new_names, index));
55 filename = get_real_filename (fs->last_selected, FALSE);
56
diff --git a/meta/packages/gtk+/gtk+-2.10.14/spinbutton.patch b/meta/packages/gtk+/gtk+-2.10.14/spinbutton.patch
deleted file mode 100644
index c26dc6d93c..0000000000
--- a/meta/packages/gtk+/gtk+-2.10.14/spinbutton.patch
+++ /dev/null
@@ -1,130 +0,0 @@
1Index: gtk+-2.10.6/gtk/gtkspinbutton.c
2===================================================================
3--- gtk+-2.10.6.orig/gtk/gtkspinbutton.c
4+++ gtk+-2.10.6/gtk/gtkspinbutton.c
5@@ -682,7 +682,7 @@ gtk_spin_button_size_allocate (GtkWidget
6
7 spin = GTK_SPIN_BUTTON (widget);
8 arrow_size = spin_button_get_arrow_size (spin);
9- panel_width = arrow_size + 2 * widget->style->xthickness;
10+ panel_width = (2 * arrow_size) + 4 * widget->style->xthickness;
11
12 widget->allocation = *allocation;
13
14@@ -815,19 +815,16 @@ gtk_spin_button_draw_arrow (GtkSpinButto
15 {
16 width = spin_button_get_arrow_size (spin_button) + 2 * widget->style->xthickness;
17
18+ y = widget->style->ythickness;
19+ height = widget->requisition.height - (2 * y);
20+
21 if (arrow_type == GTK_ARROW_UP)
22 {
23 x = 0;
24- y = 0;
25-
26- height = widget->requisition.height / 2;
27 }
28 else
29 {
30- x = 0;
31- y = widget->requisition.height / 2;
32-
33- height = (widget->requisition.height + 1) / 2;
34+ x = width;
35 }
36
37 if (spin_button_at_limit (spin_button, arrow_type))
38@@ -857,32 +854,17 @@ gtk_spin_button_draw_arrow (GtkSpinButto
39 shadow_type = GTK_SHADOW_OUT;
40 }
41 }
42-
43+
44 gtk_paint_box (widget->style, spin_button->panel,
45 state_type, shadow_type,
46 NULL, widget,
47- (arrow_type == GTK_ARROW_UP)? "spinbutton_up" : "spinbutton_down",
48+ NULL,
49 x, y, width, height);
50
51 height = widget->requisition.height;
52
53- if (arrow_type == GTK_ARROW_DOWN)
54- {
55- y = height / 2;
56- height = height - y - 2;
57- }
58- else
59- {
60- y = 2;
61- height = height / 2 - 2;
62- }
63-
64 width -= 3;
65-
66- if (widget && gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
67- x = 2;
68- else
69- x = 1;
70+ height -= 3;
71
72 w = width / 2;
73 w -= w % 2 - 1; /* force odd */
74@@ -1062,7 +1044,7 @@ gtk_spin_button_button_press (GtkWidget
75 if (GTK_ENTRY (widget)->editable)
76 gtk_spin_button_update (spin);
77
78- if (event->y <= widget->requisition.height / 2)
79+ if (event->x <= (spin_button_get_arrow_size (spin) + widget->style->xthickness))
80 {
81 if (event->button == 1)
82 start_spinning (spin, GTK_ARROW_UP, spin->adjustment->step_increment);
83@@ -1097,44 +1079,11 @@ gtk_spin_button_button_release (GtkWidge
84
85 arrow_size = spin_button_get_arrow_size (spin);
86
87- if (event->button == spin->button)
88- {
89- int click_child = spin->click_child;
90+ gtk_spin_button_stop_spinning (spin);
91
92- gtk_spin_button_stop_spinning (spin);
93-
94- if (event->button == 3)
95- {
96- if (event->y >= 0 && event->x >= 0 &&
97- event->y <= widget->requisition.height &&
98- event->x <= arrow_size + 2 * widget->style->xthickness)
99- {
100- if (click_child == GTK_ARROW_UP &&
101- event->y <= widget->requisition.height / 2)
102- {
103- gdouble diff;
104-
105- diff = spin->adjustment->upper - spin->adjustment->value;
106- if (diff > EPSILON)
107- gtk_spin_button_real_spin (spin, diff);
108- }
109- else if (click_child == GTK_ARROW_DOWN &&
110- event->y > widget->requisition.height / 2)
111- {
112- gdouble diff;
113-
114- diff = spin->adjustment->value - spin->adjustment->lower;
115- if (diff > EPSILON)
116- gtk_spin_button_real_spin (spin, -diff);
117- }
118- }
119- }
120- spin_button_redraw (spin);
121+ spin_button_redraw (spin);
122
123- return TRUE;
124- }
125- else
126- return GTK_WIDGET_CLASS (gtk_spin_button_parent_class)->button_release_event (widget, event);
127+ return TRUE;
128 }
129
130 static gint
diff --git a/meta/packages/gtk+/gtk+_2.10.14.bb b/meta/packages/gtk+/gtk+_2.10.14.bb
index 8790765c36..940ea16ef5 100644
--- a/meta/packages/gtk+/gtk+_2.10.14.bb
+++ b/meta/packages/gtk+/gtk+_2.10.14.bb
@@ -1,20 +1,16 @@
1require gtk+.inc 1require gtk+.inc
2 2
3DEPENDS += "cairo" 3DEPENDS += "cairo"
4PR = "r14" 4PR = "r15"
5 5
6# disable per default - untested and not all patches included. 6# disable per default - untested and not all patches included.
7DEFAULT_PREFERENCE = "-1" 7DEFAULT_PREFERENCE = "-1"
8 8
9SRC_URI = "ftp://ftp.gtk.org/pub/gtk/v2.10/gtk+-${PV}.tar.bz2 \ 9SRC_URI = "ftp://ftp.gtk.org/pub/gtk/v2.10/gtk+-${PV}.tar.bz2 \
10 file://no-xwc.patch;patch=1 \
11 file://automake-lossage.patch;patch=1 \
12 file://disable-tooltips.patch;patch=1 \
13 file://gtklabel-resize-patch;patch=1 \ 10 file://gtklabel-resize-patch;patch=1 \
14 file://menu-deactivate.patch;patch=1 \ 11 file://menu-deactivate.patch;patch=1 \
15 file://xsettings.patch;patch=1 \ 12 file://xsettings.patch;patch=1 \
16 file://small-gtkfilesel.patch;patch=1 \ 13 file://small-gtkfilesel.patch;patch=1 \
17 file://migration.patch;patch=1;pnum=0 \
18 file://run-iconcache.patch;patch=1 \ 14 file://run-iconcache.patch;patch=1 \
19 file://disable-print.patch;patch=1 \ 15 file://disable-print.patch;patch=1 \
20 file://hardcoded_libtool.patch;patch=1 \ 16 file://hardcoded_libtool.patch;patch=1 \
@@ -25,16 +21,12 @@ SRC_URI = "ftp://ftp.gtk.org/pub/gtk/v2.10/gtk+-${PV}.tar.bz2 \
25 file://combo-arrow-size.patch;patch=1;pnum=0 \ 21 file://combo-arrow-size.patch;patch=1;pnum=0 \
26 file://range-no-redraw.patch;patch=1;pnum=0 \ 22 file://range-no-redraw.patch;patch=1;pnum=0 \
27 file://scrolled-placement.patch;patch=1;pnum=0 \ 23 file://scrolled-placement.patch;patch=1;pnum=0 \
28# file://scroll-timings.patch;patch=1 \
29# file://pangoxft2.10.6.diff;patch=1"
30# file://gtk+-handhelds.patch;patch=1
31# file://single-click.patch;patch=1
32# file://spinbutton.patch;patch=1 \
33 file://filesystem-volumes.patch;patch=1\ 24 file://filesystem-volumes.patch;patch=1\
34 file://filechooser-utils.patch;patch=1\ 25 file://filechooser-utils.patch;patch=1\
35 file://filechooser.patch;patch=1\ 26 file://filechooser.patch;patch=1\
36 file://filechooser-default.patch;patch=1\ 27 file://filechooser-default.patch;patch=1\
37 file://filechooser-respect-style.patch;patch=1" 28 file://filechooser-respect-style.patch;patch=1"
29#file://pangoxft2.10.6.diff;patch=1"
38 30
39 31
40EXTRA_OECONF = "--without-libtiff --disable-xkb --disable-glibtest --enable-display-migration" 32EXTRA_OECONF = "--without-libtiff --disable-xkb --disable-glibtest --enable-display-migration"