Commit Graph

1794 Commits

Author SHA1 Message Date
Julian Offenhäuser
228fa1c51d SoundPlayer: Accept drop events
Files can now be dragged into the window and loading errors will be
handled more gracefully.
2020-12-03 21:52:10 +01:00
Julian Offenhäuser
bad8cd3d8f Applications+Userland: Switch to new Audio::Loader API 2020-12-02 16:31:30 +01:00
Luke
9a2a673e51 SystemMonitor: Add Interrupts tab
I was looking through the proc folder, noticed this and thought
"why not?"

It's setup as an updating model because of the call count, however,
the call count doesn't appear to be working right now.
2020-12-02 12:57:38 +01:00
Zac
99e301510e FileManager: Call on_selection_change with the correct view 2020-12-01 11:05:08 +01:00
AnotherTest
602a830428 Spreadsheet: Invert the drag-selection trigger
Make drag-selection the default behaviour, allowing (almost) any part of
the cell to initiate a select.
a small 5x5 rect at the corners of a cell can be used to initiate a
drag-copy instead.
Fixes #4268.
2020-11-30 17:54:54 +01:00
AnotherTest
c1276559ba Spreadsheet: Implement drag-to-select
To initiate drag-to-select, the user can move the mouse to near the edge
of a cell, and click-and-drag when the cursor changes to a crosshair.
Fixes #4167.
2020-11-30 12:07:45 +01:00
AnotherTest
b532b2d3ca Spreadsheet: Clear callbacks on persistent widgets before tearing tabs down
Otherwise changes to the widgets would cause all sorts of updates on
half-deleted cells.
Fixes #4171.
2020-11-30 12:07:45 +01:00
AnotherTest
a20f1202a8 Spreadsheet: Clear the cell and commit when the delete key is pressed
...as the initial stroke that begins an edit.
This is still imperfect, as it completely ignores selections.
Fixes #4168 (sort of).
2020-11-30 12:07:45 +01:00
AnotherTest
474453244b Spreadsheet: Implement infinit-scroll for columns
This naturally also implements multi-char columns, and also integrates
it into the js runtime (such columns can be named in ranges too).
2020-11-30 12:07:45 +01:00
AnotherTest
f6ae4edbd2 Spreadsheet: Implement infinite-scroll for rows
Every time the scrollbar reaches the end, we append 100 more rows
(seamlessly!).
As a result of defaulting to 100 rows, we can also save with the
smallest number of rows required.
This partially deals with #4170.
2020-11-30 12:07:45 +01:00
AnotherTest
868c315e51 Spreadsheet: Force-update the spreadsheet widget after pasting
Just updating the sheet will not cause a widget update.
2020-11-30 12:07:45 +01:00
Tom
4c8c149612 Terminal: Wait on the utmpupdate process to finish
This solves utmpupdate zombies hanging around until Terminal
terminates.
2020-11-30 11:34:08 +01:00
AnotherTest
1279d2256c Terminal: Allow the user to configure the maximum history size
Closes #4238.
2020-11-29 20:32:45 +01:00
Emanuel Sprung
3b7884ee8a TextEditor: Add button to match regular expression during search 2020-11-27 21:32:41 +01:00
AnotherTest
3bafef0b15 Spreadsheet: Allow copying from one cell to many
This simply fils the target selection with the source cell.
Fixes #4010.
2020-11-24 21:38:13 +01:00
AnotherTest
48d8534967 Spreadsheet: Add support for importing from and exporting to CSV files
Closes #4136.
2020-11-24 21:38:13 +01:00
AnotherTest
31523f6c64 Spreadsheet: Add a CSV reader and writer
This is not utilised yet.
2020-11-24 21:38:13 +01:00
Zac
1dc480e097 Calculator: Changed 'CE' Button from 'Clear Error' To 'Clear Entry'
The CE button on the windows calculator was used to clear the current
entry rather than the current error. This commit changes the
calculator's CE button such that it now clears the current value being
entered into the keypad and errors are now cleared at the end of every
successful operation.
2020-11-23 18:41:54 +01:00
BenJilks
a27d118085 PixelPaint: Use UndoStack instead of History
This allows to share more code with other undo systems.
2020-11-22 16:07:00 +01:00
BenJilks
76aeb7cad8 PixelPaint: Applying filters should be an action
This allows you to undo filters
2020-11-22 16:07:00 +01:00
BenJilks
58c30959b1 PixelPaint: Export image as BMP
You can now export your masterpieces as fresh, crisp BMP files.
2020-11-22 16:07:00 +01:00
BenJilks
d8474d80f2 PixelPaint: Save and load to and from disk
Store a PixelPaint project in a .pp file (as there doesn't seem to
be any real standard on this). It's a very simple json file that
contains the bitmap as a base64 encoded bmp.
2020-11-22 16:07:00 +01:00
BenJilks
1c27568ab0 PixelPaint: Undo and redo actions
The most used feature of any image editor, undo. Each tool now
notifies the ImageEditor that they completed an action, where
it'll take a snapshot if its current state.

