Commit graph

16409 commits

Author SHA1 Message Date
Liav A
102ac09ad7 WindowServer: Stop spurious debug spam after flushing the framebuffer
This became apparent when using the VirtIO graphics device, because the
HardwareScreenBackend object needs to allow flushing of the framebuffer
constantly, and due to incorrect if-else flow, even a non-error response
from the ioctl was leading to a debug spam.
2022-05-25 23:33:31 +01:00
Ali Mohammad Pur
78dc77f7e4 LibLine: Add support for user-controlled masking 2022-05-25 23:17:15 +01:00
Ali Mohammad Pur
c257d27f0b LibLine: Turn bracketed paste mode off in Editor::restore()
We turn it on in initialize(), so turn it off in restore().
Not all CLI applications can handle this mode correctly, and there's no
reason to leave it on.
2022-05-25 23:17:15 +01:00
MacDue
0c74f30819 DisplaySettings: Link to cursor themes from "Themes" tab
This removes a few clicks to access the mouse settings and puts
all theming actions in one place.
2022-05-25 23:14:22 +01:00
MacDue
7c8541b914 Userland: Use GUI::Process::spawn_or_show_error() for spawn() from a GUI 2022-05-25 23:14:22 +01:00
MacDue
2f2671f2d3 LibGUI: Add GUI::Process::spawn_or_show_error()
This is a wrapper around Core::Process::spawn() for GUI applications,
that shows an error if the call to spawn() failed.
2022-05-25 23:14:22 +01:00
MacDue
3fc0350caf LibCore: Return ErrorOr<pid_t> and support arguments in Process::spawn
This makes the wrapper more like the rest in LibCore, and also
removes the annoying limitation of not supporting arguments.

There are three overloads one for String, char const *, and StringView
argument lists. As long as there are <= 10 arguments the argv list
will be allocated inline, otherwise on the heap.
2022-05-25 23:14:22 +01:00
MacDue
0295d79339 LibCore: Add posix_spawn() wrapper to Core::System 2022-05-25 23:14:22 +01:00
Karol Kosek
67f1ac5de7 ThemeEditor: Use 'open' icon instead of ellipsis on path picker button
The ellipsis seemed a little unclear for me.
2022-05-25 13:42:53 +02:00
Karol Kosek
2d6edd5898 ThemeEditor: Show unsaved changes prompt also in the quit action
While the app displayed the prompt on the close button press, the quit
action from the menu didn't do so.
2022-05-25 13:42:53 +02:00
Linus Groh
9400b76d79 LibJS: Remove assertions replaced with structured headers
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/74fd5e8
2022-05-25 00:25:23 +01:00
Linus Groh
c3f1d8f5ba LibJS: Correct section IDs of Temporal .prototype property clauses
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/e4eb181
2022-05-25 00:25:23 +01:00
Linus Groh
ae1fdf299d LibJS: Use the rounding abstract operations from Intl.NumberFormat V3
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/75279e5

Co-Authored-By: Idan Horowitz <idan.horowitz@gmail.com>
2022-05-25 00:25:23 +01:00
Linus Groh
93a20b3bfb LibJS: Use default argument of CalendarDateFromFields
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/7a4a518
2022-05-25 00:25:23 +01:00
Linus Groh
cf1ea18b7f LibJS: Align DifferenceTemporalPlainTime with other Difference* AOs
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/70f739d
2022-05-25 00:25:23 +01:00
Linus Groh
89d4094709 LibJS: Mark concrete method calls of Environment Records with ?/!
This is an editorial change in the ECMA-262 spec.

