New item,focused/unfocused signals for the GenList widget

This commit is contained in:
Davide Andreoli 2014-05-04 12:20:20 +02:00
parent 8b9e5901a3
commit 81289ddfa9
2 changed files with 26 additions and 0 deletions

View File

@ -371,6 +371,8 @@ Signals that you can add callbacks for are:
was unhighlighted.
- ``focused`` - When the genlist has received focus. (since 1.8)
- ``unfocused`` - When the genlist has lost focus. (since 1.8)
- ``item,focused`` - When the genlist item has received focus. (since 1.10)
- ``item,unfocused`` - When the genlist item has lost focus. (since 1.10)
Enumerations

View File

@ -1002,6 +1002,30 @@ cdef class Genlist(Object):
def callback_unfocused_del(self, func):
self._callback_del("unfocused", func)
def callback_item_focused_add(self, func, *args, **kwargs):
"""When the genlist item has received focus.
.. versionadded:: 1.10
"""
self._callback_add_full("item,focused", _cb_object_item_conv, func, *args, **kwargs)
def callback_item_focused_del(self, func):
self._callback_del_full("item,focused", _cb_object_item_conv, func)
def callback_item_unfocused_add(self, func, *args, **kwargs):
"""When the genlist item has lost focus.
.. versionadded:: 1.10
"""
self._callback_add_full("item,unfocused", _cb_object_item_conv, func, *args, **kwargs)
def callback_item_unfocused_del(self, func):
self._callback_del_full("item,unfocused", _cb_object_item_conv, func)
property scroller_policy:
"""