Commit graph

1019 commits

Author SHA1 Message Date
Timothy Flynn 690389ae81 SQLStudio: Display error message boxes when connections/executions fail
In a GUI application, this is vastly more useful than logging to the
terminal or ignoring the error completely.
2022-12-30 14:17:18 +01:00
Timothy Flynn 5822520e6d SQLStudio: Add an option to select or specify the database to connect to
This adds a combo box to the action toolbar to allow for entering a
database name manually or selecting from the list of existing databases.
The action to run a script is now disabled while we are not connected to
a database.
2022-12-30 14:17:18 +01:00
Timothy Flynn 640e22bbdb SQLStudio: Only display the character/word count of selected text
It's not particularly useful to see the word count of a SQL script,
except for when displaying the number of selected words. This changes
SQLStudio to behave exactly like HackStudio in this regard. We will use
segment 0 to display the selected text stats (if any) and segment 2 for
the cursor position. Segment 1 will be used in an upcoming commit for
the current SQL connection status. We also now handle displaying action
text the same way as HackStudio.
2022-12-30 14:17:18 +01:00
Timothy Flynn a4d2b366b6 SQLStudio: Close the current SQL connection before opening a new one 2022-12-30 14:17:18 +01:00
Timothy Flynn 74cd0a0c82 SQLStudio: Simplify action handling a bit
Most actions do not need to care about whether there is an open editor
tab, as we can (and should) disable those actions when there isn't an
open tab. We can also hide the verify_cast handling inside a helper
function.
2022-12-30 14:17:18 +01:00
Timothy Flynn b8e4ca3b0f SQLStudio: Protect against possible crash when saving an empty file
The underlying Core::Stream methods require the bytes passed in to be
non-empty. Simply opening the file is enough to ensure the file is
created with empty contents if the editor's text is empty.
2022-12-30 14:17:18 +01:00
Timothy Flynn 9b1e754d56 SQLStudio: Convert SQLStudio to GML 2022-12-30 14:17:18 +01:00
Timothy Flynn 82363aa1c4 sql+SQLStudio: Recover from errors preparing SQL statements
In both applications, display the SQL statement that failed to parse.
For the REPL, ensure the REPL prompts the user for another statement.
For SQLStudio, we don't continue executing the script as it likely does
not make sense to run statements that come after a failed statement.
2022-12-30 14:17:18 +01:00
Liav A c191daa337 DevTools: Remove i686 support 2022-12-28 11:53:41 +01:00
Liav A cae736b5fa HackStudio: Remove i686 support 2022-12-28 11:53:41 +01:00
Liav A 85b453c2e4 Kernel+Userland: Remove dependency on i386-specific registers 2022-12-28 11:53:41 +01:00
Timothy Flynn 9b483625e6 LibIPC+Everywhere: Change IPC decoders to construct values in-place
Currently, the generated IPC decoders will default-construct the type to
be decoded, then pass that value by reference to the concrete decoder.
This, of course, requires that the type is default-constructible. This
was an issue for decoding Variants, which had to require the first type
in the Variant list is Empty, to ensure it is default constructible.

Further, this made it possible for values to become uninitialized in
user-defined decoders.

This patch makes the decoder interface such that the concrete decoders
themselves contruct the decoded type upon return from the decoder. To do
so, the default decoders in IPC::Decoder had to be moved to the IPC
namespace scope, as these decoders are now specializations instead of
overloaded methods (C++ requires specializations to be in a namespace
scope).
2022-12-26 09:36:16 +01:00
ominusliticus ae16cfff0f HackStudio: Remove release_values_but_fixme_should_propogate_errorss
There were a total of 20 fixmes that were removed. This required me to
create a `initialize_all()` function for the HackStudioWidget class
that could actually propagate the errors forward to the Serenity::Main
function for the HackStudio application.

