Commit graph

131 commits

Author SHA1 Message Date
Dan Klishch 5ed7cd6e32 Everywhere: Use east const in more places
These changes are compatible with clang-format 16 and will be mandatory
when we eventually bump clang-format version. So, since there are no
real downsides, let's commit them now.
2024-04-19 06:31:19 -04:00
Shannon Booth e800605ad3 AK+LibURL: Move AK::URL into a new URL library
This URL library ends up being a relatively fundamental base library of
the system, as LibCore depends on LibURL.

This change has two main benefits:
 * Moving AK back more towards being an agnostic library that can
   be used between the kernel and userspace. URL has never really fit
   that description - and is not used in the kernel.
 * URL _should_ depend on LibUnicode, as it needs punnycode support.
   However, it's not really possible to do this inside of AK as it can't
   depend on any external library. This change brings us a little closer
   to being able to do that, but unfortunately we aren't there quite
   yet, as the code generators depend on LibCore.
2024-03-18 14:06:28 -04:00
Hugh Davenport 7fa0cf194f Applications: Add fullscreen option to Utilities 2024-01-14 15:18:43 -07:00
Ali Mohammad Pur 5e1499d104 Everywhere: Rename {Deprecated => Byte}String
This commit un-deprecates DeprecatedString, and repurposes it as a byte
string.
As the null state has already been removed, there are no other
particularly hairy blockers in repurposing this type as a byte string
(what it _really_ is).

This commit is auto-generated:
  $ xs=$(ack -l \bDeprecatedString\b\|deprecated_string AK Userland \
    Meta Ports Ladybird Tests Kernel)
  $ perl -pie 's/\bDeprecatedString\b/ByteString/g;
    s/deprecated_string/byte_string/g' $xs
  $ clang-format --style=file -i \
    $(git diff --name-only | grep \.cpp\|\.h)
  $ gn format $(git ls-files '*.gn' '*.gni')
2023-12-17 18:25:10 +03:30
Karol Kosek ed3e729d4e Userland: Use nondeprecated set_tooltip for static and formatted strings 2023-10-06 08:20:11 +02:00
Karol Kosek 3944c39b3a LibGUI: Port tooltip in Breadcrumbbar to String 2023-10-06 08:20:11 +02:00
Kemal Zebari 18124a5611 SpaceAnalyzer: Port to GML compiler 2023-10-02 21:28:40 +02:00
Tim Ledbetter b4e134cb52 Userland: Use non-fallible EventReceiver::add() where possible 2023-09-25 10:58:31 +02:00
Tim Ledbetter 3aa49f268c Userland: Make Window::set_main_widget() non-fallible 2023-09-21 10:20:23 +02:00
Tim Ledbetter a6f6a1afd2 Userland: Prefer non-fallible construction for LibGUI objects 2023-09-18 18:00:45 +02:00
Tim Ledbetter 0d7b13edac Userland: Make GUI::Window construction non-fallible 2023-09-17 16:47:28 -06:00
Tim Ledbetter ccab5ddf9b LibGUI+Applications: Use String in make_about_action() 2023-09-16 11:05:49 +02:00
camc d978dd4af8 LibGUI: Add deprecated suffix to {set_,}tooltip in Widget 2023-08-18 10:43:37 +01:00
Andreas Kling bd61e75e0b LibGUI: Remove Window::try_add_menu()
And fall back to the infallible add_menu().
2023-08-14 14:57:54 +02:00
Andreas Kling f2faf2767f LibGUI: Remove Menu::try_add_action()
And fall back to the infallible add_action().
2023-08-14 14:57:54 +02:00
Andreas Kling 1525fa3b8f LibGUI: Remove Menu::try_add_separator()
And fall back to the infallible add_separator().
2023-08-14 14:57:54 +02:00
Andreas Kling 8322b31b97 LibGUI: Remove Widget::try_set_layout<T>()
And fall back to the infallible set_layout<T>().

Work towards #20557.
2023-08-14 14:57:54 +02:00
kleines Filmröllchen 1e67435ff5 Meta: Rename compile_gml to stringify_gml
This is what this function really does, it doesn't compile anything.
2023-08-11 21:33:48 +02:00
Lucas CHOLLET 3f35ffb648 Userland: Prefer _string over _short_string
As `_string` can't fail anymore (since 3434412), there are no real
benefits to use the short variant in most cases.
2023-08-08 07:37:21 +02:00
Andreas Kling 34344120f2 AK: Make "foo"_string infallible
Stop worrying about tiny OOMs.

Work towards #20405.
2023-08-07 16:03:27 +02:00
Timothy Flynn c911781c21 Everywhere: Remove needless trailing semi-colons after functions
This is a new option in clang-format-16.
2023-07-08 10:32:56 +01:00
Sam Atkins f3b08ffc8a SpaceAnalyzer: Show status tips in Statusbar 2023-06-17 20:36:03 +02:00
Karol Kosek 2029750519 LibGUI+Userland: Port StatusBar::text() and set_text functions to String 2023-06-15 13:53:22 +01:00
Sam Atkins a5aabb7940 SpaceAnalyzer: Migrate to Core::Directory::for_each_entry() 2023-05-28 05:51:27 -06:00
Lucas CHOLLET 1a97382305 LibGUI: Make Application's construction fallible
The pattern to construct `Application` was to use the `try_create`
method from the `C_OBJECT` macro. While being safe from an OOM
perspective, this method doesn't propagate errors from the constructor.
This patch make `Application` use the `C_OBJECT_ABSTRACT` and manually
define a `create` method that can bubble up errors from the
construction stage.

