Commit Graph

1368 Commits

Author SHA1 Message Date
Mustafa Quraish
79bcb90887 PixelPaint: Add menu action to toggle pixel grid visibility
You can now toggle on/off the visibility of the pixel grid from
the View menu, if you don't want it shown for some reason.
2021-09-11 13:17:31 +02:00
Mustafa Quraish
4af0a99634 PixelPaint: Show a pixel grid when zoomed in enough
The editor now draws a grid showing the pixels if you are zoomed
in enough. Currently the threshold is a scale of 15 (so if one
pixel side on the image takes up > 15 pixels in the editor)
2021-09-11 13:17:31 +02:00
Ben Wiederhake
2223f22590 SystemMonitor: Avoid making StringView of temporary ByteBuffer 2021-09-11 13:22:51 +03:00
Ben Wiederhake
4ef9a1ba48 Spreadsheet: Avoid making StringView of temporary ByteBuffer 2021-09-11 13:22:51 +03:00
Tobias Christiansen
6f2a016565 PixelPaint: Add "Clear Guides" to remove all Guides
This patch adds a "Clear Guides" option to the "View"-menu.
2021-09-11 00:28:27 +02:00
Mustafa Quraish
a9e9bd8d84 HexEditor: Remove unveil() for CLI file, use FileSystemAccessServer
Previously we unveiled the file specified through the command-line
interface. Now, we just make the request through the
FileSystemAccessServer instead.
2021-09-10 20:46:50 +04:30
Mustafa Quraish
3a7e42ba73 TextEditor: Remove unveil() for CLI file, use FileSystemAccessServer
Previously we unveiled the file specified through the command-line
interface. Now, we just make the request through the
FileSystemAccessServer instead.
2021-09-10 20:46:50 +04:30
Mustafa Quraish
8378ecc67b TextEditor/FileArgument: Remove file existance check for early exit
This check was fine earlier when we had access to the full filesystem,
but now that we are moving away from applications having unveiled
access to the filesystem, this check would just get rejected from
the kernel. This is rare / fast enough that performance should not
really matter in any case.
2021-09-10 20:46:50 +04:30
Mustafa Quraish
63ff5873d8 PDFViewer: Open CLI files through FileSystemAccessServer without prompt
Use `request_file_read_only_approved()` for the file (if any) is
specified through a command line argument.
2021-09-10 20:46:50 +04:30
Mustafa Quraish
d9832f8d0b PixelPaint: Add Fit Image To View action
This is a feature I missed from Photoshop: it sets the scale and
position so that the image fits (it's longest dimension) into
the editor view. There's a 5% border left around the image to
provide context. This is just arbitrary seemed like the right
amount after some trial and error.
2021-09-09 11:35:50 +02:00
Mustafa Quraish
111ef19114 PixelPaint: Add "Brush Mode" to EraseTool :^)
Previously EraseTool would only let you have hard lines, similar
to PenTool. After inheriting from BrushTool in previous commits,
making the eraser (optionally) behave like a brush is much easier.

We only need to change how the colors are handled for the hardness,
which is why the `draw_point()` call is a bit more involved. Just
blending the colors doesn't work here since we actually want to
replace the previous color, unlike in BrushTool where we are just
layering the color on top.
2021-09-09 11:35:50 +02:00
Mustafa Quraish
ec73247e90 PixelPaint: Make EraseTool inherit from BrushTool
This removes all the code to handle events that was essentially
duplicated from BrushTool anyway :^)

I've also renamed "thickness"->"size" to have consistent
terminology.
2021-09-09 11:35:50 +02:00
Mustafa Quraish
160bd33874 PixelPaint: Make PenTool inherit from BrushTool
Most of the logic implemented in PenTool was the same as BrushTool
anyway, with the only difference being how the actual lines were
drawn at the end. We now just override the `draw_line()` and
`draw_point()` methods instead.

We don't strictly need to override `draw_line()` here, but that
would just result in repeated calls to `draw_point()`, which is
wasteful.

Also renamed "thickness"->"size" to have consistent terminology.
2021-09-09 11:35:50 +02:00
Mustafa Quraish
fbfa6543ab PixelPaint: Reoriganize drawing in BrushTool to allow more code reuse
The BrushTool is very cool, but it doesn't allow us to re-use any
of the code in other classes. Many of the other tools have duplicated
code for handling mouse events / keeping track of previous location,
etc.

This commit sets up BrushTool so that other tools can inherit from
it and override some virtual functions to allow similar behavior
without re-writing the code to keep track of mouse positions, etc.
In particular, we add public setters/getters for `size` and
`hardness` properties, and make `draw_point()` and `draw_line()`
virtual so that derived classes can override them.

Note: We still pass in `color` as a parameter for `draw_line()` and
`draw_point()` instead of using `color_for()` directly because it
doesn't really make sense to be constantly asking the ImageEditor
for the color when it's not really changing (for instance along all
the points of a line)
2021-09-09 11:35:50 +02:00
Mustafa Quraish
30df74b015 PixelPaint: Allow drawing line between 2 points with BrushTool
Sometimes you want to draw a straight line between 2 points, but
using the nice-looking brush we have instead of the hard line we
would get using the LineTool.

This patch adds the ability to click somewhere with the brush, and
then Shift+click somewhere else to draw a line between the two
points using the brush stroke. Seems like an obvious addition
considering we already have a helper function to draw lines :^)
2021-09-09 11:35:50 +02:00
Mustafa Quraish
3bf204fd03 PixelPaint: Fix BucketTool out of memory crashes
The BFS implementation for BucketTool's flood-fill had sitations
which could result in infinite loop, causing OOM crashes due to
the queue growing unbounded. The way to fix this is to keep track
of the pixels we have already visited in the flood-fill algorithm
and ignore those if we ever encounter them again.

This also fixes the crashing issue from #9003. We still need a
better way to account for transparency, but that is beyond the scope
of this commit, and this issue still exists without any transparent
pixels.
2021-09-09 11:27:48 +02:00
Timothy
1c78ff1b9f 3DFileViewer: Use unveil and FileSystemAccessServer
This will restrict 3DFileViewer's access to the file system.

3DFileViewer loads a texture based on the path of the model loaded, this
will request access to the texture file before loading.
2021-09-09 02:34:29 +02:00
Dawid Wolosowicz
ac798da642 SystemMonitor: West Const to East Const refactor 2021-09-08 15:48:02 +04:30
Dawid Wolosowicz
ec7879f628 SystemMonitor: Remove an unnecessarily specific inline capacity 2021-09-08 15:48:02 +04:30
Dawid Wolosowicz
000c74e6a8 SystemMonitor: Make the process list searchable 2021-09-08 15:48:02 +04:30
Andreas Kling
e91edcaa28 LibWeb: Rename InitialContainingBlockBox => InitialContainingBlock
The "Box" suffix added nothing here.
2021-09-08 11:27:46 +02:00
Ben Wiederhake
0a69da08aa Magnifier: Remove unnecessary global cursor tracking 2021-09-08 10:53:49 +02:00
Ben Wiederhake
2f38cad987 Assistant: Fix lockfile logic
Previously, Assistant was able to re-execute itself due to a quirk in
the global cursor tracking logic, it seems.

Now it has become necessary to explicitly drop the lockfile before
activating the new Assistant instance.

Alternatively, this has always been a latent bug that only now has
become more likely.
2021-09-08 10:53:49 +02:00
Ben Wiederhake
dbc8465c20 Assistant: Remove unnecessary global cursor tracking 2021-09-08 10:53:49 +02:00
Mustafa Quraish
405b282bc3 PixelPaint: Show mouse position in statusbar without active tool
Showing the position only with an active tool seems a bit confusing,
if you've opened up an image just to find out the coordinates of
a pixel for instance, there shouldn't be a need to have to select
a tool first.
2021-09-07 16:53:40 +02:00
Mustafa Quraish
736ab4f83a PixelPaint: Add Menu action/shortcut to close current image tab
Ctrl+W now closes the current Image tab.
2021-09-07 16:53:40 +02:00
Mustafa Quraish
255f729c1f PixelPaint: Register RectangleTool thickness slider as primary
... So we can use `[` and `]` shortcuts to change the size.
2021-09-07 16:53:40 +02:00
Mustafa Quraish
d6348e1b32 PixelPaint: Use correct thickness in RectangleTool::on_second_paint()
Previously, we were ignoring the scale of the editor in the second
paint step. If you were zoomed in, the size while you were drawing
was not the same as the size of the final shape.
2021-09-07 16:53:40 +02:00
Mustafa Quraish
603d3a5dc6 PixelPaint: Use correct thickness in LineTool::on_second_paint()
Previously, we were ignoring the scale of the editor in the second
paint step. If you were zoomed in, the size while you were drawing
was not the same as the size of the final shape.
2021-09-07 16:53:40 +02:00
Mustafa Quraish
0a9c64a4f5 PixelPaint: Use correct thickness in EllipseTool::on_second_paint()
Previously, we were ignoring the scale of the editor in the second
paint step. If you were zoomed in, the size while you were drawing
was not the same as the size of the final shape.
2021-09-07 16:53:40 +02:00
Andreas Kling
6ad427993a Everywhere: Behaviour => Behavior 2021-09-07 13:53:14 +02:00
Mustafa Quraish
285a888b61 PixelPaint: Fix layer dragging bug
A previous commit I made broke layer dragging since the hole_index
was always being computed with respect to the top of the layer list
widget, however we were now drawing layers from the bottom. When
you didn't have enough layers to fill up the full height, dragging
them around would be weird.

This patch computes the hole index correctly using the same offset
we start drawing from, and fixes the behavior.
2021-09-07 00:48:48 +02:00
Mustafa Quraish
905bc79387 PixelPaint: Add Crop to Selection Action
In addition to adding the action, this commit also makes the
`did_change_rect()` method take in an optional rect, which
represents the new rect position. By default it is the same as
`rect()`.

