| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
This logic is handled within GtkDropTarget in gtk4.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We are setting the preferred action to 0 when the source and dest are
in the same folder. This prevents the ability to hold CTRL and perform
a copy operation (which worked in 42). It isn't clear why you can't
override a 0 preferred action with key modifiers.
In order to keep consistency, remove this check in
nautilus_dnd_get_preferred_action() and add it to
nautilus_files_view_drop_proxy_received_uris() (only if the action
is MOVE).
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2438
|
| |
|
|
|
|
|
|
| |
We use a fixed size drag icon so we need to scale the drag icon
accordingly. The hotspot doesn't make sense for listview,
and can produce very strange results, so simply set to 0,0.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Now we have another way to star files (by DnD), but unstarring is
limitted to the properties window and the listview icon. Add back
the ability to unstar from the files context menu only when in the
starred folder.
|
| |
|
|
|
|
|
| |
If the operation is COPY and it's to the starred directory
simply star the files. This allows us to DnD to starred.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
We already have the function in nautilus-files-view-dnd.
Allow dropping G_TYPE_STRING and call nautilus_files_view_handle_text_drop()
to generate the filename and create a text file.
This only worked in the main view in previous versions, so lets keep
that the same for simplicity.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Offset each picture 6 pixels in either direction.
Also have a stronger shadow, with same alpha as shadows in the view.
|
|
|
|
|
|
| |
It's inconsistent with the view. The motivation was making it easier
to tell each thumbnail appart. But we are going to use another
solution to that problem.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
The properties dialog provides the ability to set a custom icon.
These are not icon paintables, but rather loadable icons, just
like thumbnails are. Therefore, they need to be snapshot into
the real area too, otherwise they are going to be too large.
|
|
|
|
|
|
|
|
|
|
| |
This brings back a feature originally introduced by commit 0d4555d76f86ba2d49f48836b7eea11f1adfb2fd
Back then, it used gdk_cairo_surface_create_from_pixbuf() to apply the
scaling factor, but in GTK 4 we can no longer consume cairo surfaces
directly. Instead, we are to use paintables.
For themed icons we already use GtkIconPaintable, which just works.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
Picture will automatically take the size of the paintable, while
Image defaults to 16px.
Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/2432
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Otherwise, the previewing functionality doesn't work while sandboxed.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We set spacebar as an action keybinding for previewing a file in sushi.
But this keybinding gets overriden by GtkListItemWidget for its own
`|listitem.select` action.
Maybe we shouldn't use the spacebar as previewer shortcut in the first
place, but that's how it's been so far. Also, we haven't been using
it for selection in previous versions either.
So, use a custom shortcut controller as a workaround.
|
|
|
|
|
|
| |
122668b3b6013620f0caa8643986f20b2650cb71 removed the ability to
select a row, so the row-selected signal will never be emitted.
Drop the code.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The list should be sorted by name-ascending, that state is set
when the action is created. The sort is set when the action state
is changed, and since the action state isn't changed after creation, the
sort never happens. This leads to an inconsistent state where
the list is not sorted, but the button label indicates that the list
is sorted.
Change the numbering-order state to name-ascending after the actions
are created (even though that state is already set) in order to force
list sorting.
Also remove, the default label on the sort button in order
to prevent this issue in the future (the label gets set anyways when
the state is changed).
|
|
|
|
|
|
|
| |
There's a regression in f88c4a2b39e4e88bf78acffdcee3555a31aaea7c
that causes the numbering label button to never get updated.
The GtkMenuButton was exposed but the api for GtkButton was used
instead. Use GtkMenuButton api
|
|
|
|
|
|
|
|
|
| |
Similar to 60b0a8ae87075374d56b5e3a766a63e5bcdd39ee in gtk4
the delete-text and insert-text should be connected to the
editable delegate of the entry as the entry does not emit those
signals.
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2442
|
|
|
|
| |
Rather than displaying a broken page without any row.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Generally, we want the properties window to be sized to fit the natural
height of the content of the main page.
However, the extensions subpage is propagating its natural height; in
some cases, this can lead to the properties page being the full screen
height in many cases.
The natural height propagation is set internally by AdwPreferencesPage,
so we have to drop its use here. It was probably a misuse anyway, given
this is a subpage. Internally it's just a scrolled window and a clamp,
so that's what it's gonig to be replaced with.
|
|
|
|
|
| |
For consistency with what we do in Places, use the operating system
name or "Operating System" instead of "/"
|
|
|
|
|
|
|
|
| |
Apparently this was from when Nautilus had properties windows as
independent windows. Now it breaks the ability to open the same
property window from another Nautilus window. Remove the code.
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2358
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With the introduction of nautilus-dbus-launcher, we made it so that
the current disk is selected in gnome-disks (when opening from the
properties window) by passing the disk identifier to --block-device.
This works fine for most mounted volumes, but breaks the ability to
open gnome-disks for the root filesystem because
g_file_find_enclosing_mount() doesn't return a mount for the root file
system (it only returns "user interesting locations").
So, use unix-specific API to handle that case (antoniof's ammendment).
As a 2nd fallback, just open Disks without selecting anything (but if
this ever happens, it's a bug: we probably shouldn't show the Disks
section in Properties in that directory).
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2447
|
| |
|
|
|
|
|
|
| |
We have a special case to set the icons for mounts, but the root
filesystem doesn't return a mount from g_file_find_enclosing_mount()
so set the icon for / separately.
|
|
|
|
|
|
|
|
|
|
|
| |
When you open a properties window on the root file system,
you'll get
g_file_has_prefix: assertion 'G_IS_FILE (file)' failed
because setup_star is checking if the parent location can be starred.
We only allow starring files in the home directory anyways, so just
return early
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2422
|
|
|
|
|
|
|
|
|
|
| |
In x11 the GtkDropTarget is not correctly setting the preferred action
on the GdkDrop. The GdkDrag is getting set correctly, so for the
meantime, until a solution is merged into Gtk, let's get the action
from the GdkDrag instead of the GdkDrop.
See: https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/4982
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2457
|
|
|
|
| |
In preparation for the next commit.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In gtk4, we need to set labelled-by to help a11y programs know what
it currently selected.
Unfortunately, the focus is on a GTK internal widget, so at the moment
this solution requires a hack: we mark the internal list item widget as
being labeled by our cell (which is, in turn, labeled by the filename label).
We are reporting this to GTK to work toward a better solution.
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2460
|
| |
|
| |
|