Andreas Kling
6536198693
TextEditor: Port to LibMain :^)
...
This opens up using TRY() for syscalls and Core::Object creation.
2021-11-23 15:44:59 +01:00
Andreas Kling
58fb3ebf66
LibCore+AK: Move MappedFile from AK to LibCore
...
MappedFile is strictly a userspace thing, so it doesn't belong in AK
(which is supposed to be user/kernel agnostic.)
2021-11-23 11:33:36 +01:00
Andreas Kling
21a5fb0fa2
LibCore+LibSystem: Move syscall wrappers from LibSystem to LibCore
...
With this change, System::foo() becomes Core::System::foo().
Since LibCore builds on other systems than SerenityOS, we now have to
make sure that wrappers work with just a standard C library underneath.
2021-11-23 11:33:36 +01:00
Mustafa Quraish
4d302e0e88
Everywhere: Use Application::construct() with Main::Arguments directly
...
Use the updated API everywhere we are currently manually passing in
`arguments.argc` and `arguments.argv`.
2021-11-22 21:13:42 -08:00
Mustafa Quraish
2fbcab46bf
Everywhere: Use ArgsParser::parse() with Main::Arguments directly
...
Use the updated API everywhere we are currently manually passing in
`arguments.argc` and `arguments.argv`.
2021-11-22 21:13:42 -08:00
Pascal Puffke
ca7b603578
Mail: Port to LibMain
2021-11-22 23:56:22 +01:00
Pascal Puffke
41b80f3d85
Piano: Port to LibMain
2021-11-22 23:56:22 +01:00
Pascal Puffke
61408e2397
PDFViewer: Port to LibMain
2021-11-22 23:56:22 +01:00
Pascal Puffke
bec7ffaf0a
PixelPaint: Port to LibMain
2021-11-22 23:56:22 +01:00
Andreas Kling
c5c54f634e
FileManager: Port to LibMain :^)
...
This simplifies a handful of calls to pledge() and sigaction().
2021-11-22 23:52:47 +01:00
Sam Atkins
97eb662e62
Browser: Scope bookmark actions so that they don't block the delete key
...
This fixes #10940 .
Previously, all presses of the Delete key without a modifier in Browser
were uselessly consumed by the "Delete" action in the bookmark context
menu.
2021-11-22 23:48:10 +01:00
kleines Filmröllchen
b14a64b3c8
Piano: Move to LibDSP's Classic synthesizer
...
Almost all synthesizer code in Piano is removed in favor of the LibDSP
reimplementation.
This causes some issues that mainly have to do with the way Piano
currently handles talking to LibDSP. Additionally, the sampler is gone
for now and will be reintroduced with future work.
2021-11-22 22:26:17 +01:00
Ben Wiederhake
afc456edd6
PixelPaint: Use better-fitting image size
...
This makes the default image fit perfectly into the default viewport,
which means the first fit_image_to_view call will end up with a scale of
exactly 1. This scale level has no visual artifacts, which is the more
intuitive 'default' behavior.
Fixes #10975 .
2021-11-22 22:14:53 +01:00
Ben Wiederhake
177478dadf
PixelPaint: Add interactive zoom ComboBox to toolbar
...
Before, there was nothing that tells the user the current zoom level,
which is unknown after a 'fit to image' (the initial state).
2021-11-22 22:14:53 +01:00
Ben Wiederhake
9013d0fe38
PixelPaint: Add ability to fit to either width, height, or image
2021-11-22 22:14:53 +01:00
Ben Wiederhake
be697a440f
PixelPaint: Allow setting ImageEditor scale and listening for changes
2021-11-22 22:14:53 +01:00
Ben Wiederhake
7f962cd9d3
PixelPaint: Floor effective viewport size to whole integers
...
We don't have fractional pixels available, so don't attempt to use them.
2021-11-22 22:14:53 +01:00
Pedro Pereira
272f7c340e
3DFileViewer: Port to LibMain
...
Simplified one pledge() and five unveil() by using TRY().
2021-11-22 21:56:04 +01:00
Andreas Kling
05e45bfdc5
Browser: Port to LibMain :^)
2021-11-22 19:47:14 +01:00
Andreas Kling
e388782f60
Terminal: Port to LibMain :^)
...
This simplifies a bunch of error handling and makes the main function
quite a bit shorter.
It will become shorter yet, as we get better at propagating errors. :^)
2021-11-22 19:28:31 +01:00
Tim Schumacher
8d5fb99703
CrashReporter: Show the available memory region information
2021-11-21 17:29:08 +00:00
Ben Wiederhake
69cbaac50a
FontEditor: Make glyph parsing more robust
...
In particular, we sanity-check the received width, height, and buffer
size, before allocating.
2021-11-21 11:49:06 +00:00
Ben Wiederhake
f22c0ffe0c
LibGUI+Everywhere: Make sync requests to Clipboard server more obvious
2021-11-21 11:49:06 +00:00
Ben Wiederhake
81128c5100
Browser: Make paste access to Clipboard atomic
...
This avoids data race issues and saves a synchronous request to the
ClipboardServer.
2021-11-21 11:49:06 +00:00
Ben Wiederhake
d29f094ffa
FontEditor: Make paste access to Clipboard atomic
...
This avoids data race issues and saves three out of four synchronous
requests to the ClipboardServer.
2021-11-21 11:49:06 +00:00
Ben Wiederhake
b6419f2cf2
LibGUI: Make clipboard-as-bitmap parsing less data-race-y
...
This encourages the caller to first fetch data and type atomically, and
then parse that, instead of potentially making multiple requests.
2021-11-21 11:49:06 +00:00
Jelle Raaijmakers
55526634b6
Piano: Use default sample rate in absence of audio device
2021-11-21 09:27:00 +01:00
Itamar
dd76ba2fe1
CrashReporter: Add "Inspect in Hack Studio" button
...
This allows the user to open the crash coredump in Hack Studio and
inspect it in the Debug tab.
2021-11-20 21:22:24 +00:00
Itamar
d6d48ce936
CrashReporter: Unlink coredump file on exit
...
Previously, when the --unlink flag was passed to CrashReporter, it
unlinked the coredump file immediately after reading it.
This change makes it so the coredump file is deleted when CrashReporter
exits.
2021-11-20 21:22:24 +00:00
Sam Atkins
dc3fa1c2e5
KeyboardSettings: Add icons
...
A calculator isn't the ideal icon for the Num-lock section, so hopefully
someone will produce a better one later.
2021-11-20 21:05:20 +00:00
Sam Atkins
c6099eca5c
KeyboardSettings: Add text area to test the currently selected keymap
...
Right now, this is a bit of a hack. We can't set a keymap to only apply
to the test area, so we set the system keymap instead, while also
keeping track of the "real" current keymap. Whenever the settings are
applied, we update what that "real" keymap is, and when we exit, we
revert to that keymap.
Basically, it behaves as you would expect, apart from it also affecting
other applications you are typing in while the KeyboardSettings window
is open with a different keymap selected.
2021-11-20 21:05:20 +00:00
Sam Atkins
0a2b6b64c6
KeyboardSettings: Migrate to using SettingsWindow :^)
2021-11-20 21:05:20 +00:00
Sam Atkins
4bac30f737
KeyboardSettings: Migrate layout to GML
...
All other Settings applications use this, so let's match them!
2021-11-20 21:05:20 +00:00
Sam Atkins
1dd5c838cf
DisplaySettings: Migrate to using SettingsWindow :^)
2021-11-20 21:05:20 +00:00
Sam Atkins
a4af8b2a64
DisplaySettings: Move screen number show/hide logic into widget
...
This is functionally the same as before, as selecting a tab fires Show
and HideEvents. But this way, we don't need to directly access the
TabWidget, which will make using SettingsWindow simpler.
2021-11-20 21:05:20 +00:00
Sam Atkins
9fc53017c6
MouseSettings: Adjust layout so mouse-button image is no longer clipped
2021-11-20 21:05:20 +00:00
Sam Atkins
f20b0403bc
MouseSettings: Migrate to using SettingsWindow :^)
2021-11-20 21:05:20 +00:00
Sam Atkins
fca7924437
MailSettings: Migrate to using SettingsWindow :^)
2021-11-20 21:05:20 +00:00
Ben Wiederhake
63078ba7fc
FontEditor: Set all pixels when pasting a glyph
...
For an empty glyph (all pixels initially clear), this makes no
difference. However, if the glyph for the selected code point already
contains some set pixels, pasting used to "add" the set pixels, instead
of overwriting.
2021-11-20 12:56:35 +01:00
Ben Wiederhake
8d80d1346d
FontEditor: Add ability to copy the selected code point
...
This makes it easier to preview the current glyph, if it is not easily
typable.
2021-11-20 12:56:35 +01:00
Ben Wiederhake
7180813cd4
FontEditor: Support flipping and rotating
...
This is especially useful for highly symmetric scripts like this:
https://www.unicode.org/charts/PDF/U1400.pdf
2021-11-20 12:56:35 +01:00
Ben Wiederhake
1dfb3ff4eb
FontEditor: Tighten type of UndoGlyph::undo_state (cannot fail)
2021-11-20 12:56:35 +01:00
Ben Wiederhake
bce5a0a00d
FontEditor: Don't show focus box after clicking 'present' checkbox
2021-11-20 12:56:35 +01:00
Ben Wiederhake
197b5f7c4a
FontEditor: More reasonable labels, move property to GML
2021-11-20 12:56:35 +01:00
Ben Wiederhake
a8c95097b5
FontEditor: Convert UI from fixed to implicit height
...
This gets rid of a magic number, and means that the widget will adapt
nicely when the system font changes.
2021-11-20 12:56:35 +01:00
Ben Wiederhake
b224efe73b
FontEditor: Show code point name in status bar
2021-11-20 00:31:55 +01:00
Andreas Kling
4bd4ce439a
PixelPaint: Allow toggling the active layer boundary display rect
...
Let the user opt out of painting a rectangle around the currently
active layer.
2021-11-20 00:25:24 +01:00
Andreas Kling
7c57961c61
LibWeb: Move BrowsingContext into HTML/
...
Browsing contexts are defined by the HTML specification, so let's move
them into the HTML directory. :^)
2021-11-18 21:11:30 +01:00
Andreas Kling
587f9af960
AK: Make JSON parser return ErrorOr<JsonValue> (instead of Optional)
...
Also add slightly richer parse errors now that we can include a string
literal with returned errors.
This will allow us to use TRY() when working with JSON data.
2021-11-17 00:21:10 +01:00
Karol Kosek
e38b3f526e
DisplaySettings: Handle errors when loading wallpaper bitmap
...
Prior this change, the app crashed if the first file in alphabetical
order in /res/wallpapers couldn't be decoded.
2021-11-16 01:07:37 +00:00