Commit graph

2454 commits

Author SHA1 Message Date
Andreas Kling
548081ea23 Userland+Base: Make the window titlebar font configurable separately
Instead of defaulting to "bold variant of the system default font",
let's allow the user to set any font they want as the titlebar font.
2022-08-01 10:29:53 +02:00
Andreas Kling
8690f36eb3 CrashReporter: Turn off line wrapping in the various text editors
It's much nicer to look at a backtrace when it has one line per stack
frame instead of a random number of lines.
2022-08-01 10:29:53 +02:00
Andreas Kling
f80e19086e CrashReporter: Focus the "Close" button on startup
The most common action people will want to do with these windows is
to close them, so let's make that the first choice.
2022-08-01 10:29:53 +02:00
Andreas Kling
b480f02117 CrashReporter: Add ellipsis (...) to "Save Backtrace" button
Since you must provide a file name before saving occurs, this button
should have an ellipsis.
2022-08-01 10:29:53 +02:00
networkException
f722612e17 Browser: Set preferred color scheme when constructing a tab
Previously we would only tell OutOfProcessWebView about the preferred
color scheme when changing it in the browser's settings.

This patch implements reading in the current config value to set the
scheme immediately :^)

See SerenityOS update (July 2022) https://youtu.be/aO0b2X7tzuk?t=2171
2022-08-01 00:20:43 +02:00
Liav A
889b9d029e SystemMonitor: Remove the Hardware tab
This will allow us to essentially remove /proc/pci node for good, as
well as to create a better GUI application to contain PCI information
with other system hardware info too.
2022-07-30 23:29:07 +02:00
Undefine
97cc33ca47 Everywhere: Make the codebase more architecture aware 2022-07-27 21:46:42 +00:00
Sam Atkins
0fcb6920e3 Browser: Give BookmarksBarWidget a minimum size
Without this, it gets a minimum size that's very large and stops you
from resizing the Browser window narrower than 609px.
2022-07-27 00:01:42 +01:00
kleines Filmröllchen
29e2b1c386 Piano: Replace knob instantiations with ProcessorParameterWidgets
The only remaining "manual" knob instatiation is the octave, which will
be moved into an entirely different UI in the future.
2022-07-25 15:25:13 +02:00
kleines Filmröllchen
ab2d8edcbb LibDSP: Remove Track volume getters and setters 2022-07-25 15:25:13 +02:00
kleines Filmröllchen
a0b2e8608b Piano: Remove waveform cycling with C
This is not the most useful keyboard binding anyways, plus it will be
extremely hacky to implement it with the generic processor parameter
widgets. Therefore, we'll get rid of it and add back a more generic
keyboard binding system later.
2022-07-25 15:25:13 +02:00
kleines Filmröllchen
196841fd3a Piano: Add a generic processor parameter widget
This automatically creates the correct collection of name label, value
label and "editor" (knob, checkbox, dropdown) depending on the processor
type and layouts them vertically.
2022-07-25 15:25:13 +02:00
kleines Filmröllchen
6389384882 Piano: Add Toggle parameter widget
This is for enum widgets; though positioning is not correct as
checkboxes need more options for text-less layout.
2022-07-25 15:25:13 +02:00
MacDue
42a7dc9fe2 MouseSettings: Show highlight toggle shortcut and new layout tweaks
This now shows the shortcut to enable mouse pointer highlighting below
the preview. The GML has also been updated to take advantage of the new
layout features rather than using fixed heights.
2022-07-24 15:10:01 +01:00
David Smith
9ca580aac6 SystemMonitor: Keep selected row in ProcessMemoryMapWidget
The process memory view loses the selected row when it's redrawn. Call
update() instead of invalidate() to fix this.
2022-07-24 14:05:35 +01:00
Liav A
b5e5b299c4 Userland: Remove stale remainders of old framebuffer devices 2022-07-23 10:42:08 +01:00
networkException
7a2bef7fe1 Help: Make history navigation work with man pages opened using help urls
This patch implements man pages opened using the help url protocol
properly getting added to the navigation history as well as enabling
the back and forward buttons in such cases.
2022-07-22 23:06:54 +01:00
kleines Filmröllchen
3123753e6b Piano: Increase AudioPlayerLoop resilience against scheduling weirdness
This is a temporary fix until we move AudioPlayerLoop to direct buffer
enqueuing.
2022-07-22 19:35:41 +01:00
kleines Filmröllchen
4941cffdd0 Piano+LibDSP: Move Track to LibDSP
This is a tangly commit and it fixes all the bugs that a plain move
would have caused (i.e. we need to touch other logic which had wrong
assumptions).
2022-07-22 19:35:41 +01:00
Samuel Bowman
fadd69263a PartitionEditor: Add size column 2022-07-21 20:13:44 +01:00
Samuel Bowman
ba9f60785b PartitionEditor: Add total blocks column 2022-07-21 20:13:44 +01:00
Samuel Bowman
2f8c20816e LibPartition: Fix end block off by one error
Previously, end block was inconsistent. GUIDPartitionTable treated
end block as an inclusive bound, while MBRPartitionTable and
EBRPartitionTable treated end block as an exclusive bound.
Now all three treat end block as an inclusive upper bound.
2022-07-21 20:13:44 +01:00
Samuel Bowman
fb4221ad52 PartitionEditor: Abort and show a dialog if not running as root 2022-07-21 20:13:44 +01:00
Samuel Bowman
7a8953a833 PartitionEditor: Add the beginnings of a partition editor :^)
This adds a new application PartitionEditor which will eventually be
used to create and edit partition tables. Since LibPartition does not
know how to write partition tables yet, it is currently read-only.

Devices are discovered by scanning /dev for block device files.
Since block devices are chmod 600, PartitionEditor be must run as root.

By default Serenity uses the entire disk for the ext2 filesystem
without a partition table. This isn't useful for testing as the
partition list for the default disk will be empty. To test properly,
I created a few disk images using various partitioning schemes
(MBR, EBR, and GPT) and attached them using the following command:

export SERENITY_EXTRA_QEMU_ARGS="
  -drive file=/path/to/mbr.img,format=raw,index=1,media=disk
  -drive file=/path/to/ebr.img,format=raw,index=2,media=disk
  -drive file=/path/to/gpt.img,format=raw,index=3,media=disk"
2022-07-21 20:13:44 +01:00
kleines Filmröllchen
00e13b5b27 LibDSP: Rename library namespace to DSP
That's the standard naming convention, but I didn't follow it when
originally creating LibDSP and nobody corrected me, so here I am one
year later :^)
2022-07-19 11:17:45 +01:00
kleines Filmröllchen
3f59356c79 LibAudio: Rename ConnectionFromClient to ConnectionToServer
The automatic nomenclature change for IPC sockets got this one wrong.
2022-07-19 11:17:45 +01:00
Lucas CHOLLET
70846d701c LaunchServer+SystemServer: Move the portal to a user-specific directory
Various changes are needed to support this:
 - The directory is created by Core::Account on login (and located in
   /tmp).
 - Service's sockets are now deleted on exit (to allow re-creation)
 - SystemServer needs to handle SIGTERM to correctly destroy services.
2022-07-19 11:15:14 +01:00
MacDue
8266ebf3c6 TextEditor: Debounce update_preview() in on_change event
This avoids lag spikes when undoing/redoing large chunks of HTML/CSS
with the HTML preview open. This had been bugging me when reducing
LibWeb issues in the text editor. The debounce timeout is 100ms
so the delay should not be noticeable.
2022-07-19 11:10:02 +01:00
Karol Kosek
0795311356 Calculator: Set button colors from system palette
Previously, changing a system theme with Calculator opened made buttons
with custom color not to update to the new theme - the background color
remained from the previous one.

