gtk+ 2.10.6: Sync with updated patches in OE.dev (pangoxft includes a calender fix)

git-svn-id: https://svn.o-hand.com/repos/poky/trunk@905 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
Richard Purdie 2006-11-21 10:05:33 +00:00
parent 31fd33d296
commit e56649a959
5 changed files with 100 additions and 170 deletions

View File

@ -1,8 +1,10 @@
--- gtk+-2.4.1/gtk/gtkarrow.c 2004-03-13 09:51:13.000000000 +1100
+++ gtk+-2.4.1/gtk/gtkarrow.c 2004-05-26 14:52:17.000000000 +1000
@@ -29,7 +29,7 @@
#include "gtkarrow.h"
Index: gtk+-2.10.6/gtk/gtkarrow.c
===================================================================
--- gtk+-2.10.6.orig/gtk/gtkarrow.c 2006-05-14 05:25:28.000000000 +0100
+++ gtk+-2.10.6/gtk/gtkarrow.c 2006-11-14 12:03:45.000000000 +0000
@@ -31,7 +31,7 @@
#include "gtkintl.h"
#include "gtkalias.h"
-#define MIN_ARROW_SIZE 15
+#define MIN_ARROW_SIZE 7
@ -16,17 +18,17 @@
+static void gtk_arrow_size_request (GtkWidget *arrow,
+ GtkRequisition *requisition);
GType
gtk_arrow_get_type (void)
@@ -111,6 +113,7 @@
G_PARAM_READABLE | G_PARAM_WRITABLE));
G_DEFINE_TYPE (GtkArrow, gtk_arrow, GTK_TYPE_MISC)
@@ -88,6 +90,7 @@
GTK_PARAM_READWRITE));
widget_class->expose_event = gtk_arrow_expose;
+ widget_class->size_request = gtk_arrow_size_request;
}
static void
@@ -166,13 +169,18 @@
@@ -143,13 +146,18 @@
}
static void
@ -48,162 +50,73 @@
arrow->arrow_type = GTK_ARROW_RIGHT;
arrow->shadow_type = GTK_SHADOW_OUT;
}
--- gtk+-2.4.1/gtk/gtkcalendar.c 2004-03-06 14:37:26.000000000 +1100
+++ gtk+-2.4.1/gtk/gtkcalendar.c 2004-05-26 14:58:57.000000000 +1000
@@ -340,6 +340,9 @@
static void gtk_calendar_select_and_focus_day (GtkCalendar *calendar,
guint day);
+static void gtk_calendar_do_select_day (GtkCalendar *calendar,
+ guint day);
+
static void gtk_calendar_paint_arrow (GtkWidget *widget,
guint arrow);
static void gtk_calendar_paint_day_num (GtkWidget *widget,
@@ -861,13 +864,13 @@
if (month_len < calendar->selected_day)
{
calendar->selected_day = 0;
- gtk_calendar_select_day (calendar, month_len);
+ gtk_calendar_do_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);
+ gtk_calendar_do_select_day (calendar, calendar->selected_day);
}
gtk_widget_queue_draw (GTK_WIDGET (calendar));
@@ -908,10 +911,10 @@
if (month_len < calendar->selected_day)
{
calendar->selected_day = 0;
- gtk_calendar_select_day (calendar, month_len);
+ gtk_calendar_do_select_day (calendar, month_len);
}
else
- gtk_calendar_select_day (calendar, calendar->selected_day);
+ gtk_calendar_do_select_day (calendar, calendar->selected_day);
gtk_widget_queue_draw (GTK_WIDGET (calendar));
gtk_calendar_thaw (calendar);
@@ -939,10 +942,10 @@
if (month_len < calendar->selected_day)
{
calendar->selected_day = 0;
- gtk_calendar_select_day (calendar, month_len);
+ gtk_calendar_do_select_day (calendar, month_len);
}
else
- gtk_calendar_select_day (calendar, calendar->selected_day);
+ gtk_calendar_do_select_day (calendar, calendar->selected_day);
gtk_widget_queue_draw (GTK_WIDGET (calendar));
gtk_calendar_thaw (calendar);
@@ -974,10 +977,10 @@
if (month_len < calendar->selected_day)
{
calendar->selected_day = 0;
- gtk_calendar_select_day (calendar, month_len);
+ gtk_calendar_do_select_day (calendar, month_len);
}
else
- gtk_calendar_select_day (calendar, calendar->selected_day);
+ gtk_calendar_do_select_day (calendar, calendar->selected_day);
gtk_widget_queue_draw (GTK_WIDGET (calendar));
gtk_calendar_thaw (calendar);
@@ -2480,9 +2483,9 @@
return TRUE;
}
-void
-gtk_calendar_select_day (GtkCalendar *calendar,
- guint day)
+static void
+gtk_calendar_do_select_day (GtkCalendar *calendar,
+ guint day)
{
g_return_if_fail (GTK_IS_CALENDAR (calendar));
g_return_if_fail (day <= 31);
@@ -2499,6 +2502,13 @@
if (GTK_WIDGET_DRAWABLE (GTK_WIDGET (calendar)))
gtk_calendar_paint_day_num (GTK_WIDGET (calendar), selected_day);
}
+}
+
+void
+gtk_calendar_select_day (GtkCalendar *calendar,
+ guint day)
+{
+ gtk_calendar_do_select_day (calendar, day);
calendar->selected_day = day;
--- gtk+-2.4.1/gtk/gtkentry.c 2004-04-22 08:08:08.000000000 +1000
+++ gtk+-2.4.1/gtk/gtkentry.c 2004-05-26 14:52:17.000000000 +1000
@@ -557,6 +557,15 @@
Index: gtk+-2.10.6/gtk/gtkentry.c
===================================================================
--- gtk+-2.10.6.orig/gtk/gtkentry.c 2006-11-14 12:03:45.000000000 +0000
+++ gtk+-2.10.6/gtk/gtkentry.c 2006-11-14 12:07:02.000000000 +0000
@@ -577,6 +577,18 @@
0.0,
G_PARAM_READABLE | G_PARAM_WRITABLE));
GTK_PARAM_READWRITE));
+ // Added by gtk+-handhelds.patch
+ 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));
+ g_param_spec_int ("min_width",
+ P_("Minimum width"),
+ P_("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),
@@ -1124,7 +1133,7 @@
+
+
/**
* GtkEntry:truncate-multiline:
*
@@ -1286,7 +1298,7 @@
{
GtkEntry *entry = GTK_ENTRY (widget);
PangoFontMetrics *metrics;
- gint xborder, yborder;
+ gint xborder, yborder, min_width;
GtkBorder inner_border;
PangoContext *context;
gtk_widget_ensure_style (widget);
@@ -1140,9 +1149,11 @@
xborder += INNER_BORDER;
yborder += INNER_BORDER;
-
+
@@ -1302,8 +1314,10 @@
_gtk_entry_get_borders (entry, &xborder, &yborder);
_gtk_entry_effective_inner_border (entry, &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;
- requisition->width = MIN_ENTRY_WIDTH + xborder * 2 + inner_border.left + inner_border.right;
+ requisition->width = min_width + xborder * 2 + inner_border.left + inner_border.right;
else
{
gint char_width = pango_font_metrics_get_approximate_char_width (metrics);
--- gtk+-2.4.1/gtk/gtkrange.c 2004-03-06 14:38:08.000000000 +1100
+++ gtk+-2.4.1/gtk/gtkrange.c 2004-05-26 14:52:17.000000000 +1000
@@ -180,6 +180,7 @@
static GtkWidgetClass *parent_class = NULL;
static guint signals[LAST_SIGNAL];
Index: gtk+-2.10.6/gtk/gtkrange.c
===================================================================
--- gtk+-2.10.6.orig/gtk/gtkrange.c 2006-11-14 12:03:44.000000000 +0000
+++ gtk+-2.10.6/gtk/gtkrange.c 2006-11-14 12:07:40.000000000 +0000
@@ -197,6 +197,7 @@
static gboolean gtk_range_key_press (GtkWidget *range,
GdkEventKey *event);
+static GdkAtom recognize_protocols_atom, atom_atom;
GType
gtk_range_get_type (void)
@@ -220,6 +221,9 @@
static guint signals[LAST_SIGNAL];
@@ -213,6 +214,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;
@@ -815,6 +819,12 @@
gobject_class->get_property = gtk_range_get_property;
gobject_class->finalize = gtk_range_finalize;
@@ -1020,6 +1024,12 @@
&attributes, attributes_mask);
gdk_window_set_user_data (range->event_window, range);
@ -216,7 +129,7 @@
widget->style = gtk_style_attach (widget->style, widget->window);
}
@@ -1186,7 +1196,7 @@
@@ -1569,7 +1579,7 @@
/* ignore presses when we're already doing something else. */
if (range->layout->grab_location != MOUSE_OUTSIDE)
@ -225,7 +138,7 @@
range->layout->mouse_x = event->x;
range->layout->mouse_y = event->y;
@@ -1364,7 +1374,7 @@
@@ -1778,7 +1788,7 @@
return TRUE;
}

View File

@ -2441,3 +2441,16 @@ Index: gtk+-2.10.6/gdk/x11/gdkpixmap-x11.c
_gdk_x11_drawable_finish (GDK_DRAWABLE (draw_impl));
}
--- gtk+-2.10.6.orig/gtk/gtkcalendar.c.orig 2006-11-14 14:39:34.000000000 -0800
+++ gtk+-2.10.6/gtk/gtkcalendar.c 2006-11-14 14:37:34.000000000 -0800
@@ -1495,6 +1495,10 @@ gtk_calendar_realize (GtkWidget *widget)
BACKGROUND_COLOR ( GTK_WIDGET ( calendar)));
gdk_window_show (priv->main_win);
gdk_window_set_user_data (priv->main_win, widget);
+
+ /* Set widgets gc */
+ calendar->gc = gdk_gc_new (widget->window);
+
gdk_window_set_background (widget->window, BACKGROUND_COLOR (widget));
gdk_window_show (widget->window);
gdk_window_set_user_data (widget->window, widget);

