Commit graph

15153 commits

Author SHA1 Message Date
Andreas Kling
26cb083c6e FileManager: Created desktop shortcuts should use full basename
A shortcut to ReadMe.md should be called "ReadMe.md", not "ReadMe".
2020-12-28 09:38:11 +01:00
Andreas Kling
327f595f63 Browser: Show destination URLs as tooltips in the bookmarks bar 2020-12-28 01:43:58 +01:00
Andreas Kling
27262b639d Browser: Use Core::Object::remove_all_children() in bookmarks bar 2020-12-28 01:42:41 +01:00
Andreas Kling
71e9d06bb2 WindowServer: Spruce up the move/resize geometry label a little bit
Draw it in a threed style with a little shadow under it.
2020-12-28 01:40:09 +01:00
Linus Groh
58890e03b6 Everywhere: Move AppFile from LibGUI to LibDesktop
This was mentioned in #4574, and the more I think about it the more it
feels just right - let's move it there! :^)
Having to link LaunchServer against LibGUI explicitly should've been
telling enough...
2020-12-28 01:28:07 +01:00
Andreas Kling
97c42694db LibGUI: Make selected item tint color based on focused state
Use the inactive selection color for item icon tinting when the item
view is not focused.
2020-12-28 01:14:01 +01:00
Andreas Kling
0f1235be25 LibGUI: Show a hand cursor when hovering over a GUI::LinkLabel 2020-12-28 01:02:57 +01:00
Andreas Kling
644d5c5404 LibGUI: Switch focus if the currently focused widget is disabled 2020-12-28 01:02:57 +01:00
Brendan Coles
df6106854e Services: Fix typos 2020-12-28 00:55:45 +01:00
Andreas Kling
45d1c08386 Revert "Meta: Remove catchall lines in .gitignore (#4565)"
This reverts commit bee1774b92.

It made our .gitignore ignore *everything*.
2020-12-28 00:16:46 +01:00
Andreas Kling
4e99e013f0 Meta: Import the serenityos.org website
It doesn't seem right to not have the website in version control.
Also this way people can make changes to it. :^)
2020-12-28 00:12:12 +01:00
Andreas Kling
20e2700952 Kernel: Allow Userspace<T> pointers with invalid content
It's not an error to create a Userspace<T> that points to kernel memory
as the point of Userspace<T> is not to validate the address, but rather
to choose safe overloads that do validation before any data transfer
takes place.

Fixes #4581.
2020-12-27 23:43:15 +01:00
Brendan Coles
bceee87f61 LibELF: Reject ELF with program header p_filesz larger than p_memsz 2020-12-27 23:27:07 +01:00
Xavier Cooney
ca0f3db004 LibJS: Implement Array.prototype.sort() 2020-12-27 23:24:33 +01:00
Andreas Kling
a103eae0d4 LibJS: Run "prettier" on the tests :^) 2020-12-27 23:13:52 +01:00
Liav A
72b1998f0d Kernel: Introduce a new partitioning subsystem
The partitioning code was very outdated, and required a full refactor.
The new subsystem removes duplicated code and uses more AK containers.

The most important change is that all implementations of the
PartitionTable class conform to one interface, which made it possible
to remove unnecessary code in the EBRPartitionTable class.

Finding partitions is now done in the StorageManagement singleton,
instead of doing so in init.cpp.