When we are cropping an image, we don't want to move the whole
cropped section to the top-left of the original image in the
ImageEditor widget, so this allows us to keep the cropped image's
position fixed.
2021-09-06 23:43:49 +02:00
Sam Atkins
95aa6562db Browser+WebContent: Initialize WebContentConsoleClient earlier
With this patch, we now initialize the `WebContentConsoleClient` as soon
as the Page has loaded, instead of waiting for the Console Window to be
shown. This finally lets us see log messages that happened before the
window was opened! :^)

However, it is not perfect. Waiting until the page has loaded means we
lose any messages that happen *during* page load. Ideally we would
initialize the WCCC when the page *starts* loading instead, but it
requires that the page has a document and interpreter assigned and
accessible. As far as I can tell with my limited knowledge, this is not
the case until the page has completed loading.
2021-09-06 18:20:26 +02:00
Sam Atkins
703bd4c9da Browser: Convert JS ConsoleWidget to new API
The console widget now requests messages and receives them in bulk,
using the shiny new IPC calls. This lets it display console messages
that occurred before the widget was created. :^)
2021-09-06 18:20:26 +02:00
Sam Atkins
ca2c129923 Browser: Reconnect the JS console when the current page changes
Previously, it would keep a pointer to the interpreter of the previous
page, which resulted in Crashy Fun Times.

This also changes the clearing behavior - instead of clearing the
console output every time the window is shown, we clear it when the page
changes. This is more useful, since before you would lose any log
messages that had happened before opening the window.
2021-09-06 18:20:26 +02:00
Sam Atkins
2b2158595f Browser: Move show_console_window() to Tab
Having the BrowserWindow assigning Tab's internals felt a bit wrong.
This is also a step towards removing BrowserWindow as a friend class.

While I was at it, changed the Tab to having a pointer to the
ConsoleWidget instead of the Window, since that is usually what we want
to use, and it's awkward having to static_cast the main-widget
repeatedly.
2021-09-06 18:20:26 +02:00
Sam Atkins
931f462b6e Browser: Delete unused BrowserConsoleClient.{h,cpp}
Since the Browser now only runs in multi-process mode, we have no use
for this single-process ConsoleClient. :^)
2021-09-06 18:20:26 +02:00
Anders Fimreite
2ecbe5dd71 Keyboard Mapper: Better text color for buttons in dark theme
When using a dark theme the name of the key does not show up well at
all. This is due to it being set with pallete().button_text(), which for
dark themes is a light color. As Keyboard Mapper does not follow the
system color theme, the text on the keys should not either.
2021-09-06 17:38:59 +02:00
Karol Kosek
cbc4c98a87 ThemeEditor: Make the model derived from ItemListModel
This will make the Combo Box list searchable as you type, because
ItemListModel has already that implemented.
2021-09-06 14:05:10 +04:30
Mustafa Quraish
c1ede97543 FontEditor: Don't loop over all glyphs to find selected one
Previously we would loop over all glyphs in the GlyphMap, compute
their rects, and then test to see if the mouse click position was
inside that rect. This is silly since each element in the glyph
map for a particular font is the same size, and we can just do
some coordinate manipulation to get the index directly.
2021-09-06 14:01:24 +04:30
Mustafa Quraish
f8570bd773 PixelPaint: Allow opening of files dropped onto application :^)
We can now drag-and-drop files onto PixelPaint to be able to open
them. Each dropped file opens in a separate editor (which is the
default behavior of Photoshop).
2021-09-06 10:36:08 +02:00
Mustafa Quraish
5a8c6b95e6 PixelPaint: Refactor main.cpp into MainWidget
Previously, all the UI setup was done in `main.cpp`, with a whole
bunch of lambdas,, and actions etc just being stored in the main
function. This is probably an artifact from back when it was first
created.

Most other applications now have a "MainWidget" class of some sort
which handles setting up all the UI/menubars, etc. More importantly,,
it also lets us handle application-wide events which we were
previously not able to do directly, since the main widget was just
a default GUI::Widget.

This patch moves all the core functionality of the PixelPaint
application into PixelPaint::MainWidget, which is then instantiated
by the main function. There is likely some more refactoring that
would help, but this commit is big enough as it is doing mostly
a direct port.
2021-09-06 10:36:08 +02:00
Ali Mohammad Pur
97e97bccab Everywhere: Make ByteBuffer::{create_*,copy}() OOM-safe 2021-09-06 01:53:26 +02:00
Ali Mohammad Pur
3a9f00c59b Everywhere: Use OOM-safe ByteBuffer APIs where possible
If we can easily communicate failure, let's avoid asserting and report
failure instead.
2021-09-06 01:53:26 +02:00
Karol Kosek
1814f66c63 SoundPlayer: Convert to double before calculating
freq_bin was converted to double after it was calculated, so there was
a much higher probability it could be 0 instead of some comma number,
which meant that the bars always stayed on top.
2021-09-04 22:52:02 +02:00
Karol Kosek
43c37ae701 SoundPlayer: Simplify Bars Visualization drawing logic a bit
The freq_bin in bins_per_group was multiplied only to be divided later,
which could even result in a crash if you set higher buffer size
(like 1000ms) in PlaybackManager, due to rounding errors I presume.
2021-09-04 22:52:02 +02:00
Tom
d14d68c462 SystemMonitor: Fix CPU usage calculation
Casting u64 to float is probably not a safe thing to do. Also, keep
time deltas in u64 values as they can easily wrap between calculations.
This fixes CPU usage calculation when a process is spinning in a loop.
2021-09-04 21:48:46 +02:00
Karol Kosek
83c412ee9e SoundPlayer: Create only one playlist widget
Prior this change, opening a playlist always spawned a new widget.
This could end up with having a few the same widgets, which you couldn't
even close (besides the last one).
2021-09-04 21:03:01 +02:00
Andreas Kling
769f777098 Assistant: Use HashMap::ensure() in Database::did_receive_results() 2021-09-04 20:30:56 +02:00
Andreas Kling
6f6473d6a4 SystemMonitor: Use HashMap::ensure() in ProcessModel::update() 2021-09-04 20:30:56 +02:00
Tobias Christiansen
5d732711a2 PixelPaint: Fix broken opening of files from Shell
The fd would get closed when the File went out of scope, so we couldn't
open any file specified by 'pp <path to file>'. We need the fd to be
alive and we solemnly swear to take good care of it and close it
ourselves later.
2021-09-04 16:07:10 +02:00
David Isaksson
9699648b2a SystemMonitor: Make memory statistics dynamically formatted by size
Previously all memory values on the performance was formatted as KiB,
but with such formatting it can be quite hard to read large numbers
(as mentioned by Andreas on todays office hours livestream :^)).
This patch makes use of the human readable formatting utilies and
displays them in an easier to read format.
2021-09-04 16:05:32 +02:00
Mustafa Quraish
92df9d464a PixelPaint: Use Zoom and Eyedropper cursors
Use the newly added cursors for ZoomTool and PickerTool
2021-09-04 03:35:23 +02:00
Musab Kılıç
81326ac8c7 PixelPaint: Add invert filter 2021-09-04 03:35:17 +02:00
Mustafa Quraish
280cbf2e18 PixelPaint: Make tools use the new API for property change shortcuts
Every tool that has a slider now registers the primary/secondary
sliders and now uses the same keyboard shortcuts to modify the
primary and secondary properties. `[` and `]` for the primary,
`{` and `}` for the secondary.
2021-09-04 03:33:44 +02:00
Mustafa Quraish
d28fb8926f PixelPaint: Add mechanism for tools to use keyboard shortcuts
There are quite a few tools that might want to change certain values
based on consistent keyboard shortcuts. This commit allows tools to
hook up a "primary" and "secondary" slider with the base `Tool`
class, which can then handle updating those sliders with the common
shortcuts.

Note that any derived classes that want to override the `on_keydown`
function will manually need to call `Tool::on_keydown()`.
2021-09-04 03:33:44 +02:00
Thitat Auareesuksakul
8d36893ddf SoundPlayer: Add spacebar keyboard shortcut for play/pause 2021-09-04 03:33:35 +02:00
Mustafa Quraish
8f2521ce52 HexEditor: Use FileSystemAccessClient, add unveils
Most of the code here is based off the implementation of how
TextEditor uses FileSystemAccessClient.
2021-09-04 03:32:58 +02:00
Mustafa Quraish
eae21c7e31 PDFViewer: Use FileSystemAccessClient to open files 2021-09-04 03:32:30 +02:00
Mustafa Quraish
d645f637f1 PixelPaint: Add separator in image menu
I think it looks a bit nicer having a separator between the
"flip" and "rotate" sections.
2021-09-04 03:30:03 +02:00
Mustafa Quraish
7263e57ce8 PixelPaint: Allow modifiable thickness for RectangleTool :^) 2021-09-04 03:30:03 +02:00
Mustafa Quraish
6910cbc075 PixelPaint: Add Copy Merged action
This allows the user to copy the merged bitmap (all visible layers).
2021-09-04 03:30:03 +02:00
Tobias Christiansen
65d52467f4 PixelPaint: Parse saved Guides from the ProjectLoader in main
This patch allows PixelPaint to recreate saved Guides from .pp files.
2021-09-04 03:29:09 +02:00
Tobias Christiansen
508d563189 PixelPaint: Add ProjectLoader to abstract away opening of files
This new class will open and parse files (either images directly or .pp
project files) and one can get the parsed Image as well as other
information from it.

This patch removes a bunch of 'try_create_from..." methods from Image in
favor of using the ProjectLoader.

