Commit graph

44686 commits

Author SHA1 Message Date
Timothy Flynn
cb66c02bc4 Snake: Convert the game window to GML
Unfortunately, GML widget registration requires a non-fallible construct
method to create the widget. So this does a bit of manual error checking
when loading the food bitmaps.
2022-12-23 23:26:21 +01:00
Timothy Flynn
ae90f490bd Snake: Move GUI into Snake namespace and rename SnakeGame to Game
The former is required for GML, and the latter is to avoid the verbosity
and redundancy of Snake::SnakeGame (and matches most other games in the
system).
2022-12-23 23:26:21 +01:00
Timothy Flynn
36042fc1d6 Snake: Save configured base color to Snake's configuration file 2022-12-23 23:26:21 +01:00
Timothy Flynn
69beda23c3 LibConfig+LibCore+ConfigServer: Support u32 configuration entries 2022-12-23 23:26:21 +01:00
ericLemanissier
49f697ed56 LibGfx: GIFLoader: Propagate more errors
Migrate bool and Optional<> result types
to ErrorOr<>
2022-12-23 16:48:30 -05:00
ericLemanissier
05b9e6ac3b LibGfx: JPGLoader: Centralize error handling in read_be_word 2022-12-23 16:48:30 -05:00
ericLemanissier
14eefedbf9 LibGfx: JPGLoader: Propagate errors properly
Use our normal error propagation mechanism instead of returning booleans
2022-12-23 16:48:30 -05:00
ericLemanissier
030d380ed2 LibGfx: GIFLoader: Propagate errors properly
Use our normal error propagation mechanism instead of returning booleans
2022-12-23 16:48:30 -05:00
ericLemanissier
d0ddbf4aad LibGfx: DDSLoader: Propagate errors properly
Use our normal error propagation mechanism instead of returning booleans
2022-12-23 16:48:30 -05:00
ericLemanissier
a6d710612f LibGfx: BMPLoader: Propagate errors properly
Use our normal error propagation mechanism instead of returning booleans
2022-12-23 16:48:30 -05:00
Tim Schumacher
8455d58a44 LibCore: Use a StringView for the file path in File::remove
This allows us to use our nice syscall wrappers, avoids some accidental
string copying, and starts to unlink us from the old DeprecatedString.
2022-12-23 10:38:14 -05:00
Tim Schumacher
9805f73704 LibCore: Remove the force parameter from File::remove
About half of the usages were not using `force` anyways, and the other
half presumably just got confused about what "force" really means in
this context (which is "ignore nonexistent files").

The only 'legitimate' user, which is `rm`, instead now handles this
completely internally instead.
2022-12-23 10:38:14 -05:00
Tim Schumacher
355e761a02 LibCore: Let File::remove return a normal ErrorOr
Having the file path in there is nice, but it makes us incompatible with
comfortable error propagation in everything that isn't File::remove.
2022-12-23 10:38:14 -05:00
ericLemanissier
7fa78b2456 Taskbar: Propagate errors while loading bmp 2022-12-23 12:23:05 +00:00
ericLemanissier
2e1f7c5ac8 GameOfLife: Propagate errors while loading bmp 2022-12-23 12:23:05 +00:00
ericLemanissier
21e8099e42 FileManager: Propagate errors while loading bmp 2022-12-23 12:23:05 +00:00
FrHun
f413033a50 Magnifier: Add ability to drag the location when it is locked 2022-12-23 12:16:46 +00:00
FrHun
9d3debcbbe Magnifier: Remember grid color 2022-12-23 12:16:46 +00:00
FrHun
79f5c49afe Magnifier: Eliminate flickering when downsizing
Previously the content flickered when downsizing the window, because the
previously grabbed frame was still active, but was now too large for the
window.
This crops the source rect to a size where it now perfectly fits the
content area.
2022-12-23 12:16:46 +00:00
FrHun
6187cfec49 WindowServer: Remove overcropping for magnifier
This function is only used by the magnifier currently.
Since we now apply the scaling factor in Bitmap::cropped(), this is not
necessary anymore.
2022-12-23 12:16:46 +00:00
FrHun
4236177e4f LibGfx: Preserve scale on Bitmap crop 2022-12-23 12:16:46 +00:00
FrHun
cf47dae6a5 LibGfx: Repair SharableBitmap scaling support 2022-12-23 12:16:46 +00:00
FrHun
9e0deb76b2 Magnifier: Prevent 0 size that otherwise hangs 2022-12-23 12:16:46 +00:00
FrHun
808eafcf1e Magnifier: Add option to choose grid color 2022-12-23 12:16:46 +00:00
FrHun
2b635b5330 Magnifier: Add option to display grid over the image 2022-12-23 12:16:46 +00:00
FrHun
df30440117 LibGfx: Add NearestFractional scaling type to painter
This is useful for cases where you want to avoid scaling artifacts.
2022-12-23 12:16:46 +00:00
FrHun
837625e422 Magnifier: Allow locking location at current cursor position 2022-12-23 12:16:46 +00:00
FrHun
6d4e37138e WindowServer: Allow overriding position when getting bitmap 2022-12-23 12:16:46 +00:00
Optimoos
d856dae07c Spreadsheet: Allow Functions Help HorizontalSplitter to resize
Using set_fixed_width prevents the splitter from resizing, so it has
been changed to set_preferred_width. Added a FIXME that I'm not
familiar enough with the codebase to tackle yet.

