Commit Graph

29740 Commits

Author SHA1 Message Date
thislooksfun
f8c98cbf55 LibGUI: Show autocomplete for Layout properties 2021-11-02 17:53:22 +01:00
thislooksfun
b0122744a6 LibGUI: Match layout classes even after you start typing
The previous commit fixed the issue with layout classes not being
suggested at all, but there was still another issue. Once you started
typing the class name a different suggester would take over and only
show widgets. This commit makes it so it still only suggests layouts
in that situation.

This, combined with the last commit, makes autocompleting layouts way
more discoverable and user-friendly. :^)
2021-11-02 17:53:22 +01:00
thislooksfun
f048d16be5 LibGUI: Correctly suggest layout classes
Previously when the GMLAutocompleteProvider was invoked just after the
'layout:' tag it would suggest nothing. This is because Layouts do not
inherit from Widget, so the two checks would always eliminate every
suggestion from the list. This patch makes it always suggest any
(registered) object that inherits from GUI::Layout.

This should make layouts more discoverable and easier to quickly use.
2021-11-02 17:53:22 +01:00
thislooksfun
989c111d65 LibGUI: Remove unnecessary curly braces
Not needed for the commit, but I always try to leave the code nicer
than I found it. :)
2021-11-02 17:53:22 +01:00
thislooksfun
416988cc7f LibGUI: Register layouts with inheritance 2021-11-02 17:53:22 +01:00
thislooksfun
6dc2749795 LibGUI: Register GUI::Layout
This will be used later to check inheritence.
2021-11-02 17:53:22 +01:00
thislooksfun
9cf9e604c3 LibCore: Add REGISTER_ABSTRACT_CORE_OBJECT
This behaves identically to REGISTER_CORE_OBJECT, but the resulting
ObjectClassRegistration's construct() method will always return null.
2021-11-02 17:53:22 +01:00
thislooksfun
c3b0b9057e LibCore+LibGUI: Make ObjectClassRegistration::construct() nullable
This lays the groundwork for allowing the registration of abstract
core objects, which will be needed for improved GML autocomplete.
2021-11-02 17:53:22 +01:00
Linus Groh
0e537e2e1f LibJS/Tests: Fix arg name in Instant.prototype.toZonedDateTime() test
"item", not "items".
2021-11-02 17:51:02 +01:00
Linus Groh
654380c2c2 LibJS: Implement Temporal.PlainDate.prototype.subtract() 2021-11-02 13:29:25 +01:00
Linus Groh
bcd96c80f3 LibJS: Implement Temporal.PlainDate.prototype.add() 2021-11-02 13:29:25 +01:00
Nicolas Danelon
b233cdde77 Documentation: Update BuildInstructionsMacOS.md
- gcc@10 is not available for M1, using gcc 11.
- the path to qemu is now dynamic
2021-11-02 12:24:39 +01:00
thislooksfun
03494ed6ba Meta: Add a check to ensure grep -P stays gone
grep -P does not work on macOS, but grep -E does.
2021-11-02 12:23:30 +01:00
thislooksfun
a984545a94 Meta: Run find in the current dir
macOS's find requires a leading search scope. Without this change this
lint step fails.
2021-11-02 12:23:30 +01:00
thislooksfun
19bd302f6a Meta: Adhere to latest ScriptCheck standards (SC2268) 2021-11-02 12:23:30 +01:00
thislooksfun
3e32acc3e4 Meta: Add special case for macOS
macOS's `find` does not support the '-executable' flag, nor does it
support the '-perm /' syntax, but we can make it work with a special
case.
2021-11-02 12:23:30 +01:00
thislooksfun
170e956c80 Meta: Remove unnecessary -i
Using `xargs -i <cmd> {}` is just doing the default behavior of xargs,
but with extra steps that also don't work on macOS.
2021-11-02 12:23:30 +01:00
thislooksfun
c2d44209a8 Meta: Use grep -E/F, not grep -P
grep -E and -F are POSIX standard, and meets all our matching needs.
2021-11-02 12:23:30 +01:00
Musab Kılıç
4de7b3ad24 PixelPaint: Map color_distance_squared from 0 to 1 2021-11-02 12:20:48 +01:00
Ben Wiederhake
686efb6737 ConfigureComponents: Reduce duplicated code 2021-11-02 11:36:23 +01:00
Brian Gianforcaro
9f6eabd73a Kernel: Move TTY subsystem to use KString instead of AK::String
This is minor progress on removing the `AK::String` API from the Kernel
in the interest of improving OOM safety.
2021-11-02 11:34:31 +01:00
Brian Gianforcaro
71f05c70b4 Kernel: Remove duplicate constructor from TTY/VirtualConsole
This removes some code dupe from the constructors.

By removing this duplicate constructor we can utilize the main
VirtualConsole::create factory implementation and call that from the
VirtualConsole::create_with_preset_log factory method.
2021-11-02 11:34:31 +01:00
Brian Gianforcaro
2c85f65519 Kernel: Switch BIOSSysFSComponent constructor to AK::StringView
These are constants, they don't need to be dynamically allocated.
Another minor step towards removing `AK::String` from the Kernel
and improving OOM safety.
2021-11-02 11:34:31 +01:00
Linus Groh
897471c852 Meta: Don't check for toolchain if serenity.sh target is lagom
This is just silly :^)

    $ serenity run lagom js
    WARNING: unknown toolchain 'js'. Defaulting to GNU.
             Valid values are 'Clang', 'GNU' (default)
