Commit Graph

3631 Commits

Author SHA1 Message Date
Tim Ledbetter
1beadba0bb 3DFileViewer: Remove DeprecatedString usage in object loader
This change also improves error handling if the given .obj file
contains malformed floating point numbers.
2023-09-16 11:07:44 +02:00
Tim Ledbetter
ffda0785c0 Applications: Make creation of tabs non-fallible 2023-09-16 11:06:50 +02:00
Tim Ledbetter
ccab5ddf9b LibGUI+Applications: Use String in make_about_action() 2023-09-16 11:05:49 +02:00
Tim Ledbetter
c74f7e5f2a Userland: Don't use String::from_utf8() for literal strings 2023-09-15 08:44:52 +02:00
implicitfield
63d09f6daf Browser+Ladybird: Let the list of user agent strings be shared 2023-09-13 19:33:07 -04:00
Bastiaan van der Plaat
d63fb8fa61 Maps: Add show SerenityOS users feature 2023-09-13 21:41:37 +02:00
Bastiaan van der Plaat
dfb54083ee Maps: Add markers to map widget 2023-09-13 21:41:37 +02:00
Bastiaan van der Plaat
599a37aa0c Maps: Add panels to map widget 2023-09-13 21:41:37 +02:00
Bastiaan van der Plaat
048e8d7744 Maps: Add toolbar and frame border to map widget 2023-09-13 21:41:37 +02:00
Bastiaan van der Plaat
b5f91e3365 Maps: Remember last window position and size 2023-09-13 21:41:37 +02:00
Jelle Raaijmakers
ec416563a8 Maps: Zoom on doubleclick 2023-09-10 22:45:42 +02:00
Jelle Raaijmakers
0f330a4dcf Maps: Scale cached tiles from lower and higher zoom levels
When zooming in or out, if a tile is not yet cached, Maps now also
checks the lower and higher zoom levels for cached tiles and composites
a preview tile that is shown until the actual tile is loaded in.
2023-09-10 22:45:42 +02:00
Jelle Raaijmakers
cf898f08ab Maps: Limit parallel downloading of tiles
Previously we would bombard RequestServer with as many requests as it
would take, but when frantically zooming in and out, we would run out of
fd's causing the Maps application to hang.

This implements a tile download queue and limits the amount of parallel
downloads to 8. This fixes the hangs accompanied by this debug console
message:

    Peer endpoint error: recvfd: Too many open files (errno=24)

It does not fix other sporadic hangs caused by requests that are never
finished, however.
2023-09-10 22:45:42 +02:00
Bastiaan van der Plaat
494a8cb816 AK: Add to_radians and to_degrees math functions 2023-09-10 08:38:29 +01:00
Karol Kosek
f789d26e37 LibIMAP+Mail: Rename MultiPartBody's mime_type to multipart_subtype 2023-09-09 11:19:37 -06:00
kamp
74d15195a4 HexEditor: Replace DeprecatedString in HexEditor.cpp 2023-09-07 09:58:00 -06:00
kamp
7a2ad83c07 HexEditor: Replace DeprecatedString in ValueInspectorModel 2023-09-07 09:58:00 -06:00
kamp
4b87714700 HexEditor: Replace DeprecatedString in SearchResultsModel
Except one instance where it is required for interfacing with LibGUI