This is because when setting the color, the widget has to copy the
current palette and modify the foreground color there, which means it
will no longer refer to the system theme and any change there will not
happen here.

Using colors from a system palette fixes this issue and makes buttons
look slightly different from what was here before. But that is because
they're now somewhat more integrated with the system themes! :^)

Type                | Old color    | New color role
----                | ---------    | --------------
Numbers             | "blue"       | SyntaxNumber
Functions (sqrt, %) | "blue"       | SyntaxFunction
Operators (+ - * /) | text-default | SyntaxOperator
Backspace, CE and C | "brown"      | SyntaxControlKeyword
Memory operators, = | "red"        | SyntaxPreprocessorValue
2022-07-17 08:44:31 +01:00
Karol Kosek
f4aba71fc1 PixelPaint: Export images using the editor title as a default basename 2022-07-17 08:42:21 +01:00
FrHun
6f0fde4559 KeyboardSettings: Improve KeymapDialog layout 2022-07-15 12:34:25 +02:00
FrHun
c79e3e5a8b Applications: Make settings outer margins and spacing consistent 2022-07-15 12:34:25 +02:00
FrHun
25ffe234ac PixelPaint: Tweak FilterGallery layout
This brings the spacing in line with the rest of the system, and
removes unneeded margins that only bloated the layout and caused edges
to be misaligned.
2022-07-15 12:34:25 +02:00
FrHun
761325cd66 CrashReporter: Tweak layout
These changes bring the margins, spacing, and sizes more in line with
what is used in the rest of the system.
2022-07-15 12:34:25 +02:00
Liav A
e4e5fa74d0 Kernel+Userland: Rename prefix of user_physical => physical
There's no such supervisor pages concept, so there's no need to call
physical pages with the "user_physical" prefix anymore.
2022-07-14 23:27:46 +02:00
Liav A
1c499e75bd Kernel+Userland: Remove supervisor pages concept
There's no real value in separating physical pages to supervisor and
user types, so let's remove the concept and just let everyone to use
"user" physical pages which can be allocated from any PhysicalRegion
we want to use. Later on, we will remove the "user" prefix as this
prefix is not needed anymore.
2022-07-14 23:27:46 +02:00
Maciej
4c23264efd NetworkSettings: Remove warning about reboot 2022-07-14 23:26:47 +02:00
networkException
101c5566cb Browser: Make "Go Home" open a new tab on middle mouse click 2022-07-14 13:17:33 +02:00
networkException
6cd82f0100 Browser: Allow opening bookmarks in new tab on middle mouse click
This patch updates all bookmark buttons to allow middle mouse button
pressing and respond to a middle mouse click by opening the url in a new
tab.
2022-07-14 13:17:33 +02:00
networkException
5c1f1209fc Browser: Use OpenInNewTab parameter in on_bookmark_click handler
This patch makes the function signature of the on_bookmark_click handler
more readable by replacing `Mod_None` with `OpenInNewTab::No` and
`Mod_Ctrl` with `OpenInNewTab::Yes`.
2022-07-14 13:17:33 +02:00
sin-ack
c8585b77d2 Everywhere: Replace single-char StringView op. arguments with chars
This prevents us from needing a sv suffix, and potentially reduces the
need to run generic code for a single character (as contains,
starts_with, ends_with etc. for a char will be just a length and
equality check).

No functional changes.
2022-07-12 23:11:35 +02:00
sin-ack
3f3f45580a Everywhere: Add sv suffix to strings relying on StringView(char const*)
Each of these strings would previously rely on StringView's char const*
constructor overload, which would call __builtin_strlen on the string.
Since we now have operator ""sv, we can replace these with much simpler
versions. This opens the door to being able to remove
StringView(char const*).

No functional changes.
2022-07-12 23:11:35 +02:00
sin-ack
e5f09ea170 Everywhere: Split Error::from_string_literal and Error::from_string_view
Error::from_string_literal now takes direct char const*s, while
Error::from_string_view does what Error::from_string_literal used to do:
taking StringViews. This change will remove the need to insert `sv`
after error strings when returning string literal errors once
StringView(char const*) is removed.

No functional changes.
2022-07-12 23:11:35 +02:00
sin-ack
c70f45ff44 Everywhere: Explicitly specify the size in StringView constructors
This commit moves the length calculations out to be directly on the
StringView users. This is an important step towards the goal of removing
StringView(char const*), as it moves the responsibility of calculating
the size of the string to the user of the StringView (which will prevent
naive uses causing OOB access).
2022-07-12 23:11:35 +02:00
sin-ack
60f6bc902b Userland: Convert command line arguments to String/StringView
StringView was used where possible. Some utilities still use libc
functions which expect null-terminated strings, so String objects were
used there instead.
2022-07-12 23:11:35 +02:00
Karol Kosek
ff0b4bf360 HexEditor: Gray-out null bytes
This should improve an overall visibility of "meaningful" data. :^)
2022-07-11 18:11:11 +02:00
Lucas CHOLLET
6f04a3778b FileManager: Change PGID of spawned processes
Processes spawned by FileManager (e.g. through double-click) now set
their PGID to that of the session leader. It allows the filemanage
instance to be killed without propagating the signal to the new process.
2022-07-09 11:41:07 +01:00
Maciej
7dd3c5c981 Applications: Add a new NetworkSettings application 2022-07-09 09:22:25 +01:00
Tim Schumacher
5efa8e507b Kernel: Implement an axallowed mount option
Similar to `W^X` and `wxallowed`, this allows for anonymous executable
mappings.
2022-07-08 22:27:38 +00:00
Tim Schumacher
84e1017272 Userland: Add /usr/local/sbin to PATH by default
`e2fsprogs` adds its tools there.
2022-07-08 12:04:01 +02:00
thankyouverycool
69a385f559 FontEditor: Rename FontEditorWidget => FontEditor::MainWidget 2022-07-06 14:25:30 +02:00
thankyouverycool
dcf6454059 FontEditor: Hide Widget::set_font() in GlyphEditorWidget
We were already doing the same for its getters, and this makes its
API more consistent with GlyphMapWidget.
2022-07-06 14:25:30 +02:00
thankyouverycool
bae36a7264 FontEditor: Remove unused headers and member variables 2022-07-06 14:25:30 +02:00
thankyouverycool
2227f8f8ae FontEditor: Simplify GlyphMapWidget context menu construction 2022-07-06 14:25:30 +02:00
thankyouverycool
dc3ee84aca FontEditor: Update GML for new layout system
This patch removes deprecated GML properties and manual sizing
calculations in favor of the new UIDimensions, and registers more
widgets in the FontEditor namespace to simplify widget setup.
2022-07-06 14:25:30 +02:00
thankyouverycool
1b9dff5fb1 FontEditor: Convert preview window to GML and propagate its errors 2022-07-06 14:25:30 +02:00
thankyouverycool
7376c68652 FontEditor: Propagate errors when pushing undo commands 2022-07-06 14:25:30 +02:00
thankyouverycool
ae333fad98 FontEditor: Normalize GlyphMap selection before creating UndoSelection
Fixes bogus indexing crashes when creating new restore states.
2022-07-06 14:25:30 +02:00
thankyouverycool
9962a744eb FontEditor: Improve error propagation during construction
FontEditor now builds its actions, toolbars, models and menus
with fallible methods. Widget assignment from GML is now organized
in order of use.
2022-07-06 14:25:30 +02:00
DexesTTP
7ceeb74535 AK: Use an enum instead of a bool for String::replace(all_occurences)
This commit has no behavior changes.

