Implemented focus handling in GtkCellAreaBox

Now when the GtkCellAreaBox receives key events it cycles
the currently focused cell to the next focusable cell in the box
while observing the navigation direction, it then emits "focus-leave"
when hitting the boundries of the area.
This commit is contained in:
Tristan Van Berkom
2010-11-06 16:14:38 +09:00
parent 09e3d9d3aa
commit 0336838366
3 changed files with 145 additions and 7 deletions

View File

@ -1725,8 +1725,6 @@ gtk_cell_area_grab_focus (GtkCellArea *area,
* @area: a #GtkCellArea
* @direction: the #GtkDirectionType in which focus
* is to leave @area
* @path: the current #GtkTreePath string for the
* event which was handled by @area
*
* Notifies that focus is to leave @area in the
* given @direction.
@ -1740,12 +1738,15 @@ gtk_cell_area_grab_focus (GtkCellArea *area,
*/
void
gtk_cell_area_focus_leave (GtkCellArea *area,
GtkDirectionType direction,
const gchar *path)
GtkDirectionType direction)
{
GtkCellAreaPrivate *priv;
g_return_if_fail (GTK_IS_CELL_AREA (area));
g_signal_emit (area, cell_area_signals[SIGNAL_FOCUS_LEAVE], 0, direction, path);
priv = area->priv;
g_signal_emit (area, cell_area_signals[SIGNAL_FOCUS_LEAVE], 0, direction, priv->current_path);
}
/**