summaryrefslogtreecommitdiffstats
path: root/meta/packages/gtk+/gtk+-2.10.0/gtk+-handhelds.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/gtk+/gtk+-2.10.0/gtk+-handhelds.patch')
-rw-r--r--meta/packages/gtk+/gtk+-2.10.0/gtk+-handhelds.patch264
1 files changed, 264 insertions, 0 deletions
diff --git a/meta/packages/gtk+/gtk+-2.10.0/gtk+-handhelds.patch b/meta/packages/gtk+/gtk+-2.10.0/gtk+-handhelds.patch
new file mode 100644
index 0000000000..4b97373f32
--- /dev/null
+++ b/meta/packages/gtk+/gtk+-2.10.0/gtk+-handhelds.patch
@@ -0,0 +1,264 @@
1--- gtk+-2.8.6/gtk/gtkrange.c.orig 2005-12-07 21:13:33 +0100
2+++ gtk+-2.8.6/gtk/gtkrange.c 2005-12-07 21:21:12 +0100
3@@ -186,6 +186,7 @@
4 static GtkWidgetClass *parent_class = NULL;
5 static guint signals[LAST_SIGNAL];
6
7+static GdkAtom recognize_protocols_atom, atom_atom;
8
9 GType
10 gtk_range_get_type (void)
11@@ -226,6 +227,9 @@
12 object_class = (GtkObjectClass*) class;
13 widget_class = (GtkWidgetClass*) class;
14
15+ recognize_protocols_atom = gdk_atom_intern ("RECOGNIZE_PROTOCOLS", FALSE);
16+ atom_atom = gdk_atom_intern ("ATOM", FALSE);
17+
18 parent_class = g_type_class_peek_parent (class);
19
20 gobject_class->set_property = gtk_range_set_property;
21@@ -860,6 +864,12 @@
22 &attributes, attributes_mask);
23 gdk_window_set_user_data (range->event_window, range);
24
25+ gdk_property_change (range->event_window,
26+ recognize_protocols_atom,
27+ atom_atom,
28+ 32, GDK_PROP_MODE_REPLACE,
29+ NULL, 0);
30+
31 widget->style = gtk_style_attach (widget->style, widget->window);
32 }
33
34@@ -1229,7 +1239,7 @@
35
36 /* ignore presses when we're already doing something else. */
37 if (range->layout->grab_location != MOUSE_OUTSIDE)
38- return FALSE;
39+ return TRUE;
40
41 range->layout->mouse_x = event->x;
42 range->layout->mouse_y = event->y;
43@@ -1429,7 +1439,7 @@
44 return TRUE;
45 }
46
47- return FALSE;
48+ return TRUE;
49 }
50
51 /**
52--- gtk+-2.8.6/gtk/gtkentry.c.orig 2005-09-02 21:51:06 +0200
53+++ gtk+-2.8.6/gtk/gtkentry.c 2005-12-07 21:21:12 +0100
54@@ -597,6 +597,15 @@
55 0.0,
56 GTK_PARAM_READWRITE));
57
58+ gtk_widget_class_install_style_property (widget_class,
59+ g_param_spec_int ("min_width",
60+ _("Minimum width"),
61+ _("Minimum width of the entry field"),
62+ 0,
63+ G_MAXINT,
64+ MIN_ENTRY_WIDTH,
65+ G_PARAM_READABLE));
66+
67 signals[POPULATE_POPUP] =
68 g_signal_new ("populate_popup",
69 G_OBJECT_CLASS_TYPE (gobject_class),
70@@ -1227,7 +1236,7 @@
71 {
72 GtkEntry *entry = GTK_ENTRY (widget);
73 PangoFontMetrics *metrics;
74- gint xborder, yborder;
75+ gint xborder, yborder, min_width;
76 PangoContext *context;
77
78 gtk_widget_ensure_style (widget);
79@@ -1243,9 +1252,11 @@
80
81 xborder += INNER_BORDER;
82 yborder += INNER_BORDER;
83-
84+
85+ gtk_widget_style_get (widget, "min_width", &min_width, NULL);
86+
87 if (entry->width_chars < 0)
88- requisition->width = MIN_ENTRY_WIDTH + xborder * 2;
89+ requisition->width = min_width + xborder * 2;
90 else
91 {
92 gint char_width = pango_font_metrics_get_approximate_char_width (metrics);
93--- gtk+-2.8.6/gtk/gtkarrow.c.orig 2005-06-21 17:38:39 +0200
94+++ gtk+-2.8.6/gtk/gtkarrow.c 2005-12-07 21:21:12 +0100
95@@ -31,7 +31,7 @@
96 #include "gtkintl.h"
97 #include "gtkalias.h"
98
99-#define MIN_ARROW_SIZE 15
100+#define MIN_ARROW_SIZE 7
101
102 enum {
103 PROP_0,
104@@ -55,6 +55,8 @@
105 guint prop_id,
106 GValue *value,
107 GParamSpec *pspec);
108+static void gtk_arrow_size_request (GtkWidget *arrow,
109+ GtkRequisition *requisition);
110
111 GType
112 gtk_arrow_get_type (void)
113@@ -113,6 +115,7 @@
114 GTK_PARAM_READWRITE));
115
116 widget_class->expose_event = gtk_arrow_expose;
117+ widget_class->size_request = gtk_arrow_size_request;
118 }
119
120 static void
121@@ -168,13 +171,18 @@
122 }
123
124 static void
125+gtk_arrow_size_request (GtkWidget *arrow,
126+ GtkRequisition *requisition)
127+{
128+ requisition->width = MIN_ARROW_SIZE + GTK_MISC (arrow)->xpad * 2;
129+ requisition->height = MIN_ARROW_SIZE + GTK_MISC (arrow)->ypad * 2;
130+}
131+
132+static void
133 gtk_arrow_init (GtkArrow *arrow)
134 {
135 GTK_WIDGET_SET_FLAGS (arrow, GTK_NO_WINDOW);
136
137- GTK_WIDGET (arrow)->requisition.width = MIN_ARROW_SIZE + GTK_MISC (arrow)->xpad * 2;
138- GTK_WIDGET (arrow)->requisition.height = MIN_ARROW_SIZE + GTK_MISC (arrow)->ypad * 2;
139-
140 arrow->arrow_type = GTK_ARROW_RIGHT;
141 arrow->shadow_type = GTK_SHADOW_OUT;
142 }
143--- gtk+-2.8.6/gtk/gtkcalendar.c.orig 2005-12-07 21:36:14 +0100
144+++ gtk+-2.8.6/gtk/gtkcalendar.c 2005-12-07 21:49:21 +0100
145@@ -692,6 +692,35 @@
146 ****************************************/
147
148 static void
149+calendar_select_day (GtkCalendar *calendar, guint day)
150+{
151+ g_return_if_fail (GTK_IS_CALENDAR (calendar));
152+ g_return_if_fail (day <= 31);
153+
154+ /* Deselect the old day */
155+ if (calendar->selected_day > 0)
156+ {
157+ gint selected_day;
158+
159+ selected_day = calendar->selected_day;
160+ calendar->selected_day = 0;
161+ if (GTK_WIDGET_DRAWABLE (GTK_WIDGET (calendar)))
162+ calendar_invalidate_day_num (calendar, selected_day);
163+ }
164+
165+ calendar->selected_day = day;
166+
167+ /* Select the new day */
168+ if (day != 0)
169+ {
170+ if (GTK_WIDGET_DRAWABLE (GTK_WIDGET (calendar)))
171+ calendar_invalidate_day_num (calendar, day);
172+ }
173+
174+ g_object_notify (G_OBJECT (calendar), "day");
175+}
176+
177+static void
178 calendar_set_month_next (GtkCalendar *calendar)
179 {
180 gint month_len;
181@@ -723,10 +752,10 @@
182 if (month_len < calendar->selected_day)
183 {
184 calendar->selected_day = 0;
185- gtk_calendar_select_day (calendar, month_len);
186+ calendar_select_day (calendar, month_len);
187 }
188 else
189- gtk_calendar_select_day (calendar, calendar->selected_day);
190+ calendar_select_day (calendar, calendar->selected_day);
191
192 gtk_widget_queue_draw (GTK_WIDGET (calendar));
193 }
194@@ -752,10 +781,10 @@
195 if (month_len < calendar->selected_day)
196 {
197 calendar->selected_day = 0;
198- gtk_calendar_select_day (calendar, month_len);
199+ calendar_select_day (calendar, month_len);
200 }
201 else
202- gtk_calendar_select_day (calendar, calendar->selected_day);
203+ calendar_select_day (calendar, calendar->selected_day);
204
205 gtk_widget_queue_draw (GTK_WIDGET (calendar));
206 }
207@@ -784,10 +813,10 @@
208 if (month_len < calendar->selected_day)
209 {
210 calendar->selected_day = 0;
211- gtk_calendar_select_day (calendar, month_len);
212+ calendar_select_day (calendar, month_len);
213 }
214 else
215- gtk_calendar_select_day (calendar, calendar->selected_day);
216+ calendar_select_day (calendar, calendar->selected_day);
217
218 gtk_widget_queue_draw (GTK_WIDGET (calendar));
219 }
220@@ -1088,13 +1117,13 @@
221 if (month_len < calendar->selected_day)
222 {
223 calendar->selected_day = 0;
224- gtk_calendar_select_day (calendar, month_len);
225+ calendar_select_day (calendar, month_len);
226 }
227 else
228 {
229 if (calendar->selected_day < 0)
230 calendar->selected_day = calendar->selected_day + 1 + month_length[leap (calendar->year)][calendar->month + 1];
231- gtk_calendar_select_day (calendar, calendar->selected_day);
232+ calendar_select_day (calendar, calendar->selected_day);
233 }
234
235 gtk_widget_queue_draw (GTK_WIDGET (calendar));
236@@ -3285,27 +3314,7 @@
237 g_return_if_fail (GTK_IS_CALENDAR (calendar));
238 g_return_if_fail (day <= 31);
239
240- /* Deselect the old day */
241- if (calendar->selected_day > 0)
242- {
243- gint selected_day;
244-
245- selected_day = calendar->selected_day;
246- calendar->selected_day = 0;
247- if (GTK_WIDGET_DRAWABLE (GTK_WIDGET (calendar)))
248- calendar_invalidate_day_num (calendar, selected_day);
249- }
250-
251- calendar->selected_day = day;
252-
253- /* Select the new day */
254- if (day != 0)
255- {
256- if (GTK_WIDGET_DRAWABLE (GTK_WIDGET (calendar)))
257- calendar_invalidate_day_num (calendar, day);
258- }
259-
260- g_object_notify (G_OBJECT (calendar), "day");
261+ calendar_select_day (calendar, day);
262
263 g_signal_emit (calendar,
264 gtk_calendar_signals[DAY_SELECTED_SIGNAL],