Georges Basile Stavracas Neto
c8d291ab86
filechooserentry: Trivial cleanups
...
Use g_clear_object() in a couple of places. No functional changes.
2022-10-20 22:34:40 -04:00
Georges Basile Stavracas Neto
0a87438432
searchenginemodel: Use GListModel API to filter
...
We now start a mini-series of commits that will ultimately remove
the GtkTreeModel implementation of GtkFileSystemModel.
As a first step, port GtkSearchEngineModel iter through the files
using GListModel API.
2022-10-20 22:34:40 -04:00
Georges Basile Stavracas Neto
ddf1cd6678
filechooserwidget: Remove treeview
...
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.
2022-10-20 22:34:40 -04:00
Georges Basile Stavracas Neto
9c6d5e2ca5
filechooserwidget: Use GtkSelectionModel for selection
...
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.
2022-10-20 22:34:40 -04:00
Georges Basile Stavracas Neto
1f2561b08e
filesystemmodel: Add more GtkFileSystemItem getters
...
They'll help us further remove GtkTreeModel code.
2022-10-20 22:34:40 -04:00
Georges Basile Stavracas Neto
d5b31a30fd
filechooserwidget: Stop centering on selected files
2022-10-20 22:34:40 -04:00
Georges Basile Stavracas Neto
39c678988d
filechooserwidget: Don't queue redraw / resize on tree view
2022-10-20 22:34:40 -04:00
Georges Basile Stavracas Neto
9052c191cb
filechooserwidget: Compare focus against column view
...
This effectively doesn't work, but focus will be reworked at some
point, and this gets us a tiny bit closer to that.
2022-10-20 22:34:40 -04:00
Georges Basile Stavracas Neto
766f442636
gtkfilechooserwidget: Don't set size request
2022-10-20 22:34:40 -04:00
Georges Basile Stavracas Neto
27a3d2d09e
filesystemmodel: Don't implement GtkTreeDragSource
2022-10-20 22:34:40 -04:00
Georges Basile Stavracas Neto
3a3482e41e
filechooserwidget: Remove DnD code
...
Another case where we'll reimplement it later.
2022-10-20 22:34:40 -04:00
Georges Basile Stavracas Neto
44c37fa34a
filesystemmodel: Drop GtkTreeSortable interface
...
Stop implementing this interface. We'll be able to reimplement
sorting once we fully transition to GListModel.
2022-10-20 22:34:40 -04:00
Georges Basile Stavracas Neto
5c41dbfaa5
filechooserwidget: Remove sorting
...
This will be reimplemented later using list models. For now, let's
remove it so we can untangle all this code properly.
2022-10-20 22:34:40 -04:00
Georges Basile Stavracas Neto
c9d2ff7a0f
filechooserwidget: Stop autosizing treeview
2022-10-20 22:34:40 -04:00
Georges Basile Stavracas Neto
174af596c5
filechooserwidget: Use column view scrolled window
...
One less hook to treeview widgetry.
2022-10-20 22:34:40 -04:00
Georges Basile Stavracas Neto
de2624faa7
filechooserwidget: Move tooltip text to column view
...
Use a closure binding to query the tooltip.
2022-10-20 22:34:40 -04:00
Georges Basile Stavracas Neto
cda784a5f4
filechooserwidget: Move folder navigation to column view
...
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.
2022-10-20 22:34:40 -04:00
Georges Basile Stavracas Neto
cc33dbef03
filechooserwidget: Move keynav handling to column view
2022-10-20 22:34:40 -04:00
Georges Basile Stavracas Neto
ce36611c4e
filechooserwidget: Set rubberbanding on column view
...
And stop setting it on the tree view.
2022-10-20 22:34:40 -04:00
Georges Basile Stavracas Neto
038cb31d27
filesystemmodel: Don't expose cache
...
With this commit we start slowly cleaning up the sattelite code
surrounding GtkFileChooserWidget, so that we eventually drop it
all.
2022-10-20 22:34:40 -04:00
Georges Basile Stavracas Neto
3b53a6b0a9
filechooserwidget: Remove extra action bar
2022-10-20 22:34:40 -04:00
Georges Basile Stavracas Neto
619ff2338e
filechooserwidget: Move date and time to column view
...
Because this is the last treeview column, some pending tasks
are marked as TODO. We're getting close to dropping the tree
view!
2022-10-20 22:34:40 -04:00
Georges Basile Stavracas Neto
2bcd6949df
filechooserwidget: Move file type to column view
2022-10-20 22:34:40 -04:00
Georges Basile Stavracas Neto
abd78ce5f5
filechooserwidget: Move size to column view
...
This was one of the easier ones. We merely delegate the hard work
to g_format_size(), like we already do for treeview.
2022-10-20 22:34:40 -04:00
Georges Basile Stavracas Neto
7899fc03c4
filechooserwidget: Move location to column view
...
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.
2022-10-20 22:34:40 -04:00
Georges Basile Stavracas Neto
9984f00781
filechooserwidget: Drop name column from treeview
...
It is now entirely handled by the column view.
2022-10-20 22:34:40 -04:00
Georges Basile Stavracas Neto
a0d3bdc911
filechooserwidget: Move file icon to column view
...
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.
2022-10-20 22:34:40 -04:00
Georges Basile Stavracas Neto
b96317b872
filechooserwidget: Move file name to column view
...
And remove it from the tree view. Next commits will look a lot like
this, until all columns are moved.
2022-10-20 22:34:40 -04:00
Georges Basile Stavracas Neto
6c84958b9f
filechooserwidget: Replace 'list' page with column view
...
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.
2022-10-20 22:34:40 -04:00
Georges Basile Stavracas Neto
f2559b1dbb
filesystemmodel: Implement GListModel
...
This is a trivial implementation of the GListModel interface. It
does not do anything fancy, like filtering out hidden files, nor
sorting.
The purpose of this minimal implementation is to bootstrap the
initial work to port GtkFileChooserWidget to GtkColumnView.
2022-10-20 22:34:40 -04:00
Georges Basile Stavracas Neto
ed2ade4801
filesystemmodel: Use g_clear_* on finalize
...
Trivial cleanup, no functional changes.
2022-10-20 22:34:40 -04:00
Matthias Clasen
4549172825
Merge branch 'matthiasc/for-main' into 'main'
...
inspector: Fix accessibility calls
See merge request GNOME/gtk!5154
2022-10-21 02:28:02 +00:00
Matthias Clasen
b877804eb6
Merge branch 'completion' into 'main'
...
entrycompletion: Fix inserted-text handler
See merge request GNOME/gtk!4892
2022-10-21 02:13:42 +00:00
Matthias Clasen
5310abbcf7
filechooserentry: Fix completions
...
Before we can drop them, lets make them work.
This was broken since 4.0, I assume :(
2022-10-20 21:41:18 -04:00
Matthias Clasen
490d4b0b9e
inspector: Fix accessibility calls
...
The argument list of gtk_accessible_update_property
is -1-terminated, not NULL-terminated.
2022-10-20 21:19:13 -04:00
Matthias Clasen
375432f0b6
Merge branch 'columnview-sorter-api' into 'main'
...
gtk-demo: Add more sort columns
Closes #5149
See merge request GNOME/gtk!5152
2022-10-20 19:18:26 +00:00
Matthias Clasen
c00a23ebbc
Merge branch 'fix-wayland-keycode-mapping' into 'main'
...
wayland: Fix keycode->keyval mapping
Closes #5277
See merge request GNOME/gtk!5147
2022-10-20 19:15:38 +00:00
Matthias Clasen
4cd2e2a11f
Merge branch 'ebassi/tree-deprecation-docs' into 'main'
...
docs: Add deprecation messages to GtkTreeStore
See merge request GNOME/gtk!5115
2022-10-20 18:39:29 +00:00
Matthias Clasen
ae7bf4dcf7
Merge branch 'wip/jtojnar/compose-consistent-system' into 'main'
...
Improve composetable inclusions
See merge request GNOME/gtk!5150
2022-10-20 18:28:47 +00:00
Matthias Clasen
9ed1505073
columnviewtitle: Clean up interactions
...
Separate the apis we use for updating title,
menu and sort indicator.
2022-10-20 13:57:33 -04:00
Matthias Clasen
e040d3663e
columnviewsorter: Add public API
...
This API should be sufficient to serialize
a columnviews sort configuration.
Fixes : #5149
2022-10-20 13:06:45 -04:00
Matthias Clasen
6af69a7b7d
Make GtkColumnViewSorter public
...
API is yet to come.
2022-10-20 13:01:18 -04:00
Matthias Clasen
a116e0dd26
columnviewsorter: Cosmetics
2022-10-20 13:01:18 -04:00
Matthias Clasen
3e2b962a36
columnviewcolumn: Add an ID
...
This string can be used when storing columnview
configuration.
2022-10-20 13:01:18 -04:00
Matthias Clasen
abb60ec579
columnviewcolumn: Remove some unused code
2022-10-20 11:44:05 -04:00
Matthias Clasen
b738d4a6ac
columnviewcolumn: Cosmetics
2022-10-20 11:44:05 -04:00
Matthias Clasen
0149bd49ca
gtk-demo: Add more sort columns
...
Add a second sort column to the Settings demo,
to make it easier to test column view sorting.
2022-10-20 11:44:05 -04:00
Emmanuele Bassi
e05157437f
Add more messages to the deprecation warnings
...
Point to replacement types for the old GtkTree* API.
2022-10-20 15:39:07 +01:00
Emmanuele Bassi
e045e798a2
Mark GtkStyleContext type as deprecated
...
Add the Deprecated tag to the type docblock
2022-10-20 15:39:07 +01:00
Emmanuele Bassi
7908a72fa9
Mark GtkEntryCompletion type as deprecated
...
Add the Deprecated tag to the type docblock.
2022-10-20 15:39:07 +01:00