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/gtk.keynav.gtkiconview.patch | |
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/gtk.keynav.gtkiconview.patch')
-rwxr-xr-x | recipes/gtk+/gtk+-2.6.10/gtk.keynav.gtkiconview.patch | 91 |
1 files changed, 91 insertions, 0 deletions
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 || |