This commit also removes the ability to use `argc` and `argv` to
create an `Application`, only `Main`'s `Arguments` can be used.

From a user point of view, the patch renames `try_create` => `create`,
hence the huge number of modified files.
2023-05-05 16:41:21 +01:00
thankyouverycool 91bafc2653 LibGUI+Userland: Port Labels to String 2023-04-30 05:48:14 +02:00
Karol Kosek 969543a847 LibGUI+Userland: Make Window::*add_menu take name using new string 2023-04-19 07:59:54 +02:00
Cameron Youell 1dc3ba6ed5 Applications: Convert DeprecatedFile usages to LibFileSystem 2023-03-24 10:58:43 +00:00
Cameron Youell 1d24f394c6 Everywhere: Use LibFileSystem where trivial 2023-03-21 19:03:21 +00:00
Tim Ledbetter 26662d7ecd SpaceAnalyzer: Make "Open in File Manager" shortcut behave correctly
Previously, the incorrect action would be invoked when using the Open
in File Manager keyboard shortcut, while a directory was selected.
2023-03-16 00:02:08 +01:00
Sam Atkins 774f328783 LibCore+Everywhere: Return an Error from DirIterator::error()
This also removes DirIterator::error_string(), since the same strerror()
string will be included when you print the Error itself. Except in `ls`
which is still using fprintf() for now.
2023-03-05 20:23:42 +01:00
Sam Atkins 6b66e39df4 LibGUI+Userland: Stop returning Layout from Widget::(try_)set_layout()
Nobody uses this return value any more. It also lets us remove a whole
bunch of `(void)` casts. :^)
2023-02-18 16:56:56 +00:00
Tim Schumacher 606a3982f3 LibCore: Move Stream-based file into the Core namespace 2023-02-13 00:50:07 +00:00
Tim Schumacher d43a7eae54 LibCore: Rename File to DeprecatedFile
As usual, this removes many unused includes and moves used includes
further down the chain.
2023-02-13 00:50:07 +00:00
Andreas Kling 9e5fd95e44 SpaceAnalyzer: "Open Containing Folder" => "Reveal in File Manager"
Also "Open Folder" => "Open in File Manager".
2023-02-07 17:01:55 +01:00
Sam Atkins f7aead8086 SpaceAnalyzer: Rename widget variables to match code style 2023-02-04 12:27:10 +01:00
Sam Atkins 534039fdf5 SpaceAnalyzer: Stop treating selecting a node as a path change
This served no obvious purpose, but did make the breadcrumb bar change
confusingly.
2023-02-04 12:27:10 +01:00
Sam Atkins ad92b16887 SpaceAnalyzer: Rename TreeMapWidget::m_path -> m_path_segments
This is clearer to me at least.
2023-02-04 12:27:10 +01:00
Sam Atkins 87f4c9e580 SpaceAnalyzer: Give the Analyze action an icon and F5 shortcut
This action is basically equivalent to "Refresh", so let's use the
common shortcut for that.
2023-02-04 12:27:10 +01:00
Sam Atkins 1ec59cc52a SpaceAnalyzer: Make TreeMapWidget responsible for filesystem analysis
Also, the Tree object was only ever used by the TreeMapWidget, so its
creation can happen inside `analyze()`, fixing the memory leak issue.
Plus, it doesn't have to be RefCounted.
2023-02-04 12:27:10 +01:00
Sam Atkins 98e9ee07e3 SpaceAnalyzer: Propagate more errors 2023-02-04 12:27:10 +01:00
Sam Atkins 16bbdc812d SpaceAnalyzer: Extract ProgressWindow into its own class 2023-02-04 12:27:10 +01:00
Linus Groh 6e7459322d AK: Remove StringBuilder::build() in favor of to_deprecated_string()
Having an alias function that only wraps another one is silly, and
keeping the more obvious name should flush out more uses of deprecated
strings.
No behavior change.
2023-01-27 20:38:49 +00:00
Sam Atkins c84e11c154 SpaceAnalyzer: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-01-27 08:07:24 -05:00
Tim Schumacher 82a152b696 LibGfx: Remove try_ prefix from bitmap creation functions
Those don't have any non-try counterpart, so we might as well just omit
it.
2023-01-26 20:24:37 +00:00
Karol Kosek e45434c0c7 FileManager+HackStudio+SpaceAnalyzer: Use File::can_delete_or_move 2023-01-24 20:13:30 +00:00
Sam Atkins 1dd6b7f5b7 AK+Everywhere: Rename JsonObject::get() to ::get_deprecated()
This is a preparatory step to making `get()` return `ErrorOr`.
2023-01-17 19:52:52 -05:00
Arda Cinar 33ea96912a SpaceAnalyzer: Do not reset the path to '/' after a refresh
Clicking analyze or deleting a file would always cause the tree view in
the widget to reset back to viewing the root. This was changed to stay
in the directory currently being viewed
2023-01-09 17:08:17 +00:00
Arda Cinar c045ae1a96 SpaceAnalyzer: Keep the current path via filenames, not indices
The tree map widget keeps the current path to allow the user to navigate
between directories. This path was being kept as indices into the
children array. The indices might change after the tree is regenerated
and this change is required to keep the user's current place after a
re-analysis
2023-01-09 17:08:17 +00:00
Arda Cinar ba33267132 SpaceAnalyzer: Add a method to TreeNode to get a child node by name
This will make it easier to get to a tree node given a file path
2023-01-09 17:08:17 +00:00