diff options
Diffstat (limited to 'openembedded/packages/gtk+/gtk+-2.8.3/gtk+-handhelds.patch')
| -rw-r--r-- | openembedded/packages/gtk+/gtk+-2.8.3/gtk+-handhelds.patch | 236 |
1 files changed, 236 insertions, 0 deletions
diff --git a/openembedded/packages/gtk+/gtk+-2.8.3/gtk+-handhelds.patch b/openembedded/packages/gtk+/gtk+-2.8.3/gtk+-handhelds.patch new file mode 100644 index 0000000000..20481f059b --- /dev/null +++ b/openembedded/packages/gtk+/gtk+-2.8.3/gtk+-handhelds.patch | |||
| @@ -0,0 +1,236 @@ | |||
| 1 | --- gtk+-2.4.1/gtk/gtkarrow.c 2004-03-13 09:51:13.000000000 +1100 | ||
| 2 | +++ gtk+-2.4.1/gtk/gtkarrow.c 2004-05-26 14:52:17.000000000 +1000 | ||
| 3 | @@ -29,7 +29,7 @@ | ||
| 4 | #include "gtkarrow.h" | ||
| 5 | #include "gtkintl.h" | ||
| 6 | |||
| 7 | -#define MIN_ARROW_SIZE 15 | ||
| 8 | +#define MIN_ARROW_SIZE 7 | ||
| 9 | |||
| 10 | enum { | ||
| 11 | PROP_0, | ||
| 12 | @@ -53,6 +53,8 @@ | ||
| 13 | guint prop_id, | ||
| 14 | GValue *value, | ||
| 15 | GParamSpec *pspec); | ||
| 16 | +static void gtk_arrow_size_request (GtkWidget *arrow, | ||
| 17 | + GtkRequisition *requisition); | ||
| 18 | |||
| 19 | GType | ||
| 20 | gtk_arrow_get_type (void) | ||
| 21 | @@ -111,6 +113,7 @@ | ||
| 22 | G_PARAM_READABLE | G_PARAM_WRITABLE)); | ||
| 23 | |||
| 24 | widget_class->expose_event = gtk_arrow_expose; | ||
| 25 | + widget_class->size_request = gtk_arrow_size_request; | ||
| 26 | } | ||
| 27 | |||
| 28 | static void | ||
| 29 | @@ -166,13 +169,18 @@ | ||
| 30 | } | ||
| 31 | |||
| 32 | static void | ||
| 33 | +gtk_arrow_size_request (GtkWidget *arrow, | ||
| 34 | + GtkRequisition *requisition) | ||
| 35 | +{ | ||
| 36 | + requisition->width = MIN_ARROW_SIZE + GTK_MISC (arrow)->xpad * 2; | ||
| 37 | + requisition->height = MIN_ARROW_SIZE + GTK_MISC (arrow)->ypad * 2; | ||
| 38 | +} | ||
| 39 | + | ||
| 40 | +static void | ||
| 41 | gtk_arrow_init (GtkArrow *arrow) | ||
| 42 | { | ||
| 43 | GTK_WIDGET_SET_FLAGS (arrow, GTK_NO_WINDOW); | ||
| 44 | |||
| 45 | - GTK_WIDGET (arrow)->requisition.width = MIN_ARROW_SIZE + GTK_MISC (arrow)->xpad * 2; | ||
| 46 | - GTK_WIDGET (arrow)->requisition.height = MIN_ARROW_SIZE + GTK_MISC (arrow)->ypad * 2; | ||
| 47 | - | ||
| 48 | arrow->arrow_type = GTK_ARROW_RIGHT; | ||
| 49 | arrow->shadow_type = GTK_SHADOW_OUT; | ||
| 50 | } | ||
| 51 | --- gtk+-2.4.1/gtk/gtkcalendar.c 2004-03-06 14:37:26.000000000 +1100 | ||
| 52 | +++ gtk+-2.4.1/gtk/gtkcalendar.c 2004-05-26 14:58:57.000000000 +1000 | ||
| 53 | @@ -340,6 +340,9 @@ | ||
| 54 | static void gtk_calendar_select_and_focus_day (GtkCalendar *calendar, | ||
| 55 | guint day); | ||
| 56 | |||
| 57 | +static void gtk_calendar_do_select_day (GtkCalendar *calendar, | ||
| 58 | + guint day); | ||
| 59 | + | ||
| 60 | static void gtk_calendar_paint_arrow (GtkWidget *widget, | ||
| 61 | guint arrow); | ||
| 62 | static void gtk_calendar_paint_day_num (GtkWidget *widget, | ||
| 63 | @@ -861,13 +864,13 @@ | ||
| 64 | if (month_len < calendar->selected_day) | ||
| 65 | { | ||
| 66 | calendar->selected_day = 0; | ||
| 67 | - gtk_calendar_select_day (calendar, month_len); | ||
| 68 | + gtk_calendar_do_select_day (calendar, month_len); | ||
| 69 | } | ||
| 70 | else | ||
| 71 | { | ||
| 72 | if (calendar->selected_day < 0) | ||
| 73 | calendar->selected_day = calendar->selected_day + 1 + month_length[leap (calendar->year)][calendar->month + 1]; | ||
| 74 | - gtk_calendar_select_day (calendar, calendar->selected_day); | ||
| 75 | + gtk_calendar_do_select_day (calendar, calendar->selected_day); | ||
| 76 | } | ||
| 77 | |||
| 78 | gtk_widget_queue_draw (GTK_WIDGET (calendar)); | ||
| 79 | @@ -908,10 +911,10 @@ | ||
| 80 | if (month_len < calendar->selected_day) | ||
| 81 | { | ||
| 82 | calendar->selected_day = 0; | ||
| 83 | - gtk_calendar_select_day (calendar, month_len); | ||
| 84 | + gtk_calendar_do_select_day (calendar, month_len); | ||
| 85 | } | ||
| 86 | else | ||
| 87 | - gtk_calendar_select_day (calendar, calendar->selected_day); | ||
| 88 | + gtk_calendar_do_select_day (calendar, calendar->selected_day); | ||
| 89 | |||
| 90 | gtk_widget_queue_draw (GTK_WIDGET (calendar)); | ||
| 91 | gtk_calendar_thaw (calendar); | ||
| 92 | @@ -939,10 +942,10 @@ | ||
| 93 | if (month_len < calendar->selected_day) | ||
| 94 | { | ||
| 95 | calendar->selected_day = 0; | ||
| 96 | - gtk_calendar_select_day (calendar, month_len); | ||
| 97 | + gtk_calendar_do_select_day (calendar, month_len); | ||
| 98 | } | ||
| 99 | else | ||
| 100 | - gtk_calendar_select_day (calendar, calendar->selected_day); | ||
| 101 | + gtk_calendar_do_select_day (calendar, calendar->selected_day); | ||
| 102 | |||
| 103 | gtk_widget_queue_draw (GTK_WIDGET (calendar)); | ||
| 104 | gtk_calendar_thaw (calendar); | ||
| 105 | @@ -974,10 +977,10 @@ | ||
| 106 | if (month_len < calendar->selected_day) | ||
| 107 | { | ||
| 108 | calendar->selected_day = 0; | ||
| 109 | - gtk_calendar_select_day (calendar, month_len); | ||
| 110 | + gtk_calendar_do_select_day (calendar, month_len); | ||
| 111 | } | ||
| 112 | else | ||
| 113 | - gtk_calendar_select_day (calendar, calendar->selected_day); | ||
| 114 | + gtk_calendar_do_select_day (calendar, calendar->selected_day); | ||
| 115 | |||
| 116 | gtk_widget_queue_draw (GTK_WIDGET (calendar)); | ||
| 117 | gtk_calendar_thaw (calendar); | ||
| 118 | @@ -2480,9 +2483,9 @@ | ||
| 119 | return TRUE; | ||
| 120 | } | ||
| 121 | |||
| 122 | -void | ||
| 123 | -gtk_calendar_select_day (GtkCalendar *calendar, | ||
| 124 | - guint day) | ||
| 125 | +static void | ||
| 126 | +gtk_calendar_do_select_day (GtkCalendar *calendar, | ||
| 127 | + guint day) | ||
| 128 | { | ||
| 129 | g_return_if_fail (GTK_IS_CALENDAR (calendar)); | ||
| 130 | g_return_if_fail (day <= 31); | ||
| 131 | @@ -2499,6 +2502,13 @@ | ||
| 132 | if (GTK_WIDGET_DRAWABLE (GTK_WIDGET (calendar))) | ||
| 133 | gtk_calendar_paint_day_num (GTK_WIDGET (calendar), selected_day); | ||
| 134 | } | ||
| 135 | +} | ||
| 136 | + | ||
| 137 | +void | ||
| 138 | +gtk_calendar_select_day (GtkCalendar *calendar, | ||
| 139 | + guint day) | ||
| 140 | +{ | ||
| 141 | + gtk_calendar_do_select_day (calendar, day); | ||
| 142 | |||
| 143 | calendar->selected_day = day; | ||
| 144 | |||
| 145 | --- gtk+-2.4.1/gtk/gtkentry.c 2004-04-22 08:08:08.000000000 +1000 | ||
| 146 | +++ gtk+-2.4.1/gtk/gtkentry.c 2004-05-26 14:52:17.000000000 +1000 | ||
| 147 | @@ -557,6 +557,15 @@ | ||
| 148 | 0.0, | ||
| 149 | G_PARAM_READABLE | G_PARAM_WRITABLE)); | ||
| 150 | |||
| 151 | + gtk_widget_class_install_style_property (widget_class, | ||
| 152 | + g_param_spec_int ("min_width", | ||
| 153 | + _("Minimum width"), | ||
| 154 | + _("Minimum width of the entry field"), | ||
| 155 | + 0, | ||
| 156 | + G_MAXINT, | ||
| 157 | + MIN_ENTRY_WIDTH, | ||
| 158 | + G_PARAM_READABLE)); | ||
| 159 | + | ||
| 160 | signals[POPULATE_POPUP] = | ||
| 161 | g_signal_new ("populate_popup", | ||
| 162 | G_OBJECT_CLASS_TYPE (gobject_class), | ||
| 163 | @@ -1124,7 +1133,7 @@ | ||
| 164 | { | ||
| 165 | GtkEntry *entry = GTK_ENTRY (widget); | ||
| 166 | PangoFontMetrics *metrics; | ||
| 167 | - gint xborder, yborder; | ||
| 168 | + gint xborder, yborder, min_width; | ||
| 169 | PangoContext *context; | ||
| 170 | |||
| 171 | gtk_widget_ensure_style (widget); | ||
| 172 | @@ -1140,9 +1149,11 @@ | ||
| 173 | |||
| 174 | xborder += INNER_BORDER; | ||
| 175 | yborder += INNER_BORDER; | ||
| 176 | - | ||
| 177 | + | ||
| 178 | + gtk_widget_style_get (widget, "min_width", &min_width, NULL); | ||
| 179 | + | ||
| 180 | if (entry->width_chars < 0) | ||
| 181 | - requisition->width = MIN_ENTRY_WIDTH + xborder * 2; | ||
| 182 | + requisition->width = min_width + xborder * 2; | ||
| 183 | else | ||
| 184 | { | ||
| 185 | gint char_width = pango_font_metrics_get_approximate_char_width (metrics); | ||
| 186 | --- gtk+-2.4.1/gtk/gtkrange.c 2004-03-06 14:38:08.000000000 +1100 | ||
| 187 | +++ gtk+-2.4.1/gtk/gtkrange.c 2004-05-26 14:52:17.000000000 +1000 | ||
| 188 | @@ -180,6 +180,7 @@ | ||
| 189 | static GtkWidgetClass *parent_class = NULL; | ||
| 190 | static guint signals[LAST_SIGNAL]; | ||
| 191 | |||
| 192 | +static GdkAtom recognize_protocols_atom, atom_atom; | ||
| 193 | |||
| 194 | GType | ||
| 195 | gtk_range_get_type (void) | ||
| 196 | @@ -220,6 +221,9 @@ | ||
| 197 | object_class = (GtkObjectClass*) class; | ||
| 198 | widget_class = (GtkWidgetClass*) class; | ||
| 199 | |||
| 200 | + recognize_protocols_atom = gdk_atom_intern ("RECOGNIZE_PROTOCOLS", FALSE); | ||
| 201 | + atom_atom = gdk_atom_intern ("ATOM", FALSE); | ||
| 202 | + | ||
| 203 | parent_class = g_type_class_peek_parent (class); | ||
| 204 | |||
| 205 | gobject_class->set_property = gtk_range_set_property; | ||
| 206 | @@ -815,6 +819,12 @@ | ||
| 207 | &attributes, attributes_mask); | ||
| 208 | gdk_window_set_user_data (range->event_window, range); | ||
| 209 | |||
| 210 | + gdk_property_change (range->event_window, | ||
| 211 | + recognize_protocols_atom, | ||
| 212 | + atom_atom, | ||
| 213 | + 32, GDK_PROP_MODE_REPLACE, | ||
| 214 | + NULL, 0); | ||
| 215 | + | ||
| 216 | widget->style = gtk_style_attach (widget->style, widget->window); | ||
| 217 | } | ||
| 218 | |||
| 219 | @@ -1186,7 +1196,7 @@ | ||
| 220 | |||
| 221 | /* ignore presses when we're already doing something else. */ | ||
| 222 | if (range->layout->grab_location != MOUSE_OUTSIDE) | ||
| 223 | - return FALSE; | ||
| 224 | + return TRUE; | ||
| 225 | |||
| 226 | range->layout->mouse_x = event->x; | ||
| 227 | range->layout->mouse_y = event->y; | ||
| 228 | @@ -1364,7 +1374,7 @@ | ||
| 229 | return TRUE; | ||
| 230 | } | ||
| 231 | |||
| 232 | - return FALSE; | ||
| 233 | + return TRUE; | ||
| 234 | } | ||
| 235 | |||
| 236 | /** | ||
