Commit graph

1848 commits

Author SHA1 Message Date
sa
fd628cdfec Browser: Fix crash in Storage Inspector when the cookie list is emtpy
This patch fixes a crash when clicking on an empty cookie list in the
Browsers Storage Inspector.
2022-03-06 01:36:41 +01:00
electrikmilk
056ca62778 FontEditor: Add code previews for fixed-width fonts
Add pseudo code to font preview for fixed-width programming fonts.
2022-03-05 21:24:25 +01:00
u9g
4147b56e79 Spreadsheet: Allow integer() to throw in weird cases
Also makes numericResolve use parseInt to avoid using our own integer()
2022-03-05 05:46:35 +03:30
u9g
75a02300ba Spreadsheet: Add find, findIndex, indexOf, & has to CommonRange 2022-03-05 05:46:35 +03:30
u9g
87c818c571 Spreadsheet: Put common Range(s) functionality into CommonRange class 2022-03-05 05:46:35 +03:30
Karol Kosek
5c978266e3 Spreadsheet: Ask about unsaved changes on "Open..." action activation 2022-03-04 11:56:52 -05:00
Karol Kosek
cef595aa5c CharacterMap+FontEditor: Switch current Unicode block on arrow press 2022-03-04 11:53:04 -05:00
Karol Kosek
17f9d3d45e CharacterMap: Go to character on arrow press in Search window 2022-03-04 11:53:04 -05:00
Karol Kosek
d4097f104e CharacterMap: Move search selection on arrow press in the search textbox 2022-03-04 11:53:04 -05:00
u9g
12ef20b869 Spreadsheet: Improve R function to support all of the examples 2022-03-04 04:29:20 +03:30
u9g
93115ee044 Spreadsheet: Add Range(s).toArray() 2022-03-04 04:29:20 +03:30
ForLoveOfCats
697e1810bf Calculator: Add keyboard input for more operations 2022-03-03 22:06:14 +01:00
ForLoveOfCats
19f80f88bf Calculator: Avoid focusing any keypad button other than the equal button
Having the return key sometimes press the equal button when nothing is
focused and press a different button when there is focus felt confusing.

The equal button is still able to be focused for the tab cycle to have
something to go to in order to jump out of the textbox but no other
keypad button can be focused now.
2022-03-03 22:06:14 +01:00
ForLoveOfCats
0d0ba375e2 Calculator: Utilize Button mimic_pressed to show when keys are pressed 2022-03-03 22:06:14 +01:00
Karol Kosek
20dbbdf90c Spreadsheet: Simplify enabling actions on selection
Since the function will *always* be called with some selection, we can
straight up enable actions.
2022-03-03 22:19:50 +03:30
Karol Kosek
f384aff510 Spreadsheet: Move deselection instructions to on_selection_dropped
The previous code never executed, as SpreadsheetView splits selection
events into `on_selection_changed` and `on_selection_dropped` depending
on whether there is any selection.
2022-03-03 22:19:50 +03:30
Karol Kosek
dc65543fa9 Spreadsheet: Show the opened filename in the window title
Prior to this commit, there was a set_filename() function that could set
the window title, but actually it never did that.  It was called only
in one place -- by the 'Save as...' action, but it always failed to
change anything, because there was a check that tried to reassign
the same filename. :/

This patch:
1. removes that check, and therefore
2. renames the function to simply `update_window_title()`,
3. starts calling the function from more places (at startup and after
   loading a file),
4. changes the window title order
   (`{app_name} - {filename}` -> `{filename} - {app_name}`) to match
   the other applications style on the system. :^)
