summaryrefslogtreecommitdiff
path: root/packages/gtk+/gtk+-2.8.9/gtk+-handhelds.patch
diff options
context:
space:
mode:
Diffstat (limited to 'packages/gtk+/gtk+-2.8.9/gtk+-handhelds.patch')
-rw-r--r--packages/gtk+/gtk+-2.8.9/gtk+-handhelds.patch264
1 files changed, 264 insertions, 0 deletions
diff --git a/packages/gtk+/gtk+-2.8.9/gtk+-handhelds.patch b/packages/gtk+/gtk+-2.8.9/gtk+-handhelds.patch
new file mode 100644
index 0000000000..4b97373f32
--- /dev/null
+++ b/packages/gtk+/gtk+-2.8.9/gtk+-handhelds.patch
@@ -0,0 +1,264 @@
+--- gtk+-2.8.6/gtk/gtkrange.c.orig 2005-12-07 21:13:33 +0100
++++ gtk+-2.8.6/gtk/gtkrange.c 2005-12-07 21:21:12 +0100
+@@ -186,6 +186,7 @@
+ static GtkWidgetClass *parent_class = NULL;
+ static guint signals[LAST_SIGNAL];
+
++static GdkAtom recognize_protocols_atom, atom_atom;
+
+ GType
+ gtk_range_get_type (void)
+@@ -226,6 +227,9 @@
+ object_class = (GtkObjectClass*) class;
+ widget_class = (GtkWidgetClass*) class;
+
++ recognize_protocols_atom = gdk_atom_intern ("RECOGNIZE_PROTOCOLS", FALSE);
++ atom_atom = gdk_atom_intern ("ATOM", FALSE);
++
+ parent_class = g_type_class_peek_parent (class);
+
+ gobject_class->set_property = gtk_range_set_property;
+@@ -860,6 +864,12 @@
+ &attributes, attributes_mask);
+ gdk_window_set_user_data (range->event_window, range);
+
++ gdk_property_change (range->event_window,
++ recognize_protocols_atom,
++ atom_atom,
++ 32, GDK_PROP_MODE_REPLACE,
++ NULL, 0);
++
+ widget->style = gtk_style_attach (widget->style, widget->window);
+ }
+
+@@ -1229,7 +1239,7 @@
+
+ /* ignore presses when we're already doing something else. */
+ if (range->layout->grab_location != MOUSE_OUTSIDE)
+- return FALSE;
++ return TRUE;
+
+ range->layout->mouse_x = event->x;
+ range->layout->mouse_y = event->y;
+@@ -1429,7 +1439,7 @@
+ return TRUE;
+ }
+
+- return FALSE;
++ return TRUE;
+ }
+
+ /**
+--- gtk+-2.8.6/gtk/gtkentry.c.orig 2005-09-02 21:51:06 +0200
++++ gtk+-2.8.6/gtk/gtkentry.c 2005-12-07 21:21:12 +0100
+@@ -597,6 +597,15 @@
+ 0.0,
+ GTK_PARAM_READWRITE));
+
++ gtk_widget_class_install_style_property (widget_class,
++ g_param_spec_int ("min_width",
++ _("Minimum width"),
++ _("Minimum width of the entry field"),
++ 0,
++ G_MAXINT,
++ MIN_ENTRY_WIDTH,
++ G_PARAM_READABLE));
++
+ signals[POPULATE_POPUP] =
+ g_signal_new ("populate_popup",
+ G_OBJECT_CLASS_TYPE (gobject_class),
+@@ -1227,7 +1236,7 @@
+ {
+ GtkEntry *entry = GTK_ENTRY (widget);
+ PangoFontMetrics *metrics;
+- gint xborder, yborder;
++ gint xborder, yborder, min_width;
+ PangoContext *context;
+
+ gtk_widget_ensure_style (widget);
+@@ -1243,9 +1252,11 @@
+
+ xborder += INNER_BORDER;
+ yborder += INNER_BORDER;
+-
++
++ gtk_widget_style_get (widget, "min_width", &min_width, NULL);
++
+ if (entry->width_chars < 0)
+- requisition->width = MIN_ENTRY_WIDTH + xborder * 2;
++ requisition->width = min_width + xborder * 2;
+ else
+ {
+ gint char_width = pango_font_metrics_get_approximate_char_width (metrics);
+--- gtk+-2.8.6/gtk/gtkarrow.c.orig 2005-06-21 17:38:39 +0200
++++ gtk+-2.8.6/gtk/gtkarrow.c 2005-12-07 21:21:12 +0100
+@@ -31,7 +31,7 @@
+ #include "gtkintl.h"
+ #include "gtkalias.h"
+
+-#define MIN_ARROW_SIZE 15
++#define MIN_ARROW_SIZE 7
+
+ enum {
+ PROP_0,
+@@ -55,6 +55,8 @@
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec);
++static void gtk_arrow_size_request (GtkWidget *arrow,
++ GtkRequisition *requisition);
+
+ GType
+ gtk_arrow_get_type (void)
+@@ -113,6 +115,7 @@
+ GTK_PARAM_READWRITE));
+
+ widget_class->expose_event = gtk_arrow_expose;
++ widget_class->size_request = gtk_arrow_size_request;
+ }
+
+ static void
+@@ -168,13 +171,18 @@
+ }
+
+ static void
++gtk_arrow_size_request (GtkWidget *arrow,
++ GtkRequisition *requisition)
++{
++ requisition->width = MIN_ARROW_SIZE + GTK_MISC (arrow)->xpad * 2;
++ requisition->height = MIN_ARROW_SIZE + GTK_MISC (arrow)->ypad * 2;
++}
++
++static void
+ gtk_arrow_init (GtkArrow *arrow)
+ {
+ GTK_WIDGET_SET_FLAGS (arrow, GTK_NO_WINDOW);
+
+- GTK_WIDGET (arrow)->requisition.width = MIN_ARROW_SIZE + GTK_MISC (arrow)->xpad * 2;
+- GTK_WIDGET (arrow)->requisition.height = MIN_ARROW_SIZE + GTK_MISC (arrow)->ypad * 2;
+-
+ arrow->arrow_type = GTK_ARROW_RIGHT;
+ arrow->shadow_type = GTK_SHADOW_OUT;
+ }
+--- gtk+-2.8.6/gtk/gtkcalendar.c.orig 2005-12-07 21:36:14 +0100
++++ gtk+-2.8.6/gtk/gtkcalendar.c 2005-12-07 21:49:21 +0100
+@@ -692,6 +692,35 @@
+ ****************************************/
+
+ static void
++calendar_select_day (GtkCalendar *calendar, guint day)
++{
++ g_return_if_fail (GTK_IS_CALENDAR (calendar));
++ g_return_if_fail (day <= 31);
++
++ /* Deselect the old day */
++ if (calendar->selected_day > 0)
++ {
++ gint selected_day;
++
++ selected_day = calendar->selected_day;
++ calendar->selected_day = 0;
++ if (GTK_WIDGET_DRAWABLE (GTK_WIDGET (calendar)))
++ calendar_invalidate_day_num (calendar, selected_day);
++ }
++
++ calendar->selected_day = day;
++
++ /* Select the new day */
++ if (day != 0)
++ {
++ if (GTK_WIDGET_DRAWABLE (GTK_WIDGET (calendar)))
++ calendar_invalidate_day_num (calendar, day);
++ }
++
++ g_object_notify (G_OBJECT (calendar), "day");
++}
++
++static void
+ calendar_set_month_next (GtkCalendar *calendar)
+ {
+ gint month_len;
+@@ -723,10 +752,10 @@
+ if (month_len < calendar->selected_day)
+ {
+ calendar->selected_day = 0;
+- gtk_calendar_select_day (calendar, month_len);
++ calendar_select_day (calendar, month_len);
+ }
+ else
+- gtk_calendar_select_day (calendar, calendar->selected_day);
++ calendar_select_day (calendar, calendar->selected_day);
+
+ gtk_widget_queue_draw (GTK_WIDGET (calendar));
+ }
+@@ -752,10 +781,10 @@
+ if (month_len < calendar->selected_day)
+ {
+ calendar->selected_day = 0;
+- gtk_calendar_select_day (calendar, month_len);
++ calendar_select_day (calendar, month_len);
+ }
+ else
+- gtk_calendar_select_day (calendar, calendar->selected_day);
++ calendar_select_day (calendar, calendar->selected_day);
+
+ gtk_widget_queue_draw (GTK_WIDGET (calendar));
+ }
+@@ -784,10 +813,10 @@
+ if (month_len < calendar->selected_day)
+ {
+ calendar->selected_day = 0;
+- gtk_calendar_select_day (calendar, month_len);
++ calendar_select_day (calendar, month_len);
+ }
+ else
+- gtk_calendar_select_day (calendar, calendar->selected_day);
++ calendar_select_day (calendar, calendar->selected_day);
+
+ gtk_widget_queue_draw (GTK_WIDGET (calendar));
+ }
+@@ -1088,13 +1117,13 @@
+ if (month_len < calendar->selected_day)
+ {
+ calendar->selected_day = 0;
+- gtk_calendar_select_day (calendar, month_len);
++ calendar_select_day (calendar, month_len);
+ }
+ else
+ {
+ if (calendar->selected_day < 0)
+ calendar->selected_day = calendar->selected_day + 1 + month_length[leap (calendar->year)][calendar->month + 1];
+- gtk_calendar_select_day (calendar, calendar->selected_day);
++ calendar_select_day (calendar, calendar->selected_day);
+ }
+
+ gtk_widget_queue_draw (GTK_WIDGET (calendar));
+@@ -3285,27 +3314,7 @@
+ g_return_if_fail (GTK_IS_CALENDAR (calendar));
+ g_return_if_fail (day <= 31);
+
+- /* Deselect the old day */
+- if (calendar->selected_day > 0)
+- {
+- gint selected_day;
+-
+- selected_day = calendar->selected_day;
+- calendar->selected_day = 0;
+- if (GTK_WIDGET_DRAWABLE (GTK_WIDGET (calendar)))
+- calendar_invalidate_day_num (calendar, selected_day);
+- }
+-
+- calendar->selected_day = day;
+-
+- /* Select the new day */
+- if (day != 0)
+- {
+- if (GTK_WIDGET_DRAWABLE (GTK_WIDGET (calendar)))
+- calendar_invalidate_day_num (calendar, day);
+- }
+-
+- g_object_notify (G_OBJECT (calendar), "day");
++ calendar_select_day (calendar, day);
+
+ g_signal_emit (calendar,
+ gtk_calendar_signals[DAY_SELECTED_SIGNAL],