diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/packages/gtk+/gtk+-2.10.6/cellrenderer-cairo.patch | 32 | ||||
-rw-r--r-- | meta/packages/gtk+/gtk+-2.10.6/entry-cairo.patch | 103 | ||||
-rw-r--r-- | meta/packages/gtk+/gtk+_2.10.6.bb | 6 |
3 files changed, 139 insertions, 2 deletions
diff --git a/meta/packages/gtk+/gtk+-2.10.6/cellrenderer-cairo.patch b/meta/packages/gtk+/gtk+-2.10.6/cellrenderer-cairo.patch new file mode 100644 index 0000000000..4439e69fb6 --- /dev/null +++ b/meta/packages/gtk+/gtk+-2.10.6/cellrenderer-cairo.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | Index: gtk/gtkcellrenderer.c | ||
2 | =================================================================== | ||
3 | RCS file: /cvs/gnome/gtk+/gtk/gtkcellrenderer.c,v | ||
4 | retrieving revision 1.55 | ||
5 | diff -u -r1.55 gtkcellrenderer.c | ||
6 | --- gtk/gtkcellrenderer.c 14 May 2006 04:25:28 -0000 1.55 | ||
7 | +++ gtk/gtkcellrenderer.c 30 Jun 2006 10:57:43 -0000 | ||
8 | @@ -551,6 +551,7 @@ | ||
9 | |||
10 | if (cell->cell_background_set && !selected) | ||
11 | { | ||
12 | +#ifdef USE_CAIRO_INTERNALLY | ||
13 | cairo_t *cr = gdk_cairo_create (window); | ||
14 | |||
15 | gdk_cairo_rectangle (cr, background_area); | ||
16 | @@ -558,6 +559,16 @@ | ||
17 | cairo_fill (cr); | ||
18 | |||
19 | cairo_destroy (cr); | ||
20 | +#else | ||
21 | + GdkGC *gc; | ||
22 | + | ||
23 | + gc = gdk_gc_new (window); | ||
24 | + gdk_gc_set_rgb_fg_color (gc, &priv->cell_background); | ||
25 | + gdk_draw_rectangle (window, gc, TRUE, | ||
26 | + background_area->x, background_area->y, | ||
27 | + background_area->width, background_area->height); | ||
28 | + g_object_unref (gc); | ||
29 | +#endif | ||
30 | } | ||
31 | |||
32 | GTK_CELL_RENDERER_GET_CLASS (cell)->render (cell, | ||
diff --git a/meta/packages/gtk+/gtk+-2.10.6/entry-cairo.patch b/meta/packages/gtk+/gtk+-2.10.6/entry-cairo.patch new file mode 100644 index 0000000000..3313e7f132 --- /dev/null +++ b/meta/packages/gtk+/gtk+-2.10.6/entry-cairo.patch | |||
@@ -0,0 +1,103 @@ | |||
1 | Index: gtk/gtkentry.c | ||
2 | =================================================================== | ||
3 | RCS file: /cvs/gnome/gtk+/gtk/gtkentry.c,v | ||
4 | retrieving revision 1.317 | ||
5 | diff -u -r1.317 gtkentry.c | ||
6 | --- gtk/gtkentry.c 29 Jun 2006 09:18:05 -0000 1.317 | ||
7 | +++ gtk/gtkentry.c 2 Jul 2006 14:14:24 -0000 | ||
8 | @@ -3337,7 +3337,9 @@ | ||
9 | if (GTK_WIDGET_DRAWABLE (entry)) | ||
10 | { | ||
11 | PangoLayout *layout = gtk_entry_ensure_layout (entry, TRUE); | ||
12 | +#ifdef USE_CAIRO_INTERNALLY | ||
13 | cairo_t *cr; | ||
14 | +#endif | ||
15 | gint x, y; | ||
16 | gint start_pos, end_pos; | ||
17 | |||
18 | @@ -3345,23 +3347,35 @@ | ||
19 | |||
20 | get_layout_position (entry, &x, &y); | ||
21 | |||
22 | +#ifdef USE_CAIRO_INTERNALLY | ||
23 | cr = gdk_cairo_create (entry->text_area); | ||
24 | |||
25 | cairo_move_to (cr, x, y); | ||
26 | gdk_cairo_set_source_color (cr, &widget->style->text [widget->state]); | ||
27 | pango_cairo_show_layout (cr, layout); | ||
28 | +#else | ||
29 | + gdk_draw_layout (entry->text_area, widget->style->text_gc [widget->state], | ||
30 | + x, y, | ||
31 | + layout); | ||
32 | +#endif | ||
33 | |||
34 | if (gtk_editable_get_selection_bounds (GTK_EDITABLE (entry), &start_pos, &end_pos)) | ||
35 | { | ||
36 | gint *ranges; | ||
37 | gint n_ranges, i; | ||
38 | PangoRectangle logical_rect; | ||
39 | - GdkColor *selection_color, *text_color; | ||
40 | GtkBorder inner_border; | ||
41 | +#ifdef USE_CAIRO_INTERNALLY | ||
42 | + GdkColor *selection_color, *text_color; | ||
43 | +#else | ||
44 | + GdkGC *selection_gc, *text_gc; | ||
45 | + GdkRegion *clip_region; | ||
46 | +#endif | ||
47 | |||
48 | pango_layout_get_pixel_extents (layout, NULL, &logical_rect); | ||
49 | gtk_entry_get_pixel_ranges (entry, &ranges, &n_ranges); | ||
50 | |||
51 | +#ifdef USE_CAIRO_INTERNALLY | ||
52 | if (GTK_WIDGET_HAS_FOCUS (entry)) | ||
53 | { | ||
54 | selection_color = &widget->style->base [GTK_STATE_SELECTED]; | ||
55 | @@ -3390,11 +3404,46 @@ | ||
56 | cairo_move_to (cr, x, y); | ||
57 | gdk_cairo_set_source_color (cr, text_color); | ||
58 | pango_cairo_show_layout (cr, layout); | ||
59 | - | ||
60 | +#else | ||
61 | + if (GTK_WIDGET_HAS_FOCUS (entry)) | ||
62 | + { | ||
63 | + selection_gc = widget->style->base_gc [GTK_STATE_SELECTED]; | ||
64 | + text_gc = widget->style->text_gc [GTK_STATE_SELECTED]; | ||
65 | + } | ||
66 | + else | ||
67 | + { | ||
68 | + selection_gc = widget->style->base_gc [GTK_STATE_ACTIVE]; | ||
69 | + text_gc = widget->style->text_gc [GTK_STATE_ACTIVE]; | ||
70 | + } | ||
71 | + | ||
72 | + clip_region = gdk_region_new (); | ||
73 | + for (i = 0; i < n_ranges; ++i) | ||
74 | + { | ||
75 | + GdkRectangle rect; | ||
76 | + | ||
77 | + rect.x = inner_border.left - entry->scroll_offset + ranges[2 * i]; | ||
78 | + rect.y = y; | ||
79 | + rect.width = ranges[2 * i + 1]; | ||
80 | + rect.height = logical_rect.height; | ||
81 | + | ||
82 | + gdk_draw_rectangle (entry->text_area, selection_gc, TRUE, | ||
83 | + rect.x, rect.y, rect.width, rect.height); | ||
84 | + | ||
85 | + gdk_region_union_with_rect (clip_region, &rect); | ||
86 | + } | ||
87 | + | ||
88 | + gdk_gc_set_clip_region (text_gc, clip_region); | ||
89 | + gdk_draw_layout (entry->text_area, text_gc, | ||
90 | + x, y, | ||
91 | + layout); | ||
92 | + gdk_gc_set_clip_region (text_gc, NULL); | ||
93 | + gdk_region_destroy (clip_region); | ||
94 | +#endif | ||
95 | g_free (ranges); | ||
96 | } | ||
97 | - | ||
98 | +#ifdef USE_CAIRO_INTERNALLY | ||
99 | cairo_destroy (cr); | ||
100 | +#endif | ||
101 | } | ||
102 | } | ||
103 | |||
diff --git a/meta/packages/gtk+/gtk+_2.10.6.bb b/meta/packages/gtk+/gtk+_2.10.6.bb index a414f4d356..dc762d41cf 100644 --- a/meta/packages/gtk+/gtk+_2.10.6.bb +++ b/meta/packages/gtk+/gtk+_2.10.6.bb | |||
@@ -5,7 +5,7 @@ HOMEPAGE = "http://www.gtk.org" | |||
5 | SECTION = "libs" | 5 | SECTION = "libs" |
6 | PRIORITY = "optional" | 6 | PRIORITY = "optional" |
7 | DEPENDS = "glib-2.0 pango atk jpeg libpng libxext libxcursor gtk-doc libgcrypt cairo" | 7 | DEPENDS = "glib-2.0 pango atk jpeg libpng libxext libxcursor gtk-doc libgcrypt cairo" |
8 | PR = "r3" | 8 | PR = "r4" |
9 | 9 | ||
10 | # disable per default - untested and not all patches included. | 10 | # disable per default - untested and not all patches included. |
11 | DEFAULT_PREFERENCE = "-1" | 11 | DEFAULT_PREFERENCE = "-1" |
@@ -24,7 +24,9 @@ SRC_URI = "ftp://ftp.gtk.org/pub/gtk/v2.10/gtk+-${PV}.tar.bz2 \ | |||
24 | file://disable-print.patch;patch=1 \ | 24 | file://disable-print.patch;patch=1 \ |
25 | file://hardcoded_libtool.patch;patch=1 \ | 25 | file://hardcoded_libtool.patch;patch=1 \ |
26 | file://no-demos.patch;patch=1 \ | 26 | file://no-demos.patch;patch=1 \ |
27 | file://pangoxft2.10.6.diff;patch=1" | 27 | file://cellrenderer-cairo.patch;patch=1;pnum=0 \ |
28 | file://entry-cairo.patch;patch=1;pnum=0" | ||
29 | # file://pangoxft2.10.6.diff;patch=1" | ||
28 | # file://gtk+-handhelds.patch;patch=1 | 30 | # file://gtk+-handhelds.patch;patch=1 |
29 | # file://single-click.patch;patch=1 | 31 | # file://single-click.patch;patch=1 |
30 | # file://spinbutton.patch;patch=1 \ | 32 | # file://spinbutton.patch;patch=1 \ |