Fixed some glitches in GtkCellAreaBox keynav from my last commit.

This commit is contained in:
Tristan Van Berkom 2010-12-09 18:29:36 +09:00
parent 89b3700b78
commit 1c8093b65e

View File

@ -1779,25 +1779,25 @@ gtk_cell_area_box_focus (GtkCellArea *area,
cycle = priv->rtl ? FOCUS_NEXT : FOCUS_PREV; cycle = priv->rtl ? FOCUS_NEXT : FOCUS_PREV;
break; break;
case GTK_DIR_UP: case GTK_DIR_UP:
if (priv->orientation == GTK_ORIENTATION_VERTICAL) if (priv->orientation == GTK_ORIENTATION_VERTICAL || !priv->last_focus_cell)
cycle = FOCUS_PREV; cycle = FOCUS_PREV;
else if (!focus_cell) else if (!focus_cell)
cycle = FOCUS_LAST_CELL; cycle = FOCUS_LAST_CELL;
break; break;
case GTK_DIR_DOWN: case GTK_DIR_DOWN:
if (priv->orientation == GTK_ORIENTATION_VERTICAL) if (priv->orientation == GTK_ORIENTATION_VERTICAL || !priv->last_focus_cell)
cycle = FOCUS_PREV; cycle = FOCUS_NEXT;
else if (!focus_cell) else if (!focus_cell)
cycle = FOCUS_LAST_CELL; cycle = FOCUS_LAST_CELL;
break; break;
case GTK_DIR_LEFT: case GTK_DIR_LEFT:
if (priv->orientation == GTK_ORIENTATION_HORIZONTAL) if (priv->orientation == GTK_ORIENTATION_HORIZONTAL || !priv->last_focus_cell)
cycle = priv->rtl ? FOCUS_NEXT : FOCUS_PREV; cycle = priv->rtl ? FOCUS_NEXT : FOCUS_PREV;
else if (!focus_cell) else if (!focus_cell)
cycle = FOCUS_LAST_CELL; cycle = FOCUS_LAST_CELL;
break; break;
case GTK_DIR_RIGHT: case GTK_DIR_RIGHT:
if (priv->orientation == GTK_ORIENTATION_HORIZONTAL) if (priv->orientation == GTK_ORIENTATION_HORIZONTAL || !priv->last_focus_cell)
cycle = priv->rtl ? FOCUS_PREV : FOCUS_NEXT; cycle = priv->rtl ? FOCUS_PREV : FOCUS_NEXT;
else if (!focus_cell) else if (!focus_cell)
cycle = FOCUS_LAST_CELL; cycle = FOCUS_LAST_CELL;