The only json_metadata that is available are Guides for now.
2021-09-04 03:29:09 +02:00
Tobias Christiansen
b3f53a0b5a PixelPaint: Save Guides when writing project to file 2021-09-04 03:29:09 +02:00
Tobias Christiansen
e867e4b84b PixelPaint: Move saving a project from Image into ImageEditor
The ImageEditor knows more about the image than Image itself. So to save
a project with all the information known to the program about an image
it's logical that ImageEditor performs that task rather than the Image.

There isn't any additional data added yet, but now there's the
possibility to do so.
2021-09-04 03:29:09 +02:00
Tobias Christiansen
60e526fdd2 PixelPaint: Move serialization of Image into seperate function
This eliminates duplicated code.
2021-09-04 03:29:09 +02:00
Karol Kosek
d81ba98976 SoundPlayer: Don't try to dereference null-pointer buffers
d049626f40 tried to resample the buffer
before checking if it points to a valid location.
This caused a crash, generally at the end of the file.
2021-09-04 03:28:33 +02:00
Musab Kılıç
0139a56aa5 Piano: Format slider values when initially set 2021-09-04 03:24:03 +02:00
Musab Kılıç
7b45653331 ImageViewer: Kindly ask the user if they want to delete a file 2021-09-04 03:22:46 +02:00
Musab Kılıç
764d31b6c3 Piano: Draw note names on top of notes 2021-09-03 23:34:38 +02:00
Daniel Bertalan
d7b6cc6421 Everywhere: Prevent risky implicit casts of (Nonnull)RefPtr
Our existing implementation did not check the element type of the other
pointer in the constructors and move assignment operators. This meant
that some operations that would require explicit casting on raw pointers
were done implicitly, such as:
- downcasting a base class to a derived class (e.g. `Kernel::Inode` =>
  `Kernel::ProcFSDirectoryInode` in Kernel/ProcFS.cpp),
- casting to an unrelated type (e.g. `Promise<bool>` => `Promise<Empty>`
  in LibIMAP/Client.cpp)

This, of course, allows gross violations of the type system, and makes
the need to type-check less obvious before downcasting. Luckily, while
adding the `static_ptr_cast`s, only two truly incorrect usages were
found; in the other instances, our casts just needed to be made
explicit.
2021-09-03 23:20:23 +02:00
Karol Kosek
ad5bd209ba DisplaySettings: Add context menu for wallpapers
This adds a 'Show in File Manager' action and copy path action to file
context menu for quicker navigation. :^)
2021-09-03 23:15:47 +02:00
Sam Atkins
e2c32a6c65 Everywhere: Use my shiny new serenityos.org email :^) 2021-09-03 12:22:36 +02:00
Andreas Kling
eaf88cc78a AK: Rename create<T> => make_ref_counted<T>
And also try_create<T> => try_make_ref_counted<T>.

A global "create" was a bit much. The new name matches make<T> better,
which we've used for making single-owner objects since forever.
2021-09-03 02:36:09 +02:00
Mustafa Quraish
ca6c9be94c PixelPaint: Add actions to rotate image left/right
This also required adding a new hook to `ImageClient`, since there
wasn't a way of telling the ImageEditor that the full rect of the
image has changed (as when we rotate).
2021-09-03 01:50:11 +02:00
Mustafa Quraish
6a8c408856 PixelPaint: Add actions to flip image vertically/horizontally 2021-09-03 01:50:11 +02:00
Mustafa Quraish
0c56f06994 PixelPaint: Draw layers from bottom of panel, adjust spacing
If we don't have enough layers to be able to scroll, the layers
are pushed to be at the top of the layer list. This doesn't make
much sense now that we are correctly drawing the layers in the
right order, so now we draw them justified towards the bottom.

Previously we were also clipping the bottom gadget slightly when
there were enough layers to scroll. Now, I'm adding some offset to
the total height to account for this and give equivalent spacing
from the top and bottom layers.
2021-09-03 01:49:32 +02:00
Mustafa Quraish
339f0d5bca PixelPaint: Add Merge Active Layer Down action
This allows you to merge the active layer with the one below it.
2021-09-03 01:49:32 +02:00
Mustafa Quraish
97cc34c034 PixelPaint: Fix the displayed order of layers in LayerListWidget
Previously the background layer was shown at the top, and layers
in front of it were shown below it. This was really unintuitive.

This patch fixes LayerListWidget to now properly differentiate
between the index of a gadget, and the index of a layer, since they
are essentially mirrored. I chose not to modify the order in which
layers are stored since back-to-front makes it really convenient
there.
2021-09-03 01:49:32 +02:00
Musab Kılıç
432839c2e9 FileManager: Kindly ask the user if they want to delete a file 2021-09-02 23:52:29 +02:00
Sam Atkins
724f45c784 Browser: Reload the DOM Inspector's JSON data when loading a new page
Of course, there are other reasons the DOM might change, but one thing
at a time. :^)
2021-09-02 22:16:41 +02:00
Sam Atkins
73c95bcd5f Browser: Reset the DOM Inspector's state when re-opening it
This resets the DOM Inspector to a default state when re-opening it,
instead of it displaying the previous selection and properties, which
may be outdated. This is closer to how Chrome and Firefox behave.
Eventually, it probably makes sense to copy their behavior of selecting
the `<body>` element by default.
2021-09-02 22:16:41 +02:00
Sam Atkins
97379ace25 Browser: Implement "Inspect Element" context menu action
This is finally working for OOPWV! :^)
2021-09-02 22:16:41 +02:00
Sam Atkins
3b07f49d48 LibWeb+WebContent: Implement asynchronous DOM Node properties call
This lets us "push" a new style-properties list to the DOM Inspector,
for example when JS changes the style of the inspected node.
2021-09-02 22:16:41 +02:00
Sam Atkins
1da07734bb Browser: Display style properties in DOM Inspector
This makes use of the new `inspect_dom_node()` IPC call.
2021-09-02 22:16:41 +02:00
Sam Atkins
fe820f6d5a LibWeb: Replace unused DOMTreeModel with DOMTreeJSONModel
The direct-Document-access DOMTreeModel is no longer used, since the DOM
Inspector has to access the Document remotely over IPC. This commit
removes it, and renames DOMTreeJSONModel to take its place, since it no
longer has to differentiate itself from the non-JSON one.

In case that didn't make sense:
- Delete DOMTreeModel
- Rename DOMTreeJSONModel -> DOMTreeModel
2021-09-02 22:16:41 +02:00
Sam Atkins
08aa7b77a7 Browser: Remove residual InProcessWebView code from DOM Inspector
This is no longer useful, and has to go before I can change how the
Models work.
2021-09-02 22:16:41 +02:00
Sam Atkins
2d6a02f03b Browser: Prevent opening multiple DOM Inspectors for the same Tab
Also simplify the logic by removing `Tab::view_dom_tree()`, and making
the Tab keep a pointer to the InspectorWidget instead of its Window,
since that's more often what we want to access.
2021-09-02 22:16:41 +02:00
Mahmoud Mandour
b069c1306c About: Display the full version 2021-09-02 16:17:18 +01:00
Karol Kosek
e3f7753233 TextEditor: Stop calling window->set_modified(false) on file save
We use TextEditor::on_modified_change() to update the modified window
flag, which it also works on file saves, so we don't have to unset
it there anymore!

It isn't really what the FIXME note asked about -- GUI::TextDocument
only sends us notifications about the changes, but overall I don't
think it's that bad, given that the whole window update logic is now
in one function. :^)
2021-09-02 09:12:51 +02:00
Mustafa Quraish
dd5ceb74e9 PixelPaint: Ctrl+click on palette colors now sets primary/secondary
Previously it would only change the color of the ColorWidget itself,
but not make it the primary/secondary color. I think it feels nicer
this way, if I'm adding a color to the palette I likely want to use
it.

If you *really* need to only change the color of the palette, you
can just Ctrl+Middle click.
2021-09-02 09:09:12 +02:00
Mustafa Quraish
8d8ec6365b PixelPaint: Allow changing colors temporarily without palette
Previously, if you wanted to use a custom color, the only way to
do so was to first Ctrl+click on one of the pallette colors, which
would just change that palette item. Then, you would need to
manually click on that color.

Now, you can just click on the preview of the primary/secondary
color to open up the picker and only temporarily use the new color
without affecting the palette at all.
2021-09-02 09:09:12 +02:00
sin-ack
8ea22121ac Userland: Migrate to argument-less deferred_invoke
Only one place used this argument and it was to hold on to a strong ref
for the object. Since we already do that now, there's no need to keep
this argument around since this can be easily captured.