Also, now we don't try to find partitions on demand - the kernel will
try to detect if a StorageDevice is partitioned, and if so, will check
what is the partition table, which could be MBR, GUID or EBR.
Then, it will create DiskPartitionMetadata object for each partition
that is available in the partition table. This object will be used
by the partition enumeration code to create a DiskPartition with the
correct minor number.
2020-12-27 23:07:44 +01:00
Liav A
bc18712adf Build: Fix build of grub image when choosing EBR scheme 2020-12-27 23:07:44 +01:00
Liav A
0f208669af Build: Fix build of grub image when choosing GPT scheme 2020-12-27 23:07:44 +01:00
Liav A
43d833d94f Kernel: Add DiskPartitionMetadata Class
This class will be used to describe a partition of a StorageDevice,
without creating a DiskPartition object.
2020-12-27 23:07:44 +01:00
Liav A
3a19e18d1e Kernel: Move Partition code files to the Storage folder
This folder is more appropriate for these files.
2020-12-27 23:07:44 +01:00
Liav A
247517cd4a Kernel: Introduce the DevFS
The DevFS along with DevPtsFS give a complete solution for populating
device nodes in /dev. The main purpose of DevFS is to eliminate the
need of device nodes generation when building the system.

Later on, DevFS will assist with exposing disk partition nodes.
2020-12-27 23:07:44 +01:00
Liav A
18e77aa285 Kernel: Add a method to determine the desired permissions of a Device
This method will be used later in DevFS, to set the appropriate
permissions for each device node.
2020-12-27 23:07:44 +01:00
Liav A
092a13211a Kernel: Convert read_block method to get a reference instead of pointer
BlockBasedFileSystem::read_block method should get a reference of
a UserOrKernelBuffer.

