Fix doc and harmless typo (real_index instead of real_path)
This commit is contained in:
parent
813075ae2f
commit
a52a931b57
@ -234,7 +234,7 @@ class FlatNodeMap(object):
|
|||||||
|
|
||||||
:param handle: the key of the object for which the path in the treeview
|
:param handle: the key of the object for which the path in the treeview
|
||||||
is needed
|
is needed
|
||||||
:param type: an object handle
|
:type handle: an object handle
|
||||||
:Returns: the path, or None if handle does not link to a path
|
:Returns: the path, or None if handle does not link to a path
|
||||||
"""
|
"""
|
||||||
index = iter.user_data
|
index = iter.user_data
|
||||||
@ -252,7 +252,7 @@ class FlatNodeMap(object):
|
|||||||
|
|
||||||
:param handle: the key of the object for which the path in the treeview
|
:param handle: the key of the object for which the path in the treeview
|
||||||
is needed
|
is needed
|
||||||
:param type: an object handle
|
:type handle: an object handle
|
||||||
:Returns: the path, or None if handle does not link to a path
|
:Returns: the path, or None if handle does not link to a path
|
||||||
"""
|
"""
|
||||||
index = self._hndl2index.get(handle)
|
index = self._hndl2index.get(handle)
|
||||||
@ -267,7 +267,7 @@ class FlatNodeMap(object):
|
|||||||
|
|
||||||
:param handle: the key of the object for which the sortkey
|
:param handle: the key of the object for which the sortkey
|
||||||
is needed
|
is needed
|
||||||
:param type: an object handle
|
:type handle: an object handle
|
||||||
:Returns: the sortkey, or None if handle is not present
|
:Returns: the sortkey, or None if handle is not present
|
||||||
"""
|
"""
|
||||||
index = self._hndl2index.get(handle)
|
index = self._hndl2index.get(handle)
|
||||||
@ -381,6 +381,7 @@ class FlatNodeMap(object):
|
|||||||
Returns the path of the inserted row
|
Returns the path of the inserted row
|
||||||
|
|
||||||
:param srtkey_hndl: the (sortkey, handle) tuple that must be inserted
|
:param srtkey_hndl: the (sortkey, handle) tuple that must be inserted
|
||||||
|
:type srtkey_hndl: sortkey key already transformed by self.sort_func, object handle
|
||||||
|
|
||||||
:Returns: path of the row inserted in the treeview
|
:Returns: path of the row inserted in the treeview
|
||||||
:Returns type: Gtk.TreePath or None
|
:Returns type: Gtk.TreePath or None
|
||||||
@ -722,15 +723,15 @@ class FlatBaseModel(GObject.GObject, Gtk.TreeModel):
|
|||||||
"""
|
"""
|
||||||
Get the gramps handle for an iter.
|
Get the gramps handle for an iter.
|
||||||
"""
|
"""
|
||||||
ud = iter.user_data
|
index = iter.user_data
|
||||||
if ud is None:
|
if index is None:
|
||||||
##GTK3: user data may only be an integer, we store the index
|
##GTK3: user data may only be an integer, we store the index
|
||||||
##PROBLEM: pygobject 3.8 stores 0 as None, we need to correct
|
##PROBLEM: pygobject 3.8 stores 0 as None, we need to correct
|
||||||
## when using user_data for that!
|
## when using user_data for that!
|
||||||
##upstream bug: https://bugzilla.gnome.org/show_bug.cgi?id=698366
|
##upstream bug: https://bugzilla.gnome.org/show_bug.cgi?id=698366
|
||||||
ud = 0
|
index = 0
|
||||||
index = self.node_map.real_index(ud)
|
path = self.node_map.real_path(index)
|
||||||
return self.node_map.get_handle(index)
|
return self.node_map.get_handle(path)
|
||||||
|
|
||||||
# The following implement the public interface of Gtk.TreeModel
|
# The following implement the public interface of Gtk.TreeModel
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user