View File

@ -1,24 +1,26 @@
diff -urNd ../gtk+-2.6.3-r0.old/gtk+-2.6.3/gtk/gtkcalendar.c gtk+-2.6.3/gtk/gtkcalendar.c
--- ../gtk+-2.6.3-r0.old/gtk+-2.6.3/gtk/gtkcalendar.c 2005-04-06 16:57:04 +01:00
+++ gtk+-2.6.3/gtk/gtkcalendar.c 2005-04-06 20:05:18 +01:00
@@ -1023,9 +1023,11 @@
Index: gtk+-2.10.6/gtk/gtkcalendar.c
===================================================================
--- gtk+-2.10.6.orig/gtk/gtkcalendar.c
+++ gtk+-2.10.6/gtk/gtkcalendar.c
@@ -2482,9 +2482,11 @@ calendar_main_button_press (GtkCalendar
}
gtk_calendar_select_and_focus_day (calendar, day);
calendar_select_and_focus_day (calendar, day);
- }
+
+ // This change causes the calendar to disappear after choosing a day
+
+ // This change causes the calendar to disappear after choosing a day
+/* }
else if (event->type == GDK_2BUTTON_PRESS)
- {
+ {*/
private_data->in_drag = 0;
priv->in_drag = 0;
if (day_month == MONTH_CURRENT)
g_signal_emit (calendar,
diff -urNd ../gtk+-2.6.3-r0.old/gtk+-2.6.3/gtk/gtkfilesel.c gtk+-2.6.3/gtk/gtkfilesel.c
--- ../gtk+-2.6.3-r0.old/gtk+-2.6.3/gtk/gtkfilesel.c 2005-04-06 16:57:07 +01:00
+++ gtk+-2.6.3/gtk/gtkfilesel.c 2005-04-07 13:40:32 +01:00
@@ -2468,6 +2468,33 @@
Index: gtk+-2.10.6/gtk/gtkfilesel.c
===================================================================
--- gtk+-2.10.6.orig/gtk/gtkfilesel.c
+++ gtk+-2.10.6/gtk/gtkfilesel.c
@@ -2426,6 +2426,33 @@ gtk_file_selection_file_changed (GtkTree
if (fs->last_selected != NULL)
g_free (fs->last_selected);

View File

@ -1,6 +1,8 @@
--- gtk+-2.4.3/gtk/gtkspinbutton.c.old 2004-04-22 14:49:27.000000000 +0100
+++ gtk+-2.4.3/gtk/gtkspinbutton.c 2004-06-30 21:48:18.000000000 +0100
@@ -733,7 +733,7 @@
Index: gtk+-2.10.6/gtk/gtkspinbutton.c
===================================================================
--- gtk+-2.10.6.orig/gtk/gtkspinbutton.c
+++ gtk+-2.10.6/gtk/gtkspinbutton.c
@@ -682,7 +682,7 @@ gtk_spin_button_size_allocate (GtkWidget
spin = GTK_SPIN_BUTTON (widget);
arrow_size = spin_button_get_arrow_size (spin);
@ -9,7 +11,7 @@
widget->allocation = *allocation;
@@ -866,19 +866,16 @@
@@ -815,19 +815,16 @@ gtk_spin_button_draw_arrow (GtkSpinButto
{
width = spin_button_get_arrow_size (spin_button) + 2 * widget->style->xthickness;
@ -33,7 +35,7 @@
}
if (spin_button_at_limit (spin_button, arrow_type))
@@ -908,32 +905,17 @@
@@ -857,32 +854,17 @@ gtk_spin_button_draw_arrow (GtkSpinButto
shadow_type = GTK_SHADOW_OUT;
}
}
@ -69,7 +71,7 @@
w = width / 2;
w -= w % 2 - 1; /* force odd */
@@ -1108,7 +1090,7 @@
@@ -1062,7 +1044,7 @@ gtk_spin_button_button_press (GtkWidget
if (GTK_ENTRY (widget)->editable)
gtk_spin_button_update (spin);
@ -78,7 +80,7 @@
{
if (event->button == 1)
start_spinning (spin, GTK_ARROW_UP, spin->adjustment->step_increment);
@@ -1143,44 +1125,11 @@
@@ -1097,44 +1079,11 @@ gtk_spin_button_button_release (GtkWidge
arrow_size = spin_button_get_arrow_size (spin);
@ -121,7 +123,7 @@
- return TRUE;
- }
- else
- return GTK_WIDGET_CLASS (parent_class)->button_release_event (widget, event);
- return GTK_WIDGET_CLASS (gtk_spin_button_parent_class)->button_release_event (widget, event);
+ return TRUE;
}

View File

@ -5,7 +5,7 @@ HOMEPAGE = "http://www.gtk.org"
SECTION = "libs"
PRIORITY = "optional"
DEPENDS = "glib-2.0 pango atk jpeg libpng libxext libxcursor gtk-doc libgcrypt cairo cups"
PR = "r2"
PR = "r3"
# disable per default - untested and not all patches included.
DEFAULT_PREFERENCE = "-1"
@ -13,13 +13,13 @@ DEFAULT_PREFERENCE = "-1"
SRC_URI = "ftp://ftp.gtk.org/pub/gtk/v2.10/gtk+-${PV}.tar.bz2 \
file://no-xwc.patch;patch=1 \
file://automake-lossage.patch;patch=1 \
file://disable-tooltips.patch;patch=1 \
file://gtklabel-resize-patch;patch=1 \
file://menu-deactivate.patch;patch=1 \
file://xsettings.patch;patch=1 \
file://scroll-timings.patch;patch=1 \
file://small-gtkfilesel.patch;patch=1 \
file://migration.patch;patch=1;pnum=0 \
file://disable-tooltips.patch;patch=1 \
file://gtklabel-resize-patch;patch=1 \
file://menu-deactivate.patch;patch=1 \
file://xsettings.patch;patch=1 \
file://scroll-timings.patch;patch=1 \
file://small-gtkfilesel.patch;patch=1 \
file://migration.patch;patch=1;pnum=0 \
file://run-iconcache.patch;patch=1 \
file://disable-print.patch;patch=1 \
file://hardcoded_libtool.patch;patch=1 \
@ -96,7 +96,7 @@ python populate_packages_prepend () {
printmodules_root = os.path.join(gtk_libdir, 'printbackends');
do_split_packages(d, loaders_root, '^libpixbufloader-(.*)\.so$', 'gdk-pixbuf-loader-%s', 'GDK pixbuf loader for %s', prologue + 'gdk-pixbuf-query-loaders > /etc/gtk-2.0/gdk-pixbuf.loaders')
do_split_packages(d, immodules_root, '^im-(.*)\.so$', 'gtk-immodule-%s', 'GTK input module for %s', prologue + 'gtk-query-immodules > /etc/gtk-2.0/gtk.immodules')
do_split_packages(d, immodules_root, '^im-(.*)\.so$', 'gtk-immodule-%s', 'GTK input module for %s', prologue + 'gtk-query-immodules-2.0 > /etc/gtk-2.0/gtk.immodules')
do_split_packages(d, printmodules_root, '^libprintbackend-(.*)\.so$', 'gtk-printbackend-%s', 'GTK printbackend module for %s')
if (bb.data.getVar('DEBIAN_NAMES', d, 1)):