2022-03-03 22:17:54 +03:30
Nícolas F. R. A. Prado
cb2e187be1 SoundPlayer: Sort CMake sources alphabetically 2022-03-02 22:10:05 -08:00
Nícolas F. R. A. Prado
5bafb80255 SoundPlayer: Draw album cover with correct aspect ratio
Instead of drawing the album cover scaled to cover the whole
visualization area, draw it resized to fit the area without altering the
aspect ratio.
2022-03-02 22:10:05 -08:00
Nícolas F. R. A. Prado
2470997fc9 SoundPlayer: Rename NoVisualization to AlbumCoverVisualization
Since the NoVisualization widget now shows the album cover, it should be
called AlbumCoverVisualization instead.
2022-03-02 22:10:05 -08:00
Nícolas F. R. A. Prado
2b1ac91764 SoundPlayer: Display album cover in the NoVisualizationWidget
Display the album cover for the current playing song in the
visualization area for the "None" Visualization.

For now only "cover.png" and "cover.jpg" are looked for in the same
directory for the album cover image.

When no cover image is found the serenity background is shown instead as
a fallback.
2022-03-02 22:10:05 -08:00
Nícolas F. R. A. Prado
2e1c017bce SoundPlayer: Add start_new_file() to VisualizationWidget's API
This adds a new start_new_file() function to VisualizationWidget which
is called when the player starts a new file, passing the filename of the
file. This allows VisualizationWidget subclasses to do any setup needed
when a new file is started.
2022-03-02 22:10:05 -08:00
Lenny Maiorani
064cfd6cb7 Applications: Fix undefined behavior capturing non-static constexpr 2022-03-02 22:01:58 -08:00
kleines Filmröllchen
f209d0491f SoundPlayer: Fix potential never-updated bars visualization
When the bars visualization receives a new buffer, it checks if it needs
a new buffer, which is only the case after it has repainted. However,
after then setting m_is_using_last, which is the flag for this, it
checks the buffer size of the passed buffer and returns if that is too
small. This means that if the visualizer receives a buffer that is too
small, and because of external circumstances the update doesn't run
after the buffer modification routine, the m_is_using_last variable is
stuck at true, which means that the visualization incorrectly believes
that the passed buffer is old and we need not update. This simply fixes
that by resetting m_is_using_last if the buffer we're passed is too
small, because in that case, we're clearly not using the last buffer
anymore.

Note: This bug is not exposed by the current SoundPlayer behavior. It
will become an issue with future changes, so we should fix it
regardless.
2022-03-02 21:41:10 +01:00
thankyouverycool
21ba9c808e Help: Improve search ergonomics
Up and down arrows now select search results. Matching index now
displays in full before filtering. Searching from the command
line focuses the query, and searches are now case insensitive.
2022-03-02 21:37:58 +01:00
thankyouverycool
8825abe7ed Help: Convert to GML and propagate more errors
Converts Help's layout to GML, propagates model and icon creation
errors, and switches to the MainWidget-namespace organization
pattern seen in more up-to-date apps like TextEditor to make things
easier to maintain going forward.
2022-03-02 21:37:58 +01:00
u9g
4eb2c70a03 Spreadsheet: Make Range(s).forEach() return Position objects 2022-03-02 21:49:17 +03:30
u9g
d047f26a74 Spreadsheet: Add Range(s).at(ix) 2022-03-02 21:49:17 +03:30
Rafał Babiarz
6bf59cbb1b Browser: Add storage inspector to context menu 2022-03-02 18:11:17 +01:00
Rafał Babiarz
c2e2a964f2 Browser: Add storage inspector 2022-03-02 18:11:17 +01:00
Rafał Babiarz
5f5ee2020e Browser: Add method to get cookies list 2022-03-02 18:11:17 +01:00
Thomas
4fd65748a8 KeyboardSettings: Highlight default keymap in Keyboard Settings dialog 2022-03-02 18:08:44 +01:00
Thomas
1e31c1260a KeyboardSettings: Fix adding empty keymaps
In the Keymap Settings dialog, a check was missing when the Keymap
selection dialog was cancelled.

