Commit graph

13301 commits

Author SHA1 Message Date
asynts 01915a3027 AK+Format: Use the new format backend in the implementation. 2020-09-26 17:19:04 +02:00
asynts 2111fc5f63 AK+Format: Add new integer to string backend.
I put this into the <AK/PrintfImplementation.h> header in the hope that
it could be re-used by the printf implementation. That would not be
super trivial though, so I am not doing that now.
2020-09-26 17:19:04 +02:00
Itamar 8af67210cf HackStudio: Detach from debugged process before terminating
Fixes #3308
2020-09-26 17:18:21 +02:00
Itamar 8ce641cefc LibDebug: Add ability to detach from debuggee 2020-09-26 17:18:21 +02:00
Itamar 6c73fdf8d1 HackStudio: Fix FormEditor widget icons loading
Previously, when resolving the paths for the FormEditor widget icons
we didn't take into the account that calling class_name() returns the
widget name with a "GUI::" prefix.

Also, we now skip over widgets that we don't have an icon for.
2020-09-26 17:18:21 +02:00
Benoit Lormeau 8f34b493e4 AK: Enhance GenericLexer's string consumption
The `consume_quoted_string()` can now take an escape character. This allows it
(for example) to capture a string's enclosing quotes. The escape character is
optional by default.

You can also consume and unescape a quoted string with the eponymous method
`consume_and_unescape_string()`. It takes an escape character as parameter
(backslash by default). It builds a String in which common escape sequences
get... unescaped :^) (e.g. \n, \r, \t...).
2020-09-26 17:17:53 +02:00
Benoit Lormeau 1ab6dd67e9 AK: Alphabetically sort the ctype adapters 2020-09-26 17:17:53 +02:00
Benoit Lormeau 66481ad279 AK: Added explanatory comments in GenericLexer.h 2020-09-26 17:17:53 +02:00
Robbe De Greef fd7a2278b9 Documentation: Debian gcc-9 installation instructions
We already have installation instructions for ubuntu but not yet for
Debian. Gcc-9 is not available on Debian stable so instructions for
switching to and from Debian testing are added.
2020-09-26 17:16:53 +02:00
Robbe De Greef 926fb3ff48 Documentation: Serenity requires GCC 9 or higher
Gcc 8.3.0 (which is the current version in debian 10 stable) seems to
fail at building AK. New people might get stuck when they try to run
make inside the ./Build folder and fail at building serenity.
2020-09-26 17:16:53 +02:00
Tom 1727b2d7cd Kernel: Fix thread joining issues
The thread joining logic hadn't been updated to account for the subtle
differences introduced by software context switching. This fixes several
race conditions related to thread destruction and joining, as well as
finalization which did not properly account for detached state and the
fact that threads can be joined after termination as long as they're not
detached.

Fixes #3596
2020-09-26 13:03:13 +02:00
Andreas Kling b245121f13 Spreadsheet: clang-format 2020-09-26 00:10:57 +02:00
asynts 2030084746 AK: Borrow exact format syntax form std::format.
Instead of just implementing format specifiers ad-hog this commit
implements the exact syntax std::format uses.

There are still a ton of features that are not supported by this
implementation, however, the format specifiers should be parsed
correctly.

In some cases however, the format specifiers aren't quite parsed
correctly, for example:

    String::formatted("{:{}}", 42, 4)

should produce the string "  42" however an (unrelated) assertion fails.
This is because vformat doesn't consider nested parentheses. I have to
spend some time coming up with a simple way of doing this, I don't feel
like doing that right now.