Also changed an instance of west const to east because the clang-format
commit hook required it.
2023-09-07 09:58:00 -06:00
kamp
81afa029ac HexEditor: Replace DeprecatedString in FindDialog 2023-09-07 09:58:00 -06:00
kamp
f38cf0ca18 HexEditor: Replace DeprecatedString in GoToOffsetDialog 2023-09-07 09:58:00 -06:00
Andreas Kling
13db3c5ce0 LibGfx: Convert FontDatabase APIs to use FlyString 2023-09-06 11:29:03 -04:00
Andreas Kling
545d8336b8 LibGfx: Convert Font APIs to return String instead of DeprecatedString 2023-09-06 11:29:03 -04:00
Jelle Raaijmakers
b21ca0d04e Maps: Add pledge and unveils 2023-09-05 20:16:05 +02:00
Michal Grich
331a19efe8 Calendar: Save time of the event and display it in Calendar
This PR introduces the ability to save calendar event times
and adds functionality for displaying saved times in the calendar.
Additionally, it addresses the issue where changes to the time
value in the dropdown were not being saved.
2023-09-05 15:08:42 +01:00
Cubic Love
8eb10b135d Maps: Add Application Icons
Add 16px and 32px application icons for Maps
2023-09-05 14:13:32 +02:00
Timothy Flynn
bc5b7aeffb Ladybird: Hide the WebDriver-to-WebContent IPC path from the help menu
This is never meant to be passed by a human, it is created and passed by
WebDriver only. Hide it from the --help menu to avoid confusion.
2023-09-05 06:51:16 -04:00
Bastiaan van der Plaat
f9f9c38de3 Maps: Add new basic maps application and map widget 2023-09-03 18:10:58 +02:00
Cubic Love
ab4262d49e About: Display Application's Icon in File Manager
Before, when looking in /bin in File Manager, the About application's
icon was missing. Now it is a serenity_app instead of serenity_bin the
icon is visible!
2023-09-02 16:27:08 +01:00
Timothy Flynn
5c5a00dd3a Ladybird+LibWebView: Move CookieJar, Database, and History to LibWebView
These classes are used as-is in all chromes. Move them to LibWebView so
that non-Serenity chromes don't have to awkwardly reach into its headers
and sources.
2023-08-31 19:19:45 +02:00
Timothy Flynn
204a6f9241 Ladybird+LibWebView: Move console history tracking to ConsoleClient
This will allow other chromes to make use of history in their console
implementations.
2023-08-31 12:20:10 +02:00
Karol Kosek
8d81b08f6d Mail: Simplify reading message headers by issuing ENVELOPE items
`BODY[HEADER.FIELDS (...)]` gives us a part of a message that we have to
parse ourselves. Looking at the FIXME, we didn't do much good job doing
it, so let's better replace it with much simpler and probably preferred
way (FETCH command has ALL and FULL macro types that also include it.)

The tradeoff is that we get more data than we use currently (CC, BCC,
unparsed date format, message id, etc.).

Additionally this commit will try to decode 'encoded-words' in sender
names, because they are here more common.
2023-08-31 11:53:34 +02:00
Karol Kosek
1e282762a7 Mail: Allow sorting columns 2023-08-31 11:53:34 +02:00
Karol Kosek
ea70b96cf8 Mail: Use set_activates_on_selection and on_activation callback
Preparation for a sortable mailbox. Otherwise the model would resort
itself and select mail again forever.

Arrow keys will no longer load mail automatically, now you also need to
hit Enter.
2023-08-31 11:53:34 +02:00
Karol Kosek
59968c97f0 Mail: Make Date the first column 2023-08-31 11:53:34 +02:00
Karol Kosek
392fcc0ce6 Mail: Get message date using INTERNALDATE
Parsing mail headers and its date format is a rather tedious task,
especially if you want to support the obsolete syntax, so let's ask the
server to do it for us!

This will convert the date to our local time and display it in a
sortable and fixed-width format "%Y-%m-%d %H:%M:%S".
2023-08-31 11:53:34 +02:00
Karol Kosek
0132c30eda Mail: Fetch mails with their sequence number
The FETCH response doesn't have return the sequence in order, or at very
least one of my mail providers doesn't do it.
2023-08-31 11:53:34 +02:00
Karol Kosek
90af21aef4 LibIMAP+Mail+test-imap: Let a Promise result type be non-optional
The Empty type was used only when parsing a response failed. The
failures will now go to Promise's error type.
2023-08-31 11:10:09 +02:00
Karol Kosek
55d730bd5c LibIMAP+Mail+test-imap: Make Client requests infailable 2023-08-31 11:10:09 +02:00
Bastiaan van der Plaat
258a6cb126 FileManager: Use new window remember state 2023-08-30 06:49:51 -04:00
Timothy Flynn
bf59e06d2a Ladybird+LibWebView: Extract common JS console functionality to a helper
This creates WebView::ConsoleClient to handle functionality that will be
common to the JS consoles of all Ladybird chromes. This will let each
chrome focus on just the UI.

Note that this includes the `console.group` functionality that only the
Serenity chrome previously had. This was a FIXME in the Qt chrome, and
it is implemented such that all chromes will receive this functionality
for free.
2023-08-30 09:24:59 +02:00
Timothy Flynn
b9b2274078 Browser: Prevent moving a Database callback while it is executing
All SQL callbacks here were already moving the to-be-executed callback
out of its storage before executing it, except for on_next_result().
This makes on_next_result() do the same move to ensure we do not later
attempt to move it while the callback is executing.
2023-08-30 09:19:28 +02:00
Karol Kosek
40d732a73c PDFViewer: Accept file drops 2023-08-29 14:12:38 -04:00
Timothy Flynn
9c4ce1b80b Ladybird: Do not enable the reload button if history is empty
Not much of an issue currently, but will be once tabs are used to render
plain HTML.
2023-08-29 08:11:11 -04:00
Cubic Love
91269a8064 Chess: Capitalize chess set names + Rename 'stelar7' to 'Classic'
Now when selecting a chess set in Games Settings, the names of the sets
are capitalized which looks much neater.