This commit contains no changes.
2021-09-02 03:47:47 +04:30
thankyouverycool
902d24136b Welcome: Replace rand()/srand() with AK::get_random_uniform() 2021-09-02 00:39:12 +02:00
thankyouverycool
02121336b4 Welcome: Make license headers uniform 2021-09-02 00:39:12 +02:00
Dawid Wolosowicz
977b62a213 3DFileViewer: Maintain the FPS counter's position
Without this, any resize of the GLContextWidget might leave the label
somewhere it shouldn't be. Toggling fullscreen is a single example of
that behavior.
2021-09-01 23:04:10 +02:00
Andreas Kling
51ae913bfe LibIMAP: Stop leaking a Core::Promise<bool> in IMAP::Client::connect() 2021-09-01 23:02:18 +02:00
Dawid Wolosowicz
14c30af7d8 SpaceAnalyzer: Enable icons within the breadcrumbbar
The breadcrumbbar in here serves exactly the same purpose as the one in
File Manager. Given that, I believe it's worth to keep these two
visually consistent.
2021-09-01 23:00:28 +02:00
Thitat Auareesuksakul
1600d5a446 SoundPlayer: Use GUI::ActionGroup for Visualization menu
Removed the old custom checkbox selection code in the Visualization
menu and replaced them with GUI::ActionGroup with set_exclusive
enabled instead :^)
2021-09-01 19:19:35 +02:00
Brian Gianforcaro
0bd089b282 SoundPlayer: Fix file leak in M3UParser::from_file(..)
Found by Sonar Cloud.
2021-09-01 18:06:14 +02:00
Tobias Christiansen
8a7ce4eea3 PixelPaint: Add "Change Offset" to the GuideTool
This opens the EditGuideDialog with the values of the currently
selected Guide and allows the user to change them to the desired values.
:^)
2021-09-01 13:46:44 +02:00
Tobias Christiansen
e9595dcb79 PixelPaint: Add setter for the orientation of a Guide
Also add an additional value to the Orientation enum called "Unset".
2021-09-01 13:46:44 +02:00
Tobias Christiansen
c9e6afe6a8 PixelPaint: Allow initial values for the EditGuideDialog
This way we can feed it the values if we wanted to change an existing
Guide and handle the default as before.
That we have to pass a String here is a bit ugly.
2021-09-01 13:46:44 +02:00
Tobias Christiansen
7e2028a3cd PixelPaint: Move the conversion to pixels into the EditGuideDialog
This seems like the most appropriate location to put this.
2021-09-01 13:46:44 +02:00
Tobias Christiansen
abcb982485 PixelPaint: Rename CreateNewGuideDialog to EditGuideDialog
This doesn't change the behavior at all but sets the naming up be more
descriptive on what it does in the next patches.
2021-09-01 13:46:44 +02:00
Marcus Nilsson
1d253880e6 PixelPaint: Tweak palette height
The height of the bottom color container was cut off at the bottom.
This adjusts the heights and also the primary/secondary color
widget so that it's in line.
2021-09-01 13:43:55 +02:00
savary1
dd912bd351 PixelPaint: Add grayscale filter
Add a new Color category to the Filter menu. Add the Grayscale
filter under Filter->Color to turn the selected layer to grey colors.
Created GrayscaleFilter.h. Modify Filter.h to allow filters
without parameters.
2021-08-31 17:02:27 +02:00
Mustafa Quraish
fdc9ff2ee7 KeyboardSettings: Use LibConfig intead of Core::ConfigFile 2021-08-31 17:00:41 +02:00
Mustafa Quraish
8fdb435d24 DisplaySettings: Use LibConfig where possible
Some places here still need to open `/etc/WindowServer.ini` which
we can't do with th ConfigServer yet.
2021-08-31 17:00:41 +02:00
Mustafa Quraish
c853bc2ba6 PixelPaint: Rename Mode to FillMode for Ellipse/Rectangle
The prior commits add the `DrawMode` enum to keep track of where
the shape is being drawn from. With this addition, the prior `Mode`
enum name is confusing, so this commit renames it to `FillMode` to
be more explicit :^)
2021-08-31 16:45:57 +02:00
Mustafa Quraish
6ccdc018b4 PixelPaint: Add ability to draw rectangle from center
Essentially the same logic as the prior commit, but now for the
`RectangleTool` class. Pressing `alt` lets you draw the rectangle
with the starting position as the center.
2021-08-31 16:45:57 +02:00
Mustafa Quraish
1a3481f35b PixelPaint: Add ability to draw ellipse from center
Like other common image editing applications, now if you press
`alt` while drawing an ellipse, it uses the starting position as
the center of the ellipse as opposed to one of the corners of the
bounding rect.

The EllipseTool class now keeps track of a `DrawMode`, which is
either `DrawMode::FromCorner` (default), or `DrawMode::FromCenter`
(the option added by this commit).

The `draw_using()` function was modified to now take in the start
and end positions and construct the `ellipse_intersecting_rect`
itself, since we need to construct it differently based on the
drawing mode.
2021-08-31 16:45:57 +02:00
Karol Kosek
d04c8d478f KeyboardSettings: Reuse generic GUI::ItemListModel
This change removes the manually created model class
in order to use a generic GUI::ItemListModel.

Besides from code reusability, it also makes the list
searchable as you type.
2021-08-31 16:43:18 +02:00
Karol Kosek
8dbb996200 Spreadsheet: Implement begin() and end() 2021-08-31 16:43:18 +02:00
Karol Kosek
f56e240981 Spreadsheet: Add RowIterator::index() 2021-08-31 16:43:18 +02:00
kleines Filmröllchen
0dc6fe9102 Piano: Use LibDSP to implement delay
This is the first step in transitioning Piano to a full LibDSP backend.
For now, the delay effect is replaced with a (mostly identical)
implementation in LibDSP.

The new ProcessorParameterSlider attaches to a LibDSP::Processor's
range parameter (LibDSP::ProcessorRangeParameter) and changes it
automatically. It also has the ability to update an external GUI::Label.
This is used for the three delay parameters and it will become useful
for auto-generating UI for Processors.
2021-08-31 17:03:55 +04:30
kleines Filmröllchen
ad6a332268 Piano: Add velocity and pitch support
As Piano will later move to the RollNote defintions of LibDSP, it's a
good idea to already insert velocity and pitch support, even though it's
currently not used.
2021-08-31 17:03:55 +04:30
Andreas Kling
a5992a4ef8 FileManager: Tweak layout spacing in file properties window
There wasn't enough vertical spacing between the TabWidget and the three
(Ok/Cancel/Apply) buttons at the bottom.
2021-08-31 02:43:50 +02:00
Andreas Kling
6cb536daa8 FileManager: Hide the Inode and Symlink Target columns in TableView
These are not generally interesting, so let's hide them by default.
The user can re-enable them if they want.
2021-08-31 01:35:09 +02:00
Andreas Kling
887ab3cc9a LibGUI: Rename FileSystemModel's "Owner" column to "User"
A file is owned by a User+Group, not an Owner+Group.
2021-08-31 01:35:08 +02:00
Andreas Kling
087bd7f767 Userland: Use Rect::centered_within() where useful 2021-08-31 01:35:08 +02:00
Karol Kosek
1700b6d113 FileManager: Remove tree_view_directory_context_menu
It isn't used anywhere and the tree view shows only directories
(and that is covered by the tree_view_directory_context_menu).
2021-08-31 00:46:43 +02:00
Karol Kosek
7d6308523a FileManager: Add 'Open in Terminal' action for selected dirs on desktop
This is to be more similar to the context menu from the windowed
instance of File Manager.
2021-08-31 00:46:43 +02:00
Karol Kosek
dd75ed0c5e FileManager: Add default 'Open' action in context menu for directories
This makes the directory context menu more similar to the file context
menu.
2021-08-31 00:46:43 +02:00
Karol Kosek
7cf5904124 FileManager: Place mkdir and touch actions below openings in tree view
This way, the Properties action will always be everywhere on bottom.
2021-08-31 00:46:43 +02:00
Karol Kosek
d184e5327a FileManager: Put file launch actions first
The default action (shown in bold) indicates what would you get
by double-clicking on file.  Since it's a default option, I think it
deserves to be on top (together with alternative launch options). :^)

Also they're not task actions like "Extract .zip here" or "Add to
bookmarks".
2021-08-31 00:46:43 +02:00
Ali Mohammad Pur
04f02a5b9e Spreadsheet: Don't invalidate the model on set_data()
No previous model index will be invalidated afterwards, so avoid
invalidating them.
Also fixes an issue where committing to an edit with the inline cell
editor makes the focused cell switch to A0.
Fixes #9677.
2021-08-30 18:29:33 +02:00
Andreas Kling
f727dc3c42 MouseSettings: Tweak UI layout of cursor themes tab 2021-08-30 02:48:31 +02:00
Mandar Kulkarni
0a7efb7d7b Spreadsheet: Save and load cell alignment 2021-08-29 21:07:42 +04:30
Luke Wilde
ea364af965 MailSettings: Add unveil 2021-08-28 23:29:28 +02:00
Luke Wilde
9e6d8f7c25 MailSettings: Use LibConfig instead of Core::ConfigFile
This also tightens the pledges.
2021-08-28 23:29:28 +02:00
Luke Wilde
173ba4e19b Mail: Add unveil 2021-08-28 23:29:28 +02:00
Luke Wilde
d486560aee Mail: Use LibConfig instead of Core::ConfigFile
This also tightens the pledges.
2021-08-28 23:29:28 +02:00
Linus Groh
95751987fb MailSettings: Remove proc and exec from pleges 2021-08-28 11:26:32 +01:00
Linus Groh
c5e5ea71d7 MailSettings: Use the app-mail icon for the window
No app-mail-settings icon exists (yet). app-mail is also what's being
embedded in the executable, so let's stick with it.
2021-08-28 11:22:50 +01:00
Mustafa Quraish
5a8ac56fb9 PixelPaint: Always change cursor when active tool is set
Previously, if you used one of the keyboard shortcuts to select a
different tool, it didn't change the cursor to the corresponding
one till you clicked somewhere / did something else to trigger an
update. This was pretty jarring since there's no indication as to
whether the tool change was successful or not.

This patch just calls `set_override_cursor()` when a valid active
tool is set to immediately update it.
2021-08-28 08:10:44 +01:00
Mustafa Quraish
75a706b6eb Everywhere: Use the Optional<T>::operator==(T) operator
In general, I think `opt == x` looks much nicer than
`opt.has_value() && opt.value() == x`, so I'm updating
the remaining few instances I could find with some regex
magic in my search.
2021-08-27 23:13:51 +02:00
kleines Filmröllchen
22b836dd7b Userland: Two low-sample rate fixes
1) The Sound Player visualizer couldn't deal with small sample buffers,
   which occur on low sample rates. Now, it simply doesn't update its
