| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We present a new toast every time the undo action changed which
is confusing because you might have several undo toasts appearing
over each other. To complicate matters, the previous undo toasts
lie (undo'ing would actually undo a different action).
There was a proposal in #2350 to batch undo toasts, but that's problematic
because our undo manager is designed to undo exactly 1 action,
we do not have an undo stack.
The more straightforward solution seems to be simply dismissing the
old undo toasts, when we popup a new undo toast.
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2350
|
|
|
|
|
|
|
| |
The `‘action’ may be used uninitialized` warning is shown during build
currently. It can really happen that uninitialized value is used when
dropping something else then the `GDK_TYPE_FILE_LIST` and `G_TYPE_STRING`
on the tab bar. Let's initialize the action to prevent this.
|
|
|
|
|
|
|
|
|
|
| |
Add a check to assert nautilus_files_view_drop_proxy_received_uris is
not called with an empty source uri list.
Make nautilus_dnd_perform_drop return whether the drop event was
actually handled. Adjust callers accordingly.
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2787
|
|
|
|
|
|
|
| |
In some cases, an action that was disabled when opening the tab menu
might stay disabled when you close the tab menu because of an
early return. Make sure to reenable all of the actions when the
tab menu is closed.
|
|
|
|
|
|
|
|
|
| |
With the introduction of ::extra-drag-value in AdwTabBar, we can
now dynamically set the preferred action on the AdwTabBar. Use
the "extra" drop target on the AdwTabBar, and use our existing code
making this fairly simple.
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2495
|
|
|
|
| |
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/1620
|
| |
|
|
|
|
|
| |
Add the ability from the tab menu to close all
other tabs.
|
|
|
|
|
|
| |
New tabs are always taking the location of the current tab even
if the new tab was generated from a non-current tab using the
tab bar context menu.
|
|
|
|
|
|
| |
New tabs open up relative to the selected tab. Make new tabs
open up relative to the tab in which the context menu was opened
if applicable (otherwise open relative to the selected tab)
|
|
|
|
|
|
|
|
| |
This isn't a problem now but would cause problems with the
following commits
Return early so we don't set incorrect actions when the
callback passes a NULL page on close.
|
|
|
|
|
| |
Refactoring existing code to simplify, this will help with the
following commits. No logical or functional changes.
|
|
|
|
| |
Use of this action was removed in 4ca63d19eb3e522eea54a92c0f479911e2a17f4a
|
|
|
|
|
|
|
|
|
|
|
|
| |
Nautilus does not persist the window maximized state.
This is because we are listening to the property is-maximized for
change, which is now maximized in GTK4.
https://docs.gtk.org/gtk4/property.Window.maximized.html
Use notify::maximized instead of notify::is-maximized.
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2682
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, nautilus_location_entry_cancel uses the last_location GFile
to reset the location entry path if the user cancels.
However, the root prompt immediately overrides last_location
by setting the location to "/", which results in the user always seeing "/"
even if they cancel location bar entry then use CTRL-L to check current path.
To fix this, use the same logic as the home prompt, which only sets the entry text.
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2249
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We remove the pad controller before calling gtk_window_destroy() to
break a dependency cycle.
However, if for some reason the controller has already been removed
by the time we reach that part of our code, we access a pointer to
and already destroyed object.
Try to avoid this with a weak pointer, such that we skip the step
if the pointer is already NULL.
Presumably fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/2572
|
|
|
|
|
|
|
| |
GtkStyleContext is deprecated in 4.10, use the corresponding
GtkWidget functions.
Also bump GTK version to use the new gtk_widget_get_color().
|
|
|
|
|
|
| |
Use g_signal_connect_object to automatically disconnect the signal
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2548
|
|
|
|
| |
This adds a support URL to the Nautilus forums for easier access to ask questions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The pad controller owns a reference to the window (as an action group)
and the window (as a widget) owns a reference to the pad controller.
This is a reference cycle.
Usually, reference cycles are resolved in dispose(), which can get
called multiple times. However, GTK removes the controllers during
finalize(). We end up calling finalize() recursively, which is a big
problem.
So our only option is to manually remove the controller before starting
the destruction of the window.
|
|
|
|
|
|
|
|
|
|
|
| |
Toolbar holds a reference to the window, which owns the toolbar.
This reference cycle is problematic, so drop the property and just
peek the window by walking up the hierarchy.
Long term we should just dismantle NautilusToolbar completely, by
moving most logic to each their respective control and manage
everything from NautilusWindow.
|
| |
|
|
|
|
|
|
| |
Consistent with the context menu "Move to Trash" label.
Fixes #2360
|
| |
|
|
|
|
|
| |
This will make managing the toolbars and child widgets
easier.
|
|
|
|
|
|
|
|
| |
Prevents a crash from trying to update the selected
page after the last page is closed. Instead of letting
the code progress to that point, we simply check for
the number of pages and close the window at the right
point.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
They are better fit than GtkNotebook for our use cases and provide
more features and better visuals.
Also, they include DND support for switching tabs on hover. There is
a small regression: files can no longer be dropped in the tab itself;
this is because on one hand the AdwTabBar extra drop API is too
limiting for our needs (it lacks a means to check the value before
drop to pick a preferred action), and on the other hand our new DND
code is too new and our needs might change, so we shouldn't be asking
for more API yet.
With this we also reenable detachable tabs.
Closes https://gitlab.gnome.org/GNOME/nautilus/-/issues/615
(Rebased and amended by António Fernandes and Christopher Davis)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a tab is moved into another window, we must remove the slot from
the old window.
Currently, we do this conditionally in `GtkNotebook::page-removed`.
The condition we use is a hack: we check for a boolean set as data.
This hack is wrong because it catches only the cases when a tab is
detached into a new window, not when it's detached and attached to
an already existing window.
So, instead, we can use a simpler condition: check whether the slot
has been removed from the slots list already. This way we can drop
the hack.
(Note: tab detaching is currently disabled, but this is a preparation
to reenable it after porting to AdwTabView.)
|
|
|
|
|
|
|
|
|
|
| |
`clost_slot()` does not necessarily closes the tab. This happens only
if the 3rd parameter is TRUE. This is misleading.
Now that there is only 1 case where the 3rd parameter is TRUE, let's
extract the tab-closing part out and rename the function accordingly.
Also, swap its parameters in order to make it `g_list_foreach()`-able.
|
|
|
|
|
|
|
|
|
| |
We currently rely on sorting the list of slots in order to close the
active slot last when disposing of a window.
But the bug this works around only happens because we are actually
closing the tabs too. That's not necessary: widgets are going to be
destroyed later anyway along with their parents.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, we add a slot to the window in 2 situations:
1. When a new slot is created (`nautilus_window_initialize_slot()`);
2. When a slot moves to another window (`notebook_page_added_cb()`).
However, `GtkNotebook::page-added` triggers in both cases, so we use
a hack with g_object_set_data() to know whether it happened by DND.
This hack is wrong because it catches only the cases when a tab is
detached into a new window, not when it's detached and attached to
an already existing window.
Fortunately, `nautilus_window_initialize_slot()` already calls
`nautilus_notebook_add_tab()`, which is going to cause an emission of
`GtkNotebook::page-added`. Therefore, we can simply add the slot
unconditionally and exclusively in `notebook_page_added_cb()`.
(Note, tab detaching is currently disabled, but this is a preparation
to reenable it after porting to AdwTabView.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We create a view-less slot when the new window is constructed.
This is undesirable if the new window was created by detaching a tab,
because we already have got a slot (the one being detached); as a
workaround, we currently use a g_object_set_data() hack to close the
undesired tab.
But even in the other cases, this is entirely unnecessary, because
`nautilus_window_open_location_full()` creates the slot on demand!
So, let's just not create a slot on construction and wait for either
the detached tab or the open location.
Contrary to what an old comment states, the list of slots, and the
active_slot weak pointer can be NULL, as we perform NULL-checks
everywhere for them already.
(Note, tab detaching is currently disabled, but this
is a preparation to reenable it after porting to AdwTabView.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This hidden setting was added back when tabs were introduced in
commit 07cf7db47fd5fae64201f1cff73e39fd8aed2f54
That commit provides no motivation for this setting, and neither does
the bug it references: https://bugzilla.gnome.org/show_bug.cgi?id=48034
The same commit added a "tabs_enable" setting too, so it's fair assume
this setting doesn't solve any problem, it was just a trend of older
times to make everything configurable.
Let's remove the setting and assume the default behavior. Also remove
the related NAUTILUS_OPEN_FLAG_SLOT_APPEND flag.
(Diff and message amended by António Fernandes<antoniof@gnome.org>)
|
|
|
|
|
| |
Put a list of currently installed extensions in debug-info.
This shows up under Troubleshooting in the about page.
|
|
|
|
|
|
| |
Add function like nautilus_window_back_or_foward(), but instead
of acting on the current slot, open a new tab. This will be used
when middle clicking the navigation buttons in the toolbar.
|
|
|
|
|
|
|
|
|
|
|
| |
Exchange the adjustable GtkPaned widget for AdwFlap. We lose a
resizable sidebar, but gain an adaptive one. For windows narrower
than 600px, we fold the sidebar.
The loss of the resizable sidebar means that all settings related
to it are removed.
Fixes #2156
|
|
|
|
|
|
| |
Always show the sidebar, and remove the setting to hide it.
We are going to introduce a replacement next commit: AdwFlap.
|
|
|
|
|
| |
Get rid of the middleman; Use `g_type_ensure()` to
initialize the type.
|
| |
|
| |
|
|
|
|
| |
Remove old components such as GdkDragContext. Reenable signals for DND.
|
| |
|
| |
|
|
|
|
| |
Remove code that now exists in src/gtk/nautilusgtkplacessidebar.c
|
|
|
|
|
|
|
|
|
| |
The format volume action needs to be re-implemented for GTK4.
Move the existing code from nautilus-window to nautilusgtkplacessidebar
and necessary tweaks. Drop --xid flag for gnome-disks command
as that has been ignored by gnome-disks since version 40.beta
https://gitlab.gnome.org/GNOME/gnome-disk-utility/-/commit/9f6571532c6b6f9c78f0ec4ce47ec3d0b178dba7
|
|
|
|
| |
Also add Properties menu item to the Trash row context menu too.
|
|
|
|
|
|
|
|
| |
With the changes for GTK4, the sidebar items no longer have
support for populating the context menus with additional items.
Add a Properties action directly in the sidebar, by moving and
adapting code from NautilusWindow.
|
|
|
|
|
|
|
|
|
|
|
| |
Changes as part of commit 022867e3d3370560f2c6c07f90ad5fdfd7916d50
switched the handler of the pathbar signal.
The new handler raises an exception for NAUTILUS_OPEN_FLAG_NEW_WINDOW.
Use nautilus_application API should be used when handling new windows.
Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/2208
|
|
|
|
|
|
|
|
|
|
|
| |
AdwToastOverlay is the new recommended widget for the
in-app notification pattern. Instead of using GtkFrame
and the old pattern, we can use this instead.
AdwToast's API uses GActions, so I added an action for
opening `folder_to_open`.
Closes https://gitlab.gnome.org/GNOME/nautilus/-/issues/2104
|
|
|
|
|
|
|
|
|
|
|
| |
Due to GtkPopover now being a child of the window, instead of setting an
attach widget we need to pass it the allocation of the tab, with the
origin coordinates translated to the window coordinate space.
Also use double instead of int when appropriate and replace GdkEvent
usage with event controller method to get modifier status.
Closes https://gitlab.gnome.org/GNOME/nautilus/-/issues/2101
|