The default set 'stelar7' has been renamed to 'Classic' to reflect its
default vanilla design, as opposed to more stylized sets.
This commit also updates any code references to this set.
2023-08-29 10:28:24 +02:00
Shannon Booth
901220c588 LibWeb: Port Storage interface from DeprecatedString to String
Which ends up bubbling all the way up to the Browser storage model.
2023-08-29 10:05:02 +02:00
Liav A
751aae77bc Kernel: Rename /sys/kernel/variables => /sys/kernel/conf
The name "variables" is a bit awkward and what the directory entries are
really about is kernel configuration so let's make it clear with the new
name.
2023-08-27 22:50:22 +02:00
MacDue
360c0eb509 LibWeb: Remove implicit conversion from float and double to CSSPixels
In general it is not safe to convert any arbitrary floating-point value
to CSSPixels. CSSPixels has a resolution of 0.015625, which for small
values (e.g. scale factors between 0 and 1), can produce bad results
if converted to CSSPixels then scaled back up. In the worst case values
can underflow to zero and produce incorrect results.
2023-08-26 23:53:45 +02:00
Sam Atkins
aae7905369 Applications: Use native style sheet for WebViews where appropriate 2023-08-25 20:30:20 +01:00
Torstennator
28cda85f1f PixelPaint: Editing mask optimization
This patch introduces a new function "Layer::editin_mask_bounding_rect"
that is used within the LevelsDialog, Luminosity and Colormasking to
process only the area where a mask was applied. Therefore we can
greatly reduce the amount of processed pixels if only a small portion
of the image was masked.
2023-08-25 11:14:03 +01:00
Torstennator
b3a6ccc45b PixelPaint: Optimize color masking performance
This patch adds a small performance tweak when accsessing pixels for
color-masking. Despite of that the most time is spent in
Color::to_hsv()
2023-08-25 11:14:03 +01:00
Torstennator
60b72b8033 PixelPaint: Calculate histogram and vectorscope data only when needed
With this patch the histogram and vectorscope data for the image is
only computed when the widgets are visible to the user and therefore
saves some processing time when this information is not required
to be computed.
2023-08-25 11:14:03 +01:00
Timothy Flynn
18bbbab78c Browser: Do not visualize trailing whitespace in the source viewer
Trailing whitespace in the source view is not actionable, so there's no
benefit to showing it.
2023-08-25 05:39:32 +02:00
Timothy Flynn
d56f127c80 Ladybird+LibWebView: Rename some "on get" notifications to "on received"
The old names sounded like awkward English to me, as they implied the
WebContent process is asking for information. In reality, WebContent is
*providing* the information.
2023-08-23 12:07:02 -04:00
Timothy Flynn
ebdcba8b3b Ladybird+LibWebView: Migrate dialog APIs to LibWebView callbacks 2023-08-23 09:59:04 -04:00
Timothy Flynn
7536648498 LibLocale+LibJS+ClockSettings: Make date time format APIs infallible
These APIs only perform small allocations, and are only used by LibJS
and the time zone settings widget. Callers which could only have failed
from these APIs are also made to be infallible here.
2023-08-23 05:29:21 +02:00
Timothy Flynn
9608bfb576 LibWebView+Ladybird: Remove duplicate WebContent callback
We have on_navigate_back + on_back_button and on_navigate_forward +
on_forward_button. Remove the *_button variants.
2023-08-19 05:15:35 +02:00
camc
d978dd4af8 LibGUI: Add deprecated suffix to {set_,}tooltip in Widget 2023-08-18 10:43:37 +01:00
Karol Kosek
f9a006d092 Mail: Mark mail as seen after open 2023-08-18 10:32:49 +01:00
Karol Kosek
619b53eaca Mail: Draw unread messages as bold 2023-08-18 10:32:49 +01:00
Torstennator
411ffb7954 PixelPaint: Add simple dodge and burn function to BrushTool
This patch adds three new modes to the brush-tool where it is now
possible to use a dodge or burn function with the brush and a soft mode
where the overdraw is reduced so that the stroke looks much softer.
The dodge and burn functions are used to brighten or darken the colors
in the affected area of the brush. The user can decide if the
highlights, midtones or shadows should be prioritized by the brush.
2023-08-18 10:27:56 +01:00
Torstennator
b9b4ca064f PixelPaint: BrushTool performance optimization
This patch optimizes how the Brush-Tool modifies the pixels. The new
logic generates a "reference brush" with the required size, falloff
and color only once and uses that for the rawing operations. If no
editing mask is used the reference brush is writen via a blit operation
to the content or mask image. This increases the drawing speed and
therefore also allows bigger brush sizes.
2023-08-18 10:27:56 +01:00
Torstennator
31ee20e179 PixelPaint: Allow bigger Brush-Tool sizes
This patch allows a bigger brush tool size of 250 pixels and limits the
cursor bitmap to a reasonable size so that its not much bigger than the
image editor size. If the cursor is bigger as the editor it is rended
with a red edge to indicate that the actual cursor is bigger than
displayed. This change mitigates the OOM conditions when the cursor
gets unusual big.
2023-08-18 10:27:56 +01:00
Cameron Youell
d972338208 Browser: Add more intuitive search 2023-08-17 15:30:23 +01:00
Timothy Flynn
7c4b0b0389 LibGfx+Userland: Rename Size::scaled_by to Size::scaled
Ignoring Size for a second, we currently have:

    Rect::scale_by
    Rect::scaled

    Point::scale_by
    Point::scaled

