Commit graph

1218 commits

Author SHA1 Message Date
Karol Kosek 969543a847 LibGUI+Userland: Make Window::*add_menu take name using new string 2023-04-19 07:59:54 +02:00
Karol Kosek 956f4d9205 Userland: Construct Menus with name using the non-deprecated String 2023-04-19 07:59:54 +02:00
thankyouverycool 02a9e5d3f6 LibGUI+Userland: Improve error and font handling for InputBox
Adds fallible factories, ports DeprecatedString, and rebuilds the
layout to accomodate system font changes.
2023-04-18 10:05:21 +02:00
MacDue 35612c6a7f AK+Everywhere: Change URL::path() to serialize_path()
This now defaults to serializing the path with percent decoded segments
(which is what all callers expect), but has an option not to. This fixes
`file://` URLs with spaces in their paths.

The name has been changed to serialize_path() path to make it more clear
that this method will generate a new string each call (except for the
cannot_be_a_base_url() case). A few callers have then been updated to
avoid repeatedly calling this function.
2023-04-15 06:37:04 +02:00
iyush cc301f9861 HackStudio: Set_cursor even if the file is already open
Upon opening already opened file, the cursor was previously not
set to the correct line and column. With this patch, it should
be correctly set.

Fixes a bug where ctrl+clicking a function declaration would not
jump to the line if the file containing the function is already
open.
2023-04-13 09:52:33 +02:00
Tim Ledbetter 0829101eb8 Applications: Use thousands separator for numbers shown in status bar
TextEditor, HackStudio and SQLStudio now print the current line and
column number, as well as the number of currently selected words, with
thousands separators.

TextEditor also uses thousands seperators for the current word and
character count.
2023-04-12 09:03:01 +02:00
Evan Smal 5b906d9a40 HackStudio: Add configuration domain pledge for FileManager
This fixes a bug where clicking the "Save" button would crash the
application because 'FileManager' was a pledged domain.
2023-04-06 08:56:57 +01:00
Cameron Youell 0c98cde18e GMLPlayground: Pledge Calendar domain
This now allows for the preview of `@GUI::Calendar` without
crashing the whole program.
2023-04-06 08:24:25 +01:00
Sam Atkins 0761926127 HackStudio: Migrate git-diff indicators to TextEditor API
As part of this, the CodeDocument now keeps track of the kind of
difference for each line. Previously, we iterated every hunk every time
the editor was painted, but now we do that once whenever the diff
changes, and then save the type of difference for each line.
2023-03-31 12:09:40 +02:00
Sam Atkins 620bf45f43 HackStudio: Migrate execution-position indicator to TextEditor API 2023-03-31 12:09:40 +02:00
Sam Atkins 99221a436e HackStudio: Migrate breakpoint indicators to TextEditor API 2023-03-31 12:09:40 +02:00
Cameron Youell 752f06f228 LibFileSystem: Move TempFile from LibCore to LibFileSystem
As suggested in commit de18485
2023-03-21 19:03:21 +00:00
Cameron Youell 1d24f394c6 Everywhere: Use LibFileSystem where trivial 2023-03-21 19:03:21 +00:00
Sam Atkins 5c4ffbcb46 GMLPlayground: Let WindowServer handle the title's modification symbol 2023-03-20 09:06:12 +00:00
Sam Atkins 1fba3640cb GMLPlayground: Add list of recent files to the File menu 2023-03-20 09:06:12 +00:00
Karol Kosek 66402b0666 LibGUI+Userland: Port TabWidget set_tab_title to new string 2023-03-16 09:58:42 +01:00
Karol Kosek 797968c310 LibGUI+Userland: Make TabWidget::*add_tab() take title using new string 2023-03-16 09:58:42 +01:00
Karol Kosek 3805e4e3a9 LibGUI+HackStudio+PixelPaint: Port Widget title to the new String
I had to add a set_title(String) helper function for ImageEditor because
TabWidget requires it. This is a temporary fix and will be handled in
subsequent commit.
2023-03-16 09:58:42 +01:00
Liav A d16d805d96 Kernel: Merge {get,set}_process_name syscalls to the prctl syscall
It makes much more sense to have these actions being performed via the
prctl syscall, as they both require 2 plain arguments to be passed to
the syscall layer, and in contrast to most syscalls, we don't get in
these removed syscalls an automatic representation of Userspace<T>, but
two FlatPtr(s) to perform casting on them in the prctl syscall which is
suited to what has been done in the removed syscalls.

