@@ -144,7 +144,7 @@ function unshift!(listStore::GtkListStore, values::Tuple)
144
144
end
145
145
146
146
# # insert before
147
- function Base . insert! (listStore:: GtkListStoreLeaf , iter:: TRI , values)
147
+ function insert! (listStore:: GtkListStoreLeaf , iter:: TRI , values)
148
148
newiter = Gtk. mutable (GtkTreeIter)
149
149
ccall ((:gtk_list_store_insert_before ,Gtk. libgtk),Void,(Ptr{GObject},Ptr{GtkTreeIter},Ptr{GtkTreeIter}), listStore, newiter, iter)
150
150
list_store_set_values (listStore, newiter, values)
@@ -158,7 +158,7 @@ function delete!(listStore::GtkListStore, iter::TRI)
158
158
listStore
159
159
end
160
160
161
- Base . deleteat! (listStore:: GtkListStore , iter:: TRI ) = delete! (listStore, iter)
161
+ deleteat! (listStore:: GtkListStore , iter:: TRI ) = delete! (listStore, iter)
162
162
163
163
164
164
empty! (listStore:: GtkListStore ) =
@@ -167,18 +167,16 @@ empty!(listStore::GtkListStore) =
167
167
# # by index
168
168
169
169
# # insert into a list store after index
170
- function Base . insert! (listStore:: GtkListStoreLeaf , index:: Int , values)
170
+ function insert! (listStore:: GtkListStoreLeaf , index:: Int , values)
171
171
index > length (listStore) && return (push! (listStore, values))
172
172
173
173
iter = iter_from_index (listStore, index)
174
174
insert! (listStore, iter, values)
175
175
end
176
176
177
- Base. deleteat! (listStore:: GtkListStoreLeaf , index:: Int ) = delete! (listStore, iter_from_index (listStore, index))
178
- Base. pop! (listStore:: GtkListStoreLeaf ) = deleteat! (listStore, length (listStore))
179
- Base. shift! (listSTore:: GtkListStoreLeaf ) = deleteat! (listStore, 1 )
180
-
181
-
177
+ deleteat! (listStore:: GtkListStoreLeaf , index:: Int ) = delete! (listStore, iter_from_index (listStore, index))
178
+ pop! (listStore:: GtkListStoreLeaf ) = deleteat! (listStore, length (listStore))
179
+ shift! (listSTore:: GtkListStoreLeaf ) = deleteat! (listStore, 1 )
182
180
183
181
184
182
isvalid (listStore:: GtkListStore , iter:: TRI ) =
@@ -190,10 +188,10 @@ length(listStore::GtkListStore) =
190
188
191
189
size (listStore:: GtkListStore ) = (length (listStore), ncolumns (GtkTreeModel (listStore)))
192
190
193
- Base . getindex (listStore:: GtkListStore , iter:: TRI , column:: Integer ) = getindex (GtkTreeModel (listStore), iter, column)
194
- Base . getindex (listStore:: GtkListStore , iter:: TRI ) = getindex (GtkTreeModel (listStore), iter)
195
- Base . getindex (listStore:: GtkListStore , row:: Int , column) = getindex (listStore, iter_from_index (listStore, row), column)
196
- Base . getindex (listStore:: GtkListStore , row:: Int ) = getindex (listStore, iter_from_index (listStore, row))
191
+ getindex (listStore:: GtkListStore , iter:: TRI , column:: Integer ) = getindex (GtkTreeModel (listStore), iter, column)
192
+ getindex (listStore:: GtkListStore , iter:: TRI ) = getindex (GtkTreeModel (listStore), iter)
193
+ getindex (listStore:: GtkListStore , row:: Int , column) = getindex (listStore, iter_from_index (listStore, row), column)
194
+ getindex (listStore:: GtkListStore , row:: Int ) = getindex (listStore, iter_from_index (listStore, row))
197
195
198
196
199
197
242
240
243
241
# # index can be :parent or :sibling
244
242
# # insertion can be :after or :before
245
- function Base . insert! (treeStore:: GtkTreeStoreLeaf , piter:: TRI , values; how:: Symbol = :parent , where :: Symbol = :after )
243
+ function insert! (treeStore:: GtkTreeStoreLeaf , piter:: TRI , values; how:: Symbol = :parent , where :: Symbol = :after )
246
244
247
245
iter = Gtk. mutable (GtkTreeIter)
248
246
if how == :parent
@@ -269,16 +267,16 @@ function delete!(treeStore::GtkTreeStore, iter::TRI)
269
267
treeStore
270
268
end
271
269
272
- Base . deleteat! (treeStore:: GtkTreeStore , iter:: TRI ) = delete! (treeStore, iter)
270
+ deleteat! (treeStore:: GtkTreeStore , iter:: TRI ) = delete! (treeStore, iter)
273
271
274
272
# # insert by index
275
- function Base . insert! (treeStore:: GtkTreeStoreLeaf , index:: Vector{Int} , values; how:: Symbol = :parent , where :: Symbol = :after )
273
+ function insert! (treeStore:: GtkTreeStoreLeaf , index:: Vector{Int} , values; how:: Symbol = :parent , where :: Symbol = :after )
276
274
piter = iter_from_index (treeStore, index)
277
275
insert! (treeStore, iter, values; how= how, where = where )
278
276
end
279
277
280
278
281
- function Base . splice! (treeStore:: GtkTreeStoreLeaf , index:: Vector{Int} )
279
+ function splice! (treeStore:: GtkTreeStoreLeaf , index:: Vector{Int} )
282
280
iter = iter_from_index (treeStore, index)
283
281
delete! (treeStore, iter)
284
282
end
@@ -472,7 +470,7 @@ length(selection::GtkTreeSelection) =
472
470
473
471
hasselection (selection:: GtkTreeSelection ) = length (selection) > 0
474
472
475
- Base . select! (selection:: GtkTreeSelection , iter:: TRI ) =
473
+ select! (selection:: GtkTreeSelection , iter:: TRI ) =
476
474
ccall ((:gtk_tree_selection_select_iter ,libgtk), Void,
477
475
(Ptr{GObject},Ptr{GtkTreeIter}),selection, mutable (iter))
478
476
0 commit comments