diff options
author | Denys Dmytriyenko <denis@denix.org> | 2009-03-17 14:32:59 -0400 |
---|---|---|
committer | Denys Dmytriyenko <denis@denix.org> | 2009-03-17 14:32:59 -0400 |
commit | 709c4d66e0b107ca606941b988bad717c0b45d9b (patch) | |
tree | 37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/gtk+/gtk+-2.6.10 | |
parent | fa6cd5a3b993f16c27de4ff82b42684516d433ba (diff) |
rename packages/ to recipes/ per earlier agreement
See links below for more details:
http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326
http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816
Signed-off-by: Denys Dmytriyenko <denis@denix.org>
Acked-by: Mike Westerhof <mwester@dls.net>
Acked-by: Philip Balister <philip@balister.org>
Acked-by: Khem Raj <raj.khem@gmail.com>
Acked-by: Marcin Juszkiewicz <hrw@openembedded.org>
Acked-by: Koen Kooi <koen@openembedded.org>
Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/gtk+/gtk+-2.6.10')
23 files changed, 1912 insertions, 0 deletions
diff --git a/recipes/gtk+/gtk+-2.6.10/automake-lossage.patch b/recipes/gtk+/gtk+-2.6.10/automake-lossage.patch new file mode 100644 index 0000000000..0d423ddbb9 --- /dev/null +++ b/recipes/gtk+/gtk+-2.6.10/automake-lossage.patch @@ -0,0 +1,24 @@ +--- gtk+-2.4.1/docs/tutorial/Makefile.am~ 2003-05-06 22:54:20.000000000 +0100 ++++ gtk+-2.4.1/docs/tutorial/Makefile.am 2004-05-08 12:31:41.000000000 +0100 +@@ -52,21 +52,5 @@ + + dist-hook: html + cp -Rp $(srcdir)/html $(distdir) +-else +-html: +- echo "***" +- echo "*** Warning: Tutorial not built" +- echo "***" +- +-pdf: +- echo "***" +- echo "*** Warning: Tutorial not built" +- echo "***" +- +-dist-hook: +- echo "***" +- echo "*** Warning: Tutorial not built" +- echo "*** DISTRIBUTION IS INCOMPLETE" +- echo "***" + endif + diff --git a/recipes/gtk+/gtk+-2.6.10/compile-against-newer-glib.patch b/recipes/gtk+/gtk+-2.6.10/compile-against-newer-glib.patch new file mode 100644 index 0000000000..3d8f3f614b --- /dev/null +++ b/recipes/gtk+/gtk+-2.6.10/compile-against-newer-glib.patch @@ -0,0 +1,49 @@ +--- gtk+-2.6.10/gtk/gtkstatusbar.h 2005/03/20 07:01:22 1.17 ++++ gtk+-2.6.10/gtk/gtkstatusbar.h 2005/12/06 14:25:30 1.17.2.1 +@@ -65,7 +65,7 @@ + { + GtkHBoxClass parent_class; + +- GMemChunk *messages_mem_chunk; ++ gpointer messages_mem_chunk; + + void (*text_pushed) (GtkStatusbar *statusbar, + guint context_id, +--- gtk+-2.6.10/gtk/gtkstatusbar.c 2005/07/21 19:10:48 1.56 ++++ gtk+-2.6.10/gtk/gtkstatusbar.c 2005/12/06 14:25:30 1.56.2.1 +@@ -302,7 +302,7 @@ + g_return_val_if_fail (text != NULL, 0); + + class = GTK_STATUSBAR_GET_CLASS (statusbar); +- msg = g_chunk_new (GtkStatusbarMsg, class->messages_mem_chunk); ++ msg = g_chunk_new (GtkStatusbarMsg, (GMemChunk *)class->messages_mem_chunk); + msg->text = g_strdup (text); + msg->context_id = context_id; + msg->message_id = statusbar->seq_message_id++; +@@ -343,7 +343,7 @@ + statusbar->messages = g_slist_remove_link (statusbar->messages, + list); + g_free (msg->text); +- g_mem_chunk_free (class->messages_mem_chunk, msg); ++ g_mem_chunk_free ((GMemChunk *)class->messages_mem_chunk, msg); + g_slist_free_1 (list); + break; + } +@@ -394,7 +394,7 @@ + class = GTK_STATUSBAR_GET_CLASS (statusbar); + statusbar->messages = g_slist_remove_link (statusbar->messages, list); + g_free (msg->text); +- g_mem_chunk_free (class->messages_mem_chunk, msg); ++ g_mem_chunk_free ((GMemChunk *)class->messages_mem_chunk, msg); + g_slist_free_1 (list); + + break; +@@ -459,7 +459,7 @@ + + msg = list->data; + g_free (msg->text); +- g_mem_chunk_free (class->messages_mem_chunk, msg); ++ g_mem_chunk_free ((GMemChunk *)class->messages_mem_chunk, msg); + } + g_slist_free (statusbar->messages); + statusbar->messages = NULL; diff --git a/recipes/gtk+/gtk+-2.6.10/disable-tooltips.patch b/recipes/gtk+/gtk+-2.6.10/disable-tooltips.patch new file mode 100644 index 0000000000..d71d839c3c --- /dev/null +++ b/recipes/gtk+/gtk+-2.6.10/disable-tooltips.patch @@ -0,0 +1,11 @@ +--- gtk+-2.4.3/gtk/gtktooltips.c.old 2004-07-04 18:52:04.000000000 +0100 ++++ gtk+-2.4.3/gtk/gtktooltips.c 2004-07-04 18:52:08.000000000 +0100 +@@ -118,7 +118,7 @@ + tooltips->tips_data_list = NULL; + + tooltips->delay = DEFAULT_DELAY; +- tooltips->enabled = TRUE; ++ tooltips->enabled = FALSE; + tooltips->timer_tag = 0; + tooltips->use_sticky_delay = FALSE; + tooltips->last_popdown.tv_sec = -1; diff --git a/recipes/gtk+/gtk+-2.6.10/gtk+-2.6.10-bg.patch b/recipes/gtk+/gtk+-2.6.10/gtk+-2.6.10-bg.patch new file mode 100644 index 0000000000..039440f933 --- /dev/null +++ b/recipes/gtk+/gtk+-2.6.10/gtk+-2.6.10-bg.patch @@ -0,0 +1,20 @@ +diff -ur gtk+-2.8.20/gtk/gtkiconview.c gtk+-2.8.20-new/gtk/gtkiconview.c +--- gtk+-2.8.20/gtk/gtkiconview.c 2006-04-11 20:44:15.000000000 +0200 ++++ gtk+-2.8.20-new/gtk/gtkiconview.c 2007-01-03 20:20:26.000000000 +0100 +@@ -899,9 +899,14 @@ + gdk_window_set_user_data (icon_view->priv->bin_window, widget); + + widget->style = gtk_style_attach (widget->style, widget->window); +- gdk_window_set_background (icon_view->priv->bin_window, &widget->style->base[widget->state]); ++/* gdk_window_set_background (icon_view->priv->bin_window, &widget->style->base[widget->state]); + gdk_window_set_background (widget->window, &widget->style->base[widget->state]); +- ++*/ ++printf("realize iconview\n"); ++// gdk_window_set_back_pixmap(widget->window, NULL, FALSE); ++// gdk_window_set_back_pixmap(icon_view->priv->bin_window, NULL, FALSE); ++ gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL); ++ gtk_style_set_background (widget->style, icon_view->priv->bin_window, GTK_STATE_NORMAL); + gdk_window_show (icon_view->priv->bin_window); + } + diff --git a/recipes/gtk+/gtk+-2.6.10/gtk+-handhelds.patch b/recipes/gtk+/gtk+-2.6.10/gtk+-handhelds.patch new file mode 100644 index 0000000000..20481f059b --- /dev/null +++ b/recipes/gtk+/gtk+-2.6.10/gtk+-handhelds.patch @@ -0,0 +1,236 @@ +--- 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" + #include "gtkintl.h" + +-#define MIN_ARROW_SIZE 15 ++#define MIN_ARROW_SIZE 7 + + enum { + PROP_0, +@@ -53,6 +53,8 @@ + guint prop_id, + GValue *value, + GParamSpec *pspec); ++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)); + + widget_class->expose_event = gtk_arrow_expose; ++ widget_class->size_request = gtk_arrow_size_request; + } + + static void +@@ -166,13 +169,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.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 @@ + 0.0, + G_PARAM_READABLE | G_PARAM_WRITABLE)); + ++ 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), +@@ -1124,7 +1133,7 @@ + { + GtkEntry *entry = GTK_ENTRY (widget); + PangoFontMetrics *metrics; +- gint xborder, yborder; ++ gint xborder, yborder, min_width; + PangoContext *context; + + gtk_widget_ensure_style (widget); +@@ -1140,9 +1149,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.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]; + ++static GdkAtom recognize_protocols_atom, atom_atom; + + GType + gtk_range_get_type (void) +@@ -220,6 +221,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 @@ + &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); + } + +@@ -1186,7 +1196,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; +@@ -1364,7 +1374,7 @@ + return TRUE; + } + +- return FALSE; ++ return TRUE; + } + + /** diff --git a/recipes/gtk+/gtk+-2.6.10/gtk.keynav.gtkcombobox.patch b/recipes/gtk+/gtk+-2.6.10/gtk.keynav.gtkcombobox.patch new file mode 100755 index 0000000000..6363ecd23a --- /dev/null +++ b/recipes/gtk+/gtk+-2.6.10/gtk.keynav.gtkcombobox.patch @@ -0,0 +1,238 @@ +--- /data/zzz/gtk-2.6/gtk+-2.6.10/gtk/gtkcombobox.c 2005-08-18 22:10:57.000000000 +0800 ++++ gtk/gtkcombobox.c 2006-06-22 11:24:32.000000000 +0800 +@@ -54,6 +54,11 @@ + + /* WELCOME, to THE house of evil code */ + ++#define HILDON_MENU_COMBO_MAX_WIDTH 406 ++#define HILDON_MENU_COMBO_MIN_WIDTH 66 ++#define HILDON_MENU_COMBO_MAX_HEIGHT 305 ++#define HILDON_MENU_COMBO_MIN_HEIGHT 70 ++ + typedef struct _ComboCellInfo ComboCellInfo; + struct _ComboCellInfo + { +@@ -1199,6 +1204,8 @@ gtk_combo_box_menu_position_below (GtkMe + gint monitor_num; + GdkRectangle monitor; + ++ g_message ("%s", __FUNCTION__); ++ + /* FIXME: is using the size request here broken? */ + child = GTK_BIN (combo_box)->child; + +@@ -1240,6 +1247,7 @@ gtk_combo_box_menu_position_below (GtkMe + *push_in = FALSE; + } + ++ + static void + gtk_combo_box_menu_position_over (GtkMenu *menu, + gint *x, +@@ -1247,69 +1255,119 @@ gtk_combo_box_menu_position_over (GtkMen + gboolean *push_in, + gpointer user_data) + { +- GtkComboBox *combo_box; +- GtkWidget *active; + GtkWidget *child; + GtkWidget *widget; ++ GtkWidget *active; + GtkRequisition requisition; +- GList *children; +- gint screen_width; ++ gint screen_width, screen_height; + gint menu_xpos; + gint menu_ypos; +- gint menu_width; ++ gint menu_width, menu_height; ++ gint menu_ypad; ++ gint full_menu_height; ++ gint total_y_padding; + + g_return_if_fail (GTK_IS_COMBO_BOX (user_data)); +- +- combo_box = GTK_COMBO_BOX (user_data); +- widget = GTK_WIDGET (combo_box); + +- gtk_widget_get_child_requisition (GTK_WIDGET (menu), &requisition); ++ widget = GTK_WIDGET (user_data); ++ child = GTK_BIN (user_data)->child; ++ ++ /* We need to realize the menu, as we are playing with menu item coordinates ++ * inside. */ ++ gtk_widget_realize (GTK_WIDGET (menu)); ++ ++ gtk_widget_get_child_requisition (menu->toplevel, &requisition); + menu_width = requisition.width; ++ menu_height = requisition.height; ++ ++ gtk_widget_get_child_requisition (GTK_WIDGET (menu), &requisition); ++ full_menu_height = requisition.height; ++ ++ screen_width = gdk_screen_get_width (gtk_widget_get_screen (widget)); ++ screen_height = gdk_screen_get_height (gtk_widget_get_screen (widget)); ++ ++ active = gtk_menu_get_active (menu); + +- active = gtk_menu_get_active (GTK_MENU (combo_box->priv->popup_widget)); + gdk_window_get_origin (widget->window, &menu_xpos, &menu_ypos); + + menu_xpos += widget->allocation.x; +- menu_ypos += widget->allocation.y + widget->allocation.height / 2 - 2; ++ menu_ypos += widget->allocation.y; + +- if (active != NULL) +- { +- gtk_widget_get_child_requisition (active, &requisition); +- menu_ypos -= requisition.height / 2; +- } ++ /* RTL */ ++ if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) ++ menu_xpos = menu_xpos + widget->allocation.width - menu_width; ++ ++ /* Substract borders */ ++ gtk_widget_style_get (GTK_WIDGET (menu), ++ "vertical-padding", &menu_ypad, ++ NULL); + +- children = GTK_MENU_SHELL (combo_box->priv->popup_widget)->children; +- while (children) ++ total_y_padding = menu_ypad + GTK_CONTAINER (menu)->border_width + ++ GTK_WIDGET (menu)->style->ythickness; ++ ++ /* Substract scroll arrow height if needed, and calculate ++ * scroll_offset. */ ++ if (full_menu_height > HILDON_MENU_COMBO_MAX_HEIGHT) + { +- child = children->data; ++ GList *child; ++ int pos; + +- if (active == child) +- break; ++ child = GTK_MENU_SHELL (menu)->children; ++ pos = 0; + +- if (GTK_WIDGET_VISIBLE (child)) +- { +- gtk_widget_get_child_requisition (child, &requisition); +- menu_ypos -= requisition.height; +- } ++ while (child) ++ { ++ GtkWidget *child_widget = GTK_WIDGET (child->data); ++ ++ if (active == child_widget) ++ break; + +- children = children->next; ++ if (GTK_WIDGET_VISIBLE (child)) ++ { ++ pos += child_widget->allocation.height; ++ ++ if (pos > HILDON_MENU_COMBO_MAX_HEIGHT) ++ menu->scroll_offset += child_widget->allocation.height; ++ } ++ ++ child = child->next; ++ } + } + +- if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) +- menu_xpos = menu_xpos + widget->allocation.width - menu_width; ++ /* Try to get active item and widget lined up */ ++ if (active != NULL) ++ { ++ gint new_menu_ypos; ++ ++ new_menu_ypos = menu_ypos - active->allocation.y - total_y_padding + ++ menu->scroll_offset; ++ if (new_menu_ypos < 0 || (new_menu_ypos + menu_height) > screen_height) ++ { ++ /* Menu doesn't fit - try to get the last item lined up. */ ++ new_menu_ypos = menu_ypos - menu_height + total_y_padding + ++ active->allocation.height; ++ } ++ ++ menu_ypos = new_menu_ypos; ++ } ++ else ++ menu_ypos -= total_y_padding; /* Line up with first item */ + + /* Clamp the position on screen */ +- screen_width = gdk_screen_get_width (gtk_widget_get_screen (widget)); +- + if (menu_xpos < 0) + menu_xpos = 0; + else if ((menu_xpos + menu_width) > screen_width) + menu_xpos -= ((menu_xpos + menu_width) - screen_width); + ++ if (menu_ypos < 0) ++ menu_ypos = 0; ++ else if ((menu_ypos + menu_height) > screen_height) ++ menu_ypos -= ((menu_ypos + menu_height) - screen_height); ++ + *x = menu_xpos; + *y = menu_ypos; + +- *push_in = TRUE; ++ *push_in = FALSE; + } + + static void +@@ -3481,14 +3539,18 @@ gtk_combo_box_key_press (GtkWidget *wi + + switch (event->keyval) + { ++ case GDK_Return: ++ case GDK_KP_Enter: ++ gtk_combo_box_popup (combo_box); ++ return TRUE; + case GDK_Down: + case GDK_KP_Down: +- if (gtk_combo_box_get_active_iter (combo_box, &iter)) +- { +- found = tree_next (combo_box, combo_box->priv->model, +- &iter, &new_iter, FALSE); +- break; +- } ++ if (!gtk_widget_keynav_failed (GTK_WIDGET(combo_box), GTK_DIR_RIGHT)) ++ { ++ found = FALSE; ++ gtk_widget_child_focus (gtk_widget_get_toplevel (GTK_WIDGET(combo_box)), GTK_DIR_TAB_FORWARD); ++ } ++ break; + /* else fall through */ + case GDK_Page_Up: + case GDK_KP_Page_Up: +@@ -3496,22 +3558,21 @@ gtk_combo_box_key_press (GtkWidget *wi + case GDK_KP_Home: + found = tree_first (combo_box, combo_box->priv->model, &new_iter, FALSE); + break; +- + case GDK_Up: + case GDK_KP_Up: +- if (gtk_combo_box_get_active_iter (combo_box, &iter)) +- { +- found = tree_prev (combo_box, combo_box->priv->model, +- &iter, &new_iter, FALSE); +- break; +- } ++ if (!gtk_widget_keynav_failed (GTK_WIDGET(combo_box), GTK_DIR_LEFT)) ++ { ++ found = FALSE; ++ gtk_widget_child_focus (gtk_widget_get_toplevel (GTK_WIDGET(combo_box)), GTK_DIR_TAB_BACKWARD); ++ } ++ break; + /* else fall through */ + case GDK_Page_Down: + case GDK_KP_Page_Down: + case GDK_End: + case GDK_KP_End: + found = tree_last (combo_box, combo_box->priv->model, &new_iter, FALSE); +- break; ++ break; + default: + return FALSE; + } diff --git a/recipes/gtk+/gtk+-2.6.10/gtk.keynav.gtkentry.patch b/recipes/gtk+/gtk+-2.6.10/gtk.keynav.gtkentry.patch new file mode 100755 index 0000000000..def741af5d --- /dev/null +++ b/recipes/gtk+/gtk+-2.6.10/gtk.keynav.gtkentry.patch @@ -0,0 +1,16 @@ +--- gtk/gtkentry.c 2005-08-18 22:10:57.000000000 +0800 ++++ gtk/gtkentry.c 2006-05-29 14:42:55.980731414 +0800 +@@ -2386,6 +2386,13 @@ gtk_entry_move_cursor (GtkEntry *e + break; + case GTK_MOVEMENT_VISUAL_POSITIONS: + new_pos = gtk_entry_move_visually (entry, new_pos, count); ++ if (entry->current_pos == new_pos && !extend_selection) ++ { ++ if (!gtk_widget_keynav_failed (GTK_WIDGET(entry), count > 0 ? GTK_DIR_RIGHT : GTK_DIR_LEFT)) ++ { ++ gtk_widget_child_focus (gtk_widget_get_toplevel (GTK_WIDGET(entry)), count > 0 ? GTK_DIR_TAB_FORWARD : GTK_DIR_TAB_BACKWARD); ++ } ++ } + break; + case GTK_MOVEMENT_WORDS: + while (count > 0) diff --git a/recipes/gtk+/gtk+-2.6.10/gtk.keynav.gtkiconview.patch b/recipes/gtk+/gtk+-2.6.10/gtk.keynav.gtkiconview.patch new file mode 100755 index 0000000000..6ac9629767 --- /dev/null +++ b/recipes/gtk+/gtk+-2.6.10/gtk.keynav.gtkiconview.patch @@ -0,0 +1,91 @@ +--- /data/zzz/gtk-2.6/gtk+-2.6.10/gtk/gtkiconview.c 2005-08-18 22:10:58.000000000 +0800 ++++ gtk/gtkiconview.c 2006-05-31 18:12:34.423427466 +0800 +@@ -2678,10 +2678,73 @@ find_item (GtkIconView *icon_view, + + /* FIXME: this could be more efficient + */ +- row = current->row + row_ofs; +- col = current->col + col_ofs; ++ int columns = (icon_view->priv->width - icon_view->priv->margin * 2 + icon_view->priv->column_spacing) / (icon_view->priv->column_spacing + current->width); ++ int rows = g_list_length (icon_view->priv->items) / columns; ++ if (g_list_length (icon_view->priv->items) % columns > 0) ++ rows++; + +- for (items = icon_view->priv->items; items; items = items->next) ++ items = g_list_last(icon_view->priv->items); ++ item = items->data; ++ if (col_ofs == 1) //right is pressed ++ { ++ if (current->col == item->col && current->row == (rows - 1)) //the current item is the last one, wrap to the first item ++ { ++ row = 0; ++ col = 0; ++ } ++ else if (current->col == (columns - 1)) //the current item is the rightmost one ++ { ++ row = current->row + row_ofs + 1; ++ col = 0; ++ } ++ else ++ { ++ row = current->row + row_ofs; ++ col = current->col + col_ofs; ++ } ++ } ++ else if (col_ofs == -1) //left is pressed ++ { ++ if (current->col == 0) //the current item is the leftmost one ++ { ++ if (current->row == 0) //the current item is the first one, wrap to the last item ++ { ++ row = rows - 1; ++ col = item->col; ++ } ++ else ++ { ++ row = current->row + row_ofs - 1; ++ col = columns - 1; ++ } ++ } ++ else ++ { ++ row = current->row + row_ofs; ++ col = current->col + col_ofs; ++ } ++ } ++ else if (row_ofs == 1) //down is pressed ++ { ++ if (current->row == (rows - 2) && item->col < current->col)// at the second last row ++ { ++ row = current->row + row_ofs; ++ col = 0; ++ } ++ else ++ { ++ row = current->row + row_ofs; ++ col = current->col + col_ofs; ++ } ++ } ++ else //up is pressed ++ { ++ row = current->row + row_ofs; ++ col = current->col + col_ofs; ++ } ++ ++ g_message ("row:%d, col:%d", row, col); ++ for (items = icon_view->priv->items; items; items = items->next) + { + item = items->data; + if (item->row == row && item->col == col) +@@ -2819,8 +2882,10 @@ gtk_icon_view_move_cursor_up_down (GtkIc + count, 0); + + if (!item) ++ { ++ gtk_widget_child_focus (gtk_widget_get_toplevel (GTK_WIDGET(icon_view)), count > 0 ? GTK_DIR_TAB_FORWARD : GTK_DIR_TAB_BACKWARD); + return; +- ++ } + if (icon_view->priv->ctrl_pressed || + !icon_view->priv->shift_pressed || + !icon_view->priv->anchor_item || diff --git a/recipes/gtk+/gtk+-2.6.10/gtk.keynav.gtkradiobutton.patch b/recipes/gtk+/gtk+-2.6.10/gtk.keynav.gtkradiobutton.patch new file mode 100755 index 0000000000..4497261ec6 --- /dev/null +++ b/recipes/gtk+/gtk+-2.6.10/gtk.keynav.gtkradiobutton.patch @@ -0,0 +1,32 @@ +--- /data/zzz/gtk-2.6/gtk+-2.6.10/gtk/gtkradiobutton.c 2005-08-18 22:10:58.000000000 +0800 ++++ gtk/gtkradiobutton.c 2006-05-26 17:12:35.000000000 +0800 +@@ -522,6 +522,12 @@ gtk_radio_button_focus (GtkWidget + + if (!new_focus) + { ++ if (!gtk_widget_keynav_failed (widget, direction)) ++ { ++ g_slist_free (focus_list); ++ return FALSE; ++ } ++ + tmp_list = focus_list; + + while (tmp_list) +@@ -542,8 +548,15 @@ gtk_radio_button_focus (GtkWidget + + if (new_focus) + { ++ GtkSettings *settings = gtk_widget_get_settings (widget); ++ gboolean cursor_only_focus; ++ ++ g_object_get (settings, ++ "gtk-cursor-only-focus", &cursor_only_focus, ++ NULL); + gtk_widget_grab_focus (new_focus); +- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (new_focus), TRUE); ++ if (!cursor_only_focus) ++ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (new_focus), TRUE); + } + + return TRUE; diff --git a/recipes/gtk+/gtk+-2.6.10/gtk.keynav.gtksettings.patch b/recipes/gtk+/gtk+-2.6.10/gtk.keynav.gtksettings.patch new file mode 100755 index 0000000000..0c3beeec49 --- /dev/null +++ b/recipes/gtk+/gtk+-2.6.10/gtk.keynav.gtksettings.patch @@ -0,0 +1,38 @@ +--- /data/zzz/gtk-2.6/gtk+-2.6.10/gtk/gtksettings.c 2005-08-18 22:10:59.000000000 +0800 ++++ gtk/gtksettings.c 2006-05-29 10:29:35.000000000 +0800 +@@ -72,7 +72,8 @@ enum { + PROP_XFT_RGBA, + PROP_XFT_DPI, + #endif +- PROP_ALTERNATIVE_BUTTON_ORDER ++ PROP_ALTERNATIVE_BUTTON_ORDER, ++ PROP_CURSOR_ONLY_FOCUS + }; + + +@@ -435,6 +436,25 @@ gtk_settings_class_init (GtkSettingsClas + G_PARAM_READWRITE), + NULL); + g_assert (result == PROP_ALTERNATIVE_BUTTON_ORDER); ++ ++ /** ++ * GtkSettings:gtk-cursor-only-focus: ++ * ++ * When TRUE, keyboard navigation should be able to reach all widgets ++ * by using the cursor keys only. Tab, Shift etc. keys can't be expected ++ * to be present on the used input device. ++ * ++ * Since: 2.10 ++ */ ++ result = settings_install_property_parser (class, ++ g_param_spec_boolean ("gtk-cursor-only-focus", ++ P_("Cursor Only Focus"), ++ P_("When TRUE, there are only cursor keys available to navigate widgets"), ++ FALSE, ++ G_PARAM_READWRITE), ++ NULL); ++ ++ g_assert (result == PROP_CURSOR_ONLY_FOCUS); + } + + static void diff --git a/recipes/gtk+/gtk+-2.6.10/gtk.keynav.gtktextview.patch b/recipes/gtk+/gtk+-2.6.10/gtk.keynav.gtktextview.patch new file mode 100755 index 0000000000..e3231b38d0 --- /dev/null +++ b/recipes/gtk+/gtk+-2.6.10/gtk.keynav.gtktextview.patch @@ -0,0 +1,25 @@ +--- /data/zzz/gtk-2.6/gtk+-2.6.10/gtk/gtktextview.c 2005-08-18 22:10:59.000000000 +0800 ++++ gtk/gtktextview.c 2006-07-03 15:34:19.880257250 +0800 +@@ -3855,6 +3855,22 @@ gtk_text_view_key_press_event (GtkWidget + + insert = gtk_text_buffer_get_insert (get_buffer (text_view)); + gtk_text_buffer_get_iter_at_mark (get_buffer (text_view), &iter, insert); ++ ++ int lineCount = gtk_text_buffer_get_line_count (get_buffer (text_view)); ++ int curLine = gtk_text_iter_get_line (&iter); ++ if (curLine == 0 && (event->keyval == GDK_Up || event->keyval == GDK_KP_Up) ++ && (!gtk_widget_keynav_failed (GTK_WIDGET(text_view), GTK_DIR_UP))) ++ { ++ gtk_text_view_move_focus (text_view,GTK_DIR_TAB_BACKWARD); ++ return TRUE; ++ } ++ else if (curLine == (lineCount - 1) && (event->keyval == GDK_Down || event->keyval == GDK_KP_Down) ++ && (!gtk_widget_keynav_failed (GTK_WIDGET(text_view), GTK_DIR_DOWN))) ++ { ++ gtk_text_view_move_focus (text_view,GTK_DIR_TAB_FORWARD); ++ return TRUE; ++ } ++ + can_insert = gtk_text_iter_can_insert (&iter, text_view->editable); + if (can_insert && + gtk_im_context_filter_keypress (text_view->im_context, event)) diff --git a/recipes/gtk+/gtk+-2.6.10/gtk.keynav.gtktreeview.patch b/recipes/gtk+/gtk+-2.6.10/gtk.keynav.gtktreeview.patch new file mode 100755 index 0000000000..f83558d879 --- /dev/null +++ b/recipes/gtk+/gtk+-2.6.10/gtk.keynav.gtktreeview.patch @@ -0,0 +1,121 @@ +--- /data/zzz/gtk-2.6/gtk+-2.6.10/gtk/gtktreeview.c 2006-06-29 14:06:27.099142881 +0800 ++++ gtk/gtktreeview.c 2006-06-29 14:06:53.746305635 +0800 +@@ -4198,6 +4198,118 @@ gtk_tree_view_key_press (GtkWidget *wi + return TRUE; + } + ++ GtkTreeViewColumn *focus_column; ++ GtkTreePath *tree_path; ++ gtk_tree_view_get_cursor (tree_view, &tree_path, &focus_column); ++ GtkTreeModel *tree_model = gtk_tree_view_get_model (tree_view); ++ ++ if (tree_model && tree_path ++ && (event->keyval == GDK_Up || event->keyval == GDK_KP_Up ++ || event->keyval == GDK_Down || event->keyval == GDK_KP_Down)) ++ { ++ GtkTreeIter cur_iter; ++ if (gtk_tree_model_get_iter (tree_model, &cur_iter, tree_path)) ++ { ++ GtkTreeIter iter; ++ GtkTreePath *path; ++ if ((event->keyval == GDK_Up || event->keyval == GDK_KP_Up) ++ && !gtk_widget_keynav_failed (GTK_WIDGET(tree_view), GTK_DIR_UP)) ++ { ++ gtk_tree_model_get_iter_first (tree_model, &iter); ++ path = gtk_tree_model_get_path (tree_model, &iter); ++ if (gtk_tree_path_compare (tree_path, path) == 0) ++ { ++ gtk_widget_child_focus (gtk_widget_get_toplevel (GTK_WIDGET(tree_view)), GTK_DIR_TAB_BACKWARD); ++ gtk_tree_path_free (tree_path); ++ gtk_tree_path_free (path); ++ return TRUE; ++ } ++ gtk_tree_path_free (path); ++ } ++ if ((event->keyval == GDK_Down || event->keyval == GDK_KP_Down) ++ && !gtk_widget_keynav_failed (GTK_WIDGET(tree_view), GTK_DIR_DOWN)) ++ { ++ if (!gtk_tree_model_iter_next (tree_model, &cur_iter))//cur_iter is the last one at its level ++ { ++ gtk_tree_model_get_iter (tree_model, &cur_iter, tree_path); ++ ++ if (!gtk_tree_model_iter_parent (tree_model, &iter, &cur_iter))//cur_iter is at toplevel ++ { ++ if (!gtk_tree_model_iter_has_child (tree_model, &cur_iter) || !gtk_tree_view_row_expanded (tree_view, tree_path)) ++ { ++ gtk_widget_child_focus (gtk_widget_get_toplevel (GTK_WIDGET(tree_view)), GTK_DIR_TAB_FORWARD); ++ gtk_tree_path_free (tree_path); ++ return TRUE; ++ } ++ } ++ else//check if every ancestor of cur_iter is the last one at its level ++ { ++ path = gtk_tree_model_get_path (tree_model, &iter); ++ int depth = gtk_tree_path_get_depth (path); ++ int i; ++ for (i = 0; i < depth; i++) ++ { ++ if (!gtk_tree_model_iter_next (tree_model, &iter)) ++ { ++ gtk_tree_path_up (path); ++ if (gtk_tree_path_to_string (path)) ++ gtk_tree_model_get_iter (tree_model, &iter, path); ++ } ++ else ++ break; ++ } ++ if (i == depth) ++ { ++ if (!gtk_tree_model_iter_has_child (tree_model, &cur_iter) || !gtk_tree_view_row_expanded (tree_view, tree_path)) ++ { ++ gtk_widget_child_focus (gtk_widget_get_toplevel (GTK_WIDGET(tree_view)), GTK_DIR_TAB_FORWARD); ++ gtk_tree_path_free (path); ++ gtk_tree_path_free (tree_path); ++ return TRUE; ++ } ++ } ++ gtk_tree_path_free (path); ++ } ++ } ++ } ++ } ++ } ++ ++ if (tree_view->priv->columns && tree_path ++ && (event->keyval == GDK_Left || event->keyval == GDK_KP_Left ++ || event->keyval == GDK_Right || event->keyval == GDK_KP_Right)) ++ { ++ list = tree_view->priv->columns; ++ guint length = g_list_length (list); ++ guint i = 0; ++ while (list) ++ { ++ GtkTreeViewColumn *column = GTK_TREE_VIEW_COLUMN (list->data); ++ ++ if (column == focus_column) ++ { ++ if (i == 0 && (event->keyval == GDK_Left || event->keyval == GDK_KP_Left)) ++ { ++ list = g_list_last (list); ++ gtk_tree_view_set_cursor (tree_view, tree_path, GTK_TREE_VIEW_COLUMN (list->data), FALSE); ++ gtk_tree_path_free (tree_path); ++ return TRUE; ++ } ++ if (i == length - 1 && (event->keyval == GDK_Right || event->keyval == GDK_KP_Right)) ++ { ++ list = g_list_first (list); ++ gtk_tree_view_set_cursor (tree_view, tree_path, GTK_TREE_VIEW_COLUMN (list->data), FALSE); ++ gtk_tree_path_free (tree_path); ++ return TRUE; ++ } ++ } ++ list = list->next; ++ i++; ++ } ++ } ++ ++ gtk_tree_path_free (tree_path); ++ + if (tree_view->priv->columns && (event->state & GDK_SHIFT_MASK) + && (event->keyval == GDK_Left || event->keyval == GDK_KP_Left + || event->keyval == GDK_Right || event->keyval == GDK_KP_Right)) diff --git a/recipes/gtk+/gtk+-2.6.10/gtk.keynav.gtkwidget.patch b/recipes/gtk+/gtk+-2.6.10/gtk.keynav.gtkwidget.patch new file mode 100755 index 0000000000..7cf4e13cf6 --- /dev/null +++ b/recipes/gtk+/gtk+-2.6.10/gtk.keynav.gtkwidget.patch @@ -0,0 +1,127 @@ +diff -r -u -p /data/zzz/gtk-2.6/gtk+-2.6.10/gtk/widget/gtkwidget.c gtk/widget/gtkwidget.c +--- /data/zzz/gtk-2.6/gtk+-2.6.10/gtk/widget/gtkwidget.c 2006-05-30 13:57:49.732943065 +0800 ++++ gtk/gtkwidget.c 2006-05-30 13:57:24.716589268 +0800 +@@ -120,6 +120,7 @@ enum { + ACCEL_CLOSURES_CHANGED, + SCREEN_CHANGED, + CAN_ACTIVATE_ACCEL, ++ KEYNAV_FAILED, + LAST_SIGNAL + }; + +@@ -202,6 +203,8 @@ static gboolean gtk_widget_real_focus_o + GdkEventFocus *event); + static gboolean gtk_widget_real_focus (GtkWidget *widget, + GtkDirectionType direction); ++static gboolean gtk_widget_real_keynav_failed (GtkWidget *widget, ++ GtkDirectionType direction); + static PangoContext* gtk_widget_peek_pango_context (GtkWidget *widget); + static void gtk_widget_propagate_state (GtkWidget *widget, + GtkStateData *data); +@@ -363,6 +366,7 @@ gtk_widget_class_init (GtkWidgetClass *k + klass->mnemonic_activate = gtk_widget_real_mnemonic_activate; + klass->grab_focus = gtk_widget_real_grab_focus; + klass->focus = gtk_widget_real_focus; ++ klass->keynav_failed = gtk_widget_real_keynav_failed; + klass->event = NULL; + klass->button_press_event = NULL; + klass->button_release_event = NULL; +@@ -1368,6 +1372,16 @@ gtk_widget_class_init (GtkWidgetClass *k + _gtk_marshal_VOID__OBJECT, + G_TYPE_NONE, 1, + GDK_TYPE_SCREEN); ++ ++ widget_signals[KEYNAV_FAILED] = ++ g_signal_new (("keynav_failed"), ++ G_TYPE_FROM_CLASS (object_class), ++ G_SIGNAL_RUN_LAST, ++ G_STRUCT_OFFSET (GtkWidgetClass, keynav_failed), ++ _gtk_boolean_handled_accumulator, NULL, ++ _gtk_marshal_BOOLEAN__ENUM, ++ G_TYPE_BOOLEAN, 1, ++ GTK_TYPE_DIRECTION_TYPE); + /** + * GtkWidget::can-activate-accel: + * @widget: the object which received the signal +@@ -4044,6 +4058,34 @@ gtk_widget_real_focus (GtkWidget + return FALSE; + } + ++static gboolean ++gtk_widget_real_keynav_failed (GtkWidget *widget, ++ GtkDirectionType direction) ++{ ++ GtkSettings *settings = gtk_widget_get_settings (widget); ++ gboolean cursor_only_focus; ++ ++ g_object_get (settings, "gtk-cursor-only-focus", &cursor_only_focus, NULL); ++ ++ switch (direction) ++ { ++ case GTK_DIR_TAB_FORWARD: ++ case GTK_DIR_TAB_BACKWARD: ++ return FALSE; ++ ++ case GTK_DIR_UP: ++ case GTK_DIR_DOWN: ++ case GTK_DIR_LEFT: ++ case GTK_DIR_RIGHT: ++ if (cursor_only_focus) ++ return FALSE; ++ } ++ ++ gdk_beep (); ++ ++ return TRUE; ++} ++ + /** + * gtk_widget_is_focus: + * @widget: a #GtkWidget +@@ -5500,6 +5542,20 @@ gtk_widget_child_focus (GtkWidget + return return_val; + } + ++gboolean ++gtk_widget_keynav_failed (GtkWidget *widget, ++ GtkDirectionType direction) ++{ ++ gboolean return_val; ++ ++ g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE); ++ ++ g_signal_emit (widget, widget_signals[KEYNAV_FAILED], 0, ++ direction, &return_val); ++ ++ return return_val; ++} ++ + /** + * gtk_widget_set_uposition: + * @widget: a #GtkWidget +diff -r -u -p /data/zzz/gtk-2.6/gtk+-2.6.10/gtk/widget/gtkwidget.h gtk/widget/gtkwidget.h +--- /data/zzz/gtk-2.6/gtk+-2.6.10/gtk/widget/gtkwidget.h 2006-05-30 13:57:49.736942642 +0800 ++++ gtk/gtkwidget.h 2006-05-30 13:57:24.716589268 +0800 +@@ -406,8 +406,9 @@ struct _GtkWidgetClass + gboolean (*can_activate_accel) (GtkWidget *widget, + guint signal_id); + ++ gboolean (* keynav_failed) (GtkWidget *widget, ++ GtkDirectionType direction); + /* Padding for future expansion */ +- void (*_gtk_reserved2) (void); + void (*_gtk_reserved3) (void); + void (*_gtk_reserved4) (void); + void (*_gtk_reserved5) (void); +@@ -562,7 +563,8 @@ GdkWindow *gtk_widget_get_parent_window + + gboolean gtk_widget_child_focus (GtkWidget *widget, + GtkDirectionType direction); +- ++gboolean gtk_widget_keynav_failed (GtkWidget *widget, ++ GtkDirectionType direction); + void gtk_widget_set_size_request (GtkWidget *widget, + gint width, + gint height); +Only in gtk/widget: gtkwidget.h.bak +Only in gtk/widget: gtkwidget.lo diff --git a/recipes/gtk+/gtk+-2.6.10/hardcoded_libtool.patch b/recipes/gtk+/gtk+-2.6.10/hardcoded_libtool.patch new file mode 100644 index 0000000000..b2afddcc61 --- /dev/null +++ b/recipes/gtk+/gtk+-2.6.10/hardcoded_libtool.patch @@ -0,0 +1,29 @@ +--- gtk+-2.6.0/configure.in.old 2005-01-01 16:23:45.000000000 +0000 ++++ gtk+-2.6.0/configure.in 2005-01-01 16:24:03.000000000 +0000 +@@ -360,7 +360,7 @@ + AC_MSG_CHECKING([Whether to write dependencies into .pc files]) + case $enable_explicit_deps in + auto) +- deplib_check_method=`(./libtool --config; echo eval echo \\$deplib_check_method) | sh` ++ deplib_check_method=`($host_alias-libtool --config; echo eval echo \\$deplib_check_method) | sh` + if test "X$deplib_check_method" = Xnone || test "x$enable_static" = xyes ; then + enable_explicit_deps=yes + else +@@ -688,7 +688,7 @@ + dnl Now we check to see if our libtool supports shared lib deps + dnl (in a rather ugly way even) + if $dynworks; then +- pixbuf_libtool_config="${CONFIG_SHELL-/bin/sh} ./libtool --config" ++ pixbuf_libtool_config="${CONFIG_SHELL-/bin/sh} $host_alias-libtool --config" + pixbuf_deplibs_check=`$pixbuf_libtool_config | \ + grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \ + sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'` +@@ -1512,7 +1512,7 @@ + # + # We are using gmodule-no-export now, but I'm leaving the stripping + # code in place for now, since pango and atk still require gmodule. +-export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh` ++export_dynamic=`($host_alias-libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh` + if test -n "$export_dynamic"; then + GDK_PIXBUF_DEP_LIBS=`echo $GDK_PIXBUF_DEP_LIBS | sed -e "s/$export_dynamic//"` + GDK_PIXBUF_XLIB_DEP_LIBS=`echo $GDK_PIXBUF_XLIB_DEP_LIBS | sed -e "s/$export_dynamic//"` diff --git a/recipes/gtk+/gtk+-2.6.10/help.patch b/recipes/gtk+/gtk+-2.6.10/help.patch new file mode 100644 index 0000000000..268b3dd9e2 --- /dev/null +++ b/recipes/gtk+/gtk+-2.6.10/help.patch @@ -0,0 +1,158 @@ +diff -NaurBb gtk+-2.6.10.old/gtk/Makefile.am gtk+-2.6.10/gtk/Makefile.am +--- gtk+-2.6.10.old/gtk/Makefile.am 2005-08-18 16:10:56.000000000 +0200 ++++ gtk+-2.6.10/gtk/Makefile.am 2005-12-29 01:23:52.000000000 +0100 +@@ -520,6 +520,7 @@ + gtkwidget.c \ + gtkwindow-decorate.c \ + gtkwindow.c \ ++ gpe-what.c \ + xembed.h + + if OS_UNIX +diff -NaurBb gtk+-2.6.10.old/gtk/gpe-what.c gtk+-2.6.10/gtk/gpe-what.c +--- gtk+-2.6.10.old/gtk/gpe-what.c 1970-01-01 01:00:00.000000000 +0100 ++++ gtk+-2.6.10/gtk/gpe-what.c 2005-12-29 00:59:26.000000000 +0100 +@@ -0,0 +1,130 @@ ++/* ++ * Copyright (C) 2002, 2003 Philip Blundell <philb@gnu.org> ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, write to the ++ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, ++ * Boston, MA 02111-1307, USA. ++ */ ++ ++#include <stdio.h> ++#include <string.h> ++#include <stdlib.h> ++ ++#include <X11/Xlib.h> ++#include <X11/Xatom.h> ++ ++#ifdef GDK_WINDOWING_X11 ++#error X11 required ++#endif ++ ++#include "gtkwidget.h" ++#include "gtktooltips.h" ++#include "x11/gdkx.h" ++#include "config.h" ++ ++#include <libintl.h> ++ ++#define _(x) dgettext(GETTEXT_PACKAGE, x) ++ ++static GdkAtom help_atom; ++static gboolean gpe_what_initialised; ++ ++static GSList *widgets; ++ ++static void ++send_text (Display *dpy, Window w, char *text) ++{ ++ Atom help_xatom = gdk_x11_atom_to_xatom (help_atom); ++ ++ gdk_error_trap_push (); ++ ++ XChangeProperty (dpy, w, help_xatom, XA_STRING, 8, PropModeReplace, text, strlen (text)); ++ ++ XFlush (dpy); ++ ++ gdk_error_trap_pop (); ++} ++ ++static GdkFilterReturn ++filter_func (GdkXEvent *xev, GdkEvent *ev, gpointer p) ++{ ++ XClientMessageEvent *xc = (XClientMessageEvent *)xev; ++ GSList *list; ++ Window sender = xc->data.l[0]; ++ ++ for (list = widgets; list; list = list->next) ++ { ++ GtkWidget *widget = GTK_WIDGET (list->data); ++ int x = xc->data.l[1], y = xc->data.l[2]; ++ int ax, ay; ++ ++ if (!GTK_WIDGET_DRAWABLE (widget)) continue; ++ ++ if (GTK_WIDGET_NO_WINDOW (widget)) ++ { ++ ax = widget->allocation.x; ++ ay = widget->allocation.y; ++ } ++ else ++ { ++ ax = 0; ++ ay = 0; ++ } ++ ++ if (widget->window == ev->any.window ++ && x >= ax && x < ax + widget->allocation.width ++ && y >= ay && y < ay + widget->allocation.height) ++ { ++ GtkTooltipsData *data = gtk_tooltips_data_get (widget); ++ if (data) ++ { ++ send_text (GDK_WINDOW_XDISPLAY (widget->window), sender, ++ data->tip_private ? data->tip_private : data->tip_text); ++ return GDK_FILTER_CONTINUE; ++ } ++ } ++ } ++ ++ send_text (GDK_WINDOW_XDISPLAY (ev->any.window), sender, _("No help available.")); ++ ++ return GDK_FILTER_CONTINUE; ++} ++ ++void ++gpe_what_mark_widget (GtkWidget *widget) ++{ ++ if (!gpe_what_initialised) ++ { ++ help_atom = gdk_atom_intern ("_GPE_INTERACTIVE_HELP", FALSE); ++ ++ gdk_add_client_message_filter (help_atom, filter_func, NULL); ++ ++ gpe_what_initialised = TRUE; ++ } ++ ++ if (widget->window) ++ { ++ widgets = g_slist_prepend (widgets, widget); ++ ++ gdk_property_change (widget->window, ++ help_atom, ++ help_atom, ++ 8, ++ GDK_PROP_MODE_REPLACE, ++ NULL, ++ 0); ++ } ++ else ++ abort (); ++} +diff -NaurBb gtk+-2.6.10.old/gtk/gtkwidget.c gtk+-2.6.10/gtk/gtkwidget.c +--- gtk+-2.6.10.old/gtk/gtkwidget.c 2005-08-18 16:10:59.000000000 +0200 ++++ gtk+-2.6.10/gtk/gtkwidget.c 2005-12-29 00:59:26.000000000 +0100 +@@ -2285,6 +2285,9 @@ + + g_signal_emit (widget, widget_signals[REALIZE], 0); + ++ extern void gpe_what_mark_widget (GtkWidget *widget); ++ gpe_what_mark_widget (widget); ++ + if (GTK_WIDGET_HAS_SHAPE_MASK (widget)) + { + shape_info = g_object_get_qdata (G_OBJECT (widget), quark_shape_info); diff --git a/recipes/gtk+/gtk+-2.6.10/menu-deactivate.patch b/recipes/gtk+/gtk+-2.6.10/menu-deactivate.patch new file mode 100644 index 0000000000..29e665fbf3 --- /dev/null +++ b/recipes/gtk+/gtk+-2.6.10/menu-deactivate.patch @@ -0,0 +1,50 @@ +--- gtk+-2.4.4/gtk/gtkmenushell.c.old Thu Aug 26 23:45:28 2004 ++++ gtk+-2.4.4/gtk/gtkmenushell.c Fri Aug 27 00:13:33 2004 +@@ -37,7 +37,7 @@ + #include "gtktearoffmenuitem.h" + #include "gtkwindow.h" + +-#define MENU_SHELL_TIMEOUT 500 ++#define MENU_SHELL_TIMEOUT 2000 + + enum { + DEACTIVATE, +@@ -156,6 +156,7 @@ + static GtkContainerClass *parent_class = NULL; + static guint menu_shell_signals[LAST_SIGNAL] = { 0 }; + ++static int last_crossing_time; + + GType + gtk_menu_shell_get_type (void) +@@ -418,6 +419,7 @@ + gtk_grab_add (GTK_WIDGET (menu_shell)); + menu_shell->have_grab = TRUE; + menu_shell->active = TRUE; ++ last_crossing_time = 0; + } + } + +@@ -545,6 +547,13 @@ + menu_shell->activate_time = 0; + deactivate = FALSE; + } ++ ++ if (last_crossing_time != 0 ++ && ((event->time - last_crossing_time) < 500)) ++ { ++ last_crossing_time = 0; ++ deactivate = FALSE; ++ } + + if (deactivate) + { +@@ -597,6 +606,8 @@ + if (menu_shell->active) + { + menu_item = gtk_get_event_widget ((GdkEvent*) event); ++ ++ last_crossing_time = event->time; + + if (!menu_item || + (GTK_IS_MENU_ITEM (menu_item) && diff --git a/recipes/gtk+/gtk+-2.6.10/menu-styling.patch b/recipes/gtk+/gtk+-2.6.10/menu-styling.patch new file mode 100644 index 0000000000..8f792df190 --- /dev/null +++ b/recipes/gtk+/gtk+-2.6.10/menu-styling.patch @@ -0,0 +1,22 @@ +# +# This patch improves menu styling (based on version in 2.7.0 +# which features a background pixmap for the menu). ---Mickey. +# +--- gtk+-2.6.10/gtk/gtkmenu.c 2005-08-18 16:10:58.000000000 +0200 ++++ gtk+-2.7.0/gtk/gtkmenu.c 2005-04-07 21:56:57.000000000 +0200 +@@ -2490,6 +2495,15 @@ + arrow_size, arrow_size); + } + } ++ else if (event->window == menu->bin_window) ++ { ++ gtk_paint_box (widget->style, ++ menu->bin_window, ++ GTK_STATE_NORMAL, ++ GTK_SHADOW_OUT, ++ NULL, widget, "menu", ++ -border_x, -border_y, width, height); ++ } + } + + static gboolean diff --git a/recipes/gtk+/gtk+-2.6.10/no-demos.patch b/recipes/gtk+/gtk+-2.6.10/no-demos.patch new file mode 100644 index 0000000000..2f10a30dda --- /dev/null +++ b/recipes/gtk+/gtk+-2.6.10/no-demos.patch @@ -0,0 +1,10 @@ +--- gtk+-2.4.1/Makefile.am~ 2004-01-17 22:15:56.000000000 +0000 ++++ gtk+-2.4.1/Makefile.am 2004-05-08 12:25:32.000000000 +0100 +@@ -1,6 +1,6 @@ + ## Makefile.am for GTK+ + +-SRC_SUBDIRS = gdk-pixbuf gdk gtk modules demos tests contrib ++SRC_SUBDIRS = gdk-pixbuf gdk gtk modules tests contrib + SUBDIRS = po po-properties $(SRC_SUBDIRS) docs build m4macros + + # require automake 1.4 diff --git a/recipes/gtk+/gtk+-2.6.10/no-xwc.patch b/recipes/gtk+/gtk+-2.6.10/no-xwc.patch new file mode 100644 index 0000000000..affb4a303e --- /dev/null +++ b/recipes/gtk+/gtk+-2.6.10/no-xwc.patch @@ -0,0 +1,151 @@ +diff -urNd ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c +--- ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c 2004-11-30 14:57:14 +00:00 ++++ gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c 2005-01-02 15:38:06 +00:00 +@@ -576,12 +576,14 @@ + GDK_GC_GET_XGC (gc), x, y, (XChar2b *) text, text_length / 2); + } + } ++#ifdef HAVE_XWC + else if (font->type == GDK_FONT_FONTSET) + { + XFontSet fontset = (XFontSet) GDK_FONT_XFONT (font); + XmbDrawString (xdisplay, impl->xid, + fontset, GDK_GC_GET_XGC (gc), x, y, text, text_length); + } ++#endif + else + g_error("undefined font type\n"); + } +@@ -613,6 +615,7 @@ + GDK_GC_GET_XGC (gc), x, y, text_8bit, text_length); + g_free (text_8bit); + } ++#ifdef HAVE_XWC + else if (font->type == GDK_FONT_FONTSET) + { + if (sizeof(GdkWChar) == sizeof(wchar_t)) +@@ -633,6 +636,7 @@ + g_free (text_wchar); + } + } ++#endif + else + g_error("undefined font type\n"); + } +diff -urNd ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkfont-x11.c gtk+-2.6.0/gdk/x11/gdkfont-x11.c +--- ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkfont-x11.c 2004-08-26 01:23:46 +01:00 ++++ gtk+-2.6.0/gdk/x11/gdkfont-x11.c 2005-01-02 15:45:39 +00:00 +@@ -525,10 +525,12 @@ + width = XTextWidth16 (xfont, (XChar2b *) text, text_length / 2); + } + break; ++#ifdef HAVE_XWC + case GDK_FONT_FONTSET: + fontset = (XFontSet) private->xfont; + width = XmbTextEscapement (fontset, text, text_length); + break; ++#endif + default: + width = 0; + } +@@ -578,6 +580,7 @@ + width = 0; + } + break; ++#ifdef HAVE_XWC + case GDK_FONT_FONTSET: + if (sizeof(GdkWChar) == sizeof(wchar_t)) + { +@@ -595,6 +598,7 @@ + g_free (text_wchar); + } + break; ++#endif + default: + width = 0; + } +@@ -667,6 +671,7 @@ + if (descent) + *descent = overall.descent; + break; ++#ifdef HAVE_XWC + case GDK_FONT_FONTSET: + fontset = (XFontSet) private->xfont; + XmbTextExtents (fontset, text, text_length, &ink, &logical); +@@ -681,6 +686,7 @@ + if (descent) + *descent = ink.y + ink.height; + break; ++#endif + } + + } +@@ -753,6 +759,7 @@ + *descent = overall.descent; + break; + } ++#ifdef HAVE_XWC + case GDK_FONT_FONTSET: + fontset = (XFontSet) private->xfont; + +@@ -780,6 +787,7 @@ + if (descent) + *descent = ink.y + ink.height; + break; ++#endif + } + + } +diff -urNd ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkim-x11.c gtk+-2.6.0/gdk/x11/gdkim-x11.c +--- ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkim-x11.c 2004-11-17 00:55:10 +00:00 ++++ gtk+-2.6.0/gdk/x11/gdkim-x11.c 2005-01-02 15:42:04 +00:00 +@@ -48,6 +48,7 @@ + void + _gdk_x11_initialize_locale (void) + { ++#ifdef HAVE_XWC + wchar_t result; + gchar *current_locale; + static char *last_locale = NULL; +@@ -93,7 +94,8 @@ + GDK_NOTE (XIM, + g_message ("%s multi-byte string functions.", + gdk_use_mb ? "Using" : "Not using")); +- ++#endif ++ + return; + } + +@@ -136,6 +138,7 @@ + { + gchar *mbstr; + ++#ifdef HAVE_XWC + if (gdk_use_mb) + { + GdkDisplay *display = find_a_display (); +@@ -178,6 +181,7 @@ + XFree (tpr.value); + } + else ++#endif + { + gint length = 0; + gint i; +@@ -210,6 +214,7 @@ + gint + gdk_mbstowcs (GdkWChar *dest, const gchar *src, gint dest_max) + { ++#ifdef HAVE_XWC + if (gdk_use_mb) + { + GdkDisplay *display = find_a_display (); +@@ -242,6 +247,7 @@ + return len_cpy; + } + else ++#endif + { + gint i; + diff --git a/recipes/gtk+/gtk+-2.6.10/scroll-timings.patch b/recipes/gtk+/gtk+-2.6.10/scroll-timings.patch new file mode 100644 index 0000000000..a38b21dcc2 --- /dev/null +++ b/recipes/gtk+/gtk+-2.6.10/scroll-timings.patch @@ -0,0 +1,15 @@ +--- gtk+-2.4.4/gtk/gtkrange.c~ 2004-08-23 01:50:22.000000000 +0100 ++++ gtk+-2.4.4/gtk/gtkrange.c 2004-08-27 15:48:49.000000000 +0100 +@@ -35,9 +35,9 @@ + #include "gtkintl.h" + #include "gtkscrollbar.h" + +-#define SCROLL_INITIAL_DELAY 250 /* must hold button this long before ... */ +-#define SCROLL_LATER_DELAY 100 /* ... it starts repeating at this rate */ +-#define UPDATE_DELAY 300 /* Delay for queued update */ ++#define SCROLL_INITIAL_DELAY 500 /* must hold button this long before ... */ ++#define SCROLL_LATER_DELAY 200 /* ... it starts repeating at this rate */ ++#define UPDATE_DELAY 1000 /* Delay for queued update */ + + enum { + PROP_0, diff --git a/recipes/gtk+/gtk+-2.6.10/single-click.patch b/recipes/gtk+/gtk+-2.6.10/single-click.patch new file mode 100644 index 0000000000..3bb208d4d6 --- /dev/null +++ b/recipes/gtk+/gtk+-2.6.10/single-click.patch @@ -0,0 +1,54 @@ +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 @@ + } + + gtk_calendar_select_and_focus_day (calendar, day); +- } ++ ++ // This change causes the calendar to disappear after choosing a day ++/* } + else if (event->type == GDK_2BUTTON_PRESS) +- { ++ {*/ + private_data->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 @@ + if (fs->last_selected != NULL) + g_free (fs->last_selected); + ++ // Single-click directory entry ++ if (new_names->len == 1) ++ { ++ GtkTreeView *tree_view; ++ GtkTreeModel *model; ++ GtkTreePath *path; ++ GtkTreeIter iter; ++ gboolean is_file; ++ ++ tree_view = gtk_tree_selection_get_tree_view (selection); ++ ++ if (gtk_tree_selection_get_selected (selection, &model, &iter)) ++ { ++ path = gtk_tree_model_get_path (model, &iter); ++ gtk_tree_model_get (model, &iter, ISFILE_COLUMN, &is_file, -1); ++ ++ if (!is_file) ++ { ++ gtk_file_selection_dir_activate (tree_view, path, ++ gtk_tree_view_get_column (tree_view, DIR_COLUMN), ++ user_data); ++ } ++ ++ gtk_tree_path_free (path); ++ } ++ } ++ + fs->last_selected = g_strdup (g_ptr_array_index (new_names, index)); + filename = get_real_filename (fs->last_selected, FALSE); + diff --git a/recipes/gtk+/gtk+-2.6.10/small-gtkfilesel.patch b/recipes/gtk+/gtk+-2.6.10/small-gtkfilesel.patch new file mode 100644 index 0000000000..20bf4cf366 --- /dev/null +++ b/recipes/gtk+/gtk+-2.6.10/small-gtkfilesel.patch @@ -0,0 +1,267 @@ +diff -urNd ../gtk+-2.4.4-r5/gtk+-2.4.4/gtk/gtkfilesel.c gtk+-2.4.4/gtk/gtkfilesel.c +--- ../gtk+-2.4.4-r5/gtk+-2.4.4/gtk/gtkfilesel.c 2004-07-10 05:02:10.000000000 +0100 ++++ gtk+-2.4.4/gtk/gtkfilesel.c 2004-09-13 13:40:09.000000000 +0100 +@@ -68,6 +68,7 @@ + #include "gtkprivate.h" + #include "gtkscrolledwindow.h" + #include "gtkstock.h" ++#include "gtksignal.h" + #include "gtktreeselection.h" + #include "gtktreeview.h" + #include "gtkvbox.h" +@@ -77,6 +78,7 @@ + #include "gtkmessagedialog.h" + #include "gtkdnd.h" + #include "gtkeventbox.h" ++#include "gtkimage.h" + + #undef GTK_DISABLE_DEPRECATED + #include "gtkoptionmenu.h" +@@ -245,7 +247,8 @@ + }; + + enum { +- DIR_COLUMN ++ DIR_COLUMN, ++ ISFILE_COLUMN + }; + + enum { +@@ -400,6 +403,12 @@ + GtkTreePath *path, + GtkTreeViewColumn *column, + gpointer user_data); ++ ++static void gtk_file_selection_activate (GtkTreeView *tree_view, ++ GtkTreePath *path, ++ GtkTreeViewColumn *column, ++ gpointer user_data); ++ + static void gtk_file_selection_file_changed (GtkTreeSelection *selection, + gpointer user_data); + static void gtk_file_selection_dir_activate (GtkTreeView *tree_view, +@@ -419,6 +428,7 @@ + static void gtk_file_selection_create_dir (GtkWidget *widget, gpointer data); + static void gtk_file_selection_delete_file (GtkWidget *widget, gpointer data); + static void gtk_file_selection_rename_file (GtkWidget *widget, gpointer data); ++static void gtk_file_selection_style_set (GtkWidget *widget, GtkStyle *prev_style); + + static void free_selected_names (GPtrArray *names); + +@@ -578,6 +588,23 @@ + G_PARAM_WRITABLE)); + object_class->destroy = gtk_file_selection_destroy; + widget_class->map = gtk_file_selection_map; ++ widget_class->style_set = gtk_file_selection_style_set; ++ ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_boolean ("show_fileops_default", ++ _("Show fileop buttons by default"), ++ _("Whether file operation buttons are shown by default"), ++ TRUE, ++ G_PARAM_READABLE)); ++ ++ gtk_widget_class_install_style_property (widget_class, ++ g_param_spec_int ("border_width", ++ _("Border width"), ++ _("Width of border around the main dialog area"), ++ 0, ++ G_MAXINT, ++ 10, ++ G_PARAM_READABLE)); + } + + static void gtk_file_selection_set_property (GObject *object, +@@ -649,7 +676,29 @@ + gtk_widget_grab_default (widget); + return FALSE; + } +- ++ ++static void ++gtk_file_selection_style_set (GtkWidget *filesel, ++ GtkStyle *prev_style) ++{ ++ gboolean show_fileops; ++ gint border_width; ++ ++ gtk_widget_style_get (filesel, ++ "show_fileops_default", ++ &show_fileops, ++ "border_width", ++ &border_width, ++ NULL); ++ ++ gtk_container_set_border_width (GTK_CONTAINER (filesel), border_width); ++ ++ if (show_fileops) ++ gtk_file_selection_show_fileop_buttons (GTK_FILE_SELECTION (filesel)); ++ else ++ gtk_file_selection_hide_fileop_buttons (GTK_FILE_SELECTION (filesel)); ++} ++ + static void + gtk_file_selection_init (GtkFileSelection *filesel) + { +@@ -674,17 +723,15 @@ + + /* The dialog-sized vertical box */ + filesel->main_vbox = dialog->vbox; +- gtk_container_set_border_width (GTK_CONTAINER (filesel), 10); + + /* The horizontal box containing create, rename etc. buttons */ + filesel->button_area = gtk_hbutton_box_new (); + gtk_button_box_set_layout (GTK_BUTTON_BOX (filesel->button_area), GTK_BUTTONBOX_START); +- gtk_box_set_spacing (GTK_BOX (filesel->button_area), 0); + gtk_box_pack_start (GTK_BOX (filesel->main_vbox), filesel->button_area, + FALSE, FALSE, 0); + gtk_widget_show (filesel->button_area); + +- gtk_file_selection_show_fileop_buttons (filesel); ++ gtk_file_selection_style_set (GTK_WIDGET (filesel), NULL); + + /* hbox for pulldown menu */ + pulldown_hbox = gtk_hbox_new (TRUE, 5); +@@ -723,25 +770,32 @@ + + /* The directories list */ + +- model = gtk_list_store_new (1, G_TYPE_STRING); ++ model = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_BOOLEAN); /* MA */ + filesel->dir_list = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model)); + g_object_unref (model); + +- column = gtk_tree_view_column_new_with_attributes (_("Folders"), ++ column = gtk_tree_view_column_new_with_attributes (/*_("Folders")*/ NULL, + gtk_cell_renderer_text_new (), + "text", DIR_COLUMN, + NULL); + label = gtk_label_new_with_mnemonic (_("Fol_ders")); + gtk_label_set_mnemonic_widget (GTK_LABEL (label), filesel->dir_list); + gtk_widget_show (label); +- gtk_tree_view_column_set_widget (column, label); ++ ++ /* gtk_tree_view_column_set_widget (column, label); */ ++ gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (filesel->dir_list), FALSE); ++ + gtk_tree_view_column_set_sizing (column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); + gtk_tree_view_append_column (GTK_TREE_VIEW (filesel->dir_list), column); + + gtk_widget_set_size_request (filesel->dir_list, + DIR_LIST_WIDTH, DIR_LIST_HEIGHT); + g_signal_connect (filesel->dir_list, "row_activated", +- G_CALLBACK (gtk_file_selection_dir_activate), filesel); ++ G_CALLBACK (gtk_file_selection_activate), filesel); ++ ++ g_signal_connect (gtk_tree_view_get_selection (GTK_TREE_VIEW (filesel->dir_list)), "changed", ++ G_CALLBACK (gtk_file_selection_file_changed), filesel); ++ + + /* gtk_clist_column_titles_passive (GTK_CLIST (filesel->dir_list)); */ + +@@ -758,41 +812,6 @@ + gtk_widget_show (filesel->dir_list); + gtk_widget_show (scrolled_win); + +- /* The files list */ +- model = gtk_list_store_new (1, G_TYPE_STRING); +- filesel->file_list = gtk_tree_view_new_with_model (GTK_TREE_MODEL (model)); +- g_object_unref (model); +- +- column = gtk_tree_view_column_new_with_attributes (_("Files"), +- gtk_cell_renderer_text_new (), +- "text", FILE_COLUMN, +- NULL); +- label = gtk_label_new_with_mnemonic (_("_Files")); +- gtk_label_set_mnemonic_widget (GTK_LABEL (label), filesel->file_list); +- gtk_widget_show (label); +- gtk_tree_view_column_set_widget (column, label); +- gtk_tree_view_column_set_sizing (column, GTK_TREE_VIEW_COLUMN_AUTOSIZE); +- gtk_tree_view_append_column (GTK_TREE_VIEW (filesel->file_list), column); +- +- gtk_widget_set_size_request (filesel->file_list, +- FILE_LIST_WIDTH, FILE_LIST_HEIGHT); +- g_signal_connect (filesel->file_list, "row_activated", +- G_CALLBACK (gtk_file_selection_file_activate), filesel); +- g_signal_connect (gtk_tree_view_get_selection (GTK_TREE_VIEW (filesel->file_list)), "changed", +- G_CALLBACK (gtk_file_selection_file_changed), filesel); +- +- /* gtk_clist_column_titles_passive (GTK_CLIST (filesel->file_list)); */ +- +- scrolled_win = gtk_scrolled_window_new (NULL, NULL); +- gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_win), GTK_SHADOW_IN); +- gtk_container_add (GTK_CONTAINER (scrolled_win), filesel->file_list); +- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win), +- GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); +- gtk_container_set_border_width (GTK_CONTAINER (scrolled_win), 0); +- gtk_container_add (GTK_CONTAINER (list_container), scrolled_win); +- gtk_widget_show (filesel->file_list); +- gtk_widget_show (scrolled_win); +- + /* action area for packing buttons into. */ + filesel->action_area = gtk_hbox_new (TRUE, 0); + gtk_box_pack_start (GTK_BOX (filesel->main_vbox), filesel->action_area, +@@ -2008,6 +2027,23 @@ + } + + static void ++gtk_file_selection_activate (GtkTreeView *tree_view, ++ GtkTreePath *path, ++ GtkTreeViewColumn *column, ++ gpointer user_data) ++{ ++ GtkTreeModel *model = gtk_tree_view_get_model (tree_view); ++ GtkTreeIter iter; ++ gboolean is_file; ++ ++ gtk_tree_model_get_iter (model, &iter, path); ++ gtk_tree_model_get (model, &iter, ISFILE_COLUMN, &is_file, -1); ++ ++ if (! is_file) ++ gtk_file_selection_dir_activate (tree_view, path, column, user_data); ++} ++ ++static void + gtk_file_selection_file_activate (GtkTreeView *tree_view, + GtkTreePath *path, + GtkTreeViewColumn *column, +@@ -2103,7 +2139,6 @@ + PossibleCompletion* poss; + GtkTreeIter iter; + GtkListStore *dir_model; +- GtkListStore *file_model; + gchar* filename; + gchar* rem_path = rel_path; + gchar* sel_text; +@@ -2125,10 +2160,8 @@ + g_assert (cmpl_state->reference_dir); + + dir_model = GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (fs->dir_list))); +- file_model = GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (fs->file_list))); + + gtk_list_store_clear (dir_model); +- gtk_list_store_clear (file_model); + + /* Set the dir list to include ./ and ../ */ + gtk_list_store_append (dir_model, &iter); +@@ -2150,13 +2183,17 @@ + strcmp (filename, ".." G_DIR_SEPARATOR_S) != 0) + { + gtk_list_store_append (dir_model, &iter); +- gtk_list_store_set (dir_model, &iter, DIR_COLUMN, filename, -1); ++ gtk_list_store_set (dir_model, &iter, ++ DIR_COLUMN, filename, ++ ISFILE_COLUMN, FALSE, -1); + } + } + else + { +- gtk_list_store_append (file_model, &iter); +- gtk_list_store_set (file_model, &iter, DIR_COLUMN, filename, -1); ++ gtk_list_store_append (dir_model, &iter); ++ gtk_list_store_set (dir_model, &iter, ++ DIR_COLUMN, filename, ++ ISFILE_COLUMN, TRUE, -1); + } + } + diff --git a/recipes/gtk+/gtk+-2.6.10/spinbutton.patch b/recipes/gtk+/gtk+-2.6.10/spinbutton.patch new file mode 100644 index 0000000000..8ad7507af0 --- /dev/null +++ b/recipes/gtk+/gtk+-2.6.10/spinbutton.patch @@ -0,0 +1,128 @@ +--- 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 @@ + + spin = GTK_SPIN_BUTTON (widget); + arrow_size = spin_button_get_arrow_size (spin); +- panel_width = arrow_size + 2 * widget->style->xthickness; ++ panel_width = (2 * arrow_size) + 4 * widget->style->xthickness; + + widget->allocation = *allocation; + +@@ -866,19 +866,16 @@ + { + width = spin_button_get_arrow_size (spin_button) + 2 * widget->style->xthickness; + ++ y = widget->style->ythickness; ++ height = widget->requisition.height - (2 * y); ++ + if (arrow_type == GTK_ARROW_UP) + { + x = 0; +- y = 0; +- +- height = widget->requisition.height / 2; + } + else + { +- x = 0; +- y = widget->requisition.height / 2; +- +- height = (widget->requisition.height + 1) / 2; ++ x = width; + } + + if (spin_button_at_limit (spin_button, arrow_type)) +@@ -908,32 +905,17 @@ + shadow_type = GTK_SHADOW_OUT; + } + } +- ++ + gtk_paint_box (widget->style, spin_button->panel, + state_type, shadow_type, + NULL, widget, +- (arrow_type == GTK_ARROW_UP)? "spinbutton_up" : "spinbutton_down", ++ NULL, + x, y, width, height); + + height = widget->requisition.height; + +- if (arrow_type == GTK_ARROW_DOWN) +- { +- y = height / 2; +- height = height - y - 2; +- } +- else +- { +- y = 2; +- height = height / 2 - 2; +- } +- + width -= 3; +- +- if (widget && gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) +- x = 2; +- else +- x = 1; ++ height -= 3; + + w = width / 2; + w -= w % 2 - 1; /* force odd */ +@@ -1108,7 +1090,7 @@ + if (GTK_ENTRY (widget)->editable) + gtk_spin_button_update (spin); + +- if (event->y <= widget->requisition.height / 2) ++ if (event->x <= (spin_button_get_arrow_size (spin) + widget->style->xthickness)) + { + if (event->button == 1) + start_spinning (spin, GTK_ARROW_UP, spin->adjustment->step_increment); +@@ -1143,44 +1125,11 @@ + + arrow_size = spin_button_get_arrow_size (spin); + +- if (event->button == spin->button) +- { +- int click_child = spin->click_child; ++ gtk_spin_button_stop_spinning (spin); + +- gtk_spin_button_stop_spinning (spin); +- +- if (event->button == 3) +- { +- if (event->y >= 0 && event->x >= 0 && +- event->y <= widget->requisition.height && +- event->x <= arrow_size + 2 * widget->style->xthickness) +- { +- if (click_child == GTK_ARROW_UP && +- event->y <= widget->requisition.height / 2) +- { +- gdouble diff; +- +- diff = spin->adjustment->upper - spin->adjustment->value; +- if (diff > EPSILON) +- gtk_spin_button_real_spin (spin, diff); +- } +- else if (click_child == GTK_ARROW_DOWN && +- event->y > widget->requisition.height / 2) +- { +- gdouble diff; +- +- diff = spin->adjustment->value - spin->adjustment->lower; +- if (diff > EPSILON) +- gtk_spin_button_real_spin (spin, -diff); +- } +- } +- } +- spin_button_redraw (spin); ++ spin_button_redraw (spin); + +- return TRUE; +- } +- else +- return GTK_WIDGET_CLASS (parent_class)->button_release_event (widget, event); ++ return TRUE; + } + + static gint |