Commit Graph

1491 Commits

Author SHA1 Message Date
Sam Atkins
8461f8c1cd Help: Add support for launching with a section and page, like man
I found it strange that `man` and `Help` did not accept the same command
line arguments since they are so similar. So... now they do. :^)

This means you can now open for example the `tar` man page in Help with
`Help tar`, or `Help 1 tar` if you want to disambiguate between pages in
different sections.

If the result is not found, it falls back to the previous behavior,
treating the input as a search query.

Initially I had this written as two optional positional arguments, but
when told to parse `[optional int] [optional string]`, and then given a
string input, ArgsParser forwards it to the [optional int], which then
fails to parse. Ideally it would pass it to the second, [optional
string] arg instead, but that looks like a fairly big change to make to
ArgsParser's internals, and risk breaking things. Maybe this ugly hack
will be an incentive to fix it. :^)
2021-12-20 10:58:41 -08:00
Sam Atkins
4c91f736c7 Help: Move update_actions() code into open_page()
These two lambdas are always called together, in this order, so why not
make them one instead?

Also converted a couple of west-consts to east-const.
2021-12-20 10:58:41 -08:00
Sam Atkins
4bf2ef2a4c Help: Always show the welcome page on launch if nothing else is there
Previously, launching Help with a query like `Help tar` left the page
blank, which looks like something has gone wrong. Instead, let's show
the usual welcome page.
2021-12-20 10:58:41 -08:00
Junior Rantila
5238308d6f Magnifier: Add timeline for easy checking of animations
This patch adds a 512 frame timeline to Magnifier and the ability to
step through it with the arrow keys.

This makes it easier to check Serenity animations frame by frame for
correctness etc.
2021-12-20 10:48:03 -08:00
Junior Rantila
105f741131 Piano: Make Key_Space shortcut to toggle playback 2021-12-20 10:39:37 -08:00
Idan Horowitz
d82c91ac2c SystemMonitor: Add back accidentally removed veil lock
Since the call to lock the veil was missing, the protections provided
by unveil() were not actually enabled.
2021-12-19 13:41:35 +01:00
Astraeus-
eb1f00a940 AnalogClock: Port to LibMain 2021-12-17 13:09:54 -08:00
Astraeus-
eec6ae0d07 About: Port to LibMain 2021-12-17 13:09:54 -08:00
RasmusNylander
fa99125571 Spreadsheet: Handle emptying of cell containing only an '='
Cell::set_data(String new_data) now checks whether the cell is a
formula-cell and the new_data is an empty string. If this is case, it
will no longer simply return and will now instead actually set the
cell's contents to an empty string.

This fixes an error whereupon committing the string "=" to a cell, it
would not be possible to directly delete the cell's contents. Instead,
it first had to be overwritten with another string, which then could be
deleted.

This could probably be done more elegantly. Right now, I believe,
writing the string "=" to a (formula-)cell already containing an
identical string will result in the cell being marked as dirty, even
though nothing actually changed.
2021-12-16 02:44:37 +03:30
Ali Mohammad Pur
5f1a34bba3 Spreadsheet: Avoid using Value.to_string_without_side_effects()
We should use .to_string() and handle the possible exceptions.
This makes the displayed cell contents so much more informative than
'[object Object]' :^)
2021-12-12 14:49:49 +03:30
Ali Mohammad Pur
235eb0b1ad Spreadsheet: Replace hacky JS VM configuration with a more correct one
Now we give each sheet its own interpreter and realm, and only make them
share the VM.
This is to prepare for the next commit, which will be refactoring a
bunch of things to propagate exceptions via ThrowCompletionOr<T>.
2021-12-12 14:49:49 +03:30
Ali Mohammad Pur
82dde46a30 Spreadsheet: Replace the help button's text with something we can render 2021-12-12 14:49:49 +03:30
Ali Mohammad Pur
91444de2cf Spreadsheet: Reimplement ranges as lazy objects instead of arrays
Doing so makes it possible to talk about theoretically infinite ranges
like "all of column A".
2021-12-12 14:49:49 +03:30
Ali Mohammad Pur
892e585e9a Spreadsheet: Don't recreate the global environment on every evaluation
The worksheet's realm does not change, and is not shared, so we can
safely leave the global environment be.
This fixes lexical scoping in the spreadsheet's runtime file.
2021-12-12 14:49:49 +03:30
Sahan Fernando
49ed168ced Userland: Use File::lines() range-based for loop where appropriate 2021-12-12 14:06:38 +03:30
Undefine
312bac1967 Mail: Ask the user if they want to see the mail settings 2021-12-11 15:09:54 -08:00
Jose Flores
65df30d00c Piano: Add track controls to the player widget
Adds the ability to add a track and cycle through the
tracks from player widget. Also displays the current track
being played or edited in a dropdown that allows
for quick track selection.
2021-12-11 23:07:21 +01:00
bugreport0
1a2ff38609 CrashReporter: Remove redundant pledge() 2021-12-11 23:06:56 +01:00
Daniel Bertalan
4a81b33c07 Everywhere: Fix -Winconsistent-missing-override warnings from Clang
This option is already enabled when building Lagom, so let's enable it
for the main build too. We will no longer be surprised by Lagom Clang
CI builds failing while everything compiles locally.