In Size, before this patch, we have:

    Size::scale_by
    Size::scaled_by

This aligns Size to use the same method name as Rect and Point. While
subjectively providing API symmetry, this is mostly to allow using this
method in templated helpers without caring what the exact underlying
type is.
2023-08-17 09:57:30 -04:00
thankyouverycool
57f3b18109 LibGUI+Userland: Remove Toolbar::try_add_{action,separator}()
These calls largely occur during initialization before there's
unsaved state worth preserving
2023-08-15 15:56:34 +02:00
Andreas Kling
c838bb3f21 LibGUI: Make AboutDialog APIs infallible 2023-08-14 14:57:54 +02:00
Andreas Kling
bd61e75e0b LibGUI: Remove Window::try_add_menu()
And fall back to the infallible add_menu().
2023-08-14 14:57:54 +02:00
Andreas Kling
94cd272ac0 LibGUI: Make CommonMenus::make_accessibility_menu() infallible 2023-08-14 14:57:54 +02:00
Andreas Kling
676ef0cc3d LibGUI: Make Menu::add_recent_files_list() infallible 2023-08-14 14:57:54 +02:00
Andreas Kling
f2faf2767f LibGUI: Remove Menu::try_add_action()
And fall back to the infallible add_action().
2023-08-14 14:57:54 +02:00
Andreas Kling
eec328e2ab LibGUI: Remove Menu::try_add_submenu()
And fall back to the infallible add_submenu().
2023-08-14 14:57:54 +02:00
Andreas Kling
1525fa3b8f LibGUI: Remove Menu::try_add_separator()
And fall back to the infallible add_separator().
2023-08-14 14:57:54 +02:00
Andreas Kling
58e482a06d LibGUI: Remove Layout::try_add_spacer()
And fall back to the infallible add_spacer().

Work towards #20557.
2023-08-14 14:57:54 +02:00
Andreas Kling
8322b31b97 LibGUI: Remove Widget::try_set_layout<T>()
And fall back to the infallible set_layout<T>().

Work towards #20557.
2023-08-14 14:57:54 +02:00
0GreenClover0
061061bd9c Calendar: Make on_month_click capture the view_month_action's RefPtr 2023-08-14 07:29:09 +02:00
Shannon Booth
9d60f23abc AK: Port URL::m_fragment from DeprecatedString to String 2023-08-13 15:03:53 -06:00
Shannon Booth
c25485700a AK: Port URL scheme from DeprecatedString to String 2023-08-13 15:03:53 -06:00
0GreenClover0
340230f6bf Calendar: Promote view_type ActionGroup to CalendarWidget's member
Otherwise, it would get destroyed after exiting the create() function.
2023-08-13 22:34:14 +02:00
Andreas Kling
72c9f56c66 LibJS: Make Heap::allocate<T>() infallible
Stop worrying about tiny OOMs. Work towards #20449.

