Commit Graph

33484 Commits

Author SHA1 Message Date
Joel Hansen
fbd4c73fa7 Base: Add "Zenburn" terminal color theme
Port of the "Zenburn-like" theme present in the "Foot" terminal emulator
by Daniel Eklöf. Original by Jani Nurminen.
2022-01-28 06:40:53 +00:00
Joel Hansen
e3aa7723fa Base: Add "Dracula" terminal color theme
Port of the "Dracula" theme by Zeno Rocha.
2022-01-28 06:40:53 +00:00
Joel Hansen
6a76f94426 Base: Add "Gruvbox" terminal color themes
Port of the "Gruvbox" light and dark themes by Pavel Pertsev.
2022-01-28 06:40:53 +00:00
Joel Hansen
03037d1d3d Base: Add "Nord" terminal color theme
Port of the "Nord" theme by Arctic Ice Studio and Sven Greb.
2022-01-28 06:40:53 +00:00
Andreas Kling
3c3c2334fa LibGUI: Alphabetize the available entries in CommandPalette 2022-01-27 23:26:06 +01:00
Andreas Kling
30d4f4b010 LibGUI: Show action icons in CommandPalette when available :^) 2022-01-27 23:26:06 +01:00
Andreas Kling
3e7e52c5f0 LibGUI: Add a universally available "command palette" to GUI programs
You can now press Ctrl+Shift+A in any LibGUI application and we'll give
you a command palette dialog where you can search for context-relevant
actions by name (via the keyboard.)

The set of actions is currently the same one you'd access via keyboard
shortcuts. In the future, we'll probably want to add APIs to allow
richer integrations with this feature.
2022-01-27 23:26:06 +01:00
Andreas Kling
e0b60d56a5 LibGUI: Make FilteringProxyModel::data() support multi-column data
While the rows are filtered, we can't just return data from column 0
every time, since that breaks underlying multi-column models.
Instead, simply forward the incoming index.
2022-01-27 23:26:06 +01:00
Andreas Kling
af532b22c8 LibGUI: Fix bogus return value on error in FilteringProxyModel::data()
Return an empty GUI::Variant on indexing error.
2022-01-27 23:26:06 +01:00
Andreas Kling
e12d2f9a04 LibGUI: Fix bogus root index column_count() in FilteringProxyModel
The root index (ModelIndex()) should should have the same column count
as the root index in the underlying model.
2022-01-27 23:26:06 +01:00
Mathieu PATUREL
9ec826144f LibGUI: Don't skip non-skipable spans on ctrl+right
Just a couple of typos in
`TextDocument::first_non_skippable_span_after`.
2022-01-27 23:01:19 +01:00
Ali Mohammad Pur
66dcb0123a Ports: Explain some new patch script options and features in the README
This explains:
- `package.sh dev [--no-depends]`
- `use_fresh_config_sub` & `config_sub_path`
2022-01-27 23:01:05 +01:00
Ali Mohammad Pur
e79a766901 Ports: Make 'package.sh dev' a bit more friendly when importing patches
When a git patch that doesn't apply is encountered, start a git am
session and _then_ drop the user in it instead of expeting the user to
start the session on their own.
Also prompt for leftover files and delete them if the user does not want
them.
2022-01-27 23:01:05 +01:00
Ali Mohammad Pur
bf82d9b5d7 AK: Simplify Variant's explicit overload detection mechanism a bit
This also allows us to remove the max-64-visitors restriction, and so
removes that assertion.
2022-01-28 00:50:04 +03:30
Timothy Flynn
a2e791277e LibJS: Implement Intl.RelativeTimeFormat.prototype.formatToParts 2022-01-27 21:16:44 +00:00
Timothy Flynn
9c5d7e515c LibJS: Implement Intl.RelativeTimeFormat.prototype.format 2022-01-27 21:16:44 +00:00
Timothy Flynn
8098eb273a LibJS: Add explicit constructors for PatternPartition
This is to enable emplacing this struct in containers. GCC is fine with
emplacing without this constructor, but Clang raises an error.
2022-01-27 21:16:44 +00:00
Timothy Flynn
236fd0a2cb LibJS: Change RelativeTimeFormat::number_format to return a reference
In the one place this will be used, we will know that the NumberFormat
object is non-null. So return a reference, as the AO it is passed off to
also expects a reference.
2022-01-27 21:16:44 +00:00
Timothy Flynn
90e68bca6a LibJS: Add missing spec link for InitializeRelativeTimeFormat 2022-01-27 21:16:44 +00:00
Timothy Flynn
f8892fdea2 LibUnicode: Templatize our naive implementation of plurality selection
As we didn't (and still don't) have Intl.PluralRules when we implemented
Intl.NumberFormat, we use a locale-unaware basic implementation to pick
a pattern based on a number's value. Templatize this method for now to
work other other format-like structures (will be used for relative-time
formatting).
2022-01-27 21:16:44 +00:00
Timothy Flynn
789f093b2e LibUnicode: Parse and generate relative-time format patterns
Relative-time format patterns are of one of two forms:

    * Tensed - refer to the past or the future, e.g. "N years ago" or
      "in N years".
    * Numbered - refer to a specific numeric value, e.g. "in 1 year"
      becomes "next year" and "in 0 years" becomes "this year".