In particular, this does not fix any of the wrong uses of the previous
default parameter (which used to be 'false', meaning "only replace the
first occurence in the string"). It simply replaces the default uses by
String::replace(..., ReplaceMode::FirstOnly), leaving them incorrect.
2022-07-06 11:12:45 +02:00
MacDue
3294753d6c Browser+WebContent: Fix inspecting non-visible nodes
I already fixed the crash from this in #14470, but didn't fully fix
the issue. Currently the browser just avoids sending the
inspect_dom_node() IPC call for non-visible nodes.

The main problem with this is it means the browser keeps displaying
the overlay for the previously selected node. This commit fixes
the crash in the WebContent side, so the IPC call can still be made
and the selection correctly updated.
2022-07-05 13:09:11 +02:00
MacDue
95e6e3be74 Browser: Fix crash if clicking on non-visible nodes in the inspector
If you attempt to inspect a non-visible dom node it will hit
various assertions as things like style have not been computed.

With this change attempting to inspect these nodes will simply
clear the style and box model tabs.
2022-07-03 20:45:11 +02:00
Maciej
e1722d39df BrowserSettings: Make content filtering on by default
It was default in Browser but not default in settings, so the checkbox
was initially not checked.
2022-07-03 13:19:52 +02:00
Maciej
503e4b805f BrowserSettings: Make default content filtering flag constexpr
And add s_ prefix per coding style guidelines.
2022-07-03 13:19:52 +02:00
Andreas Kling
e98f8f20df Run: Don't try to set a history selection if history is empty
This fixes an assertion on startup when there's no command history.
2022-06-30 17:31:07 +02:00
Lennon Donaghy
fbb8893513 PixelPaint: Omit file extension in tab/editor titles
This commit removes the file extension in the presented title of images,
and fixes an issue with the previous commit wherein "save as" on an
image would always append ".pp" as an extension, even when the filename
already included this extension.
2022-06-30 11:54:29 +02:00
Lennon Donaghy
7919b4368e PixelPaint: Use image title as default filename for "save as"
When creating a new image, a title can be entered. This title was not
used when saving the file however, so naming it was pointless, as the
title used would be whatever was entered during the first save.

This commit makes it so that the default text in the "save as" dialogue
is whatever was entered previously when the image was created.
2022-06-30 11:54:29 +02:00
FrHun
307d113594 Spreadsheet: Make conditional-formatting condition-list scrollable 2022-06-30 11:53:50 +02:00
FrHun
f59c167bb0 Applications+Games+LibGUI: Fix layout problems 2022-06-30 11:51:25 +02:00
FrHun
c2d344bd8c ThemeEditor: Fix layout for new layout system 2022-06-30 11:51:25 +02:00
FrHun
93112458b8 Spreadsheet: Use new layout system 2022-06-30 11:51:25 +02:00
FrHun
a50a48f6b4 Terminal: Repair resizing
Because the content widget gets modified when resizing, the usual way of
calculating the min_size won't work for the Terminal window. So the
automatic min_size calculation will be disabled for now.
2022-06-29 19:11:13 +01:00
Andrew Dykema
2a7b3ca4b8 Calender: Add ability to set the time of day for an event 2022-06-29 03:27:59 +00:00
FrHun
a6ec2b9d0a LibGUI+Applications: Use the new layout system in the settings screens 2022-06-28 17:52:42 +01:00
Lucas CHOLLET
0c2dc6be66 Help: Use LibWeb to open files via RequestServer 2022-06-27 20:22:15 +01:00
Lucas CHOLLET
662711fa26 Browser+LibWeb+WebContent: Allow Browser to load local files
To achieve this goal:
 - The Browser unveils "/tmp/portal/filesystemaccess"
 - Pass the page through LoadRequest => ResourceLoader
 - ResourceLoader requests a file to the FileSystemAccessServer via IPC
 - OutOfProcessWebView handles it and sends a file descriptor back to
 the Page.
2022-06-27 20:22:15 +01:00
Andrew Kaster
9d70f0383f Browser: Remove GML formatting errors from BrowserSettingsWidget.gml
Regressed in commit 6571455499

This is supposed to be caught by the GML format lint in Azure, but it
looks like a :ninjamerge: occured instead :^)
2022-06-27 08:23:13 +01:00
Ali Mohammad Pur
db4a5aafc8 Spreadsheet: Display a detailed view of a cell error on hover
With this, Spreadsheet can now show an almost full stack trace for the
error (which is infintely better than just the error message).
2022-06-26 22:21:17 +01:00
Ali Mohammad Pur
64ef808aeb Spreadsheet: Allow importing sheets into an existing workbook 2022-06-26 22:21:17 +01:00
Ali Mohammad Pur
135683795b Spreadsheet: Throw if lookup value doesn't exist and no default is given
And explicitly state which value wasn't found and where in the error.
2022-06-26 22:21:17 +01:00
Ali Mohammad Pur
746b8ec8de Spreadsheet: Make it possible to refer to ranges in other sheets
Now the range A0:C4 in a sheet named "foo" can be represented as:

    R`sheet("foo"):A0:C4`