See: https://github.com/tc39/ecma262/commit/7ae3ecf
2022-05-25 00:25:23 +01:00
Karol Kosek
6a4b125fe5 Spreadsheet: Make save functions take a Core::File instead of a filename
This allows us to use FileSystemAccessClient functions.
2022-05-24 03:36:04 +04:30
Karol Kosek
04443eb847 Spreadsheet: Open files using FileSystemAccessClient::try_open_file() 2022-05-24 03:36:04 +04:30
Karol Kosek
d877c2fcd6 Spreadsheet: Remove unused Workbook::load() function 2022-05-24 03:36:04 +04:30
Karol Kosek
01824fd19a Spreadsheet: Use TRY() on file load and save 2022-05-24 03:36:04 +04:30
Andrew Kaster
ca42da23c2 Meta+Userland: Add jakt as an optional Lagom Tool
We can now use ENABLE_JAKT to pull jakt as a host tool and use it to
pre-process .jakt files into .cpp files for use in serenity applications
2022-05-23 23:05:45 +02:00
Peter Elliott
3f0be4e9ea LibC: Add barebones <complex.h> 2022-05-23 00:13:26 +02:00
Andrew Smith
bccf0a9346 PixelPaint: Allow layer to "scale" location when resizing 2022-05-23 00:12:19 +02:00
Andrew Smith
02399d4775 PixelPaint: Add Image>Resize Image... dialog. (Front end) 2022-05-23 00:12:19 +02:00
Andrew Smith
abaecb878b LibGUI: Add on_return_pressed function to SpinBox 2022-05-23 00:12:19 +02:00
Karol Kosek
f9940390a3 SystemServer: Create a /dev/full device using numbers 1, 7
Previously, the device wasn't being created.

The new numbers correspond to those in the FullDevice (which is also
a Linux's full device number).

Also, I've tweaked the permissions to give everyone read-write access
to it.
2022-05-23 00:12:00 +02:00
Karol Kosek
169498f9db Spreadsheet: Recognize sheets files by mime type, not by file extension
These conditions weren't executed since 933a717f3b and always showed
a file import/export wizard.
2022-05-22 03:08:53 +04:30
Karol Kosek
f47bcddb5b LibCore: Set mime type for .sheets files to application/x-sheets+json
This is our own format, used by Spreadsheet.
2022-05-22 03:08:53 +04:30
Michiel Visser
7278ad761e LibHTTP+LibWeb: Accept Brotli encoded responses 2022-05-21 22:41:40 +02:00
Michiel Visser
d6a5b11f04 LibCompress: Implement Brotli decompressor
This implements the BrotliDecompressionStream, which is a Core::Stream
that can decompress another Core::Stream.
2022-05-21 22:41:40 +02:00
Michiel Visser
68772463cb LibCore: Add Stream::read_all() 2022-05-21 22:41:40 +02:00
Michiel Visser
af50b0363b LibCore: Add LittleEndianInputBitStream
As a complement to BigEndianInputStream, this will read the bits from
the lowest bits in a byte first.
2022-05-21 22:41:40 +02:00
Sam Atkins
4253594d16 ThemeEditor: Position preview windows based on the title height
This means all three window titles are visible, regardless of what the
TitleHeight and BorderThickness values are.  :^)

The one exception is when TitleHeight is less than the height of the
title text. WindowManager ensures that the real title height is at
least enough to fit the text, so if the value is set to less than that,
the window titles will start to overlap. So, don't set values that are
impossibly small!
2022-05-21 22:25:33 +02:00
Sam Atkins
f617d72bee ThemeEditor: Make MainWidget responsible for holding the edited Palette
Previously, the PreviewWidget was responsible for this, but we will soon
have multiple preview widgets, so having it here will make more sense.
2022-05-21 22:25:33 +02:00
Sam Atkins
48122e29c3 ThemeEditor: Convert the widget-preview layout to GML
This has the nice bonus of fixing the appearance of the status bar. :^)
2022-05-21 22:25:33 +02:00
Sam Atkins
4edc33b4a6 ThemeEditor: Arrange the theme properties into groups
This makes it clearer which properties are related, instead of them all
being in one list per tab.
2022-05-21 22:25:33 +02:00
Sam Atkins
423383e9aa ThemeEditor: Give each theme property its own editing widget
This is quite a radical change. The previous UI was very easy to add new
properties to (just add to the FooRole enum and it automatically
works), but not so nice to use: A ComboBox for selecting a property,
and then a box to edit that property's value. This makes it difficult
to compare different properties or edit multiple together without a lot
of back-and-forth.

