Commit Graph

886 Commits

Author SHA1 Message Date
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
Tim Schumacher
5870484d1a LibC: Remove the LibPthread interface target 2022-07-19 11:00:35 +01: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
a3eeeaa6a1 Userland: Remove erroneous String -> char* -> StringView conversions
These were accidental (or leftover) uses of String::characters() to
construct StringViews through its StringView(char const*) constructor.
Since this constructor is due to be removed, this will no longer work.
Plus this prevents strlen from being run on these strings unnecessarily.
2022-07-12 23:11:35 +02:00
ferhatgec
b56282d4b2 DevTools/HackStudio: Fix 'enabled' property of 'build' and 'run' buttons 2022-07-12 11:56:23 +01:00
ferhatgec
00075afb07 DevTools/HackStudio: Add verify_make_is_installed() 2022-07-12 11:56:23 +01:00
Yuval
bd74db157a HackStudio: Add the "Copy Full Path" TreeView context menu option
This commit adds support for the option described above.
The option can be seen after a right click on a TreeView item,
and it puts the item's full path in the clipboard.
2022-07-08 11:20:05 +01:00
Yuval
4ef0433be1 HackStudio: Add the "Copy Relative Path" TreeView context menu option
This commit adds support for the option described above.
The option can be seen after a right click on a TreeView item,
and it puts the item's relative path in the clipboard (relative
to the project's root directory).
2022-07-08 11:20:05 +01: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
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
Linus Groh
643faa1144 Everywhere: Fix two inconsistent serenity_lib() output names
- No underscores between word boundaries, i.e. `languageserver` and not
  `language_server` for LibLanguageServer
- All lowercase, i.e. `coredump` and not `Coredump` for LibCoredump
2022-07-03 22:59:13 +02:00
Lennon Donaghy
c1b0931d2e HackStudio: Properly clear previous editor tabs when closing project
Before this commit the close tab button, which is meant to only
show when more than one tab is open, would be present on the tab
of a new project opened after the first project.

This was due to m_all_editor_tab_widgets not being cleared when closing
the first project. This is now cleared when close_current_project() is
called.
2022-06-30 14:38:09 +01:00
Lennon Donaghy
d2aafe58c9 HackStudio: Leave one editor tab open on closing project 2022-06-30 14:38:09 +01:00
martinfalisse
f33979a753 SQLStudio: Add collapsible tabs for query results
Adds tabs under the editor and places the query results there. It is
only displayed if there are results to an executed query.
2022-06-30 12:22:45 +01:00
martinfalisse
e9541bca31 SQLStudio: Show script execution results in table
Show the results of executing a script in the TableView (if there are
results to show).
2022-06-30 12:22:45 +01:00
martinfalisse
061525282f SQLStudio: Execute statements in SQL server
Make the link between SQLStudio and the SQLServer so that statements
written in the editor window are executed by LibSQL when the 'Run'
button is clicked.
2022-06-30 12:22:45 +01:00
martinfalisse
4461dad0f3 SQLStudio: Add GUI for query results
Add the necessary GUI elements (button, table) so that one can click a
button to run the currently-open script, and see the results in a
user-friendly table.
2022-06-30 12:22:45 +01:00
Linus Groh
cc4bb59a7e Playground: Rename the application to GMLPlayground
Just "Playground" is too generic and doesn't match the general rule of
"application name equals display name minus spaces".
2022-06-28 21:10:10 +01:00
FrHun
8dd08d47f1 Applications: Remove usages of deprecated implicit conversions
These deprecated conversions are currently in place to make the system
compile, but they are to be removed soon. This prepares that.
2022-06-28 17:52:42 +01:00
Humberto Alves
c9ed88309b Playground: Set editor->on_change before opening files
Set `editor->on_change` callback before opening files, otherwise the
compiled GML preview will only be available after some manual input in
the text editor.
2022-06-28 17:23:47 +01:00
hhsdev
3f230a638d HackStudio: Add "Open in New Tab" context menu entry
This action creates a new editor tab and opens the selected file in the
newly created tab.
2022-06-16 12:55:14 +01: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
Linus Groh
173dcfb7cb Everywhere: Fix a bunch of typos 2022-05-29 15:22:00 +02: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
Itamar
b35293d945 LibCodeComprehension: Re-organize code comprehension related code
This moves all code comprehension-related code to a new library,
LibCodeComprehension.

This also moves some types related to code comprehension tasks (such as
autocomplete, find declaration) out of LibGUI and into
LibCodeComprehension.
2022-05-21 18:15:58 +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
Sam Atkins
cdffe556c8 LibGUI+Userland: Make Dialog::ExecResult an enum class 2022-05-13 16:27:43 +02:00
Hendiadyoin1
6c41267dcf UserspaceEmulator: Delegate rounding to the actual hardware
This also makes us a bit more accurate, due to better rounding of
intermediate results.

This also gives us the flush-to-zero and denormals-are-zero SSE settings
for free! (Assuming UE is build with SSE)
2022-05-07 20:27:05 +02:00
kleines Filmröllchen
71b175d4ed Profiler: Use ProfileModel rounding constant for the status bar text
This way, we can change the constant in one place. Note that this
requires the use of nested format strings, which is slightly ugly but
safe to do in this instance.
2022-05-07 20:21:51 +02:00
kleines Filmröllchen
6368ef41f8 Profiler: Round sample percentages to a constant number of digits
This constant is currently 3 but can be changed easily or integrated
into a user setting. Note that the results are not ideal because during
pretty-printing we're not using any nice rounding rules, so many
percentage values will actually appear as 0.399999 even though they were
rounded to three digits.
2022-05-07 20:21:51 +02:00