Blame docs/Overview.md

Packit Service 0f1579
= File Ownership =
Packit Service 0f1579
In the minimal case, a nautilus file is owned by:
Packit Service 0f1579
- Window slot -> viewed_file
Packit Service 0f1579
- Window slot -> history list using bookmarks
Packit Service 0f1579
- Path bar -> button -> file
Packit Service 0f1579
- Path bar -> button -> nautilus_drag_slot_proxy
Packit Service 0f1579
Packit Service 0f1579
When a file is a bookmark, nautilus application keeps a list with them, so it
Packit Service 0f1579
also owns those files.
Packit Service 0f1579
Packit Service 0f1579
Window slot is the creator of the file if the file was already not present due
Packit Service 0f1579
to be a bookmark.
Packit Service 0f1579
Packit Service 0f1579
The window has a queue with information of the closed tabs, owning references
Packit Service 0f1579
to previous files.
Packit Service 0f1579
Packit Service 0f1579
= Directory Ownership =
Packit Service 0f1579
Every file has a directory associated, that is usually the parent. However, when
Packit Service 0f1579
the file is a root and has no parent, the file is called self_owned, and the directory
Packit Service 0f1579
and the file are the same location, but diferent objects.
Packit Service 0f1579
Packit Service 0f1579
It's better to always deal with files instead of directories, and let the file handle
Packit Service 0f1579
the ownership of its associated directory.
Packit Service 0f1579
Packit Service 0f1579
= View Ownership =
Packit Service 0f1579
It's owned by:
Packit Service 0f1579
- Window slot as a strong reference, since the view sinks the floating reference.
Packit Service 0f1579
So to freed it the window slot needs to destroy it with gtk_widget_destroy ()
Packit Service 0f1579
since it's the container, but also needs to unref it.