Commit graph

15586 commits

Author SHA1 Message Date
Andreas Kling 47d98a5b9f Base: Tweak app names to be in "Proper Noun" style 2021-01-04 23:55:28 +01:00
Andreas Kling fedf561f57 Everywhere: Use GUI::CommonActions::make_about_action() 2021-01-04 23:51:49 +01:00
Andreas Kling f0a59ab7fb Browser: Make the about menu item look a little nicer 2021-01-04 23:34:32 +01:00
Andreas Kling da536c8d22 LibGUI: Add CommonActions::make_about_action()
This creates an "About" menu action given the app name and icon.
It takes care of showing the about dialog for you.
2021-01-04 23:31:42 +01:00
Andreas Kling 6bfcb9c2b0 SystemMenu: Tweak text "About..." => "About SerenityOS" 2021-01-04 23:23:55 +01:00
Andreas Kling bb431b58c1 FileManager: Refer to self as "File Manager" (not "FileManager") 2021-01-04 23:23:32 +01:00
Andreas Kling 9faa8e0ce6 DisplaySettings: Refer to app as "Display Settings"
Application names are proper nouns, so let's write them with capitalized
first letters.
2021-01-04 23:22:38 +01:00
Andreas Kling f2f4695bdd HackStudio: Correct use of ellipsis (...) in menu items 2021-01-04 23:07:04 +01:00
Andreas Kling 83bbbff753 FileManager: Correct use of ellipsis (...) in menu items 2021-01-04 23:06:02 +01:00
Andreas Kling 37f925ffc0 MenuApplets: Give executable icons to some menu applets
This makes SystemMonitor a bit more pleasant to look at. :^)
2021-01-04 23:01:26 +01:00
Andreas Kling 22325dd63e LibWeb: Don't careleslly insert inline-level boxes into inline-blocks
Just because an inline-block is inline doesn't mean it's ready to
accept random inline children. If it's a block, we may need to create
an anonymous wrapper first.

Fixes #4604.
2021-01-04 22:32:34 +01:00
Andreas Kling d991658794 Kernel+LibC: Tidy up assertion failures with a dedicated syscall
This patch adds sys$abort() which immediately crashes the process with
SIGABRT. This makes assertion backtraces a lot nicer by removing all
the gunk that otherwise happens between __assertion_failed() and
actually crashing from the SIGABRT.
2021-01-04 21:57:30 +01:00
Itamar 8d04bb4d7b Toolchain: Disable exceptions by default
We now configure gcc to always use the -fno-exceptions flag.

This does not affect our code since we do not use exceptions, and also
fixes the gcc port.
2021-01-04 21:57:03 +01:00
Linus Groh 7b9322dbc5 crash: Remove -x and -y which do not crash (write to / read from freed memory)
These do not crash the process anymore.
Fixes #4685.
2021-01-04 21:22:15 +01:00
Andreas Kling ce2894c95b LibWeb: Restart the cursor blink cycle whenever the user edits content
Having the text cursor disappear during rapid continuous editing is
quite jarring, so let's make sure we always restart the blink cycle
whenever the user performs some kind of editing action in a frame.
2021-01-04 20:48:27 +01:00
Tom 901ef3f1c8 Kernel: Specify default memory order for some non-synchronizing Atomics 2021-01-04 19:13:52 +01:00
Tom fb84f0ec9c AK: Add default memory order as template argument for Atomic<T>
This is useful for collecting statistics, e.g.
Atomic<unsigned, MemoryOrder::memory_order_relaxed> would allow
using operators such as ++ to use relaxed semantics throughout
without having to explicitly call fetch_add with the memory order.
2021-01-04 19:13:52 +01:00
Tom a6c459dd29 AK: Decorate RefCountedBase::try_ref with nodiscard
Because try_ref only increments the ref count if it returned true,
it is important that any caller properly acts upon the return value.
2021-01-04 19:13:52 +01:00
AnotherTest 4adfdb98aa Shell: Remove debug log about child process going away
This is still an issue, but its existence isn't helping anyone, so just
remove it.
2021-01-04 19:13:18 +01:00
AnotherTest 1c4a425bff LibLine: Don't overwrite stuff when moving origin around
This fixes an issue (mainly) with multiline prompts, where a multiline
prompt would overwrite the lines before it when libline tries to display
it.
To reproduce, set `PROMPT="a\nb\nc> "` in the shell, then press return
a few times.
2021-01-04 19:13:18 +01:00
Brendan Coles 1f03b6ad57 Playground: Add help documentation 2021-01-04 18:50:26 +01:00
Andreas Kling 1e4b9a9cd9 LibGUI: Don't include invisible widgets in BoxLayout preferred size 2021-01-04 18:48:41 +01:00
Andreas Kling 4f4e6bc61b Spreadsheet: Tweak documentation window layout slightly 2021-01-04 18:47:29 +01:00
Andreas Kling 7124e63711 Spreadsheet: Tidy up cell formatting dialog a bit
Use some of the recent features in LibGUI to simplify and tidy up the
cell formatting interface. The widget layout API's are still not good
enough to make this easy, but at least it's getting better.
2021-01-04 18:42:50 +01:00
Andreas Kling fa88a26554 Spreadsheet: Simplify conditional formatting property tab GML 2021-01-04 18:33:03 +01:00
Andreas Kling 5db34848fe Terminal: Use shrink-to-fit in the settings window 2021-01-04 18:26:52 +01:00
Andreas Kling ded4d576df DisplaySettings: Use shrink-to-fit to simplify GML 2021-01-04 18:23:34 +01:00
Andreas Kling 21bacec13f LibGUI: Simplify ToolBarContainer by using shrink-to-fit
This class was implementing shrink-to-fit manually. No need for that
anymore now that we can use Widget's shrink-to-fit mode.
2021-01-04 18:21:05 +01:00
Andreas Kling b03e1b08b5 LibGUI: Add Widget shrink-to-fit layout flag
If this flag is enabled for a widget, it will be automatically sized
based on its children. This only works for widgets using a layout.

