gtk merge requestshttps://gitlab.gnome.org/GNOME/gtk/-/merge_requests2019-06-23T07:58:39Zhttps://gitlab.gnome.org/GNOME/gtk/-/merge_requests/874GtkFileChooser: add a sortable "Type" column2019-06-23T07:58:39ZNelson BenGtkFileChooser: add a sortable "Type" columnalong with a new 'type-format' setting that allows
to choose the output format for the "Type" column.
The options implemented for this setting are:
'mime' : Output from g_content_type_get_mime_type().
'description' : Output from g_con...along with a new 'type-format' setting that allows
to choose the output format for the "Type" column.
The options implemented for this setting are:
'mime' : Output from g_content_type_get_mime_type().
'description' : Output from g_content_type_get_description().
'category' : It uses the corresponding generic icon
of the mime type to group by categories (aka basic types).
This produces a more compact output than previous options,
and allows for type families to be grouped together, so eg.
after sorting by "Type" column, jpeg and png images will
be placed together, or the various types of archiver files
will also be grouped together.
This format was copied from and currently used by Nautilus
list view, so we also improve consistency with Nautilus.
Bugzilla entry for Nautilus implementation is:
https://bugzilla.gnome.org/show_bug.cgi?id=683722
The list of type families or categories can be checked on:
https://developer.gnome.org/icon-naming-spec/#mimetypes
This 'category' format is set as default.
Issue #362
Closes #362https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/952PlacesSidebar: Allow bookmarking symbolic links2023-06-23T08:42:24ZDaniel BolesPlacesSidebar: Allow bookmarking symbolic linkspatch by Razvan Chitu from #595
>>>
Due to not following links on file information querying, links to directories
are not considered valid bookmark targets. In order to change this, allow
symlink following to test if the target is a dir...patch by Razvan Chitu from #595
>>>
Due to not following links on file information querying, links to directories
are not considered valid bookmark targets. In order to change this, allow
symlink following to test if the target is a directory.
https://bugzilla.gnome.org/show_bug.cgi?id=761013
>>>
close https://gitlab.gnome.org/GNOME/gtk/issues/595https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/957Do not add empty strings to GtkFileFilter2019-06-24T16:46:31ZEmmanuele BassiDo not add empty strings to GtkFileFilterWhen parsing a UI description for GtkFileFilter we should avoid passing
empty strings, to avoid issues when serialising the filter before
sending it over DBus.
Fixes: #1973When parsing a UI description for GtkFileFilter we should avoid passing
empty strings, to avoid issues when serialising the filter before
sending it over DBus.
Fixes: #1973https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1052filechooser: keep file selected after being renamed2019-08-13T21:20:26ZNelson Benfilechooser: keep file selected after being renamedBecause otherwise when the file list is sorted "by name"
and the new name causes the file to be re-sorted to another
row, the selection stays in the old row which is now
occupied by a different file.
Fixed by keeping track of the rename...Because otherwise when the file list is sorted "by name"
and the new name causes the file to be re-sorted to another
row, the selection stays in the old row which is now
occupied by a different file.
Fixed by keeping track of the renamed file and revealing
it in the "row-changed" signal handler, which gets emitted
after a file is renamed.
Fixes issue #948https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1053filechooser: keep file selected after being renamed2019-08-13T21:18:55ZNelson Benfilechooser: keep file selected after being renamedBecause otherwise when the file list is sorted "by name"
and the new name causes the file to be re-sorted to another
row, the selection stays in the old row which is now
occupied by a different file.
Fixed by keeping track of the rename...Because otherwise when the file list is sorted "by name"
and the new name causes the file to be re-sorted to another
row, the selection stays in the old row which is now
occupied by a different file.
Fixed by keeping track of the renamed file and revealing
it in the "row-changed" signal handler, which gets emitted
after a file is renamed.
Closes #948https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1489Fix crasher/warnings when browsing remote filesystems2020-02-28T16:34:48ZBastien NoceraFix crasher/warnings when browsing remote filesystemsAs well as filters that filtered out every single file.As well as filters that filtered out every single file.https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1490Fix crasher/warnings when browsing remote filesystems2020-03-13T12:36:58ZBastien NoceraFix crasher/warnings when browsing remote filesystemsSame as https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1489 but for the main branchSame as https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1489 but for the main branchhttps://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1595gtkfilechooserwidget: set 'New folder' button focus-on-click2020-04-01T04:28:50ZNelson Bengtkfilechooserwidget: set 'New folder' button focus-on-clickAs general rule, all buttons that launch a menu should
not grab focus on click, because otherwise when the menu
is closed the focus goes back to the button instead of
the previously focused widget, which is the one the user
was interacti...As general rule, all buttons that launch a menu should
not grab focus on click, because otherwise when the menu
is closed the focus goes back to the button instead of
the previously focused widget, which is the one the user
was interacting with.
So this is also the case for the 'New Folder' button on
the filechooser.
Fixes #2557https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1682GtkFilechooserWidget: prevent oblivious selection of file2020-04-17T20:30:38ZNelson BenGtkFilechooserWidget: prevent oblivious selection of file```
which could happen after confirming the "file overwrite"
dialog and may result in a different file being overwritten
causing data loss.
The oblivious file selection can be done by a mouse
click or keyboard press sent inadvertently j...```
which could happen after confirming the "file overwrite"
dialog and may result in a different file being overwritten
causing data loss.
The oblivious file selection can be done by a mouse
click or keyboard press sent inadvertently just after
confirming the "file overwrite" dialog.
Fixed by adding a flag to ignore any button/key press
events sent to the file list. We set this flag just
after the user accepts the "file overwrite" dialog,
which means the enclosing GtkfilechooserDialog is about
to get closed. And we restablish the flag when the dialog
is shown again (in its map() handler).
Fixes data loss issue #2288
```
Closes #2288https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1688GtkFilechooserWidget: prevent oblivious selection of file2020-04-27T13:23:21ZNelson BenGtkFilechooserWidget: prevent oblivious selection of file```
which could happen after confirming the "file overwrite"
dialog and may result in a different file being overwritten
causing data loss.
The oblivious file selection can be done by a mouse
click or keyboard press sent inadvertently j...```
which could happen after confirming the "file overwrite"
dialog and may result in a different file being overwritten
causing data loss.
The oblivious file selection can be done by a mouse
click or keyboard press sent inadvertently just after
confirming the "file overwrite" dialog (and before the
enclosing GtkfilechooserDialog is closed).
Fixed by adding a flag to ignore any button/key press
events sent to the file list. We set this flag just
after the user accepts the "file overwrite" dialog (which
means the enclosing GtkfilechooserDialog is about to
get closed). And we restablish the flag when the dialog
is shown again (in its map() handler).
```
Fixes data loss issue #2288https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1714GtkPlacesSidebar: avoid location clicks to grab focus2020-05-18T06:17:43ZNelson BenGtkPlacesSidebar: avoid location clicks to grab focusSibebar location rows should not grab focus on click.
Fixes filechooser issue #1469Sibebar location rows should not grab focus on click.
Fixes filechooser issue #1469https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1715GtkPlacesSidebar: avoid location clicks to grab focus2020-04-18T19:51:59ZNelson BenGtkPlacesSidebar: avoid location clicks to grab focusSibebar location rows should not grab focus on click.
Fixes filechooser issue #1469Sibebar location rows should not grab focus on click.
Fixes filechooser issue #1469https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1724FileChooserButton: query 'display name' also for unbookmarked files2021-07-20T18:39:45ZNelson BenFileChooserButton: query 'display name' also for unbookmarked files```
Do also the async file info query for remote files when they
are not bookmarked, because otherwise "None" will be shown as
file name (and fallback text generic icon will be used).
The remote file was already browsed by the file choo...```
Do also the async file info query for remote files when they
are not bookmarked, because otherwise "None" will be shown as
file name (and fallback text generic icon will be used).
The remote file was already browsed by the file chooser
instance when selecting it, so querying the display name
again should be using gio cache and not be slow.
Even if it's were slow it's better than showing 'None'
which makes it seem as if nothing was selected.
```
Closes #1966https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1725FileChooserButton: query 'display name' also for unbookmarked files2020-05-22T21:38:15ZNelson BenFileChooserButton: query 'display name' also for unbookmarked files```
Do also the async file info query for remote files when they
are not bookmarked, because otherwise "None" will be shown as
file name (and fallback text generic icon will be used).
The remote file was already browsed by the file...```
Do also the async file info query for remote files when they
are not bookmarked, because otherwise "None" will be shown as
file name (and fallback text generic icon will be used).
The remote file was already browsed by the file chooser
instance when selecting it, so querying the display name
again should be using gio cache and not be slow.
Even if it's were slow it's better than showing 'None'
which makes it seem as if nothing was selected.
```
Closes #1966https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1726GtkFileChooserWidget: fix refactor regression2020-04-19T23:15:57ZNelson BenGtkFileChooserWidget: fix refactor regression```
Commit 4a3742979dc which removed
GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER slipped
a bad g_assert() refactoring, which is causing
a crash when selecting a folder in a GtkFileChooserButton
dialog.
```
Closes #2635```
Commit 4a3742979dc which removed
GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER slipped
a bad g_assert() refactoring, which is causing
a crash when selecting a folder in a GtkFileChooserButton
dialog.
```
Closes #2635https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1771Resolve "Use-after-free crash in `thaw_updates()`"2020-04-27T12:17:26ZPeter BloomfieldResolve "Use-after-free crash in `thaw_updates()`"file-system-model: Avoid use-after free
This is a possible fix for https://gitlab.gnome.org/GNOME/gtk/-/issues/2657
Use a NULL return from g_file_query_info_finish() to detect cancellation
of the query, and avoid de...file-system-model: Avoid use-after free
This is a possible fix for https://gitlab.gnome.org/GNOME/gtk/-/issues/2657
Use a NULL return from g_file_query_info_finish() to detect cancellation
of the query, and avoid derferencing a stale pointer.
file-system-model: Refactor a helper
Push more common code into the helper for
gtk_file_system_model_query_done() and
gtk_file_system_model_one_query_done().
Closes #2657https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1812GtkFileChooser: reveal selection after sorting view2020-05-18T22:38:03ZNelson BenGtkFileChooser: reveal selection after sorting view```
After clicking on any of the sort column headers,
the view is properly resorted but the file we had
selected can probably be now out of view due to
the new sort order.
This commit just makes sure to reveal the current
file selection...```
After clicking on any of the sort column headers,
the view is properly resorted but the file we had
selected can probably be now out of view due to
the new sort order.
This commit just makes sure to reveal the current
file selection (if any) after the view has been
sorted.
```
Closes #2683https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/2682gtkfilechooser: Fix open() references in documentation2020-10-12T12:26:47ZPhilip Withnallgtkfilechooser: Fix open() references in documentationWhile it’s true that you can pass the results of
`gtk_file_chooser_get_filename()` straight to `open()` or `fopen()` on
Linux, you can’t do so on Windows as it expects the filename to be in
the ANSI codepage. Using the GLib wrappers `g_o...While it’s true that you can pass the results of
`gtk_file_chooser_get_filename()` straight to `open()` or `fopen()` on
Linux, you can’t do so on Windows as it expects the filename to be in
the ANSI codepage. Using the GLib wrappers `g_open()`/`g_fopen()`
instead means that the appropriate UTF-8 → UTF-16 → `wopen()`/`wfopen()`
conversions are done.
Spotted by Fabian Keßler in
https://gitlab.gnome.org/GNOME/glib/-/issues/2212.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
---
Only applies to `gtk-3-24`.https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/2727GtkFileChooser: fix entering location from recent mode2022-07-31T18:36:38ZNelson BenGtkFileChooser: fix entering location from recent modeFix regression from commit c99935a540
We need the `g_signal_emit_by_name()` bit from `reset_location_timeout()`
for OPEN_FOLDER in recent files to sensitivize the Open button.
Fixes issue #3277Fix regression from commit c99935a540
We need the `g_signal_emit_by_name()` bit from `reset_location_timeout()`
for OPEN_FOLDER in recent files to sensitivize the Open button.
Fixes issue #3277https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/3973File chooser choice fixes2021-09-18T03:59:54ZGeorges Basile Stavracas NetoFile chooser choice fixesSee commits.See commits.