Not checking the return value causes an empty string to be added to
the keymap list.
2022-03-02 11:41:10 +01:00
roughjericho
8dd08a1103 Spreadsheet: Make function examples easier to read
Up until now, the Spreadsheet function examples appeared below their
descriptions. Let's swap them to make it clearer which JS example
goes to which description.
2022-02-28 20:27:50 -08:00
kleines Filmröllchen
889315e8aa Piano: Respect logarithmic parameters in sliders
If the underlying parameter is logarithmic, the slider respects that and
switches to a logarithmic display. Currently, the used base is e, and
we'll have to see in practice if 2 or 10 might be better. The parameters
that make use of this, as can be seen in the previous commit, are all of
the time dependent parameters such as the synth envelope parameters, as
with these, usually fine-grained control at small time scales and
coarser control at large time scales is desired.

This was a good opportunity to refactor the slider step count into a
constant.
2022-02-28 13:59:31 +01:00
Lenny Maiorani
1dd70a6f49 Applications: Change static constexpr variables to constexpr
Function-local `static constexpr` variables can be `constexpr`. This
can reduce memory consumption, binary size, and offer additional
compiler optimizations.
2022-02-28 13:54:27 +01:00
Idan Horowitz
feb00b7105 Everywhere: Make JSON serialization fallible
This allows us to eliminate a major source of infallible allocation in
the Kernel, as well as lay down the groundwork for OOM fallibility in
userland.
2022-02-27 20:37:57 +01:00
u9g
d2adf54e73 Spreadsheet: Add sumProduct(If) functions 2022-02-27 02:48:32 +03:30
u9g
99425c5adc Spreadsheet: Add max(If)/min(If) function for ranges 2022-02-27 02:48:32 +03:30
u9g
6c35419236 Spreadsheet: Add Range(s).first() functions 2022-02-27 02:48:32 +03:30
thankyouverycool
76157594a9 TextEditor: Save wrapping mode settings 2022-02-26 22:54:25 +01:00
thankyouverycool
e5f7032fb8 TextEditor: Add missing syntax Alt-menu shortcuts 2022-02-26 22:54:25 +01:00
Filiph Sandström
3c01ef1c23 Spreadsheet: Disable cut/copy if no cell is selected
This resolves #12766 which occurred when the user tried to
use either the cut or copy action before selecting a cell.
2022-02-26 10:36:27 +01:00
Itamar
935d023967 Userland: Rename WindowServerConnection=>ConnectionToWindowServer
This was done with CLion's automatic rename feature.
2022-02-25 22:35:12 +01:00
Itamar
af132fdbd1 Userland: Rename WindowManagerServerConnection
Rename WindowManagerServerConnection=>ConnectionToWindowManagerServer.

This was done with CLion's automatic rename feature.
2022-02-25 22:35:12 +01:00
Itamar
3a71748e5d Userland: Rename IPC ClientConnection => ConnectionFromClient
This was done with CLion's automatic rename feature and with:
find . -name ClientConnection.h
    | rename 's/ClientConnection\.h/ConnectionFromClient.h/'

find . -name ClientConnection.cpp
    | rename 's/ClientConnection\.cpp/ConnectionFromClient.cpp/'
2022-02-25 22:35:12 +01:00
thankyouverycool
f457e43885 Assistant+CommandPalette: Use FrameShape::Window for main widgets 2022-02-25 19:38:23 +01:00
networkException
9279dd783b Everywhere: Use title case for man section titles
In addition to the section headings on man.serenityos.org,
all occurances of man section titles are now formatted in title case.
2022-02-25 12:06:31 -05:00
thankyouverycool
b9f81b91a6 TextEditor: Update status bar to use clickable Segments
Adds two new Segments to TextEditor's status bar to quickly
change and display syntax highlighting and line and column info.
2022-02-24 19:09:41 +01:00
thankyouverycool
3aa95dd4d5 LibGUI+Apps: Convert Statusbar Labels to Segments
Segments inherit from Button and let us add clickable widgets
to status bars. This patch also adds proportional, fixed and
autosized modes for segments and lets the status bar consume
all non-clickable segments for override text.
2022-02-24 19:09:41 +01:00