For now, a snapshot is just a copy of the whole image and its
layers. There's a hard limit on the amount of actions it stores.
2020-11-22 16:07:00 +01:00
Andreas Kling
5aeab9878e LibWeb: Rename LayoutNode classes and move them into Layout namespace
Bring the names of various boxes closer to spec language. This should
hopefully make things easier to understand and hack on. :^)

Some notable changes:

- LayoutNode -> Layout::Node
- LayoutBox -> Layout::Box
- LayoutBlock -> Layout::BlockBox
- LayoutReplaced -> Layout::ReplacedBox
- LayoutDocument -> Layout::InitialContainingBlockBox
- LayoutText -> Layout::TextNode
- LayoutInline -> Layout::InlineNode

Note that this is not strictly a "box tree" as we also hang inline/text
nodes in the same tree, and they don't generate boxes. (Instead, they
contribute line box fragments to their containing block!)
2020-11-22 15:56:27 +01:00
Andreas Kling
f358f2255f LibWeb: Rename LayoutNode::node() => LayoutNode::dom_node() 2020-11-22 14:46:36 +01:00
Simon Danner
bc5b8223b7 SoundPlayer: Add pledge for thread so file chooser doesn't crash
- Without thread pledge, SoundPlayer crashes when generating thumbnails
- Fixes #4121
2020-11-22 10:53:58 +01:00
Andreas Kling
adabcf24ec Everywhere: Add missing <AK/ByteBuffer.h> includes
All of these files were getting ByteBuffer.h from someone else and then
using it. Let's include it explicitly.
2020-11-15 13:11:21 +01:00
Tom
75f61fe3d9 AK: Make RefPtr, NonnullRefPtr, WeakPtr thread safe
This makes most operations thread safe, especially so that they
can safely be used in the Kernel. This includes obtaining a strong
reference from a weak reference, which now requires an explicit
call to WeakPtr::strong_ref(). Another major change is that
Weakable::make_weak_ref() may require the explicit target type.
Previously we used reinterpret_cast in WeakPtr, assuming that it
can be properly converted. But WeakPtr does not necessarily have
the knowledge to be able to do this. Instead, we now ask the class
itself to deliver a WeakPtr to the type that we want.

Also, WeakLink is no longer specific to a target type. The reason
for this is that we want to be able to safely convert e.g. WeakPtr<T>
to WeakPtr<U>, and before this we just reinterpret_cast the internal
WeakLink<T> to WeakLink<U>, which is a bold assumption that it would
actually produce the correct code. Instead, WeakLink now operates
on just a raw pointer and we only make those constructors/operators
available if we can verify that it can be safely cast.