While going through these, I also changed the function signature in many
places where returning ThrowCompletionOr<T> is no longer necessary.
2023-08-13 15:38:42 +02:00
kleines Filmröllchen
ae039977d1 LibAudio: Use Encoder interface for WavWriter
The only real change here is the fallibility of the finalization
function, which makes WavWriter's code quite a bit nicer.
2023-08-12 12:25:26 -06:00
Valtteri Koskivuori
077a8058c3 LibIMAP+Mail: Implement RFC2047 message header encoding
This enables us to display email subject fields with non-ASCII
characters in Mail :^)
2023-08-12 11:45:52 -06:00
Valtteri Koskivuori
6128e859ac LibIMAP+Mail: Propagate errors from LibIMAP and MailWidget
This lets us bubble up errors from `LibIMAP::Client::send_command()`,
which can happen if the connection hangs or is taking a long time, and
the user closes Mail.
2023-08-12 11:45:52 -06:00
Valtteri Koskivuori
fc54bd03f9 Mail: Fetch and display date in e-mail list
Added a third column to show date of e-mail, as sent from the IMAP
server.
2023-08-12 11:45:52 -06:00
Valtteri Koskivuori
f74380eecf Mail: Keep user in the loop by updating status bar
The status bar now shows what the IMAP client is doing to keep the user
feeling like things are happening.
2023-08-12 11:45:52 -06:00
Valtteri Koskivuori
bdecb0a999 Mail: Don't crash on invalid/missing From Email header
During testing, I found that some Email clients/providers format the
From header field content with a lower case f, so `from:` instead of
`From:`. Our client previously gave up if it couldn't find one that
starts with a capital F. Now, we try both, and provide a fallback if
neither were found.
2023-08-12 11:45:52 -06:00
Valtteri Koskivuori
08fb98caac Mail: Fix crash when closing window before IMAP::Client connects
`MailWidget::m_imap_client` is only assigned after a connection is
established, so the user might close the main window before that
happens, especially if the connection hangs for whatever reason.
Now we check the `OwnPtr` before working with it.
2023-08-12 11:45:52 -06:00
kleines Filmröllchen
8ec9b26bba Help: Use new GML code generator 2023-08-11 21:33:48 +02:00
kleines Filmröllchen
1e67435ff5 Meta: Rename compile_gml to stringify_gml
This is what this function really does, it doesn't compile anything.
2023-08-11 21:33:48 +02:00
Gurkirat Singh
adf70b8a16 FileManager: Add "Copy Path" action to the context menus
Adding a feature to "Copy Path" of the selected entries to the
context menus of directory_view, tree_view and file_view which
copies the absolute path of the entry in the global clipboard.

It will change the label text "Copy Path" -> "Copy Paths" when
multiple entries are selected in the directory_view.
2023-08-10 09:17:26 +02:00
Andreas Kling
97ebfd9f0f LibJS: Make Value::to_string_without_side_effects() infallible
Work towards #20449.
2023-08-09 17:09:16 +02:00
Andreas Kling
09547ec975 LibJS: Make PrimitiveString::deprecated_string() infallible
Work towards #20449.
2023-08-09 17:09:16 +02:00
Jelle Raaijmakers
1c19c2bc92 PixelPaint: Guess image type based on its filename
We do this in ImageViewer so it understands TGA images; let's do it in
PixelPaint as well :^)
2023-08-09 14:40:26 +02:00
Jelle Raaijmakers
e272f796ad PixelPaint: Remove unused includes and method 2023-08-09 14:40:26 +02:00
Timothy Flynn
3e2449d1fe Browser+WebDriver: Set the initial URL to about:blank from WebDriver
We already do this for headless-browser. There's no need to open any URL
other than about:blank when starting a WebDriver session. We should also
do this from WebDriver code, rather than in special logic in Browser's
main.cpp.
2023-08-09 05:33:24 +02:00
Andreas Kling
2eaa528a0e LibJS: Rip out the AST interpreter :^)
This has been superseded by the bytecode VM, which is both faster
and more capable.
2023-08-08 13:07:13 +02:00
Andreas Kling
fcc72a787b Spreadsheet: Use the LibJS bytecode VM 2023-08-08 13:07:13 +02:00
Andreas Kling
acd366eddd Assistant: Use the LibJS bytecode VM 2023-08-08 13:07:13 +02:00
Andreas Kling
99ac34eeae Ladybird+LibWebView+Browser: Remove ability to run with AST interpreter 2023-08-08 13:07:13 +02:00
Andreas Kling
4eb43cc107 Browser: Remove ability to run with AST interpreter 2023-08-08 13:07:13 +02:00
Jelle Raaijmakers
14091f32c6 Browser: Synchronize database statements used for cookies
Since SQLServer is inherently asynchronous, database statements can run
in parallel. Our `CookieJar` did not require synchronous actions on the
database for its cookies, resulting in cookies not being set
immediately. This resulted in a bug that could be exposed by setting
`document.cookie` and immediately querying its value, revealing that the
cookie was not yet persisted.

Solve this by requiring all database statements to be executed
synchronously. Ideally SQLServer has a mechanism to determine interquery
dependencies and blocks until dependent queries are fully executed, but
until we have that, this works around that limitation.
2023-08-08 06:25:11 -04:00