Lines 34-54
Link Here
|
34 |
* that are required for the IconView, so we have to duplicate |
34 |
* that are required for the IconView, so we have to duplicate |
35 |
* them here. |
35 |
* them here. |
36 |
*/ |
36 |
*/ |
37 |
PyObject* |
|
|
38 |
pygtk_tree_path_to_pyobject (GtkTreePath *path) |
39 |
{ |
40 |
gint len, i, *indices; |
41 |
PyObject *ret; |
42 |
|
43 |
len = gtk_tree_path_get_depth (path); |
44 |
indices = gtk_tree_path_get_indices (path); |
45 |
|
46 |
ret = PyTuple_New (len); |
47 |
for (i = 0; i < len; i++) |
48 |
PyTuple_SetItem (ret, i, PyInt_FromLong (indices[i])); |
49 |
return ret; |
50 |
} |
51 |
|
37 |
|
|
|
38 |
#if !defined(pygtk_tree_path_from_pyobject) |
52 |
GtkTreePath* |
39 |
GtkTreePath* |
53 |
pygtk_tree_path_from_pyobject (PyObject *object) |
40 |
pygtk_tree_path_from_pyobject (PyObject *object) |
54 |
{ |
41 |
{ |
Lines 96-102
Link Here
|
96 |
|
83 |
|
97 |
return NULL; |
84 |
return NULL; |
98 |
} |
85 |
} |
|
|
86 |
#endif |
99 |
|
87 |
|
|
|
88 |
#if !defined(pygtk_tree_path_to_pyobject) |
89 |
PyObject* |
90 |
pygtk_tree_path_to_pyobject (GtkTreePath *path) |
91 |
{ |
92 |
gint len, i, *indices; |
93 |
PyObject *ret; |
94 |
|
95 |
len = gtk_tree_path_get_depth (path); |
96 |
indices = gtk_tree_path_get_indices (path); |
97 |
|
98 |
ret = PyTuple_New (len); |
99 |
for (i = 0; i < len; i++) |
100 |
PyTuple_SetItem (ret, i, PyInt_FromLong (indices[i])); |
101 |
return ret; |
102 |
} |
103 |
#endif |
100 |
|
104 |
|
101 |
DL_EXPORT(void) |
105 |
DL_EXPORT(void) |
102 |
init_exo (void) |
106 |
init_exo (void) |