Commit graph

13249 commits

Author SHA1 Message Date
Rummskartoffel
0c88a53d4c UserspaceEmulator: Convert virt$ioctl to use switch-case 2022-01-29 11:22:43 +01:00
networkException
fcd97a3e19 LibGUI: Show radio buttons for checkable actions in CommandPalette
This patch adds a painting delegate to the icon column of CommandPalette
to show a radio button in case an action is checkable and does not
explicitly have an icon :^)
2022-01-29 11:22:02 +01:00
networkException
b67d4ab52f LibGUI: Allow falling back to default paint behavior in delegate
This patch adds a method that can optionally be implemented to allow
a TableCellPaintingDelegate to fall back to the default painting in a
View.
2022-01-29 11:22:02 +01:00
networkException
e2df145e14 WindowServer: Allow checking checkable entries in a menu using space 2022-01-29 11:22:02 +01:00
Ali Mohammad Pur
e72521f286 LibCoredump: Copy out the FooInfo structs to an aligned address
We were handing out unaligned pointers to these, which made UBSAN super
mad, copy them out to avoid that.
2022-01-28 22:51:27 +00:00
Ali Mohammad Pur
e0db9cb876 LibDebug+LibCoredump: Replace remaining reinterpret_casts and C casts
You misused your toys and I'm now taking them away, reflect on what you
did wrong for a bit.
2022-01-28 22:51:27 +00:00
Ali Mohammad Pur
da3c4e5df5 LibDebug+LibCoredump: Use ByteReader to do unaligned reads
The previous solution of "lol whats a UB" was not nice and tripped over
itself when it was run under UBSAN, fix this by doing explicit
byte-by-byte reads where needed.
2022-01-28 22:51:27 +00:00
Ali Mohammad Pur
6d64b13a1b LibDebug+Everywhere: Avoid void* -> FlatPtr -> void* dance
And limit the `void*` to the functions that interface the system (i.e.
ptrace wrappers).
This generally makes the code less riddled with casts.
2022-01-28 22:51:27 +00:00
kleines Filmröllchen
145eeb57ab Userland: Remove a bunch of unnecessary Vector imports
How silly :^)
2022-01-28 23:40:25 +01:00
kleines Filmröllchen
4efe6210ee Applets/Audio: Use Array for the volume level bitmaps 2022-01-28 23:40:25 +01:00
kleines Filmröllchen
cab6384966 HexEditor: Use Array in FindDialog's options 2022-01-28 23:40:25 +01:00
kleines Filmröllchen
1a8c8d2383 Chess: Don't use Vector in a literal iterator 2022-01-28 23:40:25 +01:00
kleines Filmröllchen
a79a9fb692 LibAudio: Use ArrayLike concept to remove duplicate Buffer constructor 2022-01-28 23:40:25 +01:00
Daniel Bertalan
6003b6f4d3 LibTextCodec: Do not allocate the various decoders
These objects contain no data members, so there is no point in creating
1-byte heap allocations for them. We don't need to have them as static
local variables, as they are trivially constructible, so they can simply
be global variables.
2022-01-28 23:31:00 +01:00
Daniel Bertalan
7d11edbe17 Userland: Fix unnecessary heap allocation of singleton objects
In order to avoid having multiple instances, we were keeping a pointer
to these singleton objects and only allocating them when it was null.

We have `__cxa_guard_{acquire,release}` in the userland, so there's no
need to do this dance, as the compiler will ensure that the constructors
are only called once.
2022-01-28 23:31:00 +01:00
Ali Mohammad Pur
c1184c1fde RequestServer: Replace disconnected sockets in the grace period too
We previously only replaced disconnected sockets on the queued-request
path, leading to attempts to send requests on a disconnected socket if
the disconnection happened in the deletion grace period.
2022-01-28 23:29:32 +01:00
Timothy Flynn
b387ac56b6 LibCore: Change DateTime format strings to be StringViews
There's no need to allocate a String for these. Note the "string"
parameter of DateTime::parse is left as a String for now; the parser is
currently using strtol which needs a NUL-terminated string. This method
can likely be rewritten with GenericLexer.
2022-01-28 20:19:05 +00:00
Timothy Flynn
9c80430eea LibCore: Remove time zone from default format string
The default format string is used in many applications/services like
FileManager/FileSystemAccessServer. Showing the time zone in e.g. the
last modified time for every file in FileManager is feeling a bit over
the top, so let's revert this change and assume the user is smart enough
to know what time zone they are in.
2022-01-28 20:19:05 +00:00
Timothy Flynn
5ca1c54c27 date: Use an explicit time format string for default option
This is to prepare for removing the time zone from DateTime's default
format string. The date utility on most system show time zone by default
so let's keep that.
2022-01-28 20:19:05 +00:00
Ali Mohammad Pur
58ed00f633 run-tests: Dump a backtrace for crashed tests
It only makes sense to see what a crashed test was up to, so generate a
backtrace if we can find the coredump and read it.
2022-01-28 20:18:46 +00:00
Ali Mohammad Pur
1c121d7488 js: Use generic reference instead of Variant<A,B>
As the two types are used in exactly the same way, just make the lambda
generic over the type instead of explicitly moving them into a variant
and then visiting with a generic lambda.
2022-01-28 20:18:46 +00:00
Timothy Flynn
74939eb943 LibJS: Implement Intl.PluralRules.prototype.resolvedOptions 2022-01-28 19:38:47 +00:00
Timothy Flynn
8b3f49ff84 LibJS: Implement Intl.PluralRules.supportedLocalesOf 2022-01-28 19:38:47 +00:00
Timothy Flynn
624fad3821 js: Implement pretty-printing of Intl.PluralRules 2022-01-28 19:38:47 +00:00
Timothy Flynn
348059bffd LibJS: Implement the Intl.PluralRules constructor 2022-01-28 19:38:47 +00:00
Timothy Flynn
0087804d10 LibJS: Implement a nearly empty Intl.PluralRules object
This adds plumbing for the Intl.PluralRules object, constructor, and
prototype.
2022-01-28 19:38:47 +00:00
Timothy Flynn
ac3e42a8de LibJS: Move some Intl.NumberFormat fields into a NumberFormatBase class
Other Intl objects, such as PluralRules, are to be treated as a
NumberFormat object in some AOs. There's only a handful of fields which
are to be shared between those objects - move them to a base class for
shared reuse.