In order to guarantee thread safety, we now use the least significant
bit in the pointer for locking purposes. This also means that only
properly aligned pointers can be used.
2020-11-10 19:11:52 +01:00
asynts
3b3edbc4d2 AK: Rename new_out to out and new_warn to warn. 2020-11-09 16:21:29 +01:00
AnotherTest
e99c2261e3 Spreadsheet: Add support for copying ranges of cells to other cells
Now the entire range is copied to the area around the target cell,
translating the current cursor to the target.
2020-11-08 21:46:13 +01:00
AnotherTest
7878596532 Spreadsheet: Update the view when using the cell editor 2020-11-08 21:46:13 +01:00
AnotherTest
0e544b8afa Spreadsheet: Enable Drag&Drop and Copy/Paste
These currently only work on the current sheet, in the current
Spreadsheet instance, but they're still freakin' cool!
2020-11-03 16:47:56 +01:00
AnotherTest
821e875bc0 Spreadsheet: Serialise Positions to URLs and add Sheet::from_uri() 2020-11-03 16:47:56 +01:00
Brendan Coles
ed5469c1c2 Applications: Use pledge and unveil 2020-11-02 22:36:27 +01:00
Brendan Coles
5ed7ca3627 Applications: Use GUI::Icon::default_icon to set application icon 2020-11-02 21:06:17 +01:00
Brendan Coles
e8ff7c895b Applications: Use GUI::CommonActions for save and save as menu options 2020-11-02 13:14:58 +01:00
Brendan Coles
90a30f694d SoundPlayer: Optionally allow playback to loop indefinitely 2020-11-01 10:33:57 +01:00
Andreas Kling
39c9319b6d Terminal: Run clang-format 2020-10-31 19:54:23 +01:00
AnotherTest
1bd3a2d09f Spreadsheet: Add support for example views and hyperlinks in the docs
Now the functions can actually be demonstrated by small examples,
embedded right inside the documentation via:
spreadsheet://example/<page>#<example_name>

Also allows pages to link to each other via the same scheme:
spreadsheet://doc/<page>
2020-10-31 15:40:13 +01:00
Andreas Kling
982e066100 LibGfx: Move FontDatabase from LibGUI to LibGfx
Not sure why I put this into LibGUI in the first place.
2020-10-31 13:56:21 +01:00
Brendan Coles
e569f7fd1c Applications: Use application icons for dialog windows 2020-10-31 13:48:15 +01:00
Brendan Coles
15b68b4653 Spreadsheet: Add Help menu 2020-10-31 13:39:18 +01:00
Andreas Kling
aef56159a8 LibGUI: Add Widget focus policies
Every widget now has a GUI::FocusPolicy that determines how it can
receive focus:

- NoFocus: The widget is not focusable (default)
- TabFocus: The widget can be focused using the tab key.
- ClickFocus: The widget can be focused by clicking on it.
- StrongFocus: Both of the above.

For widgets that have a focus proxy, getting/setting the focus policy
will affect the proxy instead.
2020-10-30 17:03:28 +01:00
Andreas Kling
9d347352a1 LibGfx+LibGUI+Clients: Make fonts findable by their qualified name
The qualified name of a font is "<Family> <Size> <Weight>". You can
get the QN of a Font via the Font::qualified_name() API, and you can
get any system font by QN from the GUI::FontDatabase. :^)
2020-10-25 21:18:18 +01:00
Andreas Kling
260b52215c HexEditor: Use the system default fixed width font 2020-10-25 21:18:18 +01:00
asynts
1254cbbd0b AK: Eradicate calls to warn(). 2020-10-25 18:52:51 +01:00
Andreas Kling
80b77cec38 LibGfx+FontEditor+Fonts: Add family, size and weight metadata to fonts
This makes finding fonts from the same family much less difficult. :^)
2020-10-25 10:12:03 +01:00
Andreas Kling
688675e89b LibGUI: Make table view row height+padding font-size-relative
This makes tables look a lot nicer with different-sized fonts. :^)
2020-10-25 10:12:03 +01:00
asynts
88bca152c9 AK: Eradicate the uses of out(). 2020-10-24 12:56:25 +02:00
Andreas Kling
46c15276e9 LibWeb: Fix Document construction mishap in <template> element
Ref-counted objects must not be stack allocated. Make DOM::Document's
constructor private to avoid this issue. (I wish we could mark classes
as heap-only..)
2020-10-23 08:33:16 +02:00