This makes it possible to do cross-sheet lookups and more.
2022-06-26 22:21:17 +01:00
Ali Mohammad Pur
0e2f4c50d3 Spreadsheet: Prevent OOB access to text editor buffer
For some reason LibGUI sends two events for each edit, and one of them
contains an OOB cursor if a character was deleted.
This works around that for now.
2022-06-26 22:21:17 +01:00
Xexxa
b691269912 Base+Browser+BrowserSettings: Add default page for new tab 2022-06-26 22:18:30 +01:00
Xexxa
6571455499 Browser+BrowserSettings: Add preference for new tab 2022-06-26 22:18:30 +01:00
Michał Lach
e9dae38f38 Terminal+TerminalSettings: Add caret customization 2022-06-22 12:12:00 +01:00
Torstennator
5aeb6552f0 PixelPaint: Add level sliders for brightness, contrast and gamma
This patch adds a basic dialog to change brightness, contrast and gamma
correction for the selected layer.
2022-06-21 18:23:01 +01:00
Linus Groh
25667a834c ThemeEditor: Run gml-format 2022-06-17 19:49:16 +01:00
networkException
8163faa696 DisplaySettings: Use IPC calls instead of current_system_theme helper 2022-06-17 19:46:30 +01:00
networkException
28f4b67bdc ThemeEditor: Allow temporarily overriding the system theme
This patch introduces two new buttons to apply the current theme being
edited to the whole system and to reset to the previously selected
on disk system theme.
2022-06-17 19:46:30 +01:00
networkException
e2d2b403e9 DisplaySettings: Handle an override theme being active
This patch updates the "Theme" tab to react to an override theme being
set. The preview will reflect the override theme and the combo box will
show no selection.
2022-06-17 19:46:30 +01:00
networkException
278fd28502 DisplaySettings: Update selected theme on change
Previously the "Theme" tab in DisplaySettings would only reflect the
current theme on startup and get out of sync when a theme would get
selected using the taskbar menu.
2022-06-17 19:46:30 +01:00
ferhatgec
e9e1959d4c BrowserSettings: Avoid adding empty domain to content filter 2022-06-17 19:45:52 +01:00
Karol Kosek
54687c63af PixelPaint: Add Smooth Pixels scaling option 2022-06-16 14:26:55 +01:00
Karol Kosek
1759d8f34e ImageViewer: Add Smooth Pixels image scaling option 2022-06-16 14:26:55 +01:00
networkException
621349ed14 DisplaySettings: Use absolute path for loading mouse settings icon
This patch fixes DisplaySettings crashing when launching it from a non
root working directory.
2022-06-14 14:57:09 +01:00
MacDue
5caf307ec0 WindowServer+MouseSettings: Toggle cursor highlighting with Super+H
Rather than enabling/disabling cursor highlighting by going into mouse
settings, you can now instead toggle it any time with Super+H. Mouse
settings now is only for customising the look of the highlighting.
2022-06-10 23:02:34 +01:00
MacDue
3c2c6790df MouseSettings: Support animated cursors in the highlighting preview 2022-06-10 23:02:34 +01:00
MacDue
ceab9903cd MouseSettings: Avoid rendering artifact on loading highlighting defaults
Occasionally, the top of the preview would have the wrong opacity. This
seems to be solved by updating the widget again a bit after setting
the values.
2022-06-10 23:02:34 +01:00
MacDue
44cd973148 WindowServer+MouseSettings: Make default cursor highlight more visible
A litte smaller, and red with a slightly higher opacity, which
is much easier to make out.
2022-06-10 23:02:34 +01:00
FrHun
fc3fd7212f Run: Use the new DialogButton 2022-06-10 23:02:07 +01:00
FrHun
8081a8a5de LibGUI: Add layout spacer support to GML
This is a bit of a hack, but it is an easy way to finally get spacers
into GML.
This will translate well if spacers are later to become child objects of
the continer widget.
2022-06-10 21:26:06 +01:00
redsnout
fd641f6f17 Calculator: Replace "Euler's Constant" with "Euler's Number" in menu
This is meant to address #14234 by renaming the "Euler's Constant"
menu item to "Euler's Number". This commit removes the existing
"eulers.png" and replaces with a new "eulers_number.png" for clarity.
2022-06-10 20:03:37 +01:00
Andrew Dykema
8c37e508f2 Calculator: Add Phi constant 2022-06-09 19:17:43 +01:00
Aaron J Yoder
9a07f9cdac PixelPaint: Speed up and improve memory usage of bucket fill tool
This algorithm utilizes a modified scanline method that takes advantage
of the fact that if you are filling rows starting from the top left and
going right, you do not need to check pixels very often except in
certain cases such as at the beginning or end of a row.

There are some tests on top of this that ensure correct filling in all
other cases. This leads to much-improved speed compared to the
4-directional queue method, and no heap allocations.
2022-06-08 21:53:06 +01:00
MacDue
6fca2134d2 Mail: Fix mail settings not opening after prompt to configure
If the extra "/bin/MailSettings" argument is passed to
Desktop::Launcher::open() it then is passed as an argument to
MailSettings. This then causes the args parsing to fail leading to
the settings not opening.
2022-06-06 15:14:08 +01:00
MacDue
d116fc01e8 MouseSettings: Get highlight preview cursor via cursor theme Config.ini
Fixes #14200
2022-06-06 11:03:05 +01:00
MacDue
b558d899ea MouseSettings: Add tab to configure cursor highlighting
This adds a nice little tab, including a preview, for configuring
the cursor highlighting. Which allows setting the color, size/radius,
and opacity.
2022-06-05 22:42:35 +01:00
networkException
52ee5026ea LibGUI+Browser: Fix crash when activating a "Tab n" action
Previously we would try setting the tab index regardless if that tab
actually existed, resulting in Browser crashing by either pressing
Control + N or using the CommandPalette.
2022-06-05 13:46:52 +01:00
MacDue
5fd5a03d1f Applications: Use spawn_or_show_error() for common spawn pattern 2022-06-03 12:29:56 +01:00
Karol Kosek
72be27e16c PixelPaint: Use default buttons in EditGuideDialog 2022-06-02 22:33:00 +02:00
Karol Kosek
9f1f1b8472 Userland: Use default buttons instead of manually handling return press
Besides simplifying the code, this will also draw outline for these
buttons as a cue for a user!
2022-06-02 22:33:00 +02:00
MacDue
f1baa56cc8 PixelPaint: Add rounded rectangles (both with/without antialiasing) 2022-06-02 13:20:27 +02:00
MacDue
a30c81104d PixelPaint: Add option for antialiased lines 2022-06-02 13:20:27 +02:00
MacDue
f98dad94fb PixelPaint: Enable antialiased option for outline ellipsis 2022-06-01 19:33:45 +02:00
MacDue
8ac5f625e9 LibGfx: Rename draw_ellipse/circle to fill_ellipse/circle
This makes these functions more consistent with the non-aa painter.
2022-06-01 19:33:45 +02:00
Olivier De Cannière
6c202ee4a9 LibGUI: Fix typo in ConnectionToWindowManagerServer 2022-06-01 19:31:34 +02:00
networkException
d034675032 Browser: Always show menu for additional bookmarks when one is hidden
This patch fixes the additional bookmarks menu button getting pushed all
they way to the right until a bookmark is out of bounds of the bar by
instead collapsing a bookmark into the menu as soon as it intersects
with the additional button.
2022-05-30 17:33:11 +01:00
Linus Groh
0c3db153cf SoundPlayer: Insert separator after play/stop and back/next buttons 2022-05-29 15:27:03 +02:00
Linus Groh
094487b5d4 SoundPlayer: Replace two manual key event checks with action shortcut 2022-05-29 15:27:03 +02:00
Linus Groh
1940363e0b SoundPlayer: Replace regular buttons with action-based toolbar buttons
This looks nicer in every way imaginable.
2022-05-29 15:27:03 +02:00
Linus Groh
5c79681611 FileManager: Replace '->' with '→' in symlink statusbar info message
This looks so much nicer, as the '-' and '>' are not aligned in the
default font configuration.
2022-05-29 15:22:00 +02:00
Linus Groh
173dcfb7cb Everywhere: Fix a bunch of typos 2022-05-29 15:22:00 +02:00
Rafał Babiarz
b162b7eec6 Browser+LibWeb+WebContent: Add ability to inspect session storage 2022-05-28 23:54:06 +01:00
Karol Kosek
3667d7e93c Userland: Depend some applications on WebContent if it's being used
Deduced this mostly by looking at unveil()s.
2022-05-26 21:54:58 +01:00
Karol Kosek
0534a68c6c Welcome: Depend on Help 2022-05-26 21:54:58 +01:00
Karol Kosek
d8862853bb Browser: Depend on BrowserSettings
The app refused to run in the Required+Browser system configuration,
because unveil was angry that BrowserSettings wasn't being installed.
2022-05-26 21:54:58 +01:00
Karol Kosek
3dfa215174 CharacterMap: Mark this component as 'recommended', not 'required'
Despite being a small and useful program, it doesn't feel being
essential enough to be included in every build configuration.
2022-05-26 21:54:58 +01:00
kleines Filmröllchen
aea8a040b3 Piano: Use LibDSP::Keyboard for all keyboard-playing logic
The only major functional change is that the Track now needs to know
whether it's active or not, in order to listen to the keyboard (or not).

There are some bugs exposed/created by this, mainly:
* KeysWidget sometimes shows phantom notes. Those do not actually exist
  as far as debugging has revealed and do not play in the synth.
* The keyboard can lock up Piano when rapidly pressing keys. This
  appears to be a HashMap bug; I invested significant time in bugfixing
  but got nowhere.