Also, it makes sense to have these actions in the prctl syscall, because
they are strongly related to the process control concept of the prctl
syscall.
2023-03-15 20:10:48 +01:00
Sam Atkins 6d8f046fd0 LibGfx+Userland: Make TextAttributes::underline_style optional
Rather than having a style AND a field saying whether to use the style,
just make the style Optional.
2023-03-15 14:55:49 +01:00
Tim Schumacher ecd1862859 AK: Rename Stream::write_entire_buffer to Stream::write_until_depleted
No functional changes.
2023-03-13 15:16:20 +00:00
Sam Atkins 08c1effc04 HackStudio: Use Syntax::Language instead of our own one
The one behavior difference here is that the statusbar used to display
"Unknown" for unknown file types, and "Markdown" for md, but we now
display "Plain Text" for all file types without syntax highlighters.
2023-03-11 13:22:57 +00:00
Andreas Kling a504ac3e2a Everywhere: Rename equals_ignoring_case => equals_ignoring_ascii_case
Let's make it clear that these functions deal with ASCII case only.
2023-03-10 13:15:44 +01:00
Sam Atkins 24d5bf8173 HackStudio: Store correct address in ClassViewModel's ModelIndices
When 359d6e7b0b happened, the return value
of `children[row]` went from being `ClassViewNode&` to
`NonnullOwnPtr<ClassViewNode>&`, so we were putting the wrong address
into the ModelIndex's data.
2023-03-08 23:14:21 +01:00
Sam Atkins b1ce852c37 HackStudio: Enable CMakeCache.txt highlighting 2023-03-08 14:21:37 +00:00
Andreas Kling 7369d0ab5f Kernel: Stop using NonnullLockRefPtrVector 2023-03-06 23:46:36 +01:00
Andreas Kling 21db2b7b90 Everywhere: Remove NonnullOwnPtr.h includes 2023-03-06 23:46:35 +01:00
Andreas Kling 359d6e7b0b Everywhere: Stop using NonnullOwnPtrVector
Same as NonnullRefPtrVector: weird semantics, questionable benefits.
2023-03-06 23:46:35 +01:00
Andreas Kling 689ca370d4 Everywhere: Remove NonnullRefPtr.h includes 2023-03-06 23:46:35 +01:00
Andreas Kling 8a48246ed1 Everywhere: Stop using NonnullRefPtrVector
This class had slightly confusing semantics and the added weirdness
doesn't seem worth it just so we can say "." instead of "->" when
iterating over a vector of NNRPs.

