The original work was done in #2752
(deceb91c48 to be precise),
but unfortunately 2c772d1848 replaced
on_selection with on_selection_change, which caused the function
to never be executed, as it was reassigned a few lines below.
This fixes#6902.
Previously, dragging and dropping multiple files would create a window
for each file or directory that was selected. Now, we combine them and
show one progress window for the whole batch. :^)
Applications previously had to create a GUI::Menubar object, add menus
to it, and then call GUI::Window::set_menubar().
This patch introduces GUI::Window::add_menu() which creates the menubar
automatically and adds items to it. Application code becomes slightly
simpler as a result. :^)
Adds a new on_rename_error handler and renames the old on_error handler
to on_directory_change_error in FileSystemModel. The on_rename_error
handler creates a MessageDialog with the error message.
File Manager and Spreadsheet had an inconsistent order relative
to other apps (they had a copy-cut-paste order, where every other app
had a cut-copy-paste order).
The issue was that the desktop IconView has Gfx::FrameShape::NoFrame as
its frame shape, but with a non-zero frame_thickness().
This caused us to not render a frame, but to include one in the
selection boundary calculations.
Fix this by setting the desktop icon view's frame thickness to 0.
Fixes#8525.
This fixes#8204.
In the case that we just navigated up from a directory because it was
deleted, we can detect that easily by checking if the child directory
exists, and then remove the relevant breadcrumbs immediately.
However, it's harder to notice if a child directory for a breadcrumb
is deleted at another time. Previously, clicking that breadcrumb would
crash, but now we check to see if the directory it points to actually
exists. If it doesn't, we pop that breadcrumb and any after it, off
of the breadcrumbbar.
This may not be the ideal solution - maybe it should detect that the
directory is gone automatically - but it works and doesn't involve
managing additional directory watchers.
The LexicalPath instance methods dirname(), basename(), title() and
extension() will be changed to return StringView const& in a further
commit. Due to this, users creating temporary LexicalPath objects just
to call one of those getters will recieve a StringView const& pointing
to a possible freed buffer.
To avoid this, static methods for those APIs have been added, which will
return a String by value to avoid those problems. All cases where
temporary LexicalPath objects have been used as described above haven
been changed to use the static APIs.
Since this is always set to true on the non-default constructor and
subsequently never modified, it is somewhat pointless. Furthermore,
there are arguably no invalid relative paths.
Previously, AK::Function would accept _any_ callable type, and try to
call it when called, first with the given set of arguments, then with
zero arguments, and if all of those failed, it would simply not call the
function and **return a value-constructed Out type**.
This lead to many, many, many hard to debug situations when someone
forgot a `const` in their lambda argument types, and many cases of
people taking zero arguments in their lambdas to ignore them.
This commit reworks the Function interface to not include any such
surprising behaviour, if your function instance is not callable with
the declared argument set of the Function, it can simply not be
assigned to that Function instance, end of story.
Since the introduction of multi-select, we have had both `on_selection`
and `on_selection_change`, the latter of which was only invoked when a
change in selection came in through the model.
This removes `AbstractView::on_selection` and replaces it usage with
the more explicit `on_selection_change` everywhere.
This changes (context) menus across the system to conform to titlecase
capitalization and to not underline the same character twice (for
accessing actions with Alt).
Since applications using Core::EventLoop no longer need to create a
socket in /tmp/rpc/, and also don't need to listen for incoming
connections on this socket, we can remove a whole bunch of pledges!
SPDX License Identifiers are a more compact / standardized
way of representing file license information.
See: https://spdx.dev/resources/use/#identifiers
This was done with the `ambr` search and replace tool.
ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
did_error() caused the program to crash since the DialogBox tried to
run its own Notifier with the same - now invalid because closed - fd.
In addition to setting the member that is the Notifier to nullptr we
also tell the Notifier that it is not enabled anymore.
Use the total bytes transferred count to estimate the time left
for the copy operation to finish. With the estimate label, the
two progress bars were deemed superfluous, so the only remaining
progress bar is the overall copy progress, that is updated more
frequently. (The same progress is also shown in the task bar,
so you can minimize the window and still be informed of the
progress.)
Bring some mid-90s charm and show a file flying animation while copying
files. Icons for both source and destination directories are currently
the default icons, but in the future they could be the respective icons
for the destination directory.