Gdk.FileList is not usable
Hello!
When using a Gtk.DropTarget
with the Gdk.FileList
type, when dropping files, I get a Gdk.FileList
. However, nothing can be done with it.
According to Matthias Clasen, it is a GSlist of GFiles, so, according to the documentation, it should be available as a List.
Am I doing something wrong or is it not implemented?
The code I'm using:
def on_drop(
widget: Gtk.DropTarget,
value: Any,
x: int,
y: int):
if isinstance(value, Gdk.FileList):
print(dir(value))
drop_target = Gtk.DropTarget.new(Gdk.FileList, Gdk.DragAction.COPY)
drop_target.connect("drop", on_drop)
widget.add_controller(drop_target)
Result of print(dir(value))
:
['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__gtype__', '__hash__', '__info__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_clear_boxed', 'copy']