Commit graph

30616 commits

Author SHA1 Message Date
Andreas Kling 984cf1fe7a DisplaySettings: Port to LibMain :^) 2021-11-28 08:10:53 +01:00
Emir Sarı 343de29652 Keymaps: Add Turkish-F Keymap 2021-11-28 08:06:28 +01:00
Liav A ed5a4f2938 Kernel/Storage: Restore booting from MBR partitions functionality
We had such functionality in the past, but it was regressed and now is
restored.
2021-11-28 08:05:58 +01:00
Brian Gianforcaro cf4fa936be Everywhere: Use default execpromises argument for Core::System::pledge 2021-11-28 08:04:57 +01:00
Brian Gianforcaro 44ffe3e5bb LibCore: Allow System::pledge execpromises argument to be omitted
It appears that we don't have almost no cases of a callers passing
exec promises when they call `pledge()`. To simplify the code a bit we
add a default parameter that will pass nullptr for us to `pledge()`.
2021-11-28 08:04:57 +01:00
Brian Gianforcaro fcc00c9a27 LibCore+cat: Switch Core::System::read/write to take a Span of bytes
In the spirit of the Core::System name space having "modern" facades
for classically C functions / Kernel interfaces, it seems appropriate
that we should take Span's of data instead of raw pointer + length
arguments.
2021-11-28 08:04:57 +01:00
Brian Gianforcaro eb896aa33e Settings: Convert to TRY + serenity_main(..) 2021-11-28 08:04:57 +01:00
Linus Groh 908d943e85 LibJS: Parse TemporalInstantString as part of TemporalCalendarString 2021-11-27 23:54:38 +00:00
Lady Gegga a94223afd0 Base: Add Lisu characters to font Katica Regular 10
A4D0–A4FF https://www.unicode.org/charts/PDF/UA4D0.pdf
2021-11-27 14:59:15 -08:00
Linus Groh 8f99c05f97 LibJS: Implement Temporal.PlainYearMonth.prototype.since() 2021-11-27 19:11:31 +00:00
Linus Groh bdd2c357fd LibJS: Implement Temporal.PlainYearMonth.prototype.until() 2021-11-27 19:11:31 +00:00
Linus Groh 6f2e0b3355 LibJS: Implement Temporal.PlainYearMonth.prototype.subtract() 2021-11-27 17:48:04 +00:00
Linus Groh acbcd64cdc LibJS: Implement Temporal.PlainYearMonth.prototype.add() 2021-11-27 17:48:04 +00:00
Pedro Pereira d748f2bea2 Spider: TRY() all the things in serenity_main() :^) 2021-11-27 17:18:44 +01:00
Pedro Pereira 206847c37d Solitaire: TRY() all the things in serenity_main() :^) 2021-11-27 17:18:44 +01:00
Pedro Pereira d2e9b122e0 Snake: TRY() all the things in serenity_main() :^) 2021-11-27 17:18:44 +01:00
Pedro Pereira 498d8bf1d7 Pong: TRY() all the things in serenity_main() :^) 2021-11-27 17:18:44 +01:00
Pedro Pereira aa2bc6fd47 Minesweeper: TRY() all the things in serenity_main() :^) 2021-11-27 17:18:44 +01:00
Pedro Pereira 1211a3a3f3 Hearts: TRY() all the things in serenity_main() :^) 2021-11-27 17:18:44 +01:00
Pedro Pereira ee3b14fc38 GameOfLife: TRY() all the things in serenity_main() :^) 2021-11-27 17:18:44 +01:00
Pedro Pereira 2f5f53d1cf FlappyBug: TRY() all the things in serenity_main() :^) 2021-11-27 17:18:44 +01:00
Pedro Pereira 45e29d58e2 Chess: TRY() all the things in serenity_main() :^) 2021-11-27 17:18:44 +01:00
Pedro Pereira 5caa9311d7 Breakout: TRY() all the things in serenity_main() :^) 2021-11-27 17:18:44 +01:00
Pedro Pereira d56e4d5145 2048: TRY() all the things in serenity_main() :^) 2021-11-27 17:18:44 +01:00
Lady Gegga e91cf53e67 Base: Add Lydian and NKo characters to font Katica Regular 10
10920–1093F, 07C0–07FF
2021-11-27 15:01:55 +00:00
kleines Filmröllchen 1ff48a3ca4 Terminal: Modernize terminal settings as a standalone application
The settings for Terminal are extracted into their own application,
TerminalSettings, which is reachable over the normal Settings menu as
well as the same place in the Terminal menu. The font settings are moved
into these settings as well, which are now split up into the "Terminal"
and "View" tabs. The font settings themselves receive an option to
override the selected font with the system default on the user side.
The live update behavior of all of the terminal settings is retained.

The layout of the new TerminalSettings is based around the other
Settings applications, but pixel-perfectness is missing in some places.
It's a bit fiddly and I'd like to have some better GUI::Label auto-size
behavior, but oh well :^)
2021-11-27 12:45:44 +01:00
kleines Filmröllchen 12468e036b Base: Set a default value for terminal scrollback size
This setting was previously defaulted in the terminal setting code,
which will be removed in the next step.
2021-11-27 12:45:44 +01:00
kleines Filmröllchen 1e9554145e LibGUI: Add a cancel button callback to settings window tabs
Some settings tabs, like the ones on the upcoming terminal settings,
need to know when the cancel button is pressed to clean up things like
temporary live updates. Therefore, the SettingsWindow::Tab now features
a cancel_settings callback which does not need to be implemented.
2021-11-27 12:45:44 +01:00
Brian Gianforcaro 72e9d024b9 Settings: Fix launch of settings dialog
There was a bug report on discord where someone mentioned that
launching the keyboard settings always crashed. When looking
at the backtrace it became clear we were calling down the
`AppFile::executable()` path on uninitialized memory.