buffer, meaning the display is broken on low sample rates. I'm not too
familiar with the visualizer to figure out a proper fix for now, but
this mitigates the issue (and "normal" sample rates still work).
2) Piano wouldn't buffer enough samples for small sample rates, so the
   sample count per buffer is now increased to 2^12, introducing minor
amounts of (acceptable) lag.
2021-08-27 23:35:27 +04:30
kleines Filmröllchen
d049626f40 Userland+LibAudio: Make audio applications support dynamic sample rate
All audio applications (aplay, Piano, Sound Player) respect the ability
of the system to have theoretically any sample rate. Therefore, they
resample their own audio into the system sample rate.

LibAudio previously had its loaders resample their own audio, even
though they expose their sample rate. This is now changed. The loaders
output audio data in their file's sample rate, which the user has to
query and resample appropriately. Resampling code from Buffer, WavLoader
and FlacLoader is removed.

Note that these applications only check the sample rate at startup,
which is reasonable (the user has to restart applications when changing
the sample rate). Fully dynamic adaptation could both lead to errors and
will require another IPC interface. This seems to be enough for now.
2021-08-27 23:35:27 +04:30
Maciej Zygmanowski
3ad9df1522 PixelPaint: Make Layer passed to tools a pointer
Some tools (e.g. ZoomTool) doesn't need layer to work. This commit
makes mouse events fire even if there is no layer. This fixes
a bug that ZoomTool didn't work when there is no layers.
2021-08-27 12:45:06 +02:00
Maciej Zygmanowski
0224dc2882 PixelPaint: Pass raw mouse event to Tools and wrap them all in a struct
This commit adds a Tool::MouseEvent struct, which contains events that
may be needed by tools: layer-relative, image-relative and raw (editor-
relative) event.

The raw event is used by ZoomTool to properly pan the view. This fixes
a bug which caused image to snap out of sight.
2021-08-27 12:45:06 +02:00
Maciej Zygmanowski
635130ef76 PixelPaint: Make scaling exponential
This matches behaviour of other image editors, e.g GIMP.
The default ZoomTool sensitivity was increased for better zooming
experience :^)
2021-08-27 12:45:06 +02:00
thankyouverycool
96dee93d3f FontEditor: Adjust margins and spacing
Brings vertical spacing in line with most other apps using
ToolbarContainers. Fixes GroupBox margins since CSS ordering
change.
2021-08-27 12:38:29 +02:00
thankyouverycool
e8e7c59c34 FontEditor: Let WindowServer manage modified markings
Simplifies building modified/new font titles and lets FontEditor
make use of the comfy ellipsis close button.
2021-08-27 12:38:29 +02:00
thankyouverycool
a621932c11 FontEditor: Save discrete undo and redo states for each Command
Makes undo/redo actions compatible with the updated UndoStack sans
finalization. Fixes having to click actions twice.
2021-08-27 12:38:29 +02:00
Mustafa Quraish
22a1035f1b HexEditor: Use LibConfig instead of Core::ConfigFile 2021-08-27 12:37:07 +02:00
Andreas Kling
7b62113db7 FileManager: Report errors from chdir(), if any 2021-08-26 23:41:38 +02:00
Andreas Kling
696dbc889f FileManager: Make DirectoryView listen for configuration changes
DirectoryView now inherits from Config::Listener and will update its
view mode immediately if changed from elsewhere.

This is pretty neat. :^)
2021-08-26 23:41:38 +02:00
Andreas Kling
c8c58626e9 FileManager: Move "View as ViewType" actions into DirectoryView
Let DirectoryView manage these actions itself. This matches what we
already do for a bunch of other actions, and prepares for the next
patch which will add Config::Listener to the mix.
2021-08-26 23:41:38 +02:00
TheFightingCatfish
d2af27d2d0 FileManager: Change the cwd when opening a directory
The `open()` function of DirectoryView should change the current working
directory, so that the "Go to Location" menu item can process relative
paths correctly. Update other functions in DirectoryView to use `open()`
when opening a directory.
2021-08-26 22:02:15 +02:00
TheFightingCatfish
ce66c40160 FileManager: Remove "on activation" debug spam 2021-08-26 22:02:15 +02:00
Scott R. Parish
eb368a5000 Calculator: The equal key will now also finish the operation
Prior to this if you typed "1+2=" you would not get the answer, instead
you'd be left with "2" on the screen; Calculator wanted you to hit the
enter key to get the answer. Now you can either use the enter or the
equal key to finish the operation and get the answer.
2021-08-26 17:35:15 +02:00
Andy Jansson
bb399c6955 FileManager: Change read_i32 call to read_bool
The FileManager/Window/Maximized flag was incorrectly read from the
ConfigServer using read_i32 instead of the intended read_bool function
call.

It is now being read with the correct type :^)
2021-08-26 12:05:51 +02:00
Andreas Kling
6ad63ae71c Browser: Use LibConfig instead of Core::ConfigFile 2021-08-26 00:54:28 +02:00
Andreas Kling
0cd4b8cbb7 TextEditor: Use LibConfig instead of Core::ConfigFile 2021-08-26 00:54:28 +02:00
Andreas Kling
3114fe612c Terminal: Use Config::pledge_domains() 2021-08-26 00:54:28 +02:00
Andreas Kling
1a0a35f4b8 FileManager: Use Config::pledge_domains() 2021-08-26 00:54:28 +02:00
Andreas Kling
82d8cd2b87 Terminal+LibVT: Use LibConfig instead of Core::ConfigFile 2021-08-26 00:54:27 +02:00
Andreas Kling
39d9373bca FileManager: Use LibConfig instead of Core::ConfigFile :^) 2021-08-26 00:54:27 +02:00
Karol Kosek
04694ae682 ThemeEditor: Place menu quit action as the last item
No other applications put this action as the first item.
2021-08-26 00:51:40 +02:00
Andreas Kling
fe09f85414 Browser: Use OutOfProcessWebView for the Browser JavaScript console
Instead of building the web DOM by hand, we now load an empty document
into an OutOfProcessWebView, and then append things to it by sending
little snippets of JavaScript to the host process. :^)
2021-08-24 16:59:11 +02:00
Andreas Kling
6b2aadce11 Browser: Remove single-process mode :^)
Browser now only supports multi-process mode (Web::OutOfProcessWebView).
This is where we want to go, so let's just jump in the cold water. :^)
2021-08-24 16:37:28 +02:00
Andreas Kling
dfa9dcca98 LibWeb+Browser: Remove unnecessary InProcessWebView.h includes 2021-08-24 16:37:28 +02:00
Andreas Kling
c915174563 Userland: Remove IRC Client
The IRC Client application made some sense while our main communication
hub was an IRC channel. Now that we've moved on, IRC is just a random
protocol with no particular relevance to this project.

This also has the benefit of removing one major client of the single-
process Web::InProcessWebView class.
2021-08-24 16:37:28 +02:00
Sam Atkins
37f060b873 Browser: Add "Inspect Element" to context menu :^)
This opens the DOM Inspector window, with the target element already
selected. (If the window is already open, it just selects the element.)

Note that this only applies to single-process mode for now. In OOP mode,
the "inspect element" action is disabled.
2021-08-23 15:59:29 +02:00
Sam Atkins
3ef4ba810a Browser: Hide inspected-element outline when DOM Inspector is closed
...and then show it again when the inspector is re-opened. :^)
2021-08-23 15:59:29 +02:00
Maciej Zygmanowski
42df4fb2df MouseSettings: Add a tab to change cursor theme 2021-08-23 01:41:53 +02:00
Ralf Donau
7d579b04c5 TextEditor: Unveil the full path to the config file
Unveil ~/.config/TextEditor.ini instead of the whole config directory.
2021-08-23 01:40:42 +02:00
Andreas Kling
bcd2025311 Everywhere: Core dump => Coredump
We all know what a coredump is, and it feels more natural to refer to
it as a coredump (most code already does), so let's be consistent.
2021-08-23 00:02:09 +02:00
networkException
d51072629d ThemeEditor: Add Actions to save preview_palette to theme file
This patch adds a save and save as Action to the file menu allowing
to export all colors into an ini file.
2021-08-22 01:32:25 +02:00
networkException
acde7d12b0 Everywhere: Rename get in ConfigFile::get_for_{lib,app,system} to open
This patch brings the ConfigFile helpers for opening lib, app and system
configs more inline with the regular ConfigFile::open functions.
2021-08-22 01:32:25 +02:00
networkException
938051feb8 Everywhere: Use Core::ConfigFile::AllowWriting::Yes to allow writing 2021-08-22 01:32:25 +02:00
Andreas Kling
13f4890c38 LibCore: Make Core::File::open() return OSError in case of failure 2021-08-20 15:31:46 +02:00
Andrew January
1474a537b6 DisplaySettings: Lazily load wallpapers
Load the wallpaper in a background action instead of on the main thread.

This reduces the time to first paint, and makes the UI feel more
responsive when clicking on wallpaper thumbnails.

The behavior of the method is changed slightly to return true if it
succesfully "loads" the empty path. This makes the API a little more
consistent, where "true" means "I made changes" and "false" means "I did
not make changes". No call sites currently use the return value, so no
changes are needed to those.
2021-08-20 15:31:22 +02:00
Timothy Flynn
02e3633b7f AK: Move FormatParser definition from header to implementation file
This is primarily to be able to remove the GenericLexer include out of
Format.h as well. A subsequent commit will add AK::Result to
GenericLexer, which will cause naming conflicts with other structures
named Result. This can be avoided (for now) by preventing nearly every
file in the system from implicitly including GenericLexer.

Other changes in this commit are to add the GenericLexer include to
files where it is missing.
2021-08-19 23:49:25 +02:00
Stephan Unverwerth
addbcd42d7 LibGL: Fix triangle winding calculation
Since we operate in screen space where y points down we need to reverse
what is considered clock wise and what is considered counter clockwise.

