Commit graph

1347 commits

Author SHA1 Message Date
FalseHonesty
112b4de430 IRCClient: Enable history on the message box 2020-05-28 10:33:20 +02:00
Andreas Kling
2cb50f6750 LibWeb+Browser: Add ability to run Browser with the new HTML parser
You can now pass "-n" to the browser to use the new HTML parser.
It's not turned on by default since it's still very immature, but this
is a huge step towards bringing it into maturity. :^)
2020-05-27 21:57:30 +02:00
FalseHonesty
08e2907210 Browser: Add console history to re-send old commands
The console has now enabled history in its input text box. Pretty
nice to not have to retype things all the time :^)
2020-05-27 20:04:52 +02:00
Nick Vella
e53fa97cfb LibGUI, About: Implement system-wide W2k-esque About dialog
The new About dialog reads version information from /res/version.ini,
which is generated at build time.
2020-05-27 11:44:19 +02:00
AnotherTest
70a213a6ec LibLine: Use Core::EventLoop for outer read loop
This commit changes LibLine's internal structure to work in an event
loop, and as a result, also switches it to being a Core::Object.
2020-05-27 11:13:02 +02:00
FalseHonesty
e4760e5b42 Browser: Add option in DownloadWidget to open download's in folder
When a download has completed, instead of graying out the cancel
option, replace it with an option to open your download in the file
manager.
2020-05-26 21:09:45 +02:00
Linus Groh
0f2b3cd280 Browser: Show a "source location hint" for syntax errors :^) 2020-05-26 14:36:30 +02:00
Sergey Bugaev
602c3fdb3a AK: Rename FileSystemPath -> LexicalPath
And move canonicalized_path() to a static method on LexicalPath.

This is to make it clear that FileSystemPath/canonicalized_path() only
perform *lexical* canonicalization.
2020-05-26 14:35:10 +02:00
Sergey Bugaev
4139838a93 Userland et al: Pledge sigaction when needed
* In some cases, we can first call sigaction()/signal(), then *not* pledge
  sigaction.
* In other cases, we pledge sigaction at first, call sigaction()/signal()
  second, then pledge again, this time without sigaction.
* In yet other cases, we keep the sigaction pledge. I suppose these could all be
  migrated to drop it or not pledge it at all, if somebody is interested in
  doing that.
2020-05-26 14:35:10 +02:00
Andreas Kling
b5788594f9 PixelPaint: Let Layer track whether it's selected or not
This will simplify a lot of code that keeps getting more confusing.
2020-05-26 10:18:03 +02:00
Andreas Kling
18d68c8c94 PixelPaint: Add selection functionality to the LayerListWidget
Now we can get rid of the old table view and with it the LayerModel.
2020-05-26 10:18:03 +02:00
Andreas Kling
e4b11a23b7 PixelPaint: Allow reordering layer by dragging them in LayerListWidget
This is rather cool! :^)
2020-05-26 10:18:03 +02:00
Andreas Kling
dc3de47b03 PixelPaint: Have layers and images send out notifications on changes
We use this to automatically update the thumbnail in LayerListWidget
when you draw into a layer. We also use it to repaint the ImageEditor
when the image changes somehow. :^)
2020-05-26 10:18:03 +02:00
Andreas Kling
de85cd0907 PixelPaint: Start working on a custom layer list widget
Instead of using a TableView to show the layer stack, let's build a new
custom widget for this purpose and give it some neat features!

This patch also introduces an ImageClient interface for Image to notify
interested parties about things happening. The LayerListWidget is the
first ImageClient and listens for "layer added" and "layer removed"
notifications. :^)
2020-05-26 10:18:03 +02:00
FalseHonesty
d2b493b74e Browser: Add output styles to JS source printed in the console
This patch uses the new JS::MarkupGenerator to stylize all of the
source code and runtime values printed in the console's output panel.
This also does away with the Console's global style sheet, as all
styling is handled by the MarkupGenerator and the System Palette.
2020-05-26 10:17:50 +02:00
FalseHonesty
941b028ca3 LibJS: Create JS to HTML markup generator
The new JS::MarkupGenerator class can convert both a JS source string
and a JS Runtime Value into properly formatted HTML using the new
LibWeb System Palette css color values.

