| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Whenever g_time_zone_new_local() is called it has to check the file
system for changes, because the system's time zone might have changed
since the last call. This function was called multiple times for each
file when generating the date string, which was causing some unnecessary
overhead.
This changes the code to re-use the local time zone from the first call.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is not guaranteed that all `GFileInfo` attributes are always set when
requested. They used to be silently set to `NULL`, `FALSE`, or `0` earlier
when they were not provided by their implementations. However, some of the
helper functions now print critical errors when the attributes are not set
by their implementations even though they were requested. See the
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3261 merge request for
more details. So Nautilus now prints tons of critical errors when started.
The unset attributes can be detected over the `g_file_info_has_attribute`
function. But Nautilus doesn't care in most cases about the reason why the
attribute is `NULL`, `FALSE`, or `0`. There are also more generic helper
functions that don't print these critical errors. Let's use them for the
attributes that may not always be set to get rid of those critical errors.
I suppose that the `name`, `display_name`, `size`, `icon`, and `file_type`
attributes don't need this special handling, although it is not clearly
stated anywhere...
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2861
|
|
|
|
|
|
|
|
| |
We are already caching the preferences for thumbnailing. Since the
clock format is queried for every single file when loading a list view,
we should also cache the clock format setting.
Rename the flag from use_24 to use_24_hour for more clarity.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In nautilus_file_class_init, we are calling
thumbnail_limit_changed_callback() and show_thumbnails_changed_callback()
in order to cache the initial values for the static variables
cached_thumbnail_limit and show_file_thumbs. This has the unintended
side effect of also calling emit_change_signals_for_all_files_in_all_directories ()
which doesn't make sense at a point in time when there are no
NautilusFile's and NautilusDirectory may not even be ready.
Split out the updating of the setting from the emission of
all files changed.
|
| |
|
|
|
|
| |
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/1022
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, thumbnails are not shown for MTP/GPhoto2 locations. The
backends return `G_FILESYSTEM_PREVIEW_TYPE_NEVER` in order to prevent
thumbnailers to make them unresponsive. However, the backends provide
preview icons for some file types and the `GnomeDesktopThumbnailFactory`
is smart enough not to invoke thumbnailers if the icon is available
(see https://bugzilla.gnome.org/show_bug.cgi?id=738503). Let's allow
the thumbnail generation from the preview icons if they are available.
This should not affect backend responsiveness much.
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/1921
|
|
|
|
|
|
|
|
|
|
|
|
| |
We've been allowing thumbnails at smaller sizes if the screen density
is larger. This goes back to 7059cc66ca3bc338e49a6ac4cb37c3484ba3b19d
This leads to inconsistent results depending on the screen density.
Also, the human eye is the limiting factor here.
So, replace the helper function with a simple size check.
Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/1804
|
|
|
|
|
| |
Replace the eel_boolean_bit typedef with a plain guint and remove all
includes.
|
|
|
|
|
|
| |
The separator used, if any, depends on locale.
As per user suggestion in https://discourse.gnome.org/t/size-of-file-in-bytes-in-nautilus/12757/14
|
|
|
|
| |
The last user was NautilusLink, and that's been gone for a while.
|
|
|
|
|
|
|
|
|
| |
Sharp corners give an unpolished feel to thumbnail.
We've been trying to give the illusion of round corners using shadows.
But now that we already use GtkSnapshot, properly clipping round
corners is too easy not to do it.
|
|
|
|
|
|
|
|
| |
These flags were relevant when each folder opened in its own window,
such that the open folders would have a different icon. Also, we would
ignore that icon in properties.
Spacial nautilus has been gone for maybe 15 years now.
|
|
|
|
|
|
|
| |
Instead of duplicating the work here.
Also push "upstream" the root directory special case which was
recently added in commit 5722c394567d36f214fe58fb4bef7334b5209bad.
|
|
|
|
|
|
|
|
| |
We've also been scaling thumbnails down in advance using GdkPixbuf API,
and keeping a cache of scaled thumbnails.
But nowadays we can push that scaling job into the render nodes,
taking advantage of GPU. This is also a lot simpler.
|
|
|
|
| |
This can take advantage of GPU and prepares for next changes.
|
|
|
|
|
|
| |
This is more generic and is going to allow HiDPI icons and GPU usage.
GdkPixbuf can be easily converted into GdkTexture, which is a GdkPaintable.
|
|
|
|
|
|
|
|
|
|
|
| |
Thumbnails in Properties were sometimes larger than the requested size.
This is because we didn't pass the FORCE_THUMBNAIL_SIZE flag.
There were probably good reasons for this flag in the past, but there
are none now. If we request a size, that should be the size we get.
So, drop this flag entirely and default to forcing the size everywhere.
|
|
|
|
|
|
|
|
| |
xdg-user-dirs is intentionally configured to disable a special
directory when it's set to $HOME. Let's check if the file is
pointing to the home directory and return early.
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2459
|
|
|
|
|
|
|
|
|
| |
The commit 35647f2 fixed build on 32-bit architectures using the relevant
format string, but gettext isn't able to extract the text now due to string
concatenation. Let's use the format string outside of the `ngettext` function
to fix the issue.
Related: https://gitlab.gnome.org/GNOME/nautilus/-/merge_requests/940
|
|
|
|
|
|
|
| |
The `%lu` format string doesn't match `goffset` type on 32-bit architectures
Let's use the `G_GOFFSET_FORMAT` format string instead.
Closes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2419
|
|
|
|
|
|
|
| |
"Unknown" is displayed in Properties without a description, so
add " type" to allow the user to make sense of it.
Also capitalize "unknown" fallback.
|
|
|
|
|
|
| |
"You" is preferrable to "Me"
https://developer.gnome.org/hig/guidelines/writing-style.html#guidelines
|
|
|
|
|
|
|
| |
G_FORMAT_SIZE_LONG_FORMAT is, well, long. And redundact.
But, oh, well, in case someone really wants to know bytes,
we keep it as a tooltip.
|
|
|
|
|
|
|
| |
This is immediately useful information.
Deemphasize the action aspect: most people have no need for setting
custom permissions.
|
|
|
|
|
|
|
|
|
| |
Instead of list row.
This also means the list box where they used to be becomes the locations list,
and must be hiden when none of its rows are shown.
As proposed in mockups from https://gitlab.gnome.org/GNOME/nautilus/-/issues/2370
|
|
|
|
|
|
|
|
| |
This makes it easier to tell it is a folder path.
In a special case, for recursive search, where we omit the common
prefix, this is especially important because direct subfolders would
be a single basename without any slash.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problems:
- Changing icon without animation is crude.
- If the folder has a custom icon, it doesn't change, which is
inconsistent
- And archives, which can accept drops, don't change icon, which is
inconsistent.
We already have css styling for drop targets so, which suffices.
As per design review in https://gitlab.gnome.org/GNOME/nautilus/-/issues/2347
|
|
|
|
|
|
|
|
|
|
| |
Use a dash with spaces to separate user names and display names, rather
than line breaks and splitting and recombining the string.
For now the user name is still extracted for each entry, with the
adaption to GListModel this will only be done when needed.
Part of #1326
|
|
|
|
| |
Their purpose is now handled by `nautilus_dnd_get_prefered_action()`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We used to display emblems overlaid on icons. This had a few problems:
* Emblemed icons were not cached.
* If the icon was too small, some emblems could be omitted.
* Emblems would partially obstruct the visibility of thumbnails.
So, we are reintroducing them as a mere box of icons:
* vertically next to the file icon/thumbnail in grid view;
* horizontally next to the filename in list view.
This avoids all the problems of the old implementation.
Closes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2017
|
|
|
|
|
| |
Emblemed icons are not implemented in GTK 4 and we don't want to
reimplement them here anyway, so let's drop this code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new grid view introduces a new 256px icon size option, optimized
for thumbnails. This was made possible because, unlike the old canvas,
we have more control over the padding and can keep it low.
However, with it, we have 5 size options now, which a little too many;
in particular, the 64px size doesn't differ significantly enough from
the 48px nor the 96px option now (the old canvas view this difference
was more marked because padding increased in proportion).
Similarly, the 48px option in the new list view is not significantly
different from 32px and 64px. In the past, 32px didn't show thumbnails
because the frames didn't allow the thumbnails to use the whole 32px;
this would mark a difference vs. 48px. With the removal of thumbnail
frames, this distinction is also gone.
The 128px option in grid view is also not significantly larger than
96px and yet significantly smaller than 256px.
Drop the superfluous sizes, replace 128px size with 168px size for a
geometric progression and rename the enum symbols.
|
|
|
|
|
|
|
|
| |
It's really annoying having to setup a local autocleanup variable in
every function we want to use the NautilusTagManager API.
Use a NautilusUndoManager-like API instead, with new() returning a
reference and get() not.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Files are flagged as remote in file->details->filesystem_remote
through directory-async as folders are browsed.
nautilus_file_get_filesystem_remote() incorrectly returns FALSE for
child directories that have not been processed by directory-async
on a remote filesystem. This causes the "Count Number of Files in
Folders" options to not work correctly when set to "On This Computer
Only". Rather than unnecessarily process all of the child folders,
check whether filesystem_info_is_up_to_date==TRUE. If not,
check whether the parent is remote instead.
This issue was introduced in 99f55748ef69a68df86b9a039998ee576d59b898.
Previously the prefix of the URI was checked to match a hardcoded list.
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2035
|
|
|
|
|
| |
As they have been touched in the last two commits, and to clarify they
don't actually mean a GList but rather a GStrv.
|
|
|
|
|
|
| |
Same rationale as previous commit, this time for the setter.
This saves a lot of futile array-->list-->array conversions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Metadata lists are attributes of type G_FILE_ATTRIBUTE_TYPE_STRINGV.
In other words, they are gchar** (arrays of strings).
Our NautilusFile API exports them as GList instead, but most calls
happen in NautilusListView, which consumes arrays of strings. So,
the conversion from array to list and back to array is wasteful.
Let's start with the getter, making it return a string array isntead.
For emblem keywords, we actually need a GList (for sorting), so make
the conversion there after the getter call.
The setter part is due in the next commit.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new major version of the toolkit is a requirement to fix old issues and enable future enhancements.
Update symbols and adapt logic to API changes.
Update and simplify UI definitions.
Update local copy of places sidebar and places view.
Replace dependencies with their GTK4-compatible successors.
Make a minimum changes required to build and run, with known
regressions to be fixed in future commits.
For a detailed breakup of the changes, see the 36 commits-deep
log leading to d5763facb1e5045251171ed1273dca0859f3542f.
This is the main part of https://gitlab.gnome.org/GNOME/nautilus/-/issues/276
|
|
|
|
| |
To avoid build warnings about unused code.
|
|
|
|
| |
No longer used.
|
|
|
|
| |
Callers always pass TRUE nowadays anyway.
|
|
|
|
|
|
| |
GTK 4 is not going to draw them anyway.
Assume a temporary regression, to be fixed after the switch to GTK 4.
|
|
|
|
|
|
| |
These symbols are actually meant for both old and new "grid" views,
in opposition to the "list" view, so this is a more appropriate name,
considering both share NAUTILUS_VIEW_GRID_ID.
|
|
|
|
| |
There is no reason not to do it for the new icon view now.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 26d33d74f468a8ab10b4a1c3c8aa66b66205e112.
It was a hack to fix an issue with the way GTK 3 renders GEmblemedIcon.
But GTK4 has dropped support for rendering GEmblemedIcon[0], so we
aren't going to have any need for this hack going forward.
Also, the new icon view now draws shadows around thumbnails. But due
to this hack, the shadow would always go around the invisible square.
[0] https://gitlab.gnome.org/GNOME/nautilus/-/issues/2017
|
|
|
|
|
|
|
|
|
|
| |
Shadows are present in design mockups, frame is not.
In GTK 4 we are going to be able to draw shadows in the new views using
CSS, which is going to be much better than transforming pixbufs.
Furthermore, this removes another use of libgd, which we want to stop
depending on as part of the GTK 3-to-4 migration.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, list view doesn't use thumbnails for its first zoom levels:
SMALL (16px) and STANDARD (32px). So, it does display thumbnails for
LARGE (48px) and LARGER (64px). On the other hand, the icon view uses
displays for all zoom levels, the smallest being 48px.
In short: thumbnails are displayed for zoom levels that request an
icon size of 48 logical pixels. So, the minumum size of thumbs is 48px.
This is implemented by checking that the current icon size is equal to
or lower than NAUTILUS_LIST_ICON_SIZE_STANDARD (32px).
However, we are going to need to check this condition in other places,
so it would be best to have a constant specifically for this purpose.
For the sake of naming this constant reasonably, let's use the minumum
size of 48px and update the condition checking accordingly.
|
|
|
|
|
|
|
| |
It's conveniently set as a property of GtkMountOperation, so there is no
reason not to pass both forward.
This is necessary for the preceding commit to actually work as intended.
|
|
|
|
|
|
|
|
|
|
| |
Adds file comparison based on actual file type, rather than generic
type category. For example .jpg and .png files will now be sorted
into two different groups.
Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/1776
Signed-off-by: Rajat Jain <rajatjain.ix@gmail.com>
|