This patch replaces NonnullRefPtrVector<T> with Vector<NNRP<T>>.
2023-03-06 23:46:35 +01:00
Sam Atkins 774f328783 LibCore+Everywhere: Return an Error from DirIterator::error()
This also removes DirIterator::error_string(), since the same strerror()
string will be included when you print the Error itself. Except in `ls`
which is still using fprintf() for now.
2023-03-05 20:23:42 +01:00
Liav A be1d7c325a Kernel: Move process coredump metadata modification to the prctl syscall 2023-03-05 16:55:08 +01:00
Sam Atkins 0d0ad22572 HackStudio: Enable CMake syntax highlighting 2023-03-04 05:43:43 -07:00
Andreas Kling b71c7a6e44 Userland: Use Font::pixel_size_rounded_up() instead of glyph_height()
The only remaining clients of this API are specific to bitmap fonts and
editing thereof.
2023-03-04 00:29:38 +01:00
Andreas Kling c44bc58aaa HackStudio: Don't hard-code a default code font
If no HackStudio specific code font is set, we fall back to the system
default fixed-width font.
2023-03-03 15:23:47 +01:00
Ali Mohammad Pur 500044906d LibCore+Everywhere: Remove ArgsParser::add*(char const*&)
This is not guaranteed to always work correctly as ArgsParser deals in
StringViews and might have a non-properly-null-terminated string as a
value. As a bonus, using StringView (and DeprecatedString where
necessary) leads to nicer looking code too :^)
2023-03-01 10:47:19 +01:00
Linus Groh 09d40bfbb2 Everywhere: Use _{short_,}string to create Strings from literals 2023-02-25 20:51:49 +01:00
Itamar 47f5a3ea9a HackStudio: Add 'pause debuggee' button
This button sends a SIGSTOP to the debugged process, which pauses it.
The debuggee can be resumed with the 'continue' button.
2023-02-24 19:09:27 +01:00
Itamar 91224d47d2 SystemMonitor: Add "Debug In HackStudio" action to process context menu
This action launches HackStudio with its debugger attached to the
selected process.
2023-02-24 19:09:27 +01:00
Itamar 6e5b1f5819 HackStudio: Add progress bar to Debugger initialization
During Debugger initialization, most of the time is spent creating
DebugInfo objects for the libraries that the program has loaded.
2023-02-24 19:09:27 +01:00
Itamar 0896c03744 HackStudio: Add commandline option to debug a running process 2023-02-24 19:09:27 +01:00
Itamar 58c4fe52d4 HackStudio: Fix event loop usage in debugger callbacks
These callbacks are called from a different thread than the UI thread,
so we need to explicitly use the Application's event loop to perform GUI
logic.
2023-02-24 19:09:27 +01:00
Itamar ff6fb2cb10 HackStudio: Add ability to attach debugger to a running process 2023-02-24 19:09:27 +01:00
Andreas Kling 33e87d1627 Userland: Fix remaining smart pointer const-correctness issues 2023-02-21 00:54:04 +01:00
Sam Atkins 1a5159df73 LibGUI+HackStudio: Simplify TextEditor gutter & ruler calculations
- Make gutter/ruler_content_rect() return rectangles relative to the
  TextEditor widget.
- Re-order painting code to translate the Painter after the gutter/ruler
  has been painted, to use those coordinates.
- Consistently put gutter before ruler in code, because that's the order
  they physically appear.
2023-02-20 18:41:47 +01:00
Sam Atkins 307cd4a1da HackStudio: Make wrapping modes consistent
We were only setting the wrapping mode when triggering the action. So:
- Any editors open without triggering a wrapping-mode action would have
  the default (WrapAtWords) instead of the selected item (NoWrap).
- Any editors opened after triggering an action would have the default
  too.

This fixes both situations, by:
- Storing the current wrapping mode in `m_wrapping_mode`. Later this
  could be loaded from the config.
- Changing that value any time a wrapping-mode action is triggered.
- Setting the wrapping mode on newly-created editors.
2023-02-19 18:52:26 +01:00
Sam Atkins 6b66e39df4 LibGUI+Userland: Stop returning Layout from Widget::(try_)set_layout()
Nobody uses this return value any more. It also lets us remove a whole
bunch of `(void)` casts. :^)
2023-02-18 16:56:56 +00:00
Sam Atkins 77ad0fdb07 Userland: Specify margins and spacing in the GUI::Layout constructor 2023-02-18 16:56:56 +00:00
Ben Wiederhake 9a7b3c145f Everywhere: Change all XXX into FIXME or remove as appropriate 2023-02-15 23:33:25 +01:00
Tim Schumacher 43f98ac6e1 Everywhere: Remove the AK:: qualifier from Stream usages 2023-02-13 00:50:07 +00:00
Tim Schumacher 874c7bba28 LibCore: Remove Stream.h 2023-02-13 00:50:07 +00:00
Tim Schumacher 606a3982f3 LibCore: Move Stream-based file into the Core namespace 2023-02-13 00:50:07 +00:00
Tim Schumacher a96339b72b LibCore: Move Stream-based sockets into the Core namespace 2023-02-13 00:50:07 +00:00
Tim Schumacher d43a7eae54 LibCore: Rename File to DeprecatedFile
As usual, this removes many unused includes and moves used includes
further down the chain.
2023-02-13 00:50:07 +00:00
Karol Kosek e39adc4772 Userland: Set Button text using the new String class 2023-02-13 00:45:09 +00:00
Nico Weber 9cfd7a299c Userland: Use allocation-failure safe functions where it's easy
I went through all callers of adopt_own() and replaced them with
try_make<>() if possible or adopt_nonnull_own_or_enomem() else
in cases where it was easy (i.e. in functions already returning
ErrorOr).