The rasterizer always expects triangles with a consistent winding order
thus swap 2 vertices if necessary to reverse the winding before passing
the triangle on to the rasterization stage.
2021-08-18 20:30:58 +02:00
Stephan Unverwerth
22905daacb LibGL: Fix interpretation of BGRA byte order
This fixes byte order interpretation in several places.
2021-08-18 20:30:58 +02:00
Stephan Unverwerth
5e27da20f4 LibGL: Fix glTexCoord behaviour
glTexCoord should behave like glColor. It only updates a gl context
variable that contains the current texture coordinates. The vertex is
only actually created once glVertex is called.
2021-08-18 20:30:58 +02:00
Stephan Unverwerth
b6373c2aba LibGL+3DFileViewer: Make glRotatef accept degrees, not radians
This is in accordance with the GL spec. Also adjust rotation values in
3DFileViewer to take the new units into account.
2021-08-18 20:30:58 +02:00
Andreas Kling
b36968c442 SystemMonitor: Put the "Hardware" tabs at the end of the list 2021-08-18 13:07:35 +02:00
Andreas Kling
7d904eed12 FileManager: Reorder main toolbar actions a little bit
Put the "Open in terminal" action next to the other navigation actions.
And separate the "New File" and "New Directory" actions from the actions
that operate on existing items.
2021-08-18 13:00:20 +02:00
Andreas Kling
fe1b490416 SystemMonitor: Rename "Graphs" tab to "Performance" 2021-08-18 12:54:59 +02:00
Andreas Kling
636a4fe36c SystemMonitor: Rename "File system" tab to "Storage" 2021-08-18 12:53:59 +02:00
Andreas Kling
f91c499a41 SystemMonitor: Consolidate hardware tabs + remove interrupts tab
Combine the "PCI devices" and "Processors" tabs into a "Hardware" tab.

And then remove the "Interrupts" tab because the number of received
IRQ's per device is not really useful information to expose in this GUI.
If the user needs this, he can check lsirq.
2021-08-18 12:50:24 +02:00
Andreas Kling
9994b81931 SystemMonitor: Remove "Devices" tab
This was crowding up the GUI without providing anything useful.
2021-08-18 12:49:30 +02:00
Rob Ryan
dd0244a97d Browser: Add Ctrl-D keyboard shortcut for bookmarking the current page 2021-08-18 10:39:13 +02:00
Rob Ryan
34a64ed25b LibGUI+Browser: Add UrlBox class
This allows the address bar to "select all" when initially gaining focus
as Firefox and Chrome do. A future improvement on this would be for the
Widget class to mange and provide focus transition as part of the events
instead of the UrlBox class. Currently focus is updated before the event
is provided to the UrlBox class.
2021-08-18 10:39:13 +02:00
sin-ack
e11d177618 Userland+LibGUI: Add shorthand versions of the Margins constructor
This allows for typing [8] instead of [8, 8, 8, 8] to specify the same
margin on all edges, for example. The constructors follow CSS' style of
specifying margins. The added constructors are:

- Margins(int all): Sets the same margin on all edges.
- Margins(int vertical, int horizontal): Sets the first argument to top
  and bottom margins, and the second argument to left and right margins.
- Margins(int top, int vertical, int bottom): Sets the first argument to
  the top margin, the second argument to the left and right margins,
  and the third argument to the bottom margin.
2021-08-18 10:30:50 +02:00
sin-ack
9c9a5c55cb Userland+LibGUI: Make Margins arguments match CSS ordering
Previously the argument order for Margins was (left, top, right,
bottom). To make it more familiar and closer to how CSS does it, the
argument order is now (top, right, bottom, left).
2021-08-18 10:30:50 +02:00
Carlos César Neves Enumo
51b3fb5532 Assistant: Bundle UI updates to avoid flickering
While typing, we get the results from each provider asynchronously.

Previously, we were updating the UI for each result size,
which was causing a lot of flickering.

This fix creates a small timer to bundle the results
and reduce the number of UI updates per input.
2021-08-15 12:24:57 +02:00
Karol Kosek
e8fad5614e DisplaySettings: Pass the parent window to the FilePicker
Prior this change, closing the Display Settings application
didn't close the File Picker.
2021-08-14 15:20:21 +02:00
Karol Kosek
e2ad59ce06 DisplaySettings: Remove the trailing dot from tooltip and window title 2021-08-14 15:20:21 +02:00
Karol Kosek
4d477824e0 DisplaySettings: Open the wallpaper file picker in the wallpaper path
This small change can indirectly tell you where wallpapers are saved.
2021-08-14 15:20:21 +02:00
Marcus Nilsson
f080691424 PixelPaint: Disable context menu for GuideTool when no guide is found
Previously the context menu would popup even when closest_guide()
returned nullptr, making the Delete action do nothing.
2021-08-14 12:45:48 +02:00
Marcus Nilsson
1ad08ab7d6 PixelPaint: Show Guides on GuideTool activation
This adds on_tool_activation() to Tool which GuideTool can use
to show guides, if they're hidden, when it's activated. Also
show guides on mousedown since there's no use in drawing invisible
guides.
2021-08-14 12:45:48 +02:00
Marcus Nilsson
3b3df40eb9 PixelPaint: Revert update rect tightening for Selection
Tightening of the update rect when firing the marching ants timer
unfortunately meant that only finalized selections would be redrawn,
and any new selection drawn outside of the update rect would not
update.
2021-08-14 12:45:48 +02:00
Daniel Bertalan
b2ec579e98 SystemMonitor: Don't fail if we don't have ports installed
In #9373, /usr/local/bin was added to the unveiled directories to make
symbolization work on ports. This directory only exists if at least one
port is installed, so unveil would fail with ENOENT if we had none.
2021-08-13 21:29:10 +02:00
Brian Gianforcaro
27111cfc6c SystemMonitor: Unveil /usr/local/bin so symbolization works on ports 2021-08-13 11:08:38 +02:00
Stephan Unverwerth
e405f436b6 3DFileViewer: Allow zooming via mouse wheel 2021-08-12 20:57:19 +02:00
Stephan Unverwerth
3c509cf2f7 3DFileViewer: Add magnification filters to texture menu 2021-08-12 20:57:19 +02:00
Stephan Unverwerth
75bc7be622 3DFileViewer: Add texture menu
This allows setting different texture wrap modes
and setting different texture coordinate scale factors.
2021-08-12 18:58:41 +02:00
Jean-Baptiste Boric
2084289162 Userland: Fix PATH environment variable ordering 2021-08-12 18:56:30 +02:00
sin-ack
51d559e253 Spreadsheet: Call SheetModel::update() instead of invalidate()
SheetModel has its own custom updating method, and that must be called
in order to update the spreadsheet.
2021-08-10 05:21:49 +04:30
Tobias Christiansen
2a77abf85e Everywhere: Use tobyase@serenityos.org for my copyright headers 2021-08-09 21:43:05 +02:00
Mandar Kulkarni
b0ff91ff09 Spreadsheet: Make convert_from_string() return Optional<size_t>
Earlier, we were using 0 value for characters not found in "map".

We should return failure for invalid inputs.
So, I have changed the return type of function to Optional<size_t>.

