diff options
Diffstat (limited to 'meta/packages/gtk+/gtk+-2.10.12/gtk+-handhelds.patch')
-rw-r--r-- | meta/packages/gtk+/gtk+-2.10.12/gtk+-handhelds.patch | 149 |
1 files changed, 149 insertions, 0 deletions
diff --git a/meta/packages/gtk+/gtk+-2.10.12/gtk+-handhelds.patch b/meta/packages/gtk+/gtk+-2.10.12/gtk+-handhelds.patch new file mode 100644 index 0000000000..1ea86ce6b2 --- /dev/null +++ b/meta/packages/gtk+/gtk+-2.10.12/gtk+-handhelds.patch | |||
@@ -0,0 +1,149 @@ | |||
1 | Index: 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 | } | ||
53 | Index: 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); | ||
97 | Index: 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 | /** | ||