This also updates the couple of NumberFormat AOs that are meant to
operate on these NumberFormat-like objects.

Alternatively, we could just have objects like PluralRules inherit from
NumberFormat directly. But that messes up the is<NumberFormat> runtime
checks, so this feels safer.
2022-01-28 19:38:47 +00:00
Idan Horowitz
fa7ae7288b zip: Ignore symlinks when recursively zipping files
This prevents infinite loops when symlinks point to a parent directory.
2022-01-28 19:05:52 +02:00
Timothy Flynn
bd5662d6f2 CharacterMap: Move display name strings into the search results object
Now that we're passing the display name directly to the search results
structure, let's move() the string instead of copying it.
2022-01-28 15:26:58 +00:00
Timothy Flynn
54d89401df CharacterMap: Change the search widget to display results in a TableView
Code points that have a bidirectional attribute of right-to-left (e.g.
some Arabic and Hebrew code points) were causing the code point to
render at the end of the search result, rather than the beginning. To
keep the results consistent, split the search results into two columns:
the first for the code point, the second for its name.
2022-01-28 15:26:58 +00:00
Timothy Flynn
acfcad0b06 Revert "FileSystemAccessServer: Display times in the local time zone"
This reverts commit fa016a72fd.
2022-01-28 15:13:35 +00:00
Timothy Flynn
55d28a738e Revert "FileManager: Display times in the user's local time zone"
This reverts commit 080b054695.
2022-01-28 15:13:35 +00:00
Timothy Flynn
0a1e717e40 Revert "ls: Display times in the user's local time zone"
This reverts commit 0c13a3a8ff.
2022-01-28 15:13:35 +00:00
Timothy Flynn
8599ee3049 Revert "Userland: Invoke tzset in apps that care about time zones"
This reverts most of commit ede5c9548e.
The one change not reverted is ClockWidget.h, so that the taskbar clock
can continue to notice time zone changes.
2022-01-28 15:13:35 +00:00
Timothy Flynn
6838333f76 LibMain: Invoke tzset in LibMain so all apps can have time zone info
Rather than finding apps that benefit from time zone awareness one-by-
one, and calling tzset in their serenity_main, let's do it in LibMain.
2022-01-28 15:13:35 +00:00
Lenny Maiorani
899f062673 LibSoftGPU: Simplify clipping logic
The clipping logic is not DRY (Don't Repeat Yourself). The same logic
is repeated in multiple parts of an `if-else` statement. This can be
simplified to contain fewer branches and eliminate the redundant code.
2022-01-28 17:02:04 +02:00
Timothy Flynn
fa016a72fd FileSystemAccessServer: Display times in the user's local time zone 2022-01-28 12:25:20 +00:00
Timothy Flynn
080b054695 FileManager: Display times in the user's local time zone 2022-01-28 12:25:20 +00:00
Timothy Flynn
0c13a3a8ff ls: Display times in the user's local time zone
ls is already using local time, but needs tzset() for that to actually
work.
2022-01-28 12:25:20 +00:00
Timothy Flynn
da2eb63652 BrowserSettings: Use standard text placement for check box text 2022-01-28 13:20:19 +01:00
Timothy Flynn
0a3b1f6bc8 MailSettings: Use standard text placement for check box text 2022-01-28 13:20:19 +01:00
Timothy Flynn
cfd1755910 MouseSettings: Use standard text placement for check box text 2022-01-28 13:20:19 +01:00
Itamar
106e414800 HackStudio: Fix path to language-server IPC socket
The path to the language server local socket was accidentally broken
in 2e1bbcb.
2022-01-28 13:17:54 +01: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