Furthermore, the stronger `-Wsuggest-override` warning is enabled in
this commit, which enforces the use of the `override` keyword in all
classes, not just those which already have some methods marked as
`override`. This works with both GCC and Clang.
2021-12-11 13:14:15 -08:00
Sam Atkins
54bbb97ac6 Browser+LibWeb+WebContent: Add variables display to Inspector
This allows us to see which custom properties apply to a given element,
which previously wasn't shown.
2021-12-10 06:52:17 +01:00
scwfri
8d0143a380 HackStudio+TextEditor: Persist EditingEngineType across editors
Persist EditingEngine mode in HackStudio and TextEditor when opening new
files or editing splits. Previously, the EditingEngine defaulted to a
RegularEditingEngine for a new Editor, even if Vim Emulation had been
selected in the existing Editor.
2021-12-09 21:31:06 +01:00
Ben Wiederhake
13cba5f8b4 Spreadsheet: Avoid implicitly copying ByteBuffer 2021-12-08 09:46:13 -08:00
Sam Atkins
3ca2aee054 Applications: Cast unused smart-pointer TRY return values to void 2021-12-05 15:31:03 +01:00
Sam Atkins
d2024f04bd Userland: Cast unused BackgroundAction::construct() results to void
User code does not need to keep this alive, so casting to void is safe.
But maybe a bit weird.
2021-12-05 15:31:03 +01:00
Elyse
8595fd585d SoundPlayer: Port to LibMain :^) 2021-12-04 15:07:18 -08:00
Andreas Kling
96e4077c38 SystemMonitor: Port to LibMain :^)
There's a lot more work to do on this application to take full advantage
of TRY() etc. This patch just scratches the surface.
2021-12-04 14:24:04 +01:00
Andreas Kling
01228bf4ef CrashReporter: Port to LibMain and use TRY() while building the UI :^) 2021-12-04 14:24:04 +01:00
Jelle Raaijmakers
a4603fbc06 3DFileViewer: Add checkbox to disable texture 2021-12-01 10:21:13 +01:00
Andreas Kling
fc0a040e5d CrashReporter: Remove unnecessary button height overrides from GML 2021-11-30 23:34:40 +01:00
Andreas Kling
85eb0eaad0 CrashReporter+HackStudio: Let's call it "Debug in Hack Studio"
"Inspect in Hack Studio" was a bit vague.
2021-11-30 23:34:40 +01:00
Erik Biederstadt
e052d647b7 Spreadsheet: Allow sheet renaming after double clicking on the tabwidget 2021-12-01 00:44:26 +03:30
thankyouverycool
298a6b9937 LibGUI+FontEditor: Allow ComboBox on_change callback to be toggled
When calling set_selected_index() on ComboBox, allow its on_change
callback to be disabled. Fixes FontEditor window state erroneously
switching to modified when initializing between different slopes
and weights.
2021-11-30 10:51:51 +01:00
thankyouverycool
ca062d83db FontEditor: Convert to east const 2021-11-30 10:51:51 +01:00
thankyouverycool
de77e28360 FontEditor: Correct member type and initialization in UndoGlyph
Makes code_point type u32, consistent with the rest of the system,
and properly initializes it.
2021-11-30 10:51:51 +01:00
thankyouverycool
e3e3c03dca FontEditor: Remove unused Vector<String> 2021-11-30 10:51:51 +01:00
thankyouverycool
ca77aea099 FontEditor: Correct NewFontDialog layout issues
Fixes incorrect scale initialization and inconsistent margins, sets
minimum values for glyph width and height to 1, and labels page 1
more precisely as "Typeface" properties.
2021-11-30 10:51:51 +01:00
thankyouverycool
9b184fc1cb FontEditor: Clean up GlyphMapWidget header
Fixes minor organizational inconsistency and zeroes initializations
for rows and columns as the previous values haven't been meaningful
since the map was converted to a scrollable widget. No functional
changes.
2021-11-30 10:51:51 +01:00
thankyouverycool
7d73d2dfc8 FontEditor: Remove superfluous 'this' pointers 2021-11-30 10:51:51 +01:00
thankyouverycool
e29abc5395 LibGfx+FontEditor: Consolidate BitmapFont width and height limits
And make them more self-documenting. Previously these constraints
were duplicated across multiple files.
2021-11-30 10:51:51 +01:00
thankyouverycool
541f1de3a8 FontEditor: Add scaled offset members to GlyphEditor
Previously these were undescriptive globals making them a bit cryptic.
2021-11-30 10:51:51 +01:00
thankyouverycool
aa09e40eb2 FontEditor: Update status bar on initialization
Fixes incorrect glyph status immediately after loading a new font.
2021-11-30 10:51:51 +01:00
thankyouverycool
ae922c67fd FontEditor: Remove code duplication when resizing GlyphEditor
The left column now also enforces a minimum width to prevent especially
small fonts from hiding the glyph toolbars and width widgets.
2021-11-30 10:51:51 +01:00
thankyouverycool
c1744822a1 FontEditor: Account for glyph width when pasting
Fixes glyphs not expanding up to their maximum width if necessary
when pasting larger glyphs into smaller ones.
2021-11-30 10:51:51 +01:00
thankyouverycool
281805696b FontEditor: Don't allow cutting and copying absent glyphs
And update status bar on cut. Fixes placing these effectless actions
on the undo stack.
2021-11-30 10:51:51 +01:00
thankyouverycool
d2b211f14a FontEditor: Don't null check newly created NonnullRefPtr fonts 2021-11-30 10:51:51 +01:00
thankyouverycool
74938e6f42 FontEditor: Factor out redundant code for a request to close 2021-11-30 10:51:51 +01:00
thankyouverycool
1e052f5a91 FontEditor: Convert mode and transform buttons into toolbar actions
This will let us more easily organize and assign shortcuts to new
modes and transformations as they are built, and it generally looks
more polished as a uniform interface. Also adds a counterclockwise
option to the rotate action, moves Copy as Character to the edit
menu as it doesn't directly impact GlyphEditor, and makes the paint
and move modes exclusive checkables to make the editor's state more
visually obvious.
2021-11-30 10:51:51 +01:00
thankyouverycool
922e80e72b FontEditor: Simplify start-up
Previusly a cloned or newly loaded font was moved twice from main to
the constructor and then from constructor to an init routine where it
was finally used. The unmasked font is now moved only once, directly
to initialization, and redundant error checking is discarded.
2021-11-30 10:51:51 +01:00
thankyouverycool
56a8a2b493 FontEditor: Use LibUnicode to convert character case
Fixes characters beyond the Basic Latin code block not showing
their upper-case form in the preview window.
2021-11-30 10:51:51 +01:00
thankyouverycool
edf86af4f4 LibGfx+FontEditor: Add helper to determine raw glyph presence
GlyphBitmaps are considered present if they have a width greater
than zero. This adds a counterpart method for raw (unmasked) glyphs
and makes intent more explicit throughout FontEditor.
2021-11-30 10:51:51 +01:00