2022-05-26 10:24:43 +01:00
kleines Filmröllchen
a861d2b728 Piano: Make TrackManager::next_track_index const
That's very much an informational API.
2022-05-26 10:24:43 +01:00
kleines Filmröllchen
7e04560af4 Piano: Use a real transport in the TrackManager
This is technically only a stepping stone but needed to happen at some
point anyways. Now, there's no more integer time stored in Piano's
legacy datastructures directly.
2022-05-26 10:24:43 +01:00
MacDue
0c74f30819 DisplaySettings: Link to cursor themes from "Themes" tab
This removes a few clicks to access the mouse settings and puts
all theming actions in one place.
2022-05-25 23:14:22 +01:00
MacDue
7c8541b914 Userland: Use GUI::Process::spawn_or_show_error() for spawn() from a GUI 2022-05-25 23:14:22 +01:00
MacDue
3fc0350caf LibCore: Return ErrorOr<pid_t> and support arguments in Process::spawn
This makes the wrapper more like the rest in LibCore, and also
removes the annoying limitation of not supporting arguments.

There are three overloads one for String, char const *, and StringView
argument lists. As long as there are <= 10 arguments the argv list
will be allocated inline, otherwise on the heap.
2022-05-25 23:14:22 +01:00
Karol Kosek
67f1ac5de7 ThemeEditor: Use 'open' icon instead of ellipsis on path picker button
The ellipsis seemed a little unclear for me.
2022-05-25 13:42:53 +02:00
Karol Kosek
2d6edd5898 ThemeEditor: Show unsaved changes prompt also in the quit action
While the app displayed the prompt on the close button press, the quit
action from the menu didn't do so.
2022-05-25 13:42:53 +02:00
Karol Kosek
6a4b125fe5 Spreadsheet: Make save functions take a Core::File instead of a filename
This allows us to use FileSystemAccessClient functions.
2022-05-24 03:36:04 +04:30
Karol Kosek
04443eb847 Spreadsheet: Open files using FileSystemAccessClient::try_open_file() 2022-05-24 03:36:04 +04:30
Karol Kosek
d877c2fcd6 Spreadsheet: Remove unused Workbook::load() function 2022-05-24 03:36:04 +04:30
Karol Kosek
01824fd19a Spreadsheet: Use TRY() on file load and save 2022-05-24 03:36:04 +04:30
Andrew Smith
bccf0a9346 PixelPaint: Allow layer to "scale" location when resizing 2022-05-23 00:12:19 +02:00
Andrew Smith
02399d4775 PixelPaint: Add Image>Resize Image... dialog. (Front end) 2022-05-23 00:12:19 +02:00
Karol Kosek
169498f9db Spreadsheet: Recognize sheets files by mime type, not by file extension
These conditions weren't executed since 933a717f3b and always showed
a file import/export wizard.
2022-05-22 03:08:53 +04:30
Sam Atkins
4253594d16 ThemeEditor: Position preview windows based on the title height
This means all three window titles are visible, regardless of what the
TitleHeight and BorderThickness values are.  :^)

The one exception is when TitleHeight is less than the height of the
title text. WindowManager ensures that the real title height is at
least enough to fit the text, so if the value is set to less than that,
the window titles will start to overlap. So, don't set values that are
impossibly small!
2022-05-21 22:25:33 +02:00
Sam Atkins
f617d72bee ThemeEditor: Make MainWidget responsible for holding the edited Palette
Previously, the PreviewWidget was responsible for this, but we will soon
have multiple preview widgets, so having it here will make more sense.
2022-05-21 22:25:33 +02:00
Sam Atkins
48122e29c3 ThemeEditor: Convert the widget-preview layout to GML
This has the nice bonus of fixing the appearance of the status bar. :^)
2022-05-21 22:25:33 +02:00
Sam Atkins
4edc33b4a6 ThemeEditor: Arrange the theme properties into groups
This makes it clearer which properties are related, instead of them all
being in one list per tab.
2022-05-21 22:25:33 +02:00
Sam Atkins
423383e9aa ThemeEditor: Give each theme property its own editing widget
This is quite a radical change. The previous UI was very easy to add new
properties to (just add to the FooRole enum and it automatically
works), but not so nice to use: A ComboBox for selecting a property,
and then a box to edit that property's value. This makes it difficult
to compare different properties or edit multiple together without a lot
of back-and-forth.

This new design gives each property its own editing widgets, with those
categorized into several tabs. To try and avoid increasing the
maintenance burden for this, the UI is generated from the
`windows_tab`, `widgets_tab` and `syntax_highlighting_tab` variables,
which are basically just lists of which properties go in that tab. One
of the `FooProperty.gml` files is loaded to create each property's
widgets.
2022-05-21 22:25:33 +02:00
Sam Atkins
0ef3c15822 ThemeEditor: Actually save alignment roles 2022-05-21 22:25:33 +02:00
Sam Atkins
8915b3227c ThemeEditor: Extract most logic into a MainWidget class 2022-05-21 22:25:33 +02:00
Cameron Youell
df7fd39fcc Browser: Allow usage of vertical tabs
Add implementation of vertical tabs into the browser,
with the new `Ctrl + ,` shortcut, or within the View Options
2022-05-21 22:25:16 +02:00
MacDue
9b4aabbcf9 PixelPaint: Allow configuring 'new image' defaults
This allows you to configure the default name, width, and height of
the 'new image' dialog. This is done by editing the config in
~/.config/PixelPaint.ini (no GUI at the moment).

Fixes #13967
2022-05-17 01:01:44 +02:00
DexesTTP
c00ae53b66 LibWeb: Abstract the LibProtocol ResourceLoader connection
This is the final component that required LibProtocol as a dependency
of LibWeb. With this, we can now remove the dependency, and LibWeb no
longer requires IPC to work :^)
2022-05-15 12:17:36 +02:00
DexesTTP
962040b49c LibWebView: Move StylePropertiesModel to LibWebView
This patch has no functional changes.
2022-05-15 12:17:36 +02:00
DexesTTP
b797e1e2b9 LibWebView: Move DOMTreeModel to LibWebView
This patch has no functional changes.
2022-05-15 12:17:36 +02:00
DexesTTP
dcbbbf5b4a LibWebView: Move OutOfProcessWebView to a new LibWebView library
Also moves WebContentClient and the references to the generated IPC
descriptions, since they are all components of OutOfProcessWebView.

This patch has no functional changes.
2022-05-15 12:17:36 +02:00
Linus Groh
ffc5fed79f PixelPaint: Rebuild FilterGallery tree using TreeViewModel 2022-05-13 16:31:03 +02:00
Sam Atkins
80174439a9 Revert "FileManager: Reduce scope of some variables related to context…
menu"

This reverts commit 61dc489778.

This commit was causing FileManager to crash whenever you selected to
open a file using the context menu.
2022-05-13 16:28:36 +02:00
Sam Atkins
cdffe556c8 LibGUI+Userland: Make Dialog::ExecResult an enum class 2022-05-13 16:27:43 +02:00
offtkp
61a9ad45ed FileManager: Check for write permission before enabling certain actions
Upon DirectoryView selection change, check for write permission before
enabling delete and cut. This disallows attempting to delete/cut and
paste a file that you don't have write permission to by using keybinds.

Fixes #13983.
2022-05-13 10:02:01 +02:00
kleines Filmröllchen
9035d9e845 LibDSP+Piano: Convert DSP APIs to accept entire sample ranges
This has mainly performance benefits, so that we only need to call into
all processors once for every audio buffer segment. It requires
adjusting quite some logic in most processors and in Track, as we have
to consider a larger collection of notes and samples at each step.