If we need to force caching a block, we will call other method to do so.
2020-12-27 23:07:44 +01:00
dantje
d1366b660e
LibGUI: Use Object::remove_all_children() in BreadcrumbBar (#4580) 2020-12-27 23:07:10 +01:00
Nathan Lanza
d1891f67ac
AK: Use direct-list-initialization for Vector::empend() (#4564)
clang trunk with -std=c++20 doesn't seem to properly look for an
aggregate initializer here when the type being constructed is a simple
aggregate (e.g. `struct Thing { int a; int b; };`). This template fails
to compile in a usage added 12/16/2020 in `AK/Trie.h`.

Both forms of initialization are supposed to call the
aggregate-initializers but direct-list-initialization delegating to
aggregate initializers is a new addition in c++20 that might not be
implemented yet.
2020-12-27 23:06:37 +01:00
Stephen Gregoratto
1867c928a9 LibC: Add fseeko/ftello
This changes the signatures for FILE::seek and FILE::tell, to use
`off_t` as they use lseek internally. `fpos_t` is also redefined to use
`off_t`.

Dr. POSIX says that fpos_t is:

> A non-array type containing all information needed to specify uniquely
> every position within a file.

In practice, most *NIX typedef it to `off_t`, or a struct containing an
`off_t` and some internal state.
2020-12-27 23:05:14 +01:00
Nathan Lanza
bee1774b92
Meta: Remove catchall lines in .gitignore (#4565)
These two lines caused this local .gitignore to supersede all inputs
in any files specified by a user's `core.excludesFile` configuration
since the first match was going to be `!*.*` for any file with a
decimal or any directory. `git check-ignore -v somefile` can be used to
test this.
2020-12-27 23:04:57 +01:00
Stephan Unverwerth
f603128e55 LibJS: Fix old object numeric key test now that toString() is correct 2020-12-27 23:04:09 +01:00
Stephan Unverwerth
d3524f47a0 LibJS: Implement (mostly) spec compliant version of Number.toString() 2020-12-27 23:04:09 +01:00
Stephan Unverwerth
be9c2feff0 LibJS: Fix parsing of numeric object keys
Numeric keys were interpreted as their source text, leading to
something like {0x10:true} to end up as {"0x10":true}
instead of {16:true}
2020-12-27 23:04:09 +01:00
Idan Horowitz
fdacfefd09 LibVT: Use the 'U+FFFD replacement character' to indicate a parsing error
Based on this recommendation in the Unicode standard:
https://www.unicode.org/versions/Unicode13.0.0/ch23.pdf (Page 32)
2020-12-27 22:49:08 +01:00
Linus Groh
ddeb261bc2 Terminal+LibVT: Use GUI::AppFile 2020-12-27 22:46:52 +01:00
Linus Groh
6f95a6ca27 Taskbar: Use GUI::AppFile 2020-12-27 22:46:52 +01:00
Linus Groh
00402686f3 SystemMenu: Use GUI::AppFile 2020-12-27 22:46:52 +01:00
Linus Groh
bb1d52eaf0 LaunchServer: Use GUI::AppFile 2020-12-27 22:46:52 +01:00
Linus Groh
616c217a09 LibGUI: Add GUI::AppFile, a simple wrapper around .af files 2020-12-27 22:46:52 +01:00
Brendan Coles
fae2304c67 Kernel: CoreDump::write_program_headers: set NOTE p_memsz to p_filesz 2020-12-27 22:45:25 +01:00
Łukasz Maciejewski
518ba73dcb
LibTextCodec: Add Latin2 text decoder (#4579) 2020-12-27 22:44:38 +01:00
Rok Povsic
c7911fdce9 HexEditor: Select first character by default
The first character was already selected (with the selection greyed-out),
and a selection span of 1 was shown, so it's natural than the selection
from/to numbers should be 0/0, not -1/-1.
2020-12-27 21:25:54 +01:00
Rok Povsic
b2a6d2cea4 HexEditor: Don't update selection numbers when clicking the last+1 char
Clicking at the cell after the last one, where there's no character,
used to update the selection from/to numbers. Since there's no character
there, that shouldn't happen.
2020-12-27 21:25:54 +01:00
Rok Povsic
5e66eda688 HexEditor: Make single-character selection display proper start/end
Previously, -1 / -1 was displayed.

Fixes #3555
2020-12-27 21:25:54 +01:00
Linus Groh
fec7501d1a Meta: Run lint-prettier.sh on CI 2020-12-27 21:25:27 +01:00
Linus Groh
ee719c23d4 Meta: Add lint-prettier.sh
This is a script similar to the clang-format one to ensure prettier
formatting of most JavaScript files.
2020-12-27 21:25:27 +01:00
Linus Groh
51bcfb5a44 Meta: Update lint-{clang-format,shell-scripts}.sh to take a list of files
This should speed up pre-commit a bit as only files that are staged will
be processed, and clang-format and shellcheck are only invoked once, not
for every file. When no arguments are given (e.g. on CI), it still uses
'git ls-files'.
2020-12-27 21:25:27 +01:00
Linus Groh
a56b3cbf7c Meta: Set 'pipefail' option correctly in shell scripts
This needs '-o' to work correctly. Also update the shebang to bash in
some scripts as shellcheck was complaining about pipefail not being a
POSIX shell thing otherwise.
2020-12-27 21:25:27 +01:00
Linus Groh
5122f98198 Base+LibJS+LibWeb: Make prettier clean
Also use "// prettier-ignore" comments where necessary rather than
excluding whole files (via .prettierignore).
2020-12-27 21:25:27 +01:00
Andreas Kling
76239f89c2 LibGUI: Select the edited text by default in StringModelEditingDelegate
This way, if you press F2 to edit the name of an item, the name will be
selected in the editor that pops up, and you can start typing a new
name for it immediately.
2020-12-27 19:08:19 +01:00
Andreas Kling
f294bdedcc LibGUI: Make IconView return a larger content rect for editing
This fixes a visual glitch where editing the name of an item in an
IconView would cut off the edited text.
2020-12-27 19:05:43 +01:00
Andreas Kling
04f1f74b85 LibGUI+WindowServer: Tweak hover shadows slightly
Move the shadow 1 more pixel away from the unhovered icon location,
making a total 2 pixel distance between the icon and the shadow.
Also tweak the shadow color to be a darkened variant of the base color
underneath the icon.
2020-12-27 18:43:34 +01:00
Linus Groh
fe6a312714 Base+Playground: Add app-playground.png 16x16 and 32x32 icons 2020-12-27 18:36:43 +01:00