No intended behavior change.
2023-02-12 22:54:28 +01:00
Lucas CHOLLET 107e15c5bc LibGUI: Base write_to_file(StringView path) on the stream overload
`write_to_file(StringView path)` was based on the `Core::File` overload.
The return type also changed from `bool` to `ErrorOr<void>` to ease
error propagation.
2023-02-11 14:20:26 +00:00
Timothy Flynn 4a916cd379 Everywhere: Remove needless copies of Error / ErrorOr instances
Either take the underlying objects with release_* methods or move() the
instances around.
2023-02-10 09:08:52 +00:00
Timothy Flynn e96df1599c SQLStudio: Display real column names in the results tab 2023-02-03 20:34:45 +01:00
Timothy Flynn 4fe437b4d2 SQLStudio: Separate the script and results tabs with a vertical splitter 2023-02-03 20:34:45 +01:00
Timothy Flynn d6dee8c0e8 LibSQL+Userland: Pass SQL IPC results to clients in a structure
SQLClient exists as a wrapper around SQL IPC to provide a bit friendlier
interface for clients to deal with. Though right now, it mostly forwards
values as-is from IPC to the clients. This makes it a bit verbose to add
values to IPC responses, as we then have to add it to the callbacks used
by all clients. It's also a bit confusing seeing a sea of "auto" as the
parameter types for these callbacks.

This patch moves these response values to named structures instead. This
will allow adding values without needing to simultaneously update all
clients. We can then separately handle the new values in interested
clients only.
2023-02-03 20:34:45 +01:00
Jelle Raaijmakers f0f9d8f1e0 Profiler: Standardize percentage formatting
This implements the same percentage formatting for the disassembly and
flamegraph views as we have for the profile model.
2023-02-02 14:37:01 +01:00
Tim Schumacher 8464da1439 AK: Move Stream and SeekableStream from LibCore
`Stream` will be qualified as `AK::Stream` until we remove the
`Core::Stream` namespace. `IODevice` now reuses the `SeekMode` that is
defined by `SeekableStream`, since defining its own would require us to
qualify it with `AK::SeekMode` everywhere.
2023-01-29 19:16:44 -07:00
Linus Groh 6e7459322d AK: Remove StringBuilder::build() in favor of to_deprecated_string()
Having an alias function that only wraps another one is silly, and
keeping the more obvious name should flush out more uses of deprecated
strings.
No behavior change.
2023-01-27 20:38:49 +00:00
Sam Atkins 0d37121fc4 Inspector: Remove declarations for non-existent methods 2023-01-27 20:33:18 +00:00
Sam Atkins 88d746c775 HackStudio: Remove declarations for non-existent methods 2023-01-27 20:33:18 +00:00
Sam Atkins b592629fe5 Profiler: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-01-27 08:07:24 -05:00
Sam Atkins 33ab3a212f Inspector: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-01-27 08:07:24 -05:00
Sam Atkins 141aa37eda HackStudio: Replace uses of JsonObject::get_deprecated()/get_ptr() 2023-01-27 08:07:24 -05:00
Tim Schumacher 82a152b696 LibGfx: Remove try_ prefix from bitmap creation functions
Those don't have any non-try counterpart, so we might as well just omit
it.
2023-01-26 20:24:37 +00:00
Sam Atkins 86b1b49d9a UserspaceEmulator: Use Core::Process::set_name() 2023-01-25 14:27:45 +01:00
Karol Kosek e45434c0c7 FileManager+HackStudio+SpaceAnalyzer: Use File::can_delete_or_move 2023-01-24 20:13:30 +00:00
Tim Schumacher e62269650a LibDebug: Propagate errors throughout DWARF parsing
Splitting this into a separate commit was an afterthought, so this does
not yet feature any fallible operations.
2023-01-22 19:12:26 +01:00
Tim Schumacher 9d7606b8de UserspaceEmulator: Use Core::Stream for writing profiling data
This looks like it should compile, but UserspaceEmulator is currently
broken on any non-i686 platform anyways, so I can't test that.
2023-01-21 14:43:56 +01:00
Timothy Flynn 027aee2c66 Userland: Add missing Math.h and IntegralMath.h header includes
These are currently being implicitly including by FixedPoint.h by way of
Format.h. The former will soon be removed from the latter, which would
otherwise cause a compile error in these files.
2023-01-19 11:29:48 +00:00
Sam Atkins 1dd6b7f5b7 AK+Everywhere: Rename JsonObject::get() to ::get_deprecated()
This is a preparatory step to making `get()` return `ErrorOr`.
2023-01-17 19:52:52 -05:00
MacDue 9a120d7243 AK: Add support for "debug only" formatters
These are formatters that can only be used with debug print
functions, such as dbgln(). Currently this is limited to
Formatter<ErrorOr<T>>. With this you can still debug log ErrorOr
values (good for debugging), but trying to use them in any
String::formatted() call will fail (which prevents .to_string()
errors with the new failable strings being ignored).

