Other shells also support a number of other options with exec and
some have special behaviour when calling exec with no arguments except
redirections.
This PR only supports the basic case of replacing the Shell process
(or LibShell host process) with the provided command.
Instead of hard-coding 22 in random places, just make the following
widgets have a fixed height of 22 by default: Button, CheckBox,
ColorInput, ComboBox, RadioButton, SpinBox, TextBox.
In the future we can make this relative to the current font size,
but for now at least this centralizes the setting a bit better.
This patch removes size policies and preferred sizes, and replaces them
with min-size and max-size for each widget.
Box layout now works in 3 passes:
1) Set all items (widgets/spacers) to their min-size
2) Distribute remaining space evenly, respecting max-size
3) Place widgets one after the other, adding spacing in between
I've also added convenience helpers for setting a fixed size (which is
the same as setting min-size and max-size to the same value.)
This significantly reduces the verbosity of widget layout and makes GML
a bit more pleasant to write, too. :^)
Fixed sizes are really just shorthands for setting min and max size to
the same value.
This makes it much nicer to express fixed sizes in GML:
Before:
@GUI::Widget {
horizontal_size_policy: "Fixed"
preferred_width: 20
}
After:
@GUI::Widget {
fixed_width: 20
}
This makes them shrink when the taskbar fills with too many buttons.
It doesn't scale to infinity open windows, but it's better than them
escaping off screen after 6 open windows. :^)
This patch adds min_size and max_size properties to GUI::Widget. These
can also be accessed as min_width/min_height and max_width/max_height.
Layouts will respect these constraints and size widgets accordingly.
Resources embedded by the embed_resource() function will now also expose
a SECTION_start and SECTION_size symbol so the embedded resource can be found
by an application without having to parse its own ELF image which is not
something applications can currently do from userspace.
* Add SERENITY_ARCH option to CMake for selecting the target toolchain
* Port all build scripts but continue to use i686
* Update GitHub Actions cache to include BuildIt.sh
This fixes 4 issues:
- RECONSUME_IN_RETURN_STATE was functionally equivalent to
SWITCH_TO_RETURN_STATE, which caused us to lose characters.
For example, &test= would lose the =
- & characters by themselves would be lost. For example, 1 & 2
would become 1 2. This is because we forgot to flush
characters in the the ANYTHING_ELSE path in CharacterReference
- Named character references didn't work at all in attributes.
This is because there was a path that was checking the entity
code points instead of the entity itself. Plus, the path that
was checking the entity itself wasn't quite spec compliant.
- If we fail to match a named character reference, the first
character is lost. For example &test would become &est.
However, this relies on a little hack since I can't wrap my
head around on how to change the code to do as the spec says.
The hack is to reconsume in AmbigiousAmpersand instead of
just switching to it.
Fixes#3957
Such errors are raised when SyntaxError nodes are executed, and are also
used for internal control flow.
The 'break' and 'continue' commands are currently only allowed inside
for loops, and outside function bodies.
This also adds a 'loop' keyword for infinite loops.
This builtin takes a bunch of strings, resolves them as globs (in the
current directory) and prints out the matching entries.
Its main use is to allow dynamic glob resolution:
```sh
glob "$whatever/*"
```
This is a simple application that can read a coredump file and display
information regarding the crash, like the application's name and icon
and a backtrace. It will be launched by CrashDaemon whenever a new
coredump is available.
Also, it's mostly written in GML! :^)
Closes#400, but note that, unlike mentioned in that issue, this
implementation doesn't ignore applications that "have been started in
the terminal". That's just overcomplicating things, IMO. When my js(1)
REPL segfaults, I want to see a backtrace!
Creating a backtrace from a crashdump already existed as a few
standalone functions in CrashDaemon. This patch refactors the code
required for this to make it generally usable and moves it to
CoreDump::Backtrace, which provides both raw data as well as
stringification.
This makes it possible to construct a read-only (or display-only)
TextEditor in GML:
@GUI::TextEditor {
mode: "ReadOnly"
text: "Well hello friends! :^)"
}
This can be used to register a property that maps enum values to certain
strings, e.g.
REGISTER_ENUM_PROPERTY(
property_name, getter, setter, Enum,
{ Enum::Foo, "Foo" },
{ Enum::Bar, "Bar" });
Also use it for REGISTER_SIZE_POLICY_PROPERTY :^)
As mentioned in 2d39da5 the usual pattern is that LibFoo provides a Foo
namespace - LibCoreDump doesn't, so this renames CoreDumpReader to
Reader and puts it in the CoreDump namespace. :^)