It makes more sense for this JS -> HTML process to occur in LibJS
so that it can be used elsewhere, namely Markdown code block syntax
highlighting. It also means the Browser can worry less about LibJS
implementation details.
2020-05-26 10:17:50 +02:00
AnotherTest
2814b5a918 Terminal: Handle fork error by whining about it 2020-05-25 21:36:51 +02:00
AnotherTest
bc9013f706 LibLine: Change get_line to return a Result<String, Error>
This fixes a bunch of FIXME's in LibLine.
Also handles the case where read() would read zero bytes in vt_dsr() and
effectively block forever by erroring out.

Fixes #2370
2020-05-25 21:36:51 +02:00
Linus Groh
c378a1c730 HexEditor: Fix "Selected Bytes" count for backwards selection 2020-05-25 18:14:25 +02:00
FalseHonesty
2c2ce5be64 Browser: Add output styles to values printed in the console
This patch adds spans around most of the console's output, allowing
for a global document stylesheet to customize the highlighting of
the console's output. It also adds some basic styling for values
like strings, numbers, and arrays using the system Palette.

Note: This patch simply adds support for highlighting output values,
the lines of JS code printed to console are still unformatted.
2020-05-25 11:33:52 +02:00
Andreas Kling
bdc19563ef Browser: Add new icons for the add/remove bookmark toolbar button
Here's a freshly drawn icon without antialiasing so it fits better with
the system visual style. :^)
2020-05-24 18:46:48 +02:00
Itamar
bedce69b23 Debugger: Use Core::ArgsParser 2020-05-24 10:42:21 +02:00
FalseHonesty
20df82c983 Browser: Set the console's interpreter when a tab's document changes
Previously, once a console was opened for a tab, its interpreter
would never change, leaving it with a stale interpreter. Now, when
the tab's HtmlView loads a new document, the console will receive
that document's interpreter.
2020-05-24 02:20:08 +02:00
FalseHonesty
391237a8e1 Browser: Add JS Console
The JavaScript console can be opened with Control+I, or using
the menu option. The console is currently a text box with JS
syntax highlighting which will send commands to the document's
interpreter. All output is printed to an HTML view in the console.
The output is an HtmlView to easily allow complex output, such
as expandable views for JS Objects in the long run.
2020-05-24 02:20:08 +02:00
FalseHonesty
78412ee76d Browser: An anchor link should open in a new tab when required
Previously, clicking on an anchor link (href="#section1")
would always scroll to it on the current page, even if control was
held or the target="_blank" attribute was set. This fixes that
behaviour, and the link will always open in a new tab if required.
2020-05-23 11:53:25 +02:00
FalseHonesty
d32889b19d Browser: Add "Paste & Go" action to the location box 2020-05-23 01:30:20 +02:00
FalseHonesty
5431e81bc3 Browser: Pop up a context menu when requested on a bookmark button
This right click context menu currently allows for the removal of
bookmarks as well as opening them in a new tab.
2020-05-22 18:23:02 +02:00
Andreas Kling
9fc4ad2a52 PixelPaint: Make the EllipseTool previews work while zoomed in 2020-05-22 15:57:04 +02:00
Andreas Kling
d12cce76a7 PixelPaint: Make the RectangleTool previews work while zoomed in 2020-05-22 14:57:10 +02:00
Andreas Kling
f57df29724 PixelPaint: Make the LineTool previews work while zoomed in 2020-05-22 14:45:14 +02:00
Andreas Kling
84b508befa PixelPaint: Rename original_event => image_event
These events are in image coordinates, not really original coordinates.
2020-05-21 22:56:32 +02:00
FalseHonesty
9241c3a957 Browser: Pop up a context menu when one is requested on a tab
Currently, the tab's context menu only has options to reload and
close, but this patch allows for those options to be quickly
expanded!
2020-05-21 21:53:17 +02:00
Andreas Kling
2adb0a07e5 LibGUI: Get rid of Model::ColumnMetadata and always use auto-sizing
Auto-sizing of view columns is now enabled by default. This removes the
last remaining need for ColumnMetadata, so this patch gets rid of it.
2020-05-21 19:55:44 +02:00
Andreas Kling
2e03bded43 LibGUI: Add Model::Role::TextAlignment and remove from ColumnMetadata 2020-05-21 19:55:44 +02:00
Andreas Kling
3c819b8ff4 Applications: Sort CMakeLists.txt alphabetically :^) 2020-05-21 19:55:44 +02:00
Hüseyin ASLITÜRK
ef49309807 Applications: Convert 256 char font to 384 char font 2020-05-21 01:19:42 +02:00
Andreas Kling
bf9e190533 PixelPaint: Support panning and scaling the image we're working on :^)
ImageEditor now supports panning (Ctrl+MiddleMouse) and scaling (Wheel)
the image. This took a lot of unpleasant coordinate math, but now it
actually kinda works and feels awesome! :^)
2020-05-20 22:30:42 +02:00
Andreas Kling
58fa9c6e89 PixelPaint: Rename from PaintBrush :^) 2020-05-20 20:35:35 +02:00
Andreas Kling
250c3b363d Revert "Build: Include headers from LibC, LibM, and LibPthread with -isystem"
This reverts commit c1eb744ff0.
2020-05-20 16:24:26 +02:00
Andrew Kaster
c1eb744ff0 Build: Include headers from LibC, LibM, and LibPthread with -isystem
Make sure that userspace is always referencing "system" headers in a way
that would build on target :). This means removing the explicit
include_directories of Libraries/LibC in favor of having it export its
headers as SYSTEM. Also remove a redundant include_directories of
Libraries in the 'serenity build' part of the build script. It's already
set at the top.

