We need the padding inside the filelistcell, so that
its event controllers cover the whole area.
Introduce a .complex style class for columnviews that
achieves that, and make the filechooser use it.
The build breaks with a C4013 warning/error on Visual Studio because we don't
have a prototype defined for _gtk_get_datadir(), so include gtkprivate.h.
The vs2017-x64 CI did not catch this error because it is building GLib as a
fallback subproject, causing the msvc_recommended_pragmas.h header not to be
found, which is used to detect problems like this.
The tracker search engine implementation was not
setting all the custom attributes that we require
now.
The quartz search engine will need similar fixes.
These settings existed before, we keep using them.
This loses some information about sorting by multiple
columns, but it is sufficient to get the same primary
sort column back.
The "Show Time" setting does not take immediate effect (only after
changing folders) because it's set as a single call to
column_view_get_time_visible() on the FileChooserCell creation.
Instead create a bind a show-time property that gets updated
as the setting is changed.
Move the gestures to the individual cells, and
make them trigger the context menu via an action
that takes item position and coordinates.
The semantics are changed slightly: the menu actions
now operate on the clicked item, not on the selection.
Still to do: Fix up keyboard activation.
If the async query fails to reproduce a file info,
we still need to thaw the model, otherwise it ends
up frozen forever.
This was deduced by reading the code, I haven't
actually seen it happen.
We can use the new collation property of GtkStringSorter,
and get the benefit of sort key caching. This commit
also fixes an accidental leak of all sorters, and
removes the sorter from the location column - we never
show that column when individual colummns are sortable.
This reverts commit 34752a15a71597d00a8d08befc545ac1c178b81b.
Leaving out the drag source portion as that needs a total
reimplementation. The GtkDropTarget only required minor
modifications.
Put a filter model between the selection model and
the filesystem model, and make it filter on the
filechooser::visible attribute. This makes the filer
combo in the filterchooser and the 'show hidden files'
item work. But we need to prod the filter to trigger
a refiltering every now and then.
Provide the filtered-out and visible bits as a file attributes
under the names filechooser::filtered-out and filechooser::visible,
so that we can filter on it.
To track changes of the selected items in a selection
model, we need to listen to both ::selection-changed
and ::items-changed.
This fixes the open button not turning sensitive
when initially loading a new folder.
When a list item is activated, we activate the default widget.
Unfortunately, due to some other bug, sometimes the open button
is not made sensitive, and then default.activate falls back
to activating the focus widget (which is the item we are just
coming from). Boom
Soon GtkFileSystemModel will not be a GtkTreeModel implementation,
so preemptively remove any usage of this interface. Populate the
list store using the GListModel's 'items-changed' signal.
This has to be the shortest-living object in GTK history!
It helped us greatly during the transition to GtkColumnView, but
now we can remove it in favour of GFileInfo directly. Perhaps I
could have never introduced GtkFileSystemItem in the first place,
but we're 30 commits deep and it's too late to just redo the whole
thing that will get us exactly here anyway.