All the fixmes dealt with loading icons for the various actions
possible.
This should not be a failure that keeps HackStudio from running, but
currently, if the icons cannot be loaded HackStudio fails to open.
2022-12-26 04:57:02 +03:30
Aayush bc1293925a Hackstudio: Use `GUI::TextEditor' actions for cut/copy/paste buttons
This fixes a bug where hackstudio's language server will crash upon
clicking the 'cut' button when no text is selected.  This was because
the actions were not disabled on empty selection.

We now disable the actions depending on if there is empty selection
inside current tab. We update the cut/copy/paste buttons' actions when
changing tabs.
2022-12-25 15:40:46 +01:00
Karol Kosek b67762a7f3 HackStudio: Make a new ProjectBuilder object when opening a project
We couldn't compile a project after creating it, because the project
builder was still holding a reference to the previous freed project.

Fixes: #15715
2022-12-23 23:27:45 +01:00
Karol Kosek 98fa3736ed HackStudio: Open projects after the action tab was created
This change also removes the path argument from the GitWidget
constructor because otherwise, the app wouldn't work now, as it doesn't
yet know the project path.

But it'll be set right away in open_project(), so nothing's lost. :^)
2022-12-23 23:27:45 +01:00
Tim Schumacher 9805f73704 LibCore: Remove the force parameter from File::remove
About half of the usages were not using `force` anyways, and the other
half presumably just got confused about what "force" really means in
this context (which is "ignore nonexistent files").

The only 'legitimate' user, which is `rm`, instead now handles this
completely internally instead.
2022-12-23 10:38:14 -05:00
Tim Schumacher 355e761a02 LibCore: Let File::remove return a normal ErrorOr
Having the file path in there is nice, but it makes us incompatible with
comfortable error propagation in everything that isn't File::remove.
2022-12-23 10:38:14 -05:00
Sam Atkins 29733e65f8 AK+Everywhere: Replace all Bitmap::must_create() uses with ::create()
Well, *someone* has to add some more FIXMEs to keep FIXME Roulette
going. :^)
2022-12-22 15:48:53 +01:00
Karol Kosek ba60b01026 HackStudio: Fix typo in one error message
A regression from 4784ad66b2. oops.
2022-12-21 19:05:13 +00:00
Karol Kosek 4784ad66b2 HackStudio: Port to Core::Stream::File :^) 2022-12-20 10:58:54 +01:00
Baitinq 4c732abed5 HackStudio: Add a factory function for DebugInfoWidget
Thanks to this patch we now do error propagation in the DebugInfoWidget
creation and as a result we get rid of 4 FIXMEs :)
2022-12-16 09:58:51 +01:00
Baitinq 55a903911b HackStudio: Add a factory function for HackStudioWidget
This will allow us to handle errors while creating the HackStudioWidget.

(tip: check next commit :^)
2022-12-16 09:58:51 +01:00
Liav A 6c0486277e Kernel: Reintroduce the msyscall syscall as the annotate_mapping syscall
This syscall will be used later on to ensure we can declare virtual
memory mappings as immutable (which means that the underlying Region is
basically immutable for both future annotations or changing the
protection bits of it).
2022-12-16 01:02:00 -07:00
Lucas CHOLLET 9ae97c8cb1 LibFileSystemAccessClient: Rename try_save_file =>
`try_save_file_deprecated`

This precedes the addition of a new api using `Core::Stream`
2022-12-14 18:26:25 +00:00
Ali Mohammad Pur f96a3c002a Everywhere: Stop shoving things into ::std and mentioning them as such
Note that this still keeps the old behaviour of putting things in std by
default on serenity so the tools can be happy, but if USING_AK_GLOBALLY
is unset, AK behaves like a good citizen and doesn't try to put things
in the ::std namespace.

std::nothrow_t and its friends get to stay because I'm being told that
compilers assume things about them and I can't yeet them into a
different namespace...for now.
2022-12-14 11:44:32 +01:00
Tim Schumacher 9a3e95785e LibCore: Propagate errors from Stream::*_entire_buffer 2022-12-12 14:16:42 +01:00
Tim Schumacher 6c7c5a6786 LibCore: Rename Stream::*_or_error to *_entire_buffer
All of our functions are `_or_error` (or are about to be), and maybe
making it less reminiscient of AK::Stream will make people use it more.
2022-12-12 14:16:42 +01:00
Tim Schumacher ed4c2f2f8e LibCore: Rename Stream::read_all to read_until_eof
This generally seems like a better name, especially if we somehow also
need a better name for "read the entire buffer, but not the entire file"
somewhere down the line.
2022-12-12 14:16:42 +01:00
sin-ack 2a502fe232 Kernel+LibC+LibCore+UserspaceEmulator: Implement faccessat(2)
Co-Authored-By: Daniel Bertalan <dani@danielbertalan.dev>
2022-12-11 19:55:37 -07:00
Itamar 108a8e4c88 LibX86: Only pass ProcessorMode to Instruction constructor
We previously passed both OperandSize and AddressSize to the
constructor.

Both values were only ever 32-bit at construction.
We used AddressSize::Size64 to signify Long mode which was needlessly
complicated.
2022-12-11 22:06:30 +01:00
Tim Schumacher 8940f2da7f LibCore: Use Core::Stream for ProcessStatisticsReader 2022-12-10 11:49:24 +00:00
Timothy Flynn c372012842 LibSQL+SQLServer+SQLStudio+sql: Give ID types a distinct name
Makes it clearer what is being stored, especially in future clients that
will store a bunch of statement IDs.
2022-12-08 17:14:48 +01:00
Andreas Kling 4828f0b636 UserspaceEmulator: Implement MOV_RM16_seg 2022-12-07 13:18:48 +01:00
Andreas Kling 661a940ddd UserspaceEmulator: Implement MOV_seg_RM32 and MOV_seg_RM16
This allows hosted programs to write to segment registers. :^)
2022-12-07 13:18:48 +01:00
Andreas Kling bd1f39ebaa UserspaceEmulator: Implement PUSH_{CS,DS,ES,FS,GS,SS}
You can now push the segment registers on the stack! :^)
2022-12-07 13:18:48 +01:00
Andreas Kling b6472c250c UserspaceEmulator: Add SoftCPU getters for FS and GS 2022-12-07 13:18:48 +01:00
Andreas Kling fba91a4307 UserspaceEmulator: Initialize the FS segment on startup
Set it to 0x23, matching the initial value in a native process.
2022-12-07 13:18:48 +01:00
Timothy Flynn b9d8c25b0b LibSQL+SQLServer+SQLStudio+sql: Send result rows over IPC as SQL::Value
We've been sending the values converted to a string, but now that the
Value type is transferrable over IPC, send the values themselves. Any
client that wants the value as a string may do so easily, whereas this
will allow less trivial clients to avoid string parsing.
2022-12-07 13:09:00 +01:00
Timothy Flynn f9d23e1d2f LibSQL+SQLServer+SQLStudio+sql: Propagate connection errors immediately
Currently, when clients connect to SQL server, we inform them of any
errors opening the database via an asynchronous IPC. But we already know
about these errors before returning from the connect() IPC, so this
roundabout propagation is a bit unnecessary. Now if we fail to open the
database, we will simply not send back a valid connection ID.

Disconnect has a similar story. Rather than disconnecting and invoking
an asynchronous IPC to inform the client of the disconnect, make the
disconnect() IPC synchronous (because all it does is remove the database
from the map of open databases). Further, the only user of this command
is the SQL REPL when it wants to connect to a different database, so it
makes sense to block it. This did require moving a bit of logic around
in the REPL to accommodate this change.
2022-12-07 13:09:00 +01:00
Timothy Flynn aec75d749a LibSQL+SQLServer+SQLStudio+sql: Allocate per-statement-execution IDs
In order to execute a prepared statement multiple times, and track each
execution's results, clients will need to be provided an execution ID.
This will create a monotonically increasing ID each time a prepared
statement is executed for this purpose.
2022-12-07 13:09:00 +01:00
Timothy Flynn e2f71d2808 LibSQL+SQLServer+SQLStudio+sql: Use proper types for SQL IPC and IDs
When storing IDs and sending values over IPC, this changes SQLServer to:

1. Stop using -1 as a nominal "bad" ID. Store the IDs as unsigned, and
   use Optional in the one place that the IPC needs to indicate an ID
   was not allocated.

2. Let LibIPC encode/decode enumerations (SQLErrorCode) on our behalf.

3. Use size_t for array sizes.
2022-12-07 13:09:00 +01:00
Timothy Flynn 8fcb8c30c6 SQLServer+SQLStudio+sql: Allow sending placeholder values to SQLServer 2022-12-07 13:09:00 +01:00
MacDue 7be0b27dd3 Meta+Userland: Pass Gfx::IntPoint by value
This is just two ints or 8 bytes or the size of the reference on
x86_64 or AArch64.
2022-12-07 11:48:27 +01:00
Linus Groh 57dc179b1f Everywhere: Rename to_{string => deprecated_string}() where applicable
This will make it easier to support both string types at the same time
while we convert code, and tracking down remaining uses.

One big exception is Value::to_string() in LibJS, where the name is
dictated by the ToString AO.
2022-12-06 08:54:33 +01:00
Linus Groh 6e19ab2bbc AK+Everywhere: Rename String to DeprecatedString
We have a new, improved string type coming up in AK (OOM aware, no null
state), and while it's going to use UTF-8, the name UTF8String is a
mouthful - so let's free up the String name by renaming the existing
class.
Making the old one have an annoying name will hopefully also help with
quick adoption :^)
2022-12-06 08:54:33 +01:00
Linus Groh d26aabff04 Everywhere: Run clang-format 2022-12-03 23:52:23 +00:00
Filiph Sandström 4a766245fa HackStudio: Replace blank file when opening a new one
Before this we just added a new tab and left the `(Untitled)` tab in the
background. Now we instead check that it hasn't been modified and that
it's empty; if both these conditions are true we replace the blank
editor with the newly opened one.
2022-11-30 12:36:54 +00:00
Filiph Sandström 38a882ddfa HackStudio: User-definable documentation search paths
This resolves a 3+ year old FIXME related to tooltip documentation
search paths. By default we now search man3 in addition to man2 that we
previously only searched.
2022-11-30 12:08:01 +00:00
Timothy Flynn 0986b383cd SQLServer+SQLStudio+sql: Rename a couple of SQL IPC commands for clarity
Rename sql_statement to prepare_statement and statement_execute to
execute_statement. The former aligns more with other database libraries
(e.g. Java's JDBC prepareStatement). The latter reads less awkwardly.
2022-11-30 11:43:13 +01:00
thankyouverycool ed196fc265 HackStudio: Remove FindWidget
HackStudio editors now have built-in incremental search
2022-11-29 15:39:13 +00:00
Simon Wanner bf768ed215 Profiler: Don't stop disassembly on invalid instructions 2022-11-26 12:50:38 +01:00
Simon Wanner 06ece474e9 LibX86: Add {Address,Operand}Size::Size64
For now the opcode tables for OperandSize::Size64 are empty
2022-11-26 12:50:38 +01:00
Simon Wanner a7268c3c74 LibX86+UserspaceEmulator: Introduce AddressSize and OperandSize enums
These replace the bools a32 and o32, which will make implementing
64-bit sizes possible. :^)
2022-11-26 12:50:38 +01:00
Karol Kosek 0b7f5bbdfb Userland: Accept drag_enter events for widgets supporting file drops
This patch will switch cursor to DragCopy when a user enters a widget
while dragging file(s), giving them a visual clue that it *might* be
dropped into this widget.

This is a rather naive approach, as the cursor icon will change for any
kind of file, as currently programs don't know the drag contents before
dropping it. But after all I think it's better than nothing. :^)
2022-11-13 16:13:03 -07:00
Tim Schumacher ce2f1b845f Everywhere: Mark dependencies of most targets as PRIVATE
Otherwise, we end up propagating those dependencies into targets that
link against that library, which creates unnecessary link-time
dependencies.

Also included are changes to readd now missing dependencies to tools
that actually need them.
2022-11-01 14:49:09 +00:00
Tim Schumacher 7834e26ddb Everywhere: Explicitly link all binaries against the LibC target
Even though the toolchain implicitly links against -lc, it does not know
where it should get LibC from except for the sysroot. In the case of
Clang this causes it to pick up the LibC stub instead, which might be
slightly outdated and feature missing symbols.

This is currently not an issue that manifests because we pass through
the dependency on LibC and other libraries by accident, which causes
CMake to link against the LibC target (instead of just the library),
and thus points the linker at the build output directory.

Since we are looking to fix that in the upcoming commits, let's make
sure that everything will still be able to find the proper LibC first.
2022-11-01 14:49:09 +00:00
kleines Filmröllchen b8567d7a9d Kernel: Make scheduler control syscalls more generic
The syscalls are renamed as they no longer reflect the exact POSIX
functionality. They can now handle setting/getting scheduler parameters
for both threads and processes.
2022-10-27 11:30:19 +01:00
Timothy Flynn 67e396d931 GMLPlayground: Replace /proc/all unveil with /sys/kernel/processes
This was missed before commit dc5b28e26c.

Fixes #15809.
2022-10-26 18:41:11 +01:00
Gunnar Beutner 288c46dbdc LibGUI: Make sure combobox list windows can't be moved
This is done by adding a new window type (Popup) and using it for the
combobox list window. Other incorrect uses of the Tooltip window type
have also been updated to use the new window type.
2022-10-26 17:02:00 +02:00
Liav A 5dfb2b18f3 Applications: Use new global variables at /sys/kernel/ directory 2022-10-25 15:33:34 -06:00
demostanis 34acae90c7 Userland: Let applications make use of make_command_palette_action() 2022-10-25 10:21:18 +01:00
crpz1 30dc304429 Inspector: Reopen picker UI after selecting Inspector 2022-10-24 23:58:13 +01:00
demostanis 3e8b5ac920 AK+Everywhere: Turn bool keep_empty to an enum in split* functions 2022-10-24 23:29:18 +01:00
Karol Kosek 37729f5b91 GMLPlayground: Restrict filesystem access using unveil() 2022-10-24 23:09:30 +01:00
Karol Kosek 25104a30c1 GMLPlayground: Open and save files using FileSystemAccessClient 2022-10-24 23:09:30 +01:00
Samuel Bowman 5e26bb7643 GMLPlayground: Allow previewing GML in a separate window
Previously, Playground would always preview the rendered GML in a frame
next to the editor. This can be annoying when trying to work with small
or large widget hierarchies since the size of the preview is tied to the
size of the editor. Now there is a view menu which allows you to toggle
between the frame or a separate window which can be resized independent
of the editor.
2022-10-15 23:16:38 +02:00
Gunnar Beutner 31bd5b1a02 AK+Userland: Stub out code that isn't currently implemented on AARCH64
Even though this almost certainly wouldn't run properly even if we had
a working kernel for AARCH64 this at least lets us build all the
userland binaries.
2022-10-14 13:01:13 +02:00
Ali Mohammad Pur 166a905951 Userland: Properly populate GENERATED_SOURCES
We previously put the generated headers in SOURCES, which did not mark
them as GENERATED (and did not produce a proper dependency).
This commit moves all generated headers into GENERATED_SOURCES, and
removes useless header SOURCES.
2022-10-12 15:55:15 +01:00
Timothy Slater eb9db167da HackStudio: Set proper action scope for editor shortcuts
This fixes issue #14429. The editor actions were not given a parent as
scope so defaulted to global. Because HackStudio can have multiple
editors and even multiple editor tab widgets, I chose the
VerticalSplitter that all editor tab widgets get added to as the parent.
With a Widget set as the parent, the action gets WidgetLocal scope and
allows the embedded terminals to receive shortcuts.

Thanks to Andreas for doing a quick look at this and pointing in the
right direction during an Office Hours stream :)
2022-10-11 11:12:41 +02:00
Itamar c30c6eb1c1 HackStudio: Use a single global tooltip window
Previously, every Editor instance had two instances of tooltip windows
& `OutOfProcessWebView`s, one for documentation and one for parameter
hints.

They were initialized with the Editor, which slowed down creation of new
tabs.

We use a single global tooltip & OOPWV instance that is shared between
tabs.

Closes #15488

Co-authored-by: Sam Atkins <atkinssj@serenityos.org>
2022-10-06 21:27:40 +01:00
Itamar 2046a670b3 HackStudio: Remove adjustment of text range for documentation tooltip
We no longer need to adjust the hovered span's range to get the correct
hovered text. This fixes the "documentation tooltip" feature.
2022-10-06 21:27:40 +01:00
Marco Cutecchia 41744a4a87 HackStudio: Prevent closing the last editor group
Previously if the user closed the last open tab in the last TabWidget
then the open file action would stop working until they explicitly
went to the View menu and added a new editor group.

Before this commit there was an attempt at preventing the user to
close the last open tab by hiding its close button, this didn't
account for the many other ways one could close it though.
2022-10-06 11:53:23 +01:00
Marco Cutecchia f81b494182 HackStudio: Remove the 'Open in a new tab' action
This has become the default with the previous changes so it
doesn't make sense anymore
2022-10-06 11:53:23 +01:00
Marco Cutecchia d8b54b7dd0 HackStudio: Open files in dedicated tabs
Previously when trying to open a file from the tree view the file
would open in the currently selected tab, substituting the file
we were previously reading.
This change makes it so that clicking on a file from the tree view
opens it in a new tab, or selects the tab containing that file if
it's already open in the selected editor group.
2022-10-06 11:53:23 +01:00
Nico Weber 2af028132a AK+Everywhere: Add AK_COMPILER_{GCC,CLANG} and use them most places
Doesn't use them in libc headers so that those don't have to pull in
AK/Platform.h.

AK_COMPILER_GCC is set _only_ for gcc, not for clang too. (__GNUC__ is
defined in clang builds as well.) Using AK_COMPILER_GCC simplifies
things some.

AK_COMPILER_CLANG isn't as much of a win, other than that it's
consistent with AK_COMPILER_GCC.
2022-10-04 23:35:07 +01:00
Peter Elliott 7af5eef0dd SystemServer+LoginServer+Userland: Switch to sid-based sockets
This commit does three things atomically:
- switch over Core::Account+SystemServer+LoginServer to sid based socket
  names.
- change socket names with %uid to %sid.
- add/update necessary pledges and unveils.

Userland: Switch over servers to sid based sockets

Userland: Properly pledge and unveil for sid based sockets
2022-10-03 11:11:29 +02:00
Sam Atkins a58d72656d Userland: Replace empty GUI::Widgets in GML with GUI::Layout::Spacer
This fixes the "Cancel" button on HackStudio's "New Project" dialog
being too small. It's also clearer what these actually are.
2022-09-29 08:31:15 -04:00
networkException 4230dbbb21 AK+Everywhere: Replace "protocol" with "scheme" url helpers
URL had properly named replacements for protocol(), set_protocol() and
create_with_file_protocol() already. This patch removes these function
and updates all call sites to use the functions named according to the
specification.

See https://url.spec.whatwg.org/#concept-url-scheme
2022-09-29 09:39:04 +01:00
Sam Atkins 454bf1fde0 HackStudio: Insert tooltip styling directly into Markdown HTML output 2022-09-28 23:58:26 +01:00
ne0ndrag0n d463b8e6fb SQLStudio: Save and load blank files without failing assertion 2022-09-27 14:38:50 +01:00
Sam Atkins 68032d2724 Profiler: Port to Core::Stream 2022-09-20 07:48:45 -04:00
Brian Gianforcaro d0a1775369 Everywhere: Fix a variety of typos
Spelling fixes found by `codespell`.
2022-09-14 04:46:49 +00:00
Timothy Flynn fc8bf7ac3e LibUnicode+Userland: Migrate generated CLDR data to LibLocaleData
Currently, LibUnicodeData contains the generated UCD and CLDR data. Move
the UCD data to the main LibUnicode library, and rename LibUnicodeData
to LibLocaleData. This is another prepatory change to migrate to
LibLocale.
2022-09-05 14:37:16 -04:00
Jelle Raaijmakers a373542f4c Profiler: Display correctly rounded percentages as '#.##%' 2022-08-31 16:57:40 +01:00
Skye Sprung 4370e8f80a HackStudio: Warn of unsaved changes before making a new project
Before, the warning dialog would be opened after the NewProjectDialog,
leading to focus-fighting by the two windows. This fixes that and makes
the action more consistent with the standard serenity way of handling
unsaved changes by asking before the NewProjectDialog is brought up.
The way this is achieved avoids having to rewrite open_project as well.
2022-08-31 15:21:03 +01:00
Skye Sprung a7b7003376 HackStudio: Fix crash when opening or creating with open empty file
This commit fixes a crash that would occur due to an unnamed file being
automatically saved via EditorWrapper::save(). Now, we throw up a
FilePicker::get_save_filepath.
2022-08-31 15:21:03 +01:00
thankyouverycool cce9172cd4 Applications+DevTools: Remove fixed sizes from Splitters
And adjust some GML properties. Since a808cfa, splitters grow
opportunistically. Setting them to fixed sizes now quite literally
fixes them in place. Fixes immovable splitters missed in the
aforementioned commit.
2022-08-30 16:28:44 +01:00
thankyouverycool 589572cfa4 LibGUI+WindowServer: Introduce WindowModes
Previously, Windows only understood blocking modality: Windows were
either modal, i.e., in a blocking state, or not. Windows could also
be set as Accessories or ToolWindows, attributes which technically
applied modes to their parents but were implemented ad hoc. This patch
redefines these modal effects as WindowModes and sets up some helpers.
This will let us simplify a lot of modal logic in the upcoming patches
and make it easier to build new modal effects in the future.

Windows can now set 1 of 5 modes before reification:
-Modeless:	No modal effect; begins a new modal chain
-Passive:	Window joins its modal chain but has no effect
-RenderAbove:	Window renders above its parent
-CaptureInput:	Window captures the active input role from its parent
-Blocking:	Window blocks all interaction with its modal chain

States like fullscreen and tiling are dynamic and don't alter behavior
in modal chains, so they aren't included.
2022-08-25 13:28:50 +02:00
Jose Flores 355911c44e SQLStudio: Reset status bar and menu actions when closing a tab 2022-08-23 19:08:26 +01:00
Tim Schumacher 5f99934dce Userland: Consolidate most PATH resolving into a single implementation
We previously had at least three different implementations for resolving
executables in the PATH, all of which had slightly different
characteristics.

Merge those into a single implementation to keep the behaviour
consistent, and maybe to make that implementation more configurable in
the future.
2022-08-23 19:00:04 +01:00
Tim Schumacher 39a3775f48 Userland: Rely on a single authoritative source for the default PATH 2022-08-23 19:00:04 +01:00
David Smith 0b9d83fe0d Profiler: Fix unmovable splitter
Set preferred height instead of fixed height to allow the splitter to
move.

The splitter respects set_fixed_height() after a808cfa7 "LibGUI+
Applications: Govern Splitter resizing by opportunistic growth", and
that caused the splitter in Profiler to stop working.
2022-08-16 16:53:24 +02:00
Lucas CHOLLET 267a2c7c32 Base: Launch LanguageServers at session start-up 2022-08-14 21:52:35 +01:00
Lucas CHOLLET c248569d6b Base: Launch InspectorServer at session start-up 2022-08-14 21:52:35 +01:00
Lucas CHOLLET 1b36348d8b LibCore+LibIPC: Recognise %uid in path
This patch allows to insert "%uid" in `IPC_CLIENT_CONNECTION`
declaration and in SystemServer's ini files. This pattern is replaced
then replaced by the UID of the owner of the service. It opens a path
for seamlessly managed, per-user portal.
2022-08-14 21:52:35 +01:00
Federico Guerinoni 8753dc72e8 HackStudio: Fix update modified document on tab widget
Closes #14297
2022-08-13 16:43:18 +01:00
Junior Rantila 9c42a75381 HackStudio: Add fullscreen shortcut 2022-08-10 08:42:53 +01:00
David Smith 1bdaf92414 Profiler: Add scrollbar to FlameGraphView
The flame graph view used to draw only so much of the graph that could
be displayed. Change to draw the whole graph, and add a scrollbar.

Does some tricks with the scrolling to keep the bottom of the graph
fixed when resizing or double-clicking, since it works better then.
2022-08-04 02:52:39 +02:00
Undefine 97cc33ca47 Everywhere: Make the codebase more architecture aware 2022-07-27 21:46:42 +00:00