We can fix this by using the "official" API for obtaining data
from the GUI ModelIndex, instead of casting random memory to
the object type we expect it to be. :^)

Validated this fixes the issue for me locally.
2021-11-27 11:24:31 +01:00
Kenneth Myhra f25466ae08 bt: Port to LibMain :^) 2021-11-27 11:14:16 +01:00
Kenneth Myhra 951d8a06d8 LibCore: Add syscall wrapper for gethostname() 2021-11-27 11:14:16 +01:00
Kenneth Myhra 8c4625e3b1 asctl: Port to LibMain :^) 2021-11-27 11:14:16 +01:00
Kenneth Myhra 880888fcc7 aplay: Port to LibMain 2021-11-27 11:14:16 +01:00
Kenneth Myhra 494f177d22 allocate: Port to LibMain :^) 2021-11-27 11:14:16 +01:00
Marcus Nilsson 67f349be46 PixelPaint: Keep a RefPtr to offset_text_box in EditGuideDialog
Keep a RefPtr to offset_text_box in EditGuideDialog instead of using
a local pointer. Previously the lambda in ok_button.on_click() would
outlive the local variable causing a crash.
2021-11-27 11:04:48 +01:00
Brian Gianforcaro 95c0ec9afc Tests: Fix TestLibCoreArgsParser with add_positional_argument API change
Since we no longer populate a Vector<String> the lifetime of the strings
in all of these tests is now messed up, as the Vector<StringView> now
points to free'd memory.

We attempt to fix this for the unit tests, by saving the results in a
RAII type that should live as long as the test wants to validate some
output of the ArgParser.
2021-11-26 18:57:26 -08:00
Brian Gianforcaro f807796380 UserspaceEmulator: Fix after add_positional_argument API change :^)
Get UE compiling again after the Vector<String> API was changed to
Vector<StringView>.
2021-11-26 16:47:39 -08:00
Idan Horowitz 957f54d96f LibJS: Throw InternalErrors instead of Errors on CallStackSizeExceeded
These seem more appropriate.
2021-11-27 01:58:05 +02:00
Andreas Kling 7341faceeb cat: Remove accidentally-committed unused macro 2021-11-27 00:48:44 +01:00
Andreas Kling 1ded1ed963 Run: Port to LibMain :^) 2021-11-26 23:27:57 +01:00
Andreas Kling 0b8fb8358e cp: Port to LibMain :^) 2021-11-26 23:27:57 +01:00
Andreas Kling f1cc3d0fc4 Userland: Use Core::ArgsParser's Vector<StringView> API everywhere
...and remove the Vector<String> variant since there are no remaining
users of this API.
2021-11-26 23:27:57 +01:00
Andreas Kling 395ba619d8 LibCore: Add Vector<StringView> variant of add_positional_argument() 2021-11-26 23:27:57 +01:00
Andreas Kling 5bf6503ed1 cat: Use TRY() and LibCore syscall wrappers a lot more :^) 2021-11-26 23:27:57 +01:00
Jelle Raaijmakers 58bcb93777 Kernel: Implement variable rate audio support for AC97 devices
Previously we `VERIFY()`ed that the device supports variable-rate audio
(VRA). Now, we query the VRA bit and if VRA is not supported, we do not
enable double-rate audio and disallow setting any sample rate except
the fixed 48kHz rate as defined by the AC'97 specification. This should
allow the driver to function on a wider array of hardware.

Note that in the AC'97 specification, DRA without VRA is allowed when
supported: this effectively doubles the sample rate to 96kHZ. For now,
we ignore that possibility and let it default to 48kHZ.
2021-11-26 22:15:29 +01:00
Sam Atkins 377a984905 Settings: Make sure settings are listed in alphabetical order
DirectoryIterator, and so `Desktop::AppFile::for_each()`, doesn't
guarantee anything about the order, so we manually sort afterwards.
Which means using a manual version of NonnullRefPtrVector, since that
doesn't support `quick_sort()`.
2021-11-26 22:14:56 +01:00
Sam Atkins 705b7fc407 Browser: Allow custom search engine URLs that don't start http[s]:// 2021-11-26 22:14:56 +01:00
Sam Atkins a1e1405f26 BrowserSettings: Add some icons for it :^) 2021-11-26 22:14:56 +01:00
Sam Atkins c22b0bb8b2 Browser+Base: Delete provided Browser.ini file
Having files in Base's user `.config` folder means that every time the
Serenity image is built, all user settings in that file are thrown away.
So, let's not do that! :^)

Modified the default value for the homepage url to match what was in
Browser.ini, so there is no visible change.
2021-11-26 22:14:56 +01:00
Sam Atkins e84b3e7110 BrowserSettings: Implement restoring default values 2021-11-26 22:14:56 +01:00