Commit Graph

19 Commits

Author SHA1 Message Date
Sam Atkins
0c24522635 LibGUI+Everywhere: Use fallible Window::set_main_widget() everywhere :^)
Rip that bandaid off!

This does the following, in one big, awkward jump:
- Replace all uses of `set_main_widget<Foo>()` with the `try` version.
- Remove `set_main_widget<Foo>()`.
- Rename the `try` version to just be `set_main_widget` because it's now
  the only one.

The majority of places that call `set_main_widget<Foo>()` are inside
constructors, so this unfortunately gives us a big batch of new
`release_value_but_fixme_should_propagate_errors()` calls.
2023-01-06 13:36:02 -07:00
Linus Groh
6e19ab2bbc AK+Everywhere: Rename String to DeprecatedString
We have a new, improved string type coming up in AK (OOM aware, no null
state), and while it's going to use UTF-8, the name UTF8String is a
mouthful - so let's free up the String name by renaming the existing
class.
Making the old one have an annoying name will hopefully also help with
quick adoption :^)
2022-12-06 08:54:33 +01:00
sin-ack
3f3f45580a Everywhere: Add sv suffix to strings relying on StringView(char const*)
Each of these strings would previously rely on StringView's char const*
constructor overload, which would call __builtin_strlen on the string.
Since we now have operator ""sv, we can replace these with much simpler
versions. This opens the door to being able to remove
StringView(char const*).

No functional changes.
2022-07-12 23:11:35 +02:00
Sam Atkins
cdffe556c8 LibGUI+Userland: Make Dialog::ExecResult an enum class 2022-05-13 16:27:43 +02:00
Sam Atkins
88800e8f32 FileManager: Use Core::System::exec() 2022-04-11 21:09:42 +02:00
Sam Atkins
1925bde3c0 FileManager: Use Core::Stream for FileOperationProgressWidget 2022-03-13 22:38:48 +01:00
Sam Atkins
dc5a318aa9 FileManager: Use TRY in run_file_operation()
The exception is `execvp()` since that has no Core::System wrapper yet.
2022-03-13 22:38:48 +01:00
Sam Atkins
e2c32a6c65 Everywhere: Use my shiny new serenityos.org email :^) 2021-09-03 12:22:36 +02:00
Musab Kılıç
432839c2e9 FileManager: Kindly ask the user if they want to delete a file 2021-09-02 23:52:29 +02:00
Sam Atkins
469bca9d3a FileManager: Show progress dialog for file deletions
Progress dialogs are nice! :^)

Showing a proper file-deletion animation would be nice, but that is
outside the scope of my abilities.
2021-07-22 12:48:44 +02:00
Sam Atkins
dd833dc220 FileManager: Rename FileOperation::Cut to FileOperation::Move 2021-07-22 12:48:44 +02:00
Sam Atkins
5090b1bdba FileManager: Set file op progress window's text based on the operation 2021-07-22 12:48:44 +02:00
Sam Atkins
0a62d517fd FileManager+FileOperation: Implement (and use) 'Move' command
`FileOperation Move ...` is now used for cut-and-paste in the
FileManager.
2021-07-22 12:48:44 +02:00
Sam Atkins
d8fb8b9583 FileManager: Move mass-copy code from DirectoryView to FileUtils
This is preparation for calling it from FileManager/main.cpp

Also made file_operation_windows take NonnullRefPtrs.
2021-07-22 12:48:44 +02:00
Sam Atkins
ca039e6ba1 FileManager+FileOperation: Switch to east const
(And some adjustments based on MaxWipfli's feedback)
2021-07-22 12:48:44 +02:00
Max Wipfli
fc6d051dfd AK+Everywhere: Add and use static APIs for LexicalPath
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.
2021-06-30 11:13:54 +02:00
Brian Gianforcaro
1682f0b760 Everything: Move to SPDX license identifiers in all files.
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 *
2021-04-22 11:22:27 +02:00
Mițca Dumitru
255da9b02b FileManager: Use newly introduced LibCore file management helpers
Most of the functions under FileUtils were removed, except those which
dealt with file deletion, as they spawned MessageBoxes for errors, as
such, those functions were written in terms of Core::File::remove.
2021-02-21 18:14:29 +01:00
Andreas Kling
dc28c07fa5 Applications: Move to Userland/Applications/ 2021-01-12 12:05:23 +01:00