Daniel Șerbănescu
817da34f7e
Update Romanian translation
2020-07-06 20:41:16 +00:00
Daniel Șerbănescu
8fa44fc3e6
Update Romanian translation
2020-07-06 20:38:44 +00:00
Jordi Mas
c7e94151b2
Update Catalan translation
2020-07-06 22:35:10 +02:00
Matthias Clasen
729ba44297
Merge branch 'wip/otte/filterlistmodel' into 'master'
...
Improve GtkFilterListModel
See merge request GNOME/gtk!2199
2020-07-06 15:42:44 +00:00
Matthias Clasen
2a2a6879c5
Merge branch 'file-chooser-api-cleanups' into 'master'
...
File chooser api cleanups
See merge request GNOME/gtk!2195
2020-07-06 15:41:56 +00:00
Matthias Clasen
e7b773b031
filechooser: Add a readonly :shortcut-folders property
...
This makes the shortcut folders list accessible in the
the inspector.
2020-07-06 11:03:48 -04:00
Matthias Clasen
57a225681c
filechooser: Add gtk_file_chooser_get_shortcuts
...
Replace gtk_file_chooser_list_shortcuts with a new
api that returns a list model.
Update all callers.
2020-07-06 11:03:48 -04:00
Matthias Clasen
ea07a92366
filechooser: Add a readonly :filters property
...
This makes the filters list accessible in the
the inspector.
2020-07-06 11:03:48 -04:00
Matthias Clasen
76290e8ddb
filechooser: Add gtk_file_chooser_get_filters
...
Replace gtk_file_chooser_list_filters with a new
api that returns a list model.
Update all callers.
2020-07-06 10:36:35 -04:00
Jordi Mas
26d83b1ab7
Update Catalan translation
2020-07-06 09:41:45 +02:00
Jordi Mas
2bba856206
Update Catalan translation
2020-07-06 08:54:41 +02:00
Benjamin Otte
bf3382a89e
testsuite: Add more filterlistmodel tests
...
These ones try to be exhaustive and randomly catch weird cases.
As such, the tests are more complicated and harder to grasp.
Sorry.
2020-07-06 03:42:43 +02:00
Benjamin Otte
3162e25671
bitset: Fix typo: gtk_bitset_slice() => gtk_bitset_splice()
2020-07-06 03:42:43 +02:00
Benjamin Otte
3d931b4fe2
bitset: Don't overflow when splicing
...
Testcase added.
2020-07-06 03:42:43 +02:00
Matthias Clasen
fc770a383a
gtk-demo: Use a progressbar in the words demo
...
This looks better and a bit more polished.
2020-07-06 03:42:43 +02:00
Matthias Clasen
62c385a9dd
gtk-demo: No selection in the words demo
...
This demo is about filtering, not about selection,
so use a GtkNoSelection.
2020-07-06 03:42:43 +02:00
Matthias Clasen
7c4ad1a5c4
gtk-demo: Cosmetic fixes for the words demo
...
Set a window size, and don't put newlines in titles, left align and
ellipsize the label.
2020-07-06 03:42:43 +02:00
Benjamin Otte
ac524bb13a
demo: Make words listview load async
...
And add an "Open" button (why are filechooser buttons such a catastrophe
that I can't make them smaller?).
2020-07-06 03:42:43 +02:00
Benjamin Otte
66fa9380b5
filterlistmodel: Look at type of change
...
This way we can avoid refiltering most of an already filtered list when
the change becomes more strict.
2020-07-06 03:42:43 +02:00
Benjamin Otte
b64eb6ca13
gtk-demo: Add incremental filtering to words demo
2020-07-06 03:42:43 +02:00
Benjamin Otte
9b2d8ac362
filterlistmodel: Add gtk_filter_list_model_get_pending()
...
This allows tracking if the model is busy filtering.
2020-07-06 03:42:43 +02:00
Benjamin Otte
2a90bc1a9b
filterlistmodel: Add incremental filtering
2020-07-06 03:42:43 +02:00
Benjamin Otte
d4b868d9bc
filterlistmodel: Rewrite with bitset data structure
...
Bitsets are more powerful, less memory intensive and faster than the old
GtkRbTree version.
2020-07-06 03:42:43 +02:00
Benjamin Otte
b54f6710a7
gtk-demo: Add a listview demo for filtering strings
2020-07-06 03:42:42 +02:00
Matthias Clasen
6bb7caf155
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2198
2020-07-06 00:42:14 +00:00
Matthias Clasen
202348f9d0
filefilter: Cosmetics
...
Various cleanups to make this code look less ancient.
2020-07-05 19:54:57 -04:00
Matthias Clasen
1a613de2f6
filefilter: Cosmetics
2020-07-05 19:54:20 -04:00
Matthias Clasen
665df37703
filefilter: Header file cosmetics
2020-07-05 19:36:45 -04:00
Matthias Clasen
acad5e4e3d
filefilter: Fix an embarrassing oversight
...
I forgot to remove some dead code, and left the
pixbuf_formats list in the rule union. Oops.
2020-07-05 19:32:36 -04:00
Matthias Clasen
6267c8469b
Merge branch 'file-filter2' into 'master'
...
Make GtkFileFilter a GtkFilter
See merge request GNOME/gtk!2190
2020-07-05 20:32:05 +00:00
Matthias Clasen
5a2f791bdd
filefilter: Cleanups and optimizations
...
Make mime-type rules hold multiple types. Store the
content types, so we don't have to do mime-type -> content-type
conversion in the match function. Store content types for the
pixbuf-formats rule as well, so we can avoid memory allocation
in the match function altogether.
2020-07-05 15:12:07 -04:00
Matthias Clasen
286a00a1db
docs: Cleanups for the file filter docs
...
Now that GtkFileFilter is a GtkFilter, move it to the
filter section of the docs. While we are at it, touch
up the docs in some places.
2020-07-05 15:10:18 -04:00
Matthias Clasen
11dd602b28
Drop gtk_file_filter_filter
...
It has been superseded by gtk_filter_match.
2020-07-05 15:10:18 -04:00
Matthias Clasen
35988d659d
Stop using gtk_file_filter_filter
...
Make all users of GtkFileFilter use it via the
GtkFilter api. This is in preparation for dropping
gtk_filter_filter_filter.
2020-07-05 15:10:18 -04:00
Matthias Clasen
be3449b3ce
filefilter: Convert to a GtkFilter
...
Make GtkFileFilter implement GtkFilter.
2020-07-05 15:10:18 -04:00
Matthias Clasen
2d8fddc1e9
filefilter: Drop GtkFileFilterFlags
...
Replace gtk_file_filter_get_needed by gtk_file_filter_get_attributes,
which directly returns the attributes that are needed.
Update all callers.
2020-07-05 15:10:13 -04:00
Matthias Clasen
644d522d19
filefilter: Drop custom filters
...
These don't work with native file choosers.
2020-07-05 14:34:33 -04:00
Matthias Clasen
a8b0125da1
filefilter: Drop GtkFileFilterInfo
...
We can just make the filter operate on GFileInfo.
This is in preparation for making GtkFileFilter a
GtkFilter.
Update all users.
2020-07-05 13:55:42 -04:00
Matthias Clasen
acccac516e
filefiler: No more floating
...
Make GtkFileFilter not be initially unowned anymore.
This is in preparation for deriving GtkFileFilter
from GtkFilter. Update all callers.
2020-07-05 12:36:47 -04:00
Matthias Clasen
d65214fa4e
Merge branch 'wip/otte/for-master' into 'master'
...
Wip/otte/for master
See merge request GNOME/gtk!2193
2020-07-05 16:06:16 +00:00
Baurzhan Muftakhidinov
1d96fc8237
Update Kazakh translation
2020-07-05 12:51:00 +00:00
Florentina Mușat
882a87ca19
Update Romanian translation
2020-07-05 10:42:46 +00:00
Benjamin Otte
1dbb8df95f
stringlist: Export gtk_string_object_new()
...
There are various use cases where it makes sense to construct these -
from our internal testing to using them in flatten- or mapmodels.
2020-07-05 02:59:21 +02:00
Benjamin Otte
f6c2c2edbd
stringlist: Call splice() for adding items after construction
...
This has the benefit of actually allowing NULL to be passed.
2020-07-05 02:59:21 +02:00
Benjamin Otte
c4e4de36f6
stringlist: Remove n_additions argument from gtk_string_list_splice()
...
char ** arrays are null-terminated everywhere, so make sure they are in
splice(), too.
Also fix the argument to be a const char * const * like in the
constructor.
2020-07-05 02:59:21 +02:00
Benjamin Otte
67cbb2a7d3
stringlist: Clarify docs for gtk_string_list_get_string()
...
Make sure it's obvious that it behaves like g_list_model_get_item() and
returns NULL for pos >= n_items.
2020-07-05 02:59:21 +02:00
Benjamin Otte
a979daa8ea
stringlist: Make one constructor call the other
...
Simplifies code.
2020-07-05 02:59:21 +02:00
Benjamin Otte
fb14f50ec1
stringlist: Make property not construct-only
...
Massively speeds up creation of long stringlists.
2020-07-05 02:59:21 +02:00
Benjamin Otte
6099fbafc1
bitset: Add gtk_bitset_new_range()
...
It's a common use.
2020-07-05 02:59:21 +02:00
Benjamin Otte
6f2f828bce
tests: Make testlistview be a list again
...
The grid conversion was for testing and should never have been
committed.
2020-07-05 02:59:21 +02:00