Also changed caller to handle Optional return.
2021-08-09 14:14:07 +04:30
Mandar Kulkarni
2c44f2dc3c Spreadsheet: Fix column index string to number conversion
Fixed convert_from_string() function to return correct output.
The value of a number is equal to sum of each digit multiplied by it's
positional weight.
2021-08-09 14:14:07 +04:30
Marcus Nilsson
b1b6a6d6e8 PixelPaint: Let Tools have different cursors
This adds support for the Tools in PixelPaint to use different cursors
within ImageEditor. For now most of them get the crosshair cursor since
it's the most fitting, but in the future we will want to add custom
cursors.
2021-08-09 00:57:44 +02:00
Linus Groh
312946059b LibJS+Spreadsheet: Use js_string(VM&, ...) overload more 2021-08-08 21:32:58 +01:00
Marcus Nilsson
854e16797e PixelPaint: Tighten update rects for Tools
This tightens the update rects for EraseTool, BrushTool And the marching
ants update in Selection. Inflate Selection update rect by 10x10 to
avoid misalignment when zoomed out.
2021-08-08 13:55:39 +02:00
Marcus Nilsson
8c81d195c7 PixelPaint: Inflate update rect for PenTool
Previously using PenTool while zoomed in could cause rendering glitches
since the update rect was misaligned with the image, most likely because
of rounding errors.
Loosening the rect with 1 pixel on either side takes care of this.
2021-08-08 13:55:39 +02:00
Daniel Bertalan
3a8b8d8a0b SystemMonitor: Remove unused this lambda captures
This fixes an `unused-lambda-capture` warning emitted by Clang, and
reduces the size of the produced lambda object.
2021-08-08 10:55:36 +02:00
hstde
7d22713a72 Terminal: Save settings to config file
When exiting the terminal settings window, the opacity, bell and
maximum history size will be saved to the application config file.
Because the color scheme is neither configurable nor
will it be loaded on startup, it will not get saved for now.
2021-08-08 10:53:57 +02:00
TheFightingCatfish
652fa54495 Browser+LibWeb: Silence some debug spams 2021-08-08 00:33:14 +02:00
TheFightingCatfish
e80b887059 Browser+LibWeb: Make sure the default favicon is loaded
Previously in Browser, when we navigate back from a page that has an
icon to a page that does not have an icon, the icon does not update and
the old icon is displayed because FrameLoader does not set the default
favicon when the favicon cannot be loaded. This patch ensures that
Browser receives a new icon bitmap every time a load takes place.
2021-08-08 00:33:14 +02:00
Tobias Christiansen
4f5c69a04c PixelPaint: Add snapping to the GuideTool
When holding Shift, the Guide snaps to a multiple of the specified
number from the properties widget.
2021-08-08 00:30:41 +02:00
Tobias Christiansen
58cb668257 PixelPaint: Add tooltip to GuideTool to show current offset
The offset of the currently edited Guide is shown in a tooltip when
using the GuideTool.
2021-08-08 00:30:41 +02:00
Timothy
1927dbf025 PixelPaint: Use unveil to hide file system 2021-08-07 12:48:22 +02:00
Tobias Christiansen
0ca085910e PixelPaint: Make Guides' visibility optional
Whether Guides are drawn or not is now controlled via the menu-entry
View->Show Guides.
2021-08-07 02:52:47 +04:30
Tobias Christiansen
193f1e01cf PixelPaint: Add the GuideTool to the Toolbox
This also adds a custom icon for the GuideTool.
2021-08-07 02:52:47 +04:30
Tobias Christiansen
7923929a4d PixelPaint: Add GuideTool for editing Guides
This patch adds the logic for the GuideTool. Pulling in from outside the
image creates a new Guide, moving a Guide outside of the image deletes
it and a Guide can be deleteted via the context menu.
A Guide is considered clicked when the cursor is less than 20 pixels
away from the line.
2021-08-07 02:52:47 +04:30
Tobias Christiansen
d4cf4b74c1 PixelPaint: Allow creation of Guides via the View-Menu
You can specify the offset in percent, and it's getting parsed and
calculated appropriately.
2021-08-07 02:52:47 +04:30
Tobias Christiansen
515bbd0b83 PixelPaint: Add a Dialog for the creation of a Guide
You can select whether you want a horizontal or a vertical Guide and
specify the offset you want it to be at.
2021-08-07 02:52:47 +04:30
Tobias Christiansen
a717caa4b7 PixelPaint: Include Guides in the ImageEditor
The ImageEditor knows about its Guides, how to draw them and exposes
ways to manipulate them.
2021-08-07 02:52:47 +04:30
Tobias Christiansen
7e01d06226 PixelPaint: Add Guide class
This will allow the user to add Guides to the image, that will only be
visible in the Editor, not affecting the image.
2021-08-07 02:52:47 +04:30
Marcus Nilsson
4a57a4a0b3 PixelPaint: Use a StackWidget in ToolPropertiesWidget
Previously changing tools while simultaneously using a widget like a
slider would result in a event_dispatch() failure.
Instead use a StackWidget to set the active widget.
2021-08-06 23:59:14 +02:00
Marcus Nilsson
868be680c2 PixelPaint: Use the ValueSlider widget for Tool properties
Use the new ValueSlider and get rid of the temporary solution with
tooltips :^)
2021-08-06 23:35:48 +02:00
sin-ack
16ac3bbfd7 LibGUI+Applications: Rename Model::is_valid to is_within_range
The previous name did not describe what the function checked, and was
easy to confuse with ModelIndex::is_valid.
2021-08-06 21:03:53 +02:00
TheFightingCatfish
9899addb1d Browser: Add more tab options
Add more tab options to Browser: "Duplicate Tab" and "Close Other Tabs".
2021-08-06 21:03:34 +02:00
sin-ack
ca2c81251a Everywhere: Replace Model::update() with Model::invalidate()
Most of the models were just calling did_update anyway, which is
pointless since it can be unified to the base Model class. Instead, code
calling update() will now call invalidate(), which functions identically
and is more obvious in what it does.

Additionally, a default implementation is provided, which removes the
need to add empty implementations of update() for each model subclass.

Co-Authored-By: Ali Mohammad Pur <ali.mpfard@gmail.com>
2021-08-06 19:14:31 +02:00
Andreas Kling
779316d468 Userland: Use Core::Process::spawn() instead of posix_spawn() in places
This replaces a bunch of very basic uses of posix_spawn() with the new
Core::Process::spawn().
2021-08-06 01:06:42 +02:00
Karol Kosek
64ca51265d Assistant: Quit the application after losing focus
Prior to this change, Assistant would just stay in the background,
unless one pressed an Escape key or launched some app.
2021-08-05 11:43:12 +02:00
Timothy
73c1b1617a Everywhere: Replace most cases of exit() with Application::quit()
Application::quit() is nicer for most cases where exit() is used. Cases
where exit() is used intentionally for early termination are left
intact.
2021-08-03 18:55:52 +02:00
Marcus Nilsson
b6200a3ed8 PixelPaint: Add tooltips for sliders in ToolPropertiesWidget
This adds a tooltip to all the slider properties showing their
current value. Previously there was no indication of what
value they had. Also rename the SprayTool property 'thickness' to
'size' like BrushTool calls it.
2021-08-03 18:53:54 +02:00
creator1creeper1
8f552c9979 Calculator: Use KeypadValue class instead of double
Calculator now uses the KeypadValue class instead of double in
its internal calculations. By not constantly converting to
double back-and-forth, we do not use precision simply by, for
example, negating a number. This fixes #7484.
2021-08-03 19:12:06 +04:30
creator1creeper1
97d2a5799e Calculator: Add KeypadValue class
This commit adds a basic KeypadValue class which abstracts away
Keypad's internal representation in a slightly simpler format.
This will allow arithmetic operations in the Calculator to not
lose any precision. In cases where losing precision is necessary,
an explicit conversion operator to double is provided, as well as
an explicit constructor from double.
2021-08-03 19:12:06 +04:30
Thomas Wagenveld
df6db8b8cc Userland: Make representation of 'null' IPv4-address friendlier
Show an empty column rather than 'null' in SystemMonitor and show
'no IP' in the network applet if the adapter has no IPv4-address
configured.
2021-08-03 10:20:51 +02:00
Thomas Wagenveld
3a40287776 Userland: Add network adapter link status to SystemMonitor and applet
Add a column named 'Link status' to the Network tab in SystemMonitor
showing the speed and duplex if the link is up.
Add the link speed behind the existing text in the applet or show
'down' if the link is down.
2021-08-03 10:20:51 +02:00
Karol Kosek
4988540cb1 FileManager: Use the current directory as one of the initial locations
This change makes `cd /bin; FileManager` open the app in /bin.
2021-08-03 09:12:33 +02:00
Karol Kosek
35cc5b9873 FileManager: Set chdir to the current path when opening applications 2021-08-03 09:12:33 +02:00
Marcus Nilsson
0c4977161f PixelPaint: Move properties for LineTool to ToolPropertiesWidget
Remove the context menu for LineTool and use the tool properties
widget for options instead.
2021-08-03 09:04:57 +02:00
Marcus Nilsson
201b901cb1 PixelPaint: Move properties for RectangleTool to ToolPropertiesWidget
Remove the context menu and move the options to the tool properties
widget.
2021-08-03 09:04:57 +02:00
Marcus Nilsson
3392c66c94 PixelPaint: Remove context menu for MoveTool
Remove the context menu for MoveTool and move the actions to the layer
menu instead.
2021-08-03 09:04:57 +02:00
Marcus Nilsson
15e9d0b4d8 PixelPaint: Remove context menu for SprayTool
Remove the context menu for SprayTool and just use the tool properties
widget for options.
2021-08-03 09:04:57 +02:00
Marcus Nilsson
b257d8d284 PixelPaint: Move properties for EllipseTool to ToolPropertiesWidget
Remove the context menu for EllipseTool and use the properties widget
instead for consistency between tools.
2021-08-03 09:04:57 +02:00
Marcus Nilsson
cb6e63e579 PixelPaint: Remove context menu for PenTool
Remove the context menu for PenTool and just use the tool properties
widget.
2021-08-03 09:04:57 +02:00
Marcus Nilsson
e342bef854 PixelPaint: Move properties for EraserTool to ToolPropertiesWidget
Removes the context menu for EraserTool and instead use the
tool properties widget for options.
2021-08-03 09:04:57 +02:00
Andreas Kling
de7f1bfd58 Mail: Use GUI::PasswordInputDialog to ask for server passwords 2021-08-02 10:13:35 +02:00
Andreas Kling
233870c4d1 Mail: Tweak vertical spacing & margins in main UI layout 2021-08-02 10:13:35 +02:00
Andreas Kling
7d8db2b094 Browser: Tweak vertical spacing in per-tab UI layout 2021-08-02 10:13:35 +02:00
Clément Sibille
fb099ad38b PixelPaint: Show image coordinates in the status bar 2021-08-02 00:49:24 +02:00
sin-ack
95ab61e3db Mail: Use Window::add_menu instead of Menubar::add_menu
Window::add_menu is the canonical way of adding menus to a window.
2021-08-02 00:39:15 +02:00
K-Adam
9758ba5678 3DFileViewer: Display frame rate optionally
It is turned off by default
2021-08-01 17:41:26 +02:00
sin-ack
eb6cf00c0e SystemMonitor: Register ProcessStateModel with ProcessModel on construct
Since this was missing, ProcessStateModel never received
model_did_update, and it was possible for the ProcessModel index to go
stale and show another process.

Fixes #9129.
2021-08-01 19:26:07 +04:30
LuK1337
a91848c148 FileManager: Refresh DirectoryView after applying changes
Fixes: #9136
2021-08-01 12:30:24 +02:00
Karol Kosek
92fd86901d FileManager: Enable/Disable mkdir and touch actions on path change
This change disables the icons in read-only directories.
2021-08-01 12:12:59 +02:00
Karol Kosek
755fe2b0ca FileManager: Remove the rename action from the tree view context menu
The action never worked properly here.  It used the selection
from the directory view, instead of the tree view.
Furthermore, the tree view isn't even editable.

Just making tree view editable wouldn't fix it -- it'd probably
need something like creating an on_stop_editing() function
in the AbstractView to change the path after the rename.

For now, I'll remove the action from the menu as a "temporary fix".
2021-08-01 12:12:59 +02:00
Karol Kosek
c1dc9e6de2 FileManager: Add the rename action to the toolbar
When I was adding the action in #8713, the action did not have an icon
yet.  Now, since it has an icon now, we can add it to the toolbar!
2021-08-01 12:12:59 +02:00
Brian Gianforcaro
a51e6547aa Applications: Remove unused header includes 2021-08-01 08:10:16 +02:00
Andreas Kling
05faca91d5 DisplaySettings: Rename "virtual desktops" => "workspaces" 2021-07-31 20:09:27 +02:00
Andreas Kling
67c0a2c5df MailSettings: Use the same app icon as Mail
*Settings applications should use the same icon as the app they manage
the settings for.
2021-07-31 20:09:27 +02:00
Andreas Kling
b56a2c3e4c KeyboardSettings: Remove outdated FIXME 2021-07-31 11:22:53 +02:00
Andreas Kling
7f7ba726f0 Browser: Change "Custom" => "Custom..." in menus where appropriate
If a menu item requires additional user input before the action can be
taken, it should have an ellipsis.
2021-07-31 11:22:53 +02:00
Karol Kosek
ceadbafa97 HackStudio+TextEditor: Sync extensions from the FileIconProvider file
This adds more possible extensions for highlighting C/C++ files
and JavaScript module files.
2021-07-31 08:18:01 +02:00
Karol Kosek
68088b629b TextEditor: Add automatic syntax highlighting for Shell and .htm files 2021-07-31 08:18:01 +02:00
LuK1337
6e42cb8c55 KeyboardMapper: Add menus before showing the window
Otherwise, space is reserved but menus aren't shown.
2021-07-31 08:08:31 +02:00
LuK1337
5fa8a107df Calculator: Add menus before showing the window
Otherwise, space is reserved but menus aren't shown.
2021-07-31 08:08:31 +02:00
LuK1337
38767e262d Piano: Add menus before showing the window
Otherwise, space is reserved but menus aren't shown.
2021-07-31 08:08:31 +02:00
Faeliore
8e3431d56d MailSettings: Add basic mail settings dialog
MailSettings: Add a GML file for Mail settings

MailSettings: Add an AF desktop file for Mail Settings

MailSettings: Unveil /res in mail settings, fix GML

MailSettings: Mail settings texteditor->textbox

MailSettings: Update mail username to correct category in settings

Modified Mail settings GML to properly represent ports >100

MailSettings: Update/fix mail settings GML

MailSettings: Adjust GML, add icons for mail settings

MailSettings: Change Okay button to OK

MailSettings: Change mail setting reset button to revert

MailSettings: Fix incorrect variable names in mail settings

MailSettings: Add newlines af EOF of all mail setting files

MailSettings: Mail settings linting issues fixed

MailSettings: Increase size of icon features
Code cleaning/styling changes as per gunnarbeutner review
Made settings descriptions more friendly per sin-ack review

MailSettings: Fixes as per PR comments

MailSettings: Fix checkbox weirdness

MailSettings: Adjust width of checkbox

MailSettings: Remove unneccessary update() call

MailSettings: Replace port SpinBox with ComboBox

MailSettings: Add colons to labels, remove port 110 option

MailSettings: Remove custom model, use ItemListModel

MailSettings: Change relative icon paths to absolute ones
2021-07-30 20:47:31 +02:00
Sam Atkins
5de7775d22 Browser: Show a message when attempting to search with no search engine
Previously, it just showed an error message saying that "" failed to
load, which made me think that search engines were broken.
2021-07-30 13:38:20 +02:00
Marcus Nilsson
ebb96b7fea SystemMonitor: Only update kill actions when pid changes
Return early from on_selection_change if the pid hasn't changed or we
get an invalid result from selected_id().
2021-07-29 11:44:26 +02:00
Marcus Nilsson
5fbb476856 SystemMonitor: Use kill(pid,0) when checking for kill permission
We can use kill(pid,0) to check for kill permissions instead of relying
on file path access. Using 0 as signal does error checking but does not
send a signal.
2021-07-29 11:44:26 +02:00
LuK1337
16006e2d8e RunWindow: Center FilePicker window within the entire screen
It doesn't make much sense since to center run window within the parent
window since it's created in the bottom left corner of the screen.
2021-07-29 09:24:08 +02:00
LuK1337
a50b937632 ThemeEditor: Initialize color input to Gfx::ColorRole::Window 2021-07-28 19:07:15 +02:00
Karol Kosek
2ded2a8b15 SpaceAnalyzer: Adjust the text_rect
The text_rect was moved to the bottom right instead of being shrinked,
which meant that the text at the end could go a bit out of the box.
2021-07-28 16:01:51 +02:00
FrHun
55c0307288 Calculator: Improve UI margin consistency 2021-07-27 22:17:23 +02:00
FrHun
411622148a Run: Improve UI consistency 2021-07-27 22:17:23 +02:00
FrHun
033c14e574 FontEditor: Fix minor margin inconsistency 2021-07-27 22:17:23 +02:00
FrHun
3d6acc6567 HexEditor: Fix find dialog layout 2021-07-27 22:17:23 +02:00
FrHun
0dd4e2d21b FileManager: Fix properties button margins 2021-07-27 22:17:23 +02:00
FrHun
8feab1836a KeyboardSettings: Fix button margins 2021-07-27 22:17:23 +02:00
Karol Kosek
f2d3fcb7cd ImageViewer: Hide the border frame in fullscreen mode 2021-07-27 18:32:58 +02:00
Andreas Kling
49b9683381 FileManager: Make "show dotfiles" affect the tree view as well
Previously this only affected the main directory view.
2021-07-27 18:27:49 +02:00
Maciej Zygmanowski
13773d3ced SystemMonitor: Display connection status icons in Network tab 2021-07-27 00:28:12 +02:00
Tom
1a664d80f9 Mail: Prompt for password if no password was saved
This allows the user to create a mail configuration without having
to save the password in clear text (or any other form) to disk.
2021-07-26 21:55:18 +04:30
Jamie Mansfield
3d4abd7154 KeyboardSettings: Prevent minimising the window
This matches how the new MouseSettings application works.
2021-07-26 14:56:49 +02:00
Jamie Mansfield
902559fc2d KeyboardSettings: Prevent resizing the window
This matches the other settings applications.
2021-07-26 14:56:49 +02:00
Jamie Mansfield
3129956c4e DisplaySettings: Prevent minimising the window
This matches how the new MouseSettings application works.
2021-07-26 14:56:49 +02:00
Andreas Kling
b6c97a259c Settings: Tweak initial window size 2021-07-26 01:58:07 +02:00
Andreas Kling
87a22a77e9 Settings: Add a very simple Settings application
This is really just a launcher app that gathers all the installed apps
in the "Settings" category and presents them in a single window.
2021-07-26 00:39:10 +02:00
TheFightingCatfish
9b78ae5149 LibGUI+Browser: Do not paste bitmaps
This prevents GUI::TextBox and the `Paste & Go` action in the browser
from trying to paste a bitmap. Also, the paste action is enabled
and disabled on clipboard change to reflect if the clipboard data
can be pasted.
2021-07-25 12:36:23 +02:00
brapru
c4eaba6c88 SystemManager: Separate sockets GroupBox into TCP/UDP 2021-07-25 00:33:00 +02:00
Karol Kosek
a1d0ad61a6 FileManager: Show an open icon for selected folder in tree view again
The original work was done in #2752
(deceb91c48 to be precise),
but unfortunately 2c772d1848 replaced
on_selection with on_selection_change, which caused the function
to never be executed, as it was reassigned a few lines below.
2021-07-24 21:13:22 +02:00
Luke
8956b5fb55 Mail: Make checking for headers in DataItem case insensitive
For example, the servers I tested this on sent "Subject" which matched
what I was checking for. However, some servers can send "SUBJECT" which
didn't match and would cause an assertion failure.
2021-07-24 19:03:43 +01:00
Luke
b716e902ba Mail: Add an e-mail application called Mail
This utilises LibIMAP and LibWeb to provide an e-mail client.

The only way currently to connect to a server and login is with a
config file. This config file should be stored in ~/.config/Mail.ini
Here is an example config file:
```
[Connection]
Server=email.example.com
Port=993
TLS=true

[User]
Username=test@example.com
Password=Example!1
```

Since this is stored in plaintext and uses a less secure login method,
I'd recommend not using this on your main accounts :^)

This has been tested on Gmail and Outlook. For Gmail, you either have
to generate an app password if you have 2FA enabled, or enable access
from less secure apps in your account settings.
2021-07-24 20:11:28 +04:30
Itamar
8241a6c8eb TextEditor: Allow starting with a file argument that doesn't exist
If TextEditor is started with an argument for a file that doesn't
exist, we now allow editing it.

The file will be created once it is saved.
2021-07-23 21:19:30 +04:30
Peter Elliott
bf16591c07 Assistant: Only open one Assistant at once
I found myself accidentally opening two assistants at once with the
Window+Space shortcut. Since only one assistant window is usable at the
same time, I made assistant only spawn 1 instance at most.
2021-07-22 23:34:15 +02:00
Sam Atkins
9ac757647f FileManager: Switch FileOperationProgressWidget::did_error() to SV& 2021-07-22 12:48:44 +02:00
Sam Atkins
469bca9d3a FileManager: Show progress dialog for file deletions
Progress dialogs are nice! :^)

Showing a proper file-deletion animation would be nice, but that is
outside the scope of my abilities.
2021-07-22 12:48:44 +02:00