In ECMA-402, tensed and numbered refer to the numeric formatting options
of "always" and "auto", respectively.
2022-01-27 21:16:44 +00:00
Timothy Flynn
27eda77c97 LibUnicode: Create a nearly empty generator for relative-time formatting
This sets up the generator plumbing to create the relative-time data
files. This data could probably be included in the date-time generator,
but that generator is large enough that I'd rather put this tangentially
related data in its own file.
2022-01-27 21:16:44 +00:00
Timothy Flynn
589e7354fb LibUnicode: Remove extraneous semi-colons at end of generator functions 2022-01-27 21:16:44 +00:00
Lenny Maiorani
25272cabef LibSoftGPU: Reduce Clipper class interface to minimum
Much of the `Clipper` class can be made free functions and their scope
limited.

The purpose of this is to prepare the interface for a change to more
compile-time dispatch.
2022-01-27 20:42:28 +00:00
Lenny Maiorani
d1a87f1219 LibSoftGPU: Use default construction to clear AlphaBlendFactors
Clearing the `m_alpha_blend_factors` is performed manually and in
separate steps. This is error prone for future developers. The
behavior is to reset the entire `struct` to the same state as default
initialization, so this simplifies it to do just that.
2022-01-27 20:39:02 +00:00
Lenny Maiorani
229188b815 LibGL: Set rasterizer material state without copying
Each of the material faces is copied member by member then the copied
material state is passed by `const&` to another function, then
destroyed.

This is changed to simply passing the material state directly without
copying.
2022-01-27 20:35:38 +00:00
Lenny Maiorani
354017e01d LibGL: Set rasterizer light state without copying
There is a loop over the lights in which each light state is copied
member by member then the copied light state is passed by `const&` to
another function, then destroyed.

This is changed to simply passing the light state directly without
copying.
2022-01-27 20:33:46 +00:00
Timothy Flynn
cf92bc42a2 LibJS: Respect per-locale minimum grouping digits when number formatting 2022-01-27 20:30:52 +00:00
Timothy Flynn
2d2f713426 LibUnicode: Generate per-locale minimum grouping digit values
Previously, we were breaking up digits into groups without regard for
the locale's minimumGroupingDigits value in the CLDR. This value is 1 in
most locales, but is 2 in locales such as pl-PL. What this means is that
in those locales, the group separator should only be inserted if the
thousands group has at least 2 digits. So 1000 is formatted as "1,000"
in en-US, but "1000" in pl-PL. And 10000 is "10,000" in en-US and
"10 000" in pl-PL.
2022-01-27 20:30:52 +00:00
Timothy Flynn
236025df19 LibJS: Prevent implicit pointer-to-bool conversion in Value constructor
For example, say you try to create a Value from an Array and forgot to
include LibJS/Runtime/Array.h. This would cause the boolean constructor
to be used instead of a compile error.
2022-01-27 16:27:00 +00:00
Timothy Flynn
01395169dc AK: Export the SameAs concept 2022-01-27 16:27:00 +00:00
brapru
2af9a8e862 ping: Port to LibMain 2022-01-27 12:56:07 +01:00
Andreas Kling
31c1094577 Kernel: Don't mess with thread state in Process::do_exec()
We were marking the execing thread as Runnable near the end of
Process::do_exec().

This was necessary for exec in processes that had never been scheduled
yet, which is a specific edge case that only applies to the very first
userspace process (normally SystemServer). At this point, such threads
are in the Invalid state.