There's some cautionary TODOs in the currently unused LibDSP tracks
because they don't do things properly yet.
2022-05-13 00:47:26 +02:00
kleines Filmröllchen
4d65607649 LibDSP: Remove Transport's time counter reference API
This is what the old Transport in Piano had, but as everyone just
references Transport directly, there's no need for it anymore.
2022-05-13 00:47:26 +02:00
kleines Filmröllchen
4a6ebb8beb LibDSP: Refactor OOP non-functionally
* Don't inherit from Core::Object everywhere, that's overkill. Use
  RefCounted instead.
* Change some constructor visibilites to facilitate the above.
* default-implement all virtual destructors if possible.
* Drive-by include hygiene.
2022-05-13 00:47:26 +02:00
Daniel Bertalan
f40b6fbd07 PixelPaint: Fix incorrect use of RefCounted CRTP
I'm not even sure why this worked. How would the compiler know which
type to destruct the FilterInfo object as?

Fixes this janky error from gcc 12:

AK/RefCounted.h:70:13: error: array subscript 0 is outside array bounds
of 'void [56]' [-Werror=array-bounds]
   70 |             delete static_cast<const T*>(this);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2022-05-12 13:12:37 +02:00
Sam Atkins
d7190be3a3 DisplaySettings: Set window modified state 2022-05-12 13:10:49 +02:00
Sam Atkins
af01c6be0c TerminalSettings: Set window modified state 2022-05-12 13:10:49 +02:00
Sam Atkins
17b41f0d61 MouseSettings: Set window modified state 2022-05-12 13:10:49 +02:00
Sam Atkins
e74e320750 MouseSettings: Update the cursor theme preview when restoring defaults
Previously, if you opened MouseSettings, set the cursor theme to Dark,
and then click "Defaults", the cursors list would not update.
ComboBox::set_text() does not call the on_change callback, so we have
to run the steps manually.

I've also made `m_theme_name` into a local variable, since it can be.
2022-05-12 13:10:49 +02:00
Sam Atkins
c7d038cc26 MailSettings: Set window modified state 2022-05-12 13:10:49 +02:00
Sam Atkins
ab2bbaabc7 KeyboardSettings: Set window modified state 2022-05-12 13:10:49 +02:00
Sam Atkins
57bac17b9f ClockSettings: Set window modified state 2022-05-12 13:10:49 +02:00
Sam Atkins
f27985a021 BrowserSettings: Set window modified state 2022-05-12 13:10:49 +02:00
Sam Atkins
84b98da259 Userland: Set tab-widget properties in GML instead of code 2022-05-11 20:16:43 +02:00
Linus Groh
9202f101b5 DisplaySettings: Add 2256x1504 resolution
This is a common resolution of laptops with a 3:2 aspect ratio, such as
the Framework Laptop or Microsoft Surface Laptop.
2022-05-09 20:22:10 +02:00
Romain Chardiny
6ed2ded77c KeyboardSettings: Also activate keymap via ListView's on_activation 2022-05-08 16:58:20 +02:00
Karol Kosek
92f4408d66 DisplaySettings: Make the copy action copy the background path as url
Closes: #13907
2022-05-08 16:41:04 +02:00
MacDue
875093e6a9 DisplaySettings: Fix Clang build failure in ThemePreviewWidget 2022-05-07 23:46:41 +02:00
Linus Groh
360e149c5c ThemeEditor: Fix Clang build failure in PreviewWidget 2022-05-07 23:33:00 +02:00
MacDue
89445b967d PixelPaint: Add antialiased ellipse option
Currently this option is only supported for filled ellipses as that
is all the AntiAliasingPainter supports.
2022-05-07 22:59:02 +02:00
MacDue
60aba4c9f3 LibGfx: Implement AntiAliasingPainter::draw_ellipse()
This commit adds draw_ellipse() and moves the shared code
for circles and ellipses to draw_ellipse_part().

draw_ellipse_part() can draw an entire circle in one call using
8-way symmetry and an ellipse in two calls using 4-way symmetry.
2022-05-07 22:59:02 +02:00
MacDue
6e52e6b554 DisplaySettings: Center preview with center_window_group_within() 2022-05-07 22:58:55 +02:00
MacDue
e924aa338c ThemeEditor: Center preview with center_window_group_within() 2022-05-07 22:58:55 +02:00
kleines Filmröllchen
19a4b820c4 LibAudio+LibDSP: Switch samples to 32-bit float instead of 64-bit float
This has been overkill from the start, and it has been bugging me for a
long time. With this change, we're probably a bit slower on most
platforms but save huge amounts of space with all in-memory sample
datastructures.
2022-05-07 20:20:16 +02:00
Karol Kosek
39c0f31009 FileManager: Remove unused lstat() call 2022-05-07 20:14:23 +02:00
Karol Kosek
61dc489778 FileManager: Reduce scope of some variables related to context menu 2022-05-07 20:14:23 +02:00
Karol Kosek
4ef8bf53ba FileManager: Don't use bitwise OR operators on booleans 2022-05-07 20:14:23 +02:00
Karol Kosek
ec02d58b5b FileManager: Rename action_show_dotfiles to show_dotfiles_action
All actions are named that way.
2022-05-07 20:14:23 +02:00
Karol Kosek
ff6df9f27e FileManager: Use VERIFY() instead of if checks with VERIFY_NOT_REACHED
Besides micro simplifying the code, this will also show the failed
condition in the console, instead of vague 'ASSERTION FAILED: false'.
2022-05-07 20:14:23 +02:00
Rafał Babiarz
6463bc7eb3 Browser: Add option to filter entries in Storage Inspector 2022-05-07 20:09:53 +02:00
MacDue
bf30348f88 Browser: Remove STL utility include from CookiesModel
This broke clang builds
2022-05-06 13:11:09 +02:00
IT6uru
00a0b1bd14 BrowserSettings: Add missing code to update filtering checkbox
reset_default_values() now sets default filtering checkbox
state using default_enable_content_filtering.
2022-05-06 11:37:38 +02:00
MacDue
e268659d32 Terminal+TerminalSettings: Allow disabling close confirmations 2022-05-06 02:12:51 +04:30
MacDue
d5b550096e Terminal: Close warnings for background/foreground processes
This implements the "close modified" icon on the terminal,
as well as several close warnings:

- A warning there is a foreground process running
- If there is a background process running
- Or if there are multiple background processes running

Fixes #13751
2022-05-06 02:12:51 +04:30
networkException
f3f19f8321 Browser: Consolidate StorageWidget tabs into a single gml file
This patch removes the separate CookiesTab.gml file used to define the
layout of the cookies and local storage tabs and moves those defintions
into the StorageWidget.gml file.
2022-05-05 21:57:39 +02:00
Rafał Babiarz
ac991b0a89 Browser: Set all cookies at once instead adding them separately 2022-05-05 21:54:38 +02:00
Rafał Babiarz
dc66d16dc2 Browser: Rename "on_want_cookies" to match local storage equivalent 2022-05-05 21:54:38 +02:00
Luke Wilde
caf652799f SystemMonitor: Consistently use u64 for ValueFormat::text_formatter
ValueFormat::text_formatter is called with a u64 retrieved from
GraphWidget::m_values. However, the function pointer definition used
size_t and all the users of text_formatter used int.  If bytes was over
~2 billion, we would interpret bytes to be negative. We then pass this
into `human_readable_size` which converts it to a u64, making it out to
be about 15.9 EiB.