This addresses issue #16589
2022-12-23 07:53:26 +00:00
Liav A
2b5d7a8a72 Base: Mention new immutable memory mappings security feature 2022-12-22 20:32:57 -08:00
Timothy Flynn
4b4b15adb1 AK: Rearrange Error's members to reduce its size by 8 bytes
This shrinks sizeof(Error) from 32 bytes to 24 bytes, which in turn will
shrink sizeof(ErrorOr<T>) by the same amount (in cases where sizeof(T)
is less than sizeof(Error)).
2022-12-22 14:13:56 -05:00
Kenneth Myhra
74de1f6193 Ports: Let our CA Certificate location be known to curl
Co-authored-by: Tim Schumacher <timschumi@gmx.de>
2022-12-22 15:59:00 +00:00
Kenneth Myhra
3c6afeca45 Ports: Format curl package.sh script 2022-12-22 15:59:00 +00:00
Kenneth Myhra
fe478be91b Ports: Update curl to 7.87.0
This also removes the tiny patch we had since it's been upstreamed.
2022-12-22 15:59:00 +00:00
Sam Atkins
29733e65f8 AK+Everywhere: Replace all Bitmap::must_create() uses with ::create()
Well, *someone* has to add some more FIXMEs to keep FIXME Roulette
going. :^)
2022-12-22 15:48:53 +01:00
Sam Atkins
bed5961fc2 AK: Rename Bitmap::try_create() to ::create()
This is step 1 to removing `must_create()`.
2022-12-22 15:48:53 +01:00
Sam Atkins
c4e8509aac Base: Unquote the timestamp in a quote
`fortune` was failing to read this and treating the timestamp as 0.

The irony in this being a quote about the absence of boogs is not lost
on me. :^)
2022-12-22 14:13:47 +00:00
kleines Filmröllchen
00db1dffa8 Base: Add a quote to the fortunes database 2022-12-22 08:57:18 +00:00
Karol Kosek
ba60b01026 HackStudio: Fix typo in one error message
A regression from 4784ad66b2. oops.
2022-12-21 19:05:13 +00:00
Liav A
2e710de2f4 Kernel/FileSystem: Prevent symlink creation in veiled directory paths
Also, try to resolve the target path and check if it is allowed to be
accessed under the unveil rules.
2022-12-21 09:17:09 +00:00
Tim Schumacher
1c630316ec CMake: Fall back to the Web Archive when downloading files 2022-12-21 09:13:50 +00:00
Karol Kosek
917e32d31a uptime: Port to Core::Stream::File, use AK::human_readable_time() 2022-12-21 08:41:34 +00:00
Karol Kosek
25fa485dfb AK: Calculate elapsed days in human_readable_time() 2022-12-21 08:41:34 +00:00
Timon Kruiper
a473cfd71b Kernel/aarch64: Add -mstrict-align flag to Kernel build
The ARM CPU is set up to trap on unaligned accesses, however the
compiler will still generate them if this flag is not set. We also need
the -Wno-cast-align as there are some files in AK that don't build
without the flag.
2022-12-21 08:35:14 +00:00
Timon Kruiper
0226390b21 Kernel/aarch64: Add Fault Address Register (FAR_EL1)
And use it for printing the virtual address when an exception has
happened that set the register, such as data aborts and instruction
aborts.
2022-12-21 08:35:14 +00:00
Timon Kruiper
344ffda8cb Kernel: Use AK::is_power_of_two instead of AK::popcount in kmalloc_impl
AK::popcount will use floating-point instructions, which in the aarch64
kernel are not allowed, and will result in an exception.
2022-12-21 08:35:14 +00:00
Timon Kruiper
81571bdac9 Kernel/aarch64: Add function to convert Exception Class to StringView
This is useful when printing information about the type of exception
that happened.
2022-12-21 08:35:14 +00:00
Kemal Zebari
1dddefa737 Browser: Introduce action for opening bookmarks in a new window
This change introduces an action to bookmarks that allows them to be
opened in a new browser window. This is done by accessing any
bookmark's context menu and pressing "Open in New Window".
2022-12-21 08:34:08 +00:00
Andreas Kling
abad197884 LibGfx/OpenType: Read "glyf" table header using a C++ struct 2022-12-21 08:44:22 +01:00
Andreas Kling
2185a98b36 LibGfx/OpenType: Clean up "kern" table reading
- Use C++ structs for the header and subtable headers.
- Use AK::binary_search to search for kerning pairs.
2022-12-21 08:44:22 +01:00