You make a formatter debug only by adding a constexpr method like:
static constexpr bool is_debug_only() { return true; }
2023-01-13 21:09:26 +00:00
Liav A e241b47fee Userland: Remove a bunch of unveil calls on /sys/kernel/processes
These are not needed anymore since the introduction of the new
get_root_session_id syscall.
2023-01-13 13:41:30 +01:00
Sam Atkins 7164b2f758 GMLPlayground: Add a toolbar
No new features, but it sure makes things look more fancy. :^)
2023-01-13 13:37:19 +01:00
Sam Atkins d443a51b50 GMLPlayground: Move layout to GML
There isn't much layout right now, but it felt very wrong to not have
the GML editor use GML. :^)
2023-01-13 13:37:19 +01:00
Sam Atkins e181b1cb82 Userland: Use Core::Timer::create_foo() factory functions where possible 2023-01-12 11:25:51 +01:00
Sam Atkins 6edc0cf5ab LibCore+Userland: Don't auto-start new Core::Timers
This was unintuitive, and only useful in a few cases. In the majority,
users had to immediately call `stop()`, and several who did want the
timer started would call `start()` on it immediately anyway. Case in
point: There are only two places I had to add a manual `start()`.
2023-01-12 11:25:51 +01:00
Sam Atkins a15d44f019 LibCore+Userland: Make Core::Timer::create_repeating() return ErrorOr
The FIXMEs must flow!
2023-01-12 11:25:51 +01:00
Matthew Olsson 95df712c2e HackStudio: Hide autocomplete popup when switching tabs 2023-01-11 09:15:10 +00:00
Timothy Flynn f3db548a3d AK+Everywhere: Rename FlyString to DeprecatedFlyString
DeprecatedFlyString relies heavily on DeprecatedString's StringImpl, so
let's rename it to A) match the name of DeprecatedString, B) write a new
FlyString class that is tied to String.
2023-01-09 23:00:24 +00:00
Lucas CHOLLET 8a87aa85ae GMLPlayground: Port to Core::Stream 2023-01-07 19:53:35 +00:00
Andrew Kaster a492e2018d Userland: Silence warnings from ElapsedTimer::elapsed() type change
We changed elapsed() to return i64 instead of int as that's what
AK::Time::to_milliseconds() returns, causing a bunch of implicit lossy
conversions in callers. Clean those up with a mix of type changes and
casts.
2023-01-07 14:51:04 +01:00
Andrew Kaster ddf348daeb Everywhere: Use ElapsedTimer::elapsed_time() for comparisons
Simplify a lot of uses of ElapsedTimer by converting the callers to
elapsed_time from elapsed, as the AK::Time returned is better for unit
conversions and comparisons against constants.
2023-01-07 14:51:04 +01:00
Sam Atkins f0395a2042 LibGUI+Userland: Rename try_load_from_gml() -> load_from_gml() :^)
It's the only one, so the `try` prefix is unnecessary now.
2023-01-07 14:39:30 +01:00
Sam Atkins 54b1326165 Userland: Replace all uses of load_from_gml with try_load_from_gml
MOAR FIXMES! ;^)
2023-01-07 14:39:30 +01:00
Karol Kosek 247db3fdd0 LibFileSystemAccessClient: Rename try_* functions to try_*_deprecated
These functions return the deprecated `Core::File` class, so let's mark
it as such to avoid possible confusion between future non try_*
functions which will use Core::Stream family classes and to possibly
grab someone's attention. :^)
2023-01-07 10:53:43 +00:00
Sam Atkins 0c24522635 LibGUI+Everywhere: Use fallible Window::set_main_widget() everywhere :^)
Rip that bandaid off!