In the common case (normal userspace-initiated exec), making the current
thread Runnable meant that we switched away from its current state:
Running. As the thread is indeed running, that's a bogus change!
This created a short time window in which the thread state was bogus,
and any attempt to block the thread would panic the kernel (due to a
bogus thread state in Thread::block() leading to VERIFY_NOT_REACHED().)

Fix this by not touching the thread state in Process::do_exec()
and instead make the first userspace thread Runnable directly after
calling Process::exec() on it in try_create_userspace_process().

It's unfortunate that exec() can be called both on the current thread,
and on a new thread that has never been scheduled. It would be good to
not have the latter edge case, but fixing that will require larger
architectural changes outside the scope of this fix.
2022-01-27 11:18:25 +01:00
Andreas Kling
b7d316d291 RequestServer: Make Request::url() virtual
Let the Request subclass decide how they store the URL instead of
storing it in a Request member.
2022-01-27 09:56:24 +01:00
Andreas Kling
f73eae1245 WebServer: Unveil /etc/timezone for reading 2022-01-27 09:56:24 +01:00
Lady Gegga
692c6aeeed Base: Change Myanmar Extended-B codepoints in font Katica Regular 10
Move Myanmar Extended-B from 19E0-19FE to the correct range A9E0-A9FE
2022-01-27 03:39:39 +00:00
Lady Gegga
b5c83fd188 Base: Add Cherokee Supplement to font Katica Regular 10
AB70-ABBF https://www.unicode.org/charts/PDF/UAB70.pdf
2022-01-27 03:39:39 +00:00
Lady Gegga
330c89fc77 Base: Add Myanmar Extended-B to font Katica Regular 10
A9E0-A9FE https://www.unicode.org/charts/PDF/UA9E0.pdf
2022-01-27 03:39:39 +00:00
Lady Gegga
5d53b96feb Base: Add Rejang to font Katica Regular 10
A930-A95F https://www.unicode.org/charts/PDF/UA930.pdf
2022-01-27 03:39:39 +00:00
Lady Gegga
77ff587f68 Base: Add Nabataean to font Katica Regular 10
10880-108AF https://www.unicode.org/charts/PDF/U10880.pdf
2022-01-27 03:39:39 +00:00
Lady Gegga
dce3020edb Base: Add some Alphabetic Presentation Forms to font Katica Regular 10
FB00-FB06 https://www.unicode.org/charts/PDF/UFB00.pdf
2022-01-27 03:39:39 +00:00
Lady Gegga
f32cc29a3d Base: Add some Alphabetic Presentation Forms to font Tiny Regular 6
FB00-FB02, FB05-FB06
https://www.unicode.org/charts/PDF/UFB00.pdf
2022-01-27 03:39:39 +00:00
thankyouverycool
7beea36052 LibGUI+LoginServer: Use default buttons in InputBox and LoginWindow 2022-01-26 23:19:54 +01:00
thankyouverycool
f77ac3a73c LibGUI: Allow Buttons to set themselves as default
Several apps were implementing this behavior ad hoc. This provides
a standard API as well as a comfy visual cue for default return key
behavior.
2022-01-26 23:19:54 +01:00
thankyouverycool
aefe3ef539 LibGUI: Allow Windows to set a default return key widget
The default return key widget takes precendence when dispatching
return key events with the exception of focused buttons.
2022-01-26 23:19:54 +01:00
Idan Horowitz
ac4583660b Kernel: Make VirtIO::ConsolePort construction OOM-fallible 2022-01-26 22:07:01 +00:00
Idan Horowitz
94a39db31d Kernel: Add try_create_device overload for static factory functions
This makes sure DeviceManagement::try_create_device will call the
static factory function (if available) instead of directly calling the
constructor, which will allow us to move OOM-fallible calls out of
Device constructors.
2022-01-26 22:07:01 +00:00
Idan Horowitz
9259bce34e Kernel: Remove unimplemented is_device_event_queue_ready_to_read method 2022-01-26 22:07:01 +00:00
Idan Horowitz
e729c3ae36 Kernel: Add missing nothrow tag to DeviceManagement::try_create_device
Without this tag this method was essentially a must_create.
2022-01-26 22:07:01 +00:00
Idan Horowitz
a0f404551e Kernel: Ignore allocation failures during thread finalization
We ignore allocation failures above the first 32 guaranteed thread
slots, and just flag our future-selves to finalize these threads at a
later point.
2022-01-26 22:05:34 +00:00