This allows you to put widgets inside each other without having to
manually calculate how large the container should be. It's not the
perfect API but it's a decent progression in ergonomics. :^)
2021-01-04 18:17:14 +01:00
Andreas Kling ce7b09a3c5 DisplaySettings: Set "open wallpaper" button style in GML 2021-01-04 15:28:51 +01:00
Andreas Kling 6041e48eaa LibCore: Make Core::Object::property() const 2021-01-04 13:41:13 +01:00
Emanuele Torre 370ce42430 Toolchain+LibTTF: Remove some blank line at the end of CMake files. 2021-01-03 23:58:54 +01:00
Emanuele Torre 6abba493b2 Meta: Rewrite the check-newlines-at-eof script in python
The bash version takes around 15 seconds to run; that is way too slow.
This python3 version should take less than one second to run. :^)

Also, the script will now also check .py files and .txt CMake files.
2021-01-03 23:58:54 +01:00
Glenford Williams 7dc52e04fe
Calculator: Port interface to GML (#4742) 2021-01-03 22:27:24 +01:00
Linus Groh bf45a28a89 CrashReporter: Show termination signal
...in both text (using strsignal) and numeric form.
Closes #4775.
2021-01-03 22:12:42 +01:00
Linus Groh 0571a17f57 Kernel+LibELF: Store termination signal in coredump ProcessInfo 2021-01-03 22:12:42 +01:00
Tom b5437216e2 SystemMonitor: Re-use the /proc/all file descriptor when updating
This makes it more likely to be able to get statistics when resources
are scarce.
2021-01-03 22:12:19 +01:00
Tom 1d33765e1c ResourceGraph: Re-use the ProcFS file descriptors when updating stats
This makes it more likely to be able to get statistics when resources
are scarce.
2021-01-03 22:12:19 +01:00
Tom bc3c0fa936 LibCore: Allow caching and reusing the ProcFS file descriptors
Because ProcFS will refresh the data upon seek to 0, we can re-use
the same file descriptor. This saves us from having to open it every
time, but it also reduces the odds that we are unable to open a new
file descriptor due to low memory conditions.
2021-01-03 22:12:19 +01:00
Tom cf89180c35 LibCore: Report error condition when reading process statistics failed 2021-01-03 22:12:19 +01:00
Tom 754bf22da7 ResourceGraph: Handle low memory situations bit better
Rather than crashing with an ASSERT, when we can't read from /proc
we draw the graph with red instead. This also alerts the user that
memory is very low.
2021-01-03 22:12:19 +01:00
Tom f98ca35b83 Kernel: Improve ProcFS behavior in low memory conditions
When ProcFS could no longer allocate KBuffer objects to serve calls to
read, it would just return 0, indicating EOF. This then triggered
parsing errors because code assumed it read the file.

Because read isn't supposed to return ENOMEM, change ProcFS to populate
the file data upon file open or seek to the beginning. This also means
that calls to open can now return ENOMEM if needed. This allows the
caller to either be able to successfully open the file and read it, or
fail to open it in the first place.
2021-01-03 22:12:19 +01:00
Linus Groh b36f57e570 Lagom: Build gml-format 2021-01-03 22:12:08 +01:00
Linus Groh 1e236d5863 Userland: Add gml-format
TL;DR: Like clang-format but for GML files :^)

It takes a list of files (or reads from standard input if none is given),
formats them and prints the result to standard output or writes back to
the file when using the -i/--inplace option.
2021-01-03 22:12:08 +01:00
Linus Groh 7b21335caa Playground: Add "Format GML" menu action
This can be invoked via the Edit menu or with Ctrl+Alt+F. If the current
text in the editor can be parsed as valid GML, it will be formatted and
updated, otherwise an alert is shown (no specific error message as those
are only printed to the debug console in the parser for now).
If the source contains comments, which would be lost after formatting,
the user will be notified and has to confirm the action.
2021-01-03 22:12:08 +01:00
Linus Groh e608723031 LibGUI: Add GMLFormatter
This will be useful for both the Playground app as well as for a
standalone CLI tool (à la clang-format). It cannot handle comments yet
(and will drop them from the formatted output), but other than that it
produces valid GML that matches the formatting we have so far! :^)
2021-01-03 22:12:08 +01:00
Linus Groh acdbf66b54 LibGUI: Allow comment(s) before first class marker in GML parser
This wasn't considered valid GML but now is:

    // This is a comment
    // This as well
    @Foo::Bar {}
2021-01-03 22:12:08 +01:00
William Marlow 747e8de96a Kernel+Loader.so: Allow dynamic executables without an interpreter
Commit a3a9016701 removed the PT_INTERP header
from Loader.so which cleaned up some kernel code in execve. Unfortunately
it prevents Loader.so from being run as an executable
2021-01-03 19:45:16 +01:00
Andreas Kling 137237b9c2 ls: Use Core::File::real_path_for() 2021-01-03 19:16:39 +01:00
Tom c943ca95c4 Kernel: Fix ProcFS returning Inodes that are being deleted
There is a window between dropping the last reference and removing
a ProcFSInode from the lookup map. So, when looking up we need to
check if that Inode is being destructed.
2021-01-03 18:57:55 +01:00