This does the following, in one big, awkward jump:
- Replace all uses of `set_main_widget<Foo>()` with the `try` version.
- Remove `set_main_widget<Foo>()`.
- Rename the `try` version to just be `set_main_widget` because it's now
  the only one.

The majority of places that call `set_main_widget<Foo>()` are inside
constructors, so this unfortunately gives us a big batch of new
`release_value_but_fixme_should_propagate_errors()` calls.
2023-01-06 13:36:02 -07:00
Sam Atkins 3b682e885e GMLPlayground: Fill preview window with background color
Without this, the "Widget not registered" error stays visible if the
widgets defined by the GML do not themselves fill with their background
color.

Also tidied up some unused includes.
2023-01-05 18:58:08 +01:00
Timothy Flynn ab99ed5fba LibIPC+Everywhere: Change IPC::encode's return type to ErrorOr
In doing so, this removes all uses of the Encoder's stream operator,
except for where it is currently still used in the generated IPC code.
So the stream operator currently discards any errors, which is the
existing behavior. A subsequent commit will propagate the errors.
2023-01-04 11:49:15 +01:00
Ben Wiederhake 6b7ce19161 Everywhere: Remove unused includes of LibC/stdlib.h
These instances were detected by searching for files that include
stdlib.h, but don't match the regex:

\\b(_abort|abort|abs|aligned_alloc|arc4random|arc4random_buf|arc4random_
uniform|atexit|atof|atoi|atol|atoll|bsearch|calloc|clearenv|div|div_t|ex
it|_Exit|EXIT_FAILURE|EXIT_SUCCESS|free|getenv|getprogname|grantpt|labs|
ldiv|ldiv_t|llabs|lldiv|lldiv_t|malloc|malloc_good_size|malloc_size|mble
n|mbstowcs|mbtowc|mkdtemp|mkstemp|mkstemps|mktemp|posix_memalign|posix_o
penpt|ptsname|ptsname_r|putenv|qsort|qsort_r|rand|RAND_MAX|random|reallo
c|realpath|secure_getenv|serenity_dump_malloc_stats|serenity_setenv|sete
nv|setprogname|srand|srandom|strtod|strtof|strtol|strtold|strtoll|strtou
l|strtoull|system|unlockpt|unsetenv|wcstombs|wctomb)\\b

(Without the linebreaks.)

This regex is pessimistic, so there might be more files that don't
actually use anything from the stdlib.

In theory, one might use LibCPP to detect things like this
automatically, but let's do this one step after another.
2023-01-02 20:27:20 -05:00
Ben Wiederhake 8a331d4fa0 Everywhere: Move AK/Debug.h include to using files or remove 2023-01-02 20:27:20 -05:00
Ben Wiederhake b83cb09db1 Everywhere: Fix badly-formatted includes
In 7c5e30daaa, the focus was "only" on
Userland/Libraries/, whereas this commit cleans up the remaining
headers in the repo, and any new badly-formatted include.
2023-01-02 11:06:15 -05:00
Sam Atkins fa98034ff7 LibGUI+Userland: Make GML unregistered_child_handler fallible 2023-01-01 09:55:05 -05:00
Timothy Flynn e3d5b67eaf SQLStudio: Remove (unimplemented) ability to open database storage files
It may be handy to have some sort of storage inspector at some point but
for now, it doesn't make sense to open a database file. So only allow
opening script files, and don't make assumptions on their extension.
2022-12-30 14:17:18 +01:00
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
David Smith c2a1817c70 Profiler: Fix use after free in FlameGraphView
Layout cleared the list of bars in the flame graph, but didn't clear the
reference m_hovered_bar. This could cause a crash in mousedown_event()
when clicking twice: the first click caused layout, the second used
the old reference.
2022-07-24 23:19:09 +01:00