2021-11-02 11:09:05 +01:00
Jelle Raaijmakers
0909bbfe38 Documentation: Update required Qemu dev packages
Without `libspice-server-dev`, Qemu will build without SPICE support.
2021-11-02 11:08:17 +01:00
Ben Wiederhake
59619572d6 LibThreading: Remove redundant method 2021-11-02 11:07:26 +01:00
Ben Wiederhake
17d95bc1db Utilities: Remove misbehaving-application
This used to be a target to demonstrate a bug in Inspector (#3159).
However, now that the inspection direction has inverted, this no longer
makes any sense.
2021-11-02 11:07:07 +01:00
Idan Horowitz
19e28d5798 LibWeb: Convert is_named_property_exposed_on_object to ThrowCompletions
This is the last usage of old-style exceptions in the WrapperGenerator.
2021-11-02 10:41:25 +02:00
Linus Groh
07b0aded99 LibJS: Implement Temporal.PlainDateTime.prototype.subtract() 2021-11-02 09:24:35 +01:00
Linus Groh
c4e371b3da LibJS: Implement Temporal.PlainDateTime.prototype.add() 2021-11-02 09:24:35 +01:00
Linus Groh
643a2433db LibJS: Enable Temporal.Calendar.prototype.dateAdd() test that now passes 2021-11-02 09:24:35 +01:00
Linus Groh
d49bbb1da3 LibJS: Implement TODO()'d parts of balance_duration()
Massive :yakstack:, so I understand why it was skipped in the first
place :^)
2021-11-02 09:24:35 +01:00
Luke Wilde
17fd08d752 LibJS: Implement Temporal.PlainTime.prototype.subtract()
a
2021-11-01 23:51:23 +01:00
Luke Wilde
4bf391ff4b LibJS: Implement Temporal.PlainTime.prototype.add() 2021-11-01 23:51:23 +01:00
Linus Groh
97f6c6029f LibJS: Implement Temporal.TimeZone.prototype.getInstantFor() 2021-11-01 21:39:45 +01:00
Ben Wiederhake
55e1edd51b Meta: Check auto-generated manpages for completeness on CI 2021-11-01 21:12:58 +01:00
Ben Wiederhake
50a65f02a8 Manpages: Auto-generate many through ArgsParser
This set was hand-curated, guided by the questions:
- Does it have at least three options, i.e. is the help page
  non-trivial?
- Is the program unusual, i.e. does listing it in Help or on
  man.serenityos.org spread awareness?
- Is the program common, but we only implement a subset of 'common'
  flags?
2021-11-01 21:12:58 +01:00
Ben Wiederhake
a4e805756d Meta: Add script to generate and export manpages 2021-11-01 21:12:58 +01:00
Ben Wiederhake
2caad04d23 Base: Add new system-mode that just generates manpages 2021-11-01 21:12:58 +01:00
Ben Wiederhake
70c7861c33 UserspaceEmulator: Avoid special character in pseudo-identifier
In the generated HTML code, '#' gets interpreted as the beginning of a
shell comment, which throws the syntax highlighting off. Regardless,
spelling out the meaning of the '#' might make it more readable.
2021-11-01 21:12:58 +01:00
Ben Wiederhake
ea9f2f80a1 LibCore: Make ArgsParser '--help' description more general
Now that the output may end up in Markdown files (and thus the website),
the help message should no longer be self-referential.
2021-11-01 21:12:58 +01:00
Ben Wiederhake
0372f051e9 LibCore: Enable emitting markdown from ArgsParser
ArgsParser will now automatically look for an environment variable
'ARGSPARSER_EMIT_MARKDOWN', and if it is set to exactly the string "1"
(i.e. mere presence or values like "ON" or "yes" are not enough), then
ArgsParser will emit a Markdown-formatted help message, instead of the
regular help message designed for consumption through a terminal.
2021-11-01 21:12:58 +01:00
Ben Wiederhake
d2f9fee4ab LibMarkdown: Recognize and handle comments
This also improves Commonmark coverage, e.g. it fixes tests
HTML_blocks_ex179_2894..2906 and Lists_ex308_5439..5457.

In other words, we go from 271 out of 652 to 273 out of 652.
2021-11-01 21:12:58 +01:00
Ben Wiederhake
3ec87ecc75 Base: Don't start unnecessary services in self-test
These services weren't actually needed or tested. This should speed up
tests a bit. Even if it doesn't, at least we don't do unnecessary work.
2021-11-01 21:12:58 +01:00
Ben Wiederhake
c840ed12f4 Manpages: Document path of crash(1)
As /usr/Tests/Kernel/ is not in $PATH, invoking crash(1) does not work
as documented.
2021-11-01 21:12:58 +01:00
Ben Wiederhake
28195032a3 profile: Don't treat '--help' as an error
profile seems to be the only program treating '--help' as an error.
Let's change that.
2021-11-01 21:12:58 +01:00
Ben Wiederhake
b8f11b1bae Everywhere: Remove unused ArgsParser header
Found while trying to enumerate all programs that use ArgsParser.
2021-11-01 21:12:58 +01:00
Tim Schumacher
02446a5431 Ports: Enable SDL support in Angband 2021-11-01 11:34:25 +01:00
Ben Wiederhake
4e1318fb0e less: Fix condition to read more data
While mathematically equivalent, the presence of a size_t forces the
comparison to work with size_t's. This means that '-1 < 0' is false,
contrary to the 'mathematically pure' interpretation of the inequality.
2021-11-01 10:55:10 +01:00
Ben Wiederhake
5096f9cff5 hexdump: Avoid using read_all
I like using hexdump to 'have a look' at binary files, for example
/dev/random or /dev/hda. Obviously, this usecase requires that hexdump
tries not to buffer the 'entire' device.
2021-11-01 10:55:10 +01:00