This new design gives each property its own editing widgets, with those
categorized into several tabs. To try and avoid increasing the
maintenance burden for this, the UI is generated from the
`windows_tab`, `widgets_tab` and `syntax_highlighting_tab` variables,
which are basically just lists of which properties go in that tab. One
of the `FooProperty.gml` files is loaded to create each property's
widgets.
2022-05-21 22:25:33 +02:00
Sam Atkins
aadb35ff46 LibGUI: Add ability to position checkboxes to the right of their text
This uses the new `checkbox_position` property, which can be "Left"
or "Right".
2022-05-21 22:25:33 +02:00
Sam Atkins
0ef3c15822 ThemeEditor: Actually save alignment roles 2022-05-21 22:25:33 +02:00
Sam Atkins
8915b3227c ThemeEditor: Extract most logic into a MainWidget class 2022-05-21 22:25:33 +02:00
Cameron Youell
df7fd39fcc Browser: Allow usage of vertical tabs
Add implementation of vertical tabs into the browser,
with the new `Ctrl + ,` shortcut, or within the View Options
2022-05-21 22:25:16 +02:00
Cameron Youell
5b82bd719e LibGUI: TabWidget add vertical tabs
Add vertical tabs to TabWidget, this can be set using
the ```TabWidget::set_tab_position``` function or in the GML
2022-05-21 22:25:16 +02:00
Itamar
b35293d945 LibCodeComprehension: Re-organize code comprehension related code
This moves all code comprehension-related code to a new library,
LibCodeComprehension.

This also moves some types related to code comprehension tasks (such as
autocomplete, find declaration) out of LibGUI and into
LibCodeComprehension.
2022-05-21 18:15:58 +02:00
Ariel Don
a2c34554cd touch: Support custom timestamps
Previously, `touch` remained limited to creating files and updating
their current access and modifications time to the current time. It's
now capable of accepting two different timestamp formats with flags `-d`
and `-t` and referencing timestamps of other files with flag `-r`.

`touch` can also update only the last access time with `-a`, only the
last access time with `-m`, or update both as usual. `touch` updates
both left unspecified.

With `-c`, `touch` does not create a file if it doesn't already exist.
2022-05-21 18:15:00 +02:00
Ariel Don
244357472a LibCore: Add Core::Stream::File::exists() 2022-05-21 18:15:00 +02:00
Ariel Don
8a854ba309 Kernel+LibC: Implement futimens(3)
Implement futimes() in terms of utimensat(). Now, utimensat() strays
from POSIX compliance because it also accepts a combination of a file
descriptor of a regular file and an empty path. utimensat() then uses
this file descriptor instead of the path to update the last access
and/or modification time of a file. That being said, its prior behavior
remains intact.

With the new behavior of utimensat(), `path` must point to a valid
string; given a null pointer instead of an empty string, utimensat()
sets `errno` to `EFAULT` and returns a failure.
2022-05-21 18:15:00 +02:00
Ariel Don
9a6bd85924 Kernel+LibC+VFS: Implement utimensat(3)
Create POSIX utimensat() library call and corresponding system call to
update file access and modification times.
2022-05-21 18:15:00 +02:00
Simon Danner
b9a8447dc0 LibC: Add a stub for nice() 2022-05-21 18:10:52 +02:00
Peter Elliott
4e0adb638d LibC: Implement posix_memalign(3) and aligned_alloc(3)
Some ports linked against posix_memalign, but didn't use it, and others
used it if it was Available. So I decided to implement posix_memalign.

My implementation adds almost no overhead to regular mallocs. However,
if an alignment is specified, it will use the smallest ChunkedBlock, for
which aligned chunks exist, and simply use one of the chunks that is
aligned. If it cannot use a ChunkedBlock, for size or alignment reasons,
it will use a BigAllocationBlock, and return a pointer to the first
aligned address past the start of the block. This implementation
supports alignments up to 32768, due to the limitations of the
BigAllocationBlock technique.
2022-05-20 22:18:54 +02:00
MacDue
857a767ab4 WindowServer: Fix crash when hovering over title buttons
This fixes a crash where if you switched to a theme that has hover
icons for title buttons, then back to a theme that does not. Then
when you next hover over the title buttons the window server would
crash.

This was due to the hover_bitmap multi-scale bitmap pointer being
non-null, but not containing any bitmaps, so hitting an assertion
when painting.
2022-05-18 19:05:18 +02:00