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 "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.
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.
Now that most of the treeview usage is gone, remove the remaining
code that uses it - mostly event handling code, which for now won't
work, but will be fixed by next commits - and drop the tree view
entirely.
So far, GtkFileChooserWidget has relied on GtkTreeView's selection
management. This commit moves it away from GtkTreeView, and that's
a massive surgery - sorry :(
The most important aspect of this commit is that 'selection_model'
is now the main model we deal with. Changing between directories,
recent files, and search, all sets the selection_model's model.
Selections are entirely handled by GtkSelectionModel now.
React to column view's 'activate' signal, instead of treeview's
'row-activated'. It doesn't handle file sensitivity yet, but that
will probably be dropped later.
Move the entire location column, which only contains the location
renderer, to the column view. The code to generate locations from
the current folder is essentially intact.
This commit moves the icon loading code into a new private
widget called GtkFileThumbnail, which is bound to the GFileInfo
of the model, and asynchronously loads the file icon from that.
Replace the 'list' page of the main stack with another page, this
one containing a GtkColumnView. This, again, is the very minimal
code to achieve a column view - and validate the GListModel code
introduced in the previous commit - but there's a long way until
this column view covers the full range of features of the file
chooser.
The tree view still lives in an unused 'list2' page. From now on,
commits will "cannibalize" the treeview, each commit porting any
particular feature - be it a column, an event controller, etc -
to the column view, and dropping the corresponding feature from
the treeview.
The way we explicitly set the font on the entry
conflicts with the placeholder text styling. But the
entry isn't normally empty, so placeholder text is
not that important here. Remove it and use a tooltip
instead.
Slide animations cause changes in the size requests due to the
behavior of GtkRevealer. We can avoid those by using cross-fades, which
don't have that problem.
Besides, cross-fades look better anyway.
The Trash is a special location: files cannot be copied or moved, there,
and the file selection dialog is not able to restore files from the
Trash.
Fixes: #674
The Trash is a special location: files cannot be copied or moved, there,
and the file selection dialog is not able to restore files from the
Trash.
Fixes: #674
Use a flowbox instead of a horizontal box for
the section buttons at the bottom, so they can
wrap and allow for narrow layout.
We also need to stop giving the scrolledwindow
a content height, so it can shrink to make room
for more rows of section buttons.
If there is no secondary text, then the primary text is just a message,
not a title, and should not use title style.
This partially reverts 1e3ec7c1f9. The
message dialog nown looks like it used to in GTK 3. However, it's still
styled only using a style class rather than using pango markup, as in
GTK 3.
Fixes#3509
This ensures that keybindings for small-step changes
work despite draw-value being FALSE now. This was
fallout from 8ca612c966 that showed up
as arrow keys not working anymore for the color scales
in the color chooser.