The fundamental code for this already exists, by limiting the number of
format arguments (arbitrarily) to 256 large widths are used to encode
that these should be taken from other format parameters.
2020-09-26 00:00:50 +02:00
asynts 84d276dba0 AK: Add GenericLexer::remaining.
This is useful for debugging with printf :^).
2020-09-26 00:00:50 +02:00
Tibor Nagy 5b7decc3af LibGUI: Add alpha preview to ColorPicker 2020-09-26 00:00:08 +02:00
Tibor Nagy 59a0e5ba1e Applications: Paint transparency grids through StylePainter 2020-09-26 00:00:08 +02:00
Tibor Nagy 7ab04ea31a LibGfx: Add painting transparency grids to StylePainter 2020-09-26 00:00:08 +02:00
Linus Groh 7d83665635 LibJS+LibGUI+js: Handle UnterminatedRegexLiteral in syntax highlighters 2020-09-25 23:58:42 +02:00
AnotherTest 43b2928688 Spreadsheet: Add the 'Date' cell type
Since `JS::Date::value_of()' returns the timestamp in ms, this new type
assumes that the value given is also in ms.
2020-09-25 23:55:33 +02:00
AnotherTest a2efff9287 Spreadsheet: Treat an empty format string as "default" 2020-09-25 23:55:33 +02:00
AnotherTest e250591ff3 LibGUI: Do not clear the selection on right-click 2020-09-25 23:55:33 +02:00
AnotherTest 4748248fef Spreadsheet: Save and load cell types and formatting options 2020-09-25 23:55:33 +02:00
AnotherTest 395df7b27d Spreadsheet: Add conditional formatting
Currently only supports setting the foregound and the background colours.
This patch also unifies `foreground_color' and `background_color' used
throughout to a `Format' struct, in hopes of getting more formatting
options one day :P
2020-09-25 23:55:33 +02:00
AnotherTest 6902a09e47 LibGUI: Register the 'ColorInput' and 'Frame' widgets 2020-09-25 23:55:33 +02:00
Andreas Kling 9bcc168b9b Inspector: Move everything into the Inspector namespace 2020-09-25 21:18:41 +02:00
Ben Wiederhake 3843561a7e Travis: Automatically check for clang-format errors 2020-09-25 21:18:17 +02:00
Ben Wiederhake df4c9b729d Meta: Provide script to automatically flag bad formatting 2020-09-25 21:18:17 +02:00
Ben Wiederhake a2feef17bf Meta+Userland: Make clang-format-10 clean 2020-09-25 21:18:17 +02:00
Ben Wiederhake 934d4d4033 Meta+Services: Make clang-format-10 clean 2020-09-25 21:18:17 +02:00
Ben Wiederhake 42dd0675c0 Meta+MenuApplets: Make clang-format-10 clean 2020-09-25 21:18:17 +02:00
Ben Wiederhake 08f9bc26a6 Meta+LibHTTP through LibWeb: Make clang-format-10 clean 2020-09-25 21:18:17 +02:00
Ben Wiederhake ede5dbd7b3 Meta+LibC through LibHTTP: Make clang-format-10 clean
Why break at LibHTTP? Because "Meta+Libraries" would be insanely large,
and breaking between LibHTTP and LibJS makes the commits roughly evenly large.
2020-09-25 21:18:17 +02:00
Ben Wiederhake 64cc3f51d0 Meta+Kernel: Make clang-format-10 clean 2020-09-25 21:18:17 +02:00
Ben Wiederhake fa62c5595e Meta+Games: Make clang-format-10 clean 2020-09-25 21:18:17 +02:00
Ben Wiederhake 25488ddcad Meta+DevTools: Make clang-format-10 clean 2020-09-25 21:18:17 +02:00
Ben Wiederhake b3909ac0dd Meta+Demos: Make clang-format-10 clean 2020-09-25 21:18:17 +02:00
Ben Wiederhake 9ef1461ec9 Meta+Applications: Make clang-format-10 clean 2020-09-25 21:18:17 +02:00
Ben Wiederhake 8940bc3503 Meta+AK: Make clang-format-10 clean 2020-09-25 21:18:17 +02:00
Andreas Kling 468a29f4a1 LibGUI: Register the "text" property on GUI::TextEditor 2020-09-25 20:43:35 +02:00
Andreas Kling a5878175e2 LibGUI: Register the "text" property on GUI::Label 2020-09-25 20:41:30 +02:00
Andreas Kling d3adbed231 LibGUI: Move keyboard item activation up to AbstractView
All views want the same behavior, so move this to the base class. :^)
2020-09-24 21:35:47 +02:00
Andreas Kling d8553a6406 LibGUI: Stop editing in views when the view is hidden
This fixes an issue in FileManager where an editor opened in the table
view mode would remain open after switching to the icon mode.
2020-09-24 21:14:14 +02:00
Maciej Zygmanowski 53f3313cee UserspaceEmulator: Use Core::ArgsParser 2020-09-24 20:24:12 +02:00
Andreas Kling 5a0b1c46aa LibGUI: Make inline editing work in ColumnsView
All it took was overriding content_rect() :^)
2020-09-24 11:50:47 +02:00
Andreas Kling f52527ef9c LibGUI: Move editing key handling up to AbstractView
We want all views to respond to the editing key as long as the relevant
edit trigger is activated.
2020-09-24 11:42:11 +02:00
Andreas Kling ece555b684 LibGUI: Support inline editing in GUI::IconView
IconView now responds to the editing key (F2) if the view is editable.
It does feel a little bit weird to have content_rect() return the text
rect for an item, and not the whole item rect. This internal API could
probably be better.
2020-09-24 11:40:19 +02:00
Andreas Kling 7d30cf7122 FileManager: Teach DirectoryView subviews to create editing delegates
This enables inline editing of filenames for table views, where this is
already supported. More work in LibGUI will be required to support the
feature in icon and columns views.
2020-09-24 11:36:02 +02:00
Andreas Kling 701787b906 LibGUI: Support editing filenames through FileSystemModel :^) 2020-09-24 11:30:14 +02:00
Andreas Kling 7f8e18b86a LibGUI: Make SortingProxyModel forward is_editable() and set_data()
This will allow us to edit models through a SortingProxyModel. :^)
2020-09-24 11:29:21 +02:00
Andreas Kling b99eaad693 Kernel: Remove a whole bunch of unnecessary includes in Process.cpp 2020-09-24 10:49:43 +02:00