This causes issues for the Kernel, and for crt0.o. These special cases
are handled individually.
2020-05-20 08:37:50 +02:00
Linus Groh
0edfd45451 FileManager: Remove empty public access modifier from DesktopWidget 2020-05-19 19:25:41 +02:00
Linus Groh
e5ea243842 Browser: Hide tab bar if there's only one tab 2020-05-19 17:42:48 +02:00
Linus Groh
f4a941a5d7 Browser: Support fullscreen view 2020-05-19 17:42:48 +02:00
Andreas Kling
3d5233ae40 FileManager: Make the location box 2px taller 2020-05-18 17:51:09 +02:00
Andreas Kling
9895405b7c Browser: Make the location box 2px taller 2020-05-18 17:50:44 +02:00
Andreas Kling
22cd861c7e Calculator: Set a fixed-width font on the text box
GUI::TextEditor does not yet support right-aligned variable-width fonts
so just switch this to a fixed-width font for now.
2020-05-18 16:48:54 +02:00
Sergey Bugaev
acc107a44f FileManager+LibGUI+Userland: Switch clipboard to MIME types
We will now actually use MIME types for clipboard. The default type is now
"text/plain" (instead of just "text").

This also fixes some issues in copy(1) and paste(1).
2020-05-16 09:11:46 +02:00
Andreas Kling
244efe050a Clipboard: Move the system clipboard to a dedicated service process :^)
This commit moves the clipboard from WindowServer into a new Clipboard
service program. Clipboard runs as the unprivileged "clipboard" user
and with a much tighter pledge than WindowServer.

To keep things working as before, all GUI::Application users now make
a connection to Clipboard after making the connection to WindowServer.
It could be interesting to connect to Clipboard on demand, but right
now that would necessitate expanding every GUI app's pledge to include
"unix" and also unveiling the clipboard portal, which I prefer not to.
2020-05-14 22:53:58 +02:00
Sergey Bugaev
450a2a0f9c Build: Switch to CMake :^)
Closes https://github.com/SerenityOS/serenity/issues/2080
2020-05-14 20:15:18 +02:00
Pierre
49727ffee4 PaintBrush: Added 'Move active layer up/down' to the Menu
This allowes the active layer to be moved up or down.
2020-05-14 14:44:27 +02:00