This is fixed by making everything in the path take a u64.
2022-05-05 21:25:04 +02:00
Liav A
e301af8352 Everywhere: Purge all support and usage of framebuffer devices
Long live the DisplayConnector object!
2022-05-05 20:55:57 +02:00
Liav A
d9a2706079 DisplaySettings+WindowServer: Add support for display connector devices 2022-05-05 20:55:57 +02:00
Karol Kosek
272cf3cbd5 Browser: Set an icon for the 'Edit Bookmark' Dialog 2022-05-04 23:22:10 +02:00
kleines Filmröllchen
ab49fcfb7c LibAudio+Userland: Remove Audio::LegacyBuffer
The file is now renamed to Queue.h, and the Resampler APIs with
LegacyBuffer are also removed. These changes look large because nobody
actually needs Buffer.h (or Queue.h). It was mostly transitive
dependencies on the massive list of includes in that header, which are
now almost all gone. Instead, we include common things like Sample.h
directly, which should give faster compile times as very few files
actually need Queue.h.
2022-05-03 23:09:20 +02:00
cflip
e02579bdab PixelPaint: Set title of default image to 'Untitled' 2022-05-02 12:43:46 +02:00
Sam Atkins
c57410358a ThemeEditor: Show if modified, and prompt before discarding unsaved work 2022-04-29 20:06:39 +02:00
Sam Atkins
eaf24d2fce ThemeEditor: Update displayed alignment when loading a theme file 2022-04-29 20:06:39 +02:00
Sam Atkins
eb76751a76 ThemeEditor: Stop firing unnecessary change callbacks
We only need to fire these callbacks when we want to change the palette.
So, when setting widget values to match a palette that has just been
loaded, or to show the value of the role selected in a ComboBox, we can
skip the callbacks. This saves some work, and means we can reliably use
on_palette_change to know when the palette has actually been modified.
2022-04-29 20:06:39 +02:00
Sam Atkins
6c572006a3 LibGUI+ThemeEditor: Split preview-widget palette-change callback
There are two different things in ThemeEditor that want to know when a
palette changes:
1. The PreviewWidget subclass, so it can update its preview.
2. The ThemeEditor itself, so we know that the palette is modified.

Using a protected virtual function for 1 means that we can do 2 without
them fighting over the same on_palette_change callback.
2022-04-29 20:06:39 +02:00
Sam Atkins
91230ff28d ThemeEditor: Open the FilePicker at the location in the path input
The kernel panic no longer occurs, so we can do this now. :^)
2022-04-29 20:06:39 +02:00
Sam Atkins
e05d5df6aa ThemeEditor: Show a message box if saving fails 2022-04-29 20:06:39 +02:00
Sam Atkins
e15427c5ba ThemeEditor: Propagate failure to create AlignmentModel
Also make the AlignmentValue struct private, and initialize the Vector
in one go instead of empending.
2022-04-29 20:06:39 +02:00
MacDue
ac0d708634 ThemeEditor: Add preview window with 'Highlighted' window state
This state has been occasionally missed in themes, adding it
to the preview may help avoid that.
2022-04-28 22:14:18 +02:00
MacDue
332574608c ThemeEditor: Center preview windows accounting for window frame 2022-04-28 22:14:18 +02:00
Jelle Raaijmakers
f25123df66 LibCore: Remove main event loop
The main event loop functionality was used in just two places where the
alternative is a bit simpler. Remove it in favor of referencing the
event loop directly, or just invoking `EventLoop::current()`.

Note that we don't need locking in the constructor since we're now only
modifying a thread-local `Vector`. We also don't need locking in the
old call sites to `::with_main_locked()` since we already lock the
event loop in the subsequent `::post_event()` invocation.
2022-04-27 11:54:37 +02:00
kleines Filmröllchen
19f6ef3a0c HexEditor: Add UTF16 to the value inspector 2022-04-27 00:02:24 +02:00
kleines Filmröllchen
ef113b2f91 HexEditor: Add UTF8 to the value inspector 2022-04-27 00:02:24 +02:00
kleines Filmröllchen
e5736cdf2f HexEditor: Add ASCII to the value inspector
This is kind of redundant but probably easier to read than the ASCII
column. Also, it seems appropriate after we add other character
encodings.
2022-04-27 00:02:24 +02:00
kleines Filmröllchen
da7a8a8711 HexEditor: Don't require the ValueInspectorModel's value size to be i32 2022-04-27 00:02:24 +02:00
Sam Atkins
3cc1a86ef5 ClockSettings: Add a preview of the current time format
When writing a custom format especially, it's nice to be able to see how
it will look as you write it.
2022-04-23 10:48:51 -07:00
Sam Atkins
bd7e896c76 ClockSettings: Tweak timezone layout spacing to not crop the ComboBox 2022-04-23 10:48:51 -07:00
Sam Atkins
ae469b9afa ClockSettings: Don't change format text when checking "Custom"
Previously, when you selected to have a custom format, whatever was in
the custom-format box would get replaced with the format for
12-hour-without-seconds. Now, it keeps whatever was in the box before -
which is less disorientating, and lets you tweak the existing format.
2022-04-23 10:48:51 -07:00
Sam Atkins
c80fca78b3 ClockSettings: Select radio-button that matches the saved clock format
This means that if you save and close ClockSettings with "24-hour"
and "Show seconds" both checked, then they will both be checked when
you re-open ClockSettings, instead of it showing as a "Custom" format.
2022-04-23 10:48:51 -07:00
Torstennator
b7e8f32323 PixelPaint: Add a histogram widget
This adds a simple histogram widget that visualizes the rgb-channels
and brightness for a given image. When hovering over the image it will
indicate what brightness level the pixel at the mouse position has.
2022-04-21 17:26:52 +02:00
Sam Atkins
5702f016f0 LibGUI+Applications: Add --open-tab option to FooSettings applications
Similar to SystemMonitor's option of the same name, this allows you to
launch the given application with the specific tab open.
2022-04-21 17:24:42 +02:00
Sam Atkins
ded5ba1f87 LibGUI+Applications: Give SettingsWindow tabs a string ID
This gives us a convenient way to refer to them, which will be used in
the following commit.
2022-04-21 17:24:42 +02:00
kleines Filmröllchen
49b087f3cd LibAudio+Userland: Use new audio queue in client-server communication
Previously, we were sending Buffers to the server whenever we had new
audio data for it. This meant that for every audio enqueue action, we
needed to create a new shared memory anonymous buffer, send that
buffer's file descriptor over IPC (+recfd on the other side) and then
map the buffer into the audio server's memory to be able to play it.
This was fine for sending large chunks of audio data, like when playing
existing audio files. However, in the future we want to move to
real-time audio in some applications like Piano. This means that the
size of buffers that are sent need to be very small, as just the size of
a buffer itself is part of the audio latency. If we were to try
real-time audio with the existing system, we would run into problems
really quickly. Dealing with a continuous stream of new anonymous files
like the current audio system is rather expensive, as we need Kernel
help in multiple places. Additionally, every enqueue incurs an IPC call,
which are not optimized for >1000 calls/second (which would be needed
for real-time audio with buffer sizes of ~40 samples). So a fundamental
change in how we handle audio sending in userspace is necessary.

This commit moves the audio sending system onto a shared single producer
circular queue (SSPCQ) (introduced with one of the previous commits).
This queue is intended to live in shared memory and be accessed by
multiple processes at the same time. It was specifically written to
support the audio sending case, so e.g. it only supports a single
producer (the audio client). Now, audio sending follows these general
steps:
- The audio client connects to the audio server.
- The audio client creates a SSPCQ in shared memory.
- The audio client sends the SSPCQ's file descriptor to the audio server
  with the set_buffer() IPC call.
- The audio server receives the SSPCQ and maps it.
- The audio client signals start of playback with start_playback().
- At the same time:
  - The audio client writes its audio data into the shared-memory queue.
  - The audio server reads audio data from the shared-memory queue(s).
  Both sides have additional before-queue/after-queue buffers, depending
  on the exact application.
- Pausing playback is just an IPC call, nothing happens to the buffer
  except that the server stops reading from it until playback is
  resumed.
- Muting has nothing to do with whether audio data is read or not.
- When the connection closes, the queues are unmapped on both sides.

This should already improve audio playback performance in a bunch of
places.

Implementation & commit notes:
- Audio loaders don't create LegacyBuffers anymore. LegacyBuffer is kept
  for WavLoader, see previous commit message.
- Most intra-process audio data passing is done with FixedArray<Sample>
  or Vector<Sample>.
- Improvements to most audio-enqueuing applications. (If necessary I can
  try to extract some of the aplay improvements.)
- New APIs on LibAudio/ClientConnection which allows non-realtime
  applications to enqueue audio in big chunks like before.
- Removal of status APIs from the audio server connection for
  information that can be directly obtained from the shared queue.
- Split the pause playback API into two APIs with more intuitive names.

I know this is a large commit, and you can kinda tell from the commit
message. It's basically impossible to break this up without hacks, so
please forgive me. These are some of the best changes to the audio
subsystem and I hope that that makes up for this :yaktangle: commit.

:yakring:
2022-04-21 13:55:00 +02:00
kleines Filmröllchen
cb0e95c928 LibAudio+Everywhere: Rename Audio::Buffer -> Audio::LegacyBuffer
With the following change in how we send audio, the old Buffer type is
not really needed anymore. However, moving WavLoader to the new system
is a bit more involved and out of the scope of this PR. Therefore, we
need to keep Buffer around, but to make it clear that it's the old
buffer type which will be removed soon, we rename it to LegacyBuffer.
Most of the users will be gone after the next commit anyways.
2022-04-21 13:55:00 +02:00
kleines Filmröllchen
be98ce0f9f WindowServer: Add the screen mode property in the screen configuration
This will allow us to change between a couple of properties, for now
it's only Device and Virtual. (How about Remote :^) ) These get handled
by a different screen backend in the Screen.
2022-04-21 13:41:55 +02:00
ForLoveOfCats
85152d2f7f LaunchServer+Help: Open help urls with Help 2022-04-21 09:12:37 +04:30
faxe1008
b8bd667782 AK: Add FuzzyMatch header
This patch adds a header containing the fuzzy match algorithm
previously used in Assistant. The algorithm was moved to AK
since there are many places where a search may benefit from fuzzyness.
2022-04-20 18:34:09 +02:00
Lucas CHOLLET
c741db967c CrashReporter: Don't display an error when cancelling backtrace saving
Pressing the cancel button on the prompt displayed by try_save_file()
used to show an error.
2022-04-20 12:01:49 +02:00
Lucas CHOLLET
ad8c6d858e CrashReporter: Fix "Save Backtrace" button width
Previously, the size of the button changed with the window's size. Now
this parameter is fixed and consistent with the "Debug in Hack Studio"
button.
2022-04-20 12:01:49 +02:00
Eli Youngs
04763c4a12 Spreadsheet: Sort functions by name in the help window 2022-04-18 17:36:34 +02:00
Karol Kosek
807101e394 ThemeEditor: Remove unused model classes
They have been replaced by generic RoleModel class.
2022-04-18 12:58:23 +02:00
Karol Kosek
171ecdd691 ThemeEditor: Use new RoleModel template class 2022-04-18 12:58:23 +02:00
Karol Kosek
8817d3ec58 ThemeEditor: Add generic RoleModel template class
This is to simplify the code, as Color, Alignment, Flag, Metric and Path
RoleModel classes looked exactly the same.

Additionally, I've added a try_create() function for error propagation.
:^)
2022-04-18 12:58:23 +02:00
Sam Atkins
73552c1856 Userland: Always construct Application with try_create() 2022-04-18 12:57:34 +02:00
Sam Atkins
cd7037afd5 SystemMonitor: Remove MakeInspectable::Yes from constructor
I think this was left in by mistake. No application should be hard-coded
as inspectable.
2022-04-18 12:57:34 +02:00
Eli Youngs
d20ff6c891 HexEditor: Show endianness in the value inspector 2022-04-18 09:25:38 +04:30
Sam Atkins
d564cf1e89 LibCore+Everywhere: Make Core::Stream read_line() return StringView
Similar reasoning to making Core::Stream::read() return Bytes, except
that every user of read_line() creates a StringView from the result, so
let's just return one right away.
2022-04-16 13:27:51 -04:00
cflip
0a92dbd390 ClockSettings: Add 'show seconds' toggle to time format settings 2022-04-15 08:24:20 -04:00
Olivier De Canniere
be4913c1fb PixelPaint: Add exporting to the QOI image format 2022-04-13 15:21:27 +01:00
martinfalisse
356eca7e33 Spreadsheet: Implement undo functionality where missing
Implement undo/redo functionality in the Spreadsheet application
for the "extend" function, the drag-and-drop function, and when
copying and pasting.
2022-04-13 09:26:44 +04:30
martinfalisse
22575c9370 Spreadsheet: Make undo operation handle multiple cells at a time
Instead of having the undo operation only be able to undo one cell
for a given undo, make it able to handle multiple cells at a time.
 Please enter the commit message for your changes. Lines starting
2022-04-13 09:26:44 +04:30
Ali Chraghi
8f5d80a41d CrashReporter: Implement Save Backtrace button 2022-04-12 21:43:07 +01:00
Sam Atkins
88800e8f32 FileManager: Use Core::System::exec() 2022-04-11 21:09:42 +02:00
Sam Atkins
3971f71235 Terminal: Use Core::System::exec() 2022-04-11 21:09:42 +02:00
Julen Ruiz Aizpuru
23ea5c6721 BrowserSettings: Validate homepage URL 2022-04-11 08:19:29 -04:00
Jelle Raaijmakers
a021a7e240 Applications: Support .obj polygons in 3DFileViewer
Our `WavefrontOBJLoader` only supported faces with 3 vertices, but
`.obj` files can specify arbitrary polygons with 4 or more vertices.
2022-04-10 12:08:31 +02:00
Simon Wanner
206d6ece55 LibGfx: Move other font-related files to LibGfx/Font/ 2022-04-09 23:48:18 +02:00
Ali Mohammad Pur
a42e03b01a Browser+LibWeb+WebContent: Implement per-URL-pattern proxies
...at least for SOCKS5.
2022-04-09 12:21:43 +02:00
Ali Mohammad Pur
45867435c4 RequestServer+LibProtocol: Allow users to specify a per-request proxy 2022-04-09 12:21:43 +02:00
Timothy Slater
6a4fdae575 HexEditor: Add Value Inspector
This adds a value inspector window to the Hex Editor. This window shows
the data at the current cursor position (or selection start if a range
is selected) interpreted as a variety of data types.

Currently supported values include 8, 16, 32, and 64 bit signed and
unsigned values as well as float and double.

The inspector can operate in both little endian and big endian modes.
This is switched between by options in the View menu.
2022-04-07 16:55:20 +04:30