Commit graph

741 commits

Author SHA1 Message Date
Andreas Kling 02f89dc419 Kernel+SystemMonitor: Show VM region "shared" and "stack" bits in UI
Expose these two region bits through /proc/PID/vm and show them in the
SystemMonitor process memory map view.
2019-11-17 12:15:46 +01:00
Andreas Kling 69ca9cfd78 LibPthread: Start working on a POSIX threading library
This patch adds pthread_create() and pthread_exit(), which currently
simply wrap our existing create_thread() and exit_thread() syscalls.

LibThread is also ported to using LibPthread.
2019-11-13 21:49:24 +01:00
Sergey Bugaev d3504b4f9b Terminal+HackStudio: Fix leaking PTM fd to child processes
The pseudoterminal *master* fd is not supposed to be inherited,
so make sure to open it with O_CLOEXEC.
2019-11-13 16:37:04 +01:00
Andreas Kling dd2900eda0 Launcher: Remove the Launcher app, and all hacks in support of it
The Launcher's functionality has been replaced by the app shortcuts in
the system menu.

There were various window management hacks to ensure that the launcher
stayed below all other windows while also being movable, etc.
2019-11-11 13:13:08 +01:00
Andreas Kling 06a80bcf69 Kernel+SystemMonitor: Publish can_read/write state for open files
The can_read() and can_write() states for file descriptions are now
published in /proc, allowing SystemMonitor to display it.
2019-11-09 22:42:19 +01:00
Till Mayer b4c18870de SoundPlayer: Add option to hide scope
Fixes #521. The scope can be hidden using the option in the app menu.
2019-11-09 20:55:47 +01:00
Till Mayer 56cd8b4d17 SoundPlayer: Let the user open a file from the GUI
The user now can open a file without passing it as an argument
2019-11-09 20:55:47 +01:00
Hüseyin ASLITÜRK aba6e6de6a FileManager: Remember my last position and size. 2019-11-09 20:50:53 +01:00
Andreas Kling 70a4678d77 LibHTML: Paint a magenta rectangle around the currently inspected node
Document now tracks one "inspected" node, set by set_inspected_node()
which is called by Browser's DOM inspector view on_selection callback.
2019-11-09 11:58:50 +01:00
Andreas Kling e3d975e943 LibHTML+Browser: Add a simple DOM inspector popup window
LibHTML now provides a DOMTreeModel which can be used to view a given
Document's DOM tree. :^)
2019-11-09 11:31:03 +01:00
Andreas Kling 8a024a3305 LibGUI: Rename GEventLoop.{cpp,h} => GWindowServerConnection
The GEventLoop class is long gone, and the only class in these files is
GWindowServerConnection, so let's update the file names. :^)
2019-11-08 11:40:25 +01:00
Andreas Kling d6f9349f15 IRCClient: Escape HTML entities in nicknames, too, just in case 2019-11-07 18:09:52 +01:00
Andreas Kling a377e8d3f5 LibHTML+IRCClient: Add an escape_html_entities() helper
This simple helper escapes '<', '>' and '&' so they can be used in HTML
text without interfering with the parser.

Use this in IRCClient to prevent incoming messages from messing with
the DOM :^)
2019-11-06 22:40:01 +01:00
Andreas Kling f60c46ceb7 IRCClient: Use parse_html_fragment() to add messages to the HtmlView
HTML fragment strings are so much nicer to work with than raw DOM APIs.
This makes it feel like we're using innerHTML :^)
2019-11-06 20:53:30 +01:00
Andreas Kling 794f2d5645 LibHTML: Rename parse_html() => parse_html_document() 2019-11-06 20:52:18 +01:00
Andreas Kling f5cf8d4ad8 Revert "LibHTML: Rename parse_html() => parse_html_document()"
This reverts commit f6439789db.
Oops, I committed unrelated changes here, let me clean that up..
2019-11-06 20:51:07 +01:00
Andreas Kling f6439789db LibHTML: Rename parse_html() => parse_html_document() 2019-11-06 20:31:56 +01:00
Till Mayer ac9907ee61 SoundPlayer: Changed some small cosmetic things
Renamed "Position" to "Elapsed". "channel/channels" automatically
changes now when more than one channel exist. The current file name
is now displayed in the window title.
2019-11-05 19:50:11 +01:00
Till Mayer 77f3c12dc9 SoundPlayer: Added playback controls
The playback of a file can now be paused, stopped, continued and the
user can seek to any part of the file.
2019-11-04 20:55:46 +01:00
Till Mayer 112d36bfa0 SoundPlayer: Make sample widget display contents of the whole buffer
The SampleWidget now displays the contents of the whole buffer.
2019-11-04 20:55:46 +01:00
Your Name e46b251d61 SystemMonitor: Add device column to filesystems tab 2019-11-04 19:42:21 +01:00
Hüseyin ASLITÜRK e2f0ac13a4 FileManager: Remember my last view mode (#731) 2019-11-04 17:27:56 +01:00
Andreas Kling f76168a3ea FileManager: Make copying faster with ftruncate() and a bigger buffer
Apply the same techniques from "cp" to make copying files much faster.
2019-11-04 17:25:44 +01:00
Andreas Kling b8bf998b61 LibGUI: Move text search functions from GTextEditor to GTextDocument
Also add a find_all() that retuns a Vector<GTextRange> and simply does
a find_next() loop, returning all the matching ranges.
2019-11-01 21:31:06 +01:00
Andreas Kling fa69b9fbb7 IRCClient: Switch to using an HtmlView for the IRC window contents :^)
This seemed like a perfect fit for LibHTML. We can now style the IRC
channels and queries however we like with the power of HTML and CSS.

This patch doesn't do much in the way of styling, it just gets the
basic mechanism into place.
2019-10-28 20:53:19 +01:00
Brandon Scott 98e556fee9 HexEditor: Created has_selection() method.
Created has_selection() method and fixed a few small issues.
2019-10-27 00:44:42 +02:00
Brandon Scott c77fe5161c HexEditor: Added fill selection action.
Added the ability to fill the current selection with a given byte.
2019-10-27 00:44:42 +02:00
Brandon Scott f947353a56 HexEditor: Added new file action.
Added a new file action, allowing you to create a new file of a specific
size.
2019-10-27 00:44:42 +02:00
Brandon Scott bddabad3d9 HexEditor: Fixed startup error
When attempting to open a file that doesnt exist or has permission
problems, the application would end after hitting OK on the message
box instead of starting up to an empty editor.

I believe this has something to do with the dialog event loop
interfering with the application event loop, or possibly the fact
that the window creation code is in the show() method.

To work around this I now call the open_file() method after the
show() method.
2019-10-24 09:57:27 +02:00
Brandon Scott e3fbd2fe60 HexEditor: Added a multi-label status bar, and a new copy option.
Make use of the new multi-label status bar, and added a menu
option to allow you to copy generated C code from a selection
to the clipboard.
2019-10-24 09:57:27 +02:00
Andreas Kling cd1eee6604 LibVT+Terminal: Give TerminalWidget a hook for EOF on the pty
Instead of quitting the application immediately when the pty gives an
EOF, fire an on_command_exit hook so the TerminalWidget client can
decide for himself what to do.
2019-10-22 21:57:53 +02:00
Andreas Kling e9f6e1e287 LibVT+Terminal: Don't set window title directly from TerminalWidget
Instead, have TerminalWidget provide an on_title_change hook.
This allows embedders to decide for themselves what to do if we receive
a "set terminal title" escape sequence.
2019-10-21 22:07:59 +02:00
Andreas Kling da0958a882 LibVT: Make TerminalWidget's automatic size policy updates optional
When embedding a TerminalWidget, you might not want it to automatically
update its own size policy based on the exact terminal buffer size.

This behavior is now passed as a flag to the TerminalWidget constructor
which makes it behave nicely both inside HackStudio and in Terminal.
2019-10-21 20:28:30 +02:00
Andreas Kling 8b4903e733 LibVT: Move TerminalWidget from the Terminal app to here
It would be nice to be able to reuse this widget in other apps. :^)
2019-10-21 19:50:07 +02:00
Brandon Scott 465a33443c HexEditor: Fix half byte offset bug
If you had made a change to the first 4 bits of a byte and then changed
your offset via keyboard or menu option it would change the last 4 bits
of the new offset the next time you made a change and would not show that
the byte had been changed at the new offset.
2019-10-21 09:45:21 +02:00
Brandon Scott a76b02f741 HexEditor: Added navigate to a hex offset
Added the ability to navigate to a specified hex offset.
2019-10-21 09:45:21 +02:00
Brandon Scott 443eda986a HexEditor: Fixed off-by-one copying bug
When copying as hex or text we missed the last byte.
2019-10-21 09:45:21 +02:00
Brandon Scott 5cc722cec4 HexEditor: Reverse selections
Added the ability to select text and hex in reverse.
2019-10-21 09:45:21 +02:00
Andreas Kling c41bae3d54 LibHTML+Browser: Support scrolling to anchor with <a href="#foo">
This patch implements basic support for <a href="#foo"> fragment links.

To figure out where we actually want to scroll to, we have to do
something different based on the layout node's box type. So if it's a
regular LayoutBox we can just use the LayoutBox::position().

However, if it's an inline layout node, we use the position of the
first line box fragment in the containing block contributed by this
layout node or one of its descendants.
2019-10-20 10:07:26 +02:00
Andreas Kling 884ae80699 LibHTML+Browser: Show target URL of hovered links in Browser statusbar
HtmlView will now invoke the on_link_hover hook when the cursor enters
or leaves a DOM node that has an enclosing link element.

This patch also updates the meaning of Node::enclosing_link_element()
to find the nearest HTMLAnchorElementAncestor *with an href attribute*.
2019-10-19 21:25:49 +02:00
Andreas Kling fbdd0def47 Terminal: Make Shift+PgUp/PgDown scroll the terminal up/down one page
I keep doing this out of habit, expecting it to scroll, and now it
actually will scroll. :^)
2019-10-19 20:54:47 +02:00
Andreas Kling 89aaae82a1 Browser: Add basic back/forward history 2019-10-17 23:39:31 +02:00
Chyza 36bb03b6dd PaintBrush: Use secondary color for eraser (like in ms_paint)
Comes with a checkbox to turn it off if you dislike it.
2019-10-15 19:18:04 +02:00
Kevin Murphy 10324bc574 TextEditor: suppress "Not found" window when searching for empty string
Minor patch, but I was watching one of your videos on YouTube and
thought that the pop-up was unecessary/annoying in this case.  Love
your enthusiasm for the project :^)
2019-10-15 09:10:10 +02:00
Andreas Kling 49ac0c2e24 LibHTML: Move layout root from HtmlView to Document
The layout root is now kept alive via Document::m_layout_root.
This will allow us to do more layout-related things inside the inner
layer of LibHTML without reaching out to the HtmlView.

I'd like to keep HtmlView at a slightly higher level, to prevent it
from getting too complex.

This patch also fixes accidental disconnection of the layout tree from
the DOM after doing a layout tree rebuild. ~LayoutNode() now only
unsets the DOM node's layout_node() if it's itself.
2019-10-13 12:43:31 +02:00
Brandon Scott 48ef1d1bd1 HexEditor: Initial application release
The very first release of the Hex Editor for Serenity.
2019-10-13 08:45:49 +02:00
Andreas Kling 2530378f59 LibHTML+Browser: Add debug option to draw borders around line boxes
This will be very useful when debugging line layout.
2019-10-12 15:02:53 +02:00
Andreas Kling bf79b198f6 Browser: Add a debug menu with actions to dump DOM and Layout trees 2019-10-12 13:44:17 +02:00
Andreas Kling 06113b4ffe LibHTML+Browser: Show the number of pending resource loads
For now this is simply a counter+hook exposed by ResourceLoader and
shown in the Browser status bar.

This is not very nuanced, and it would be nice to expose more info so
we could eventually do something like a progress bar.
2019-10-10 22:07:08 +02:00
Andreas Kling 850955053f LibHTML: Rename Document::normalize() to fixup() and always do it
Node.normalize() is a standard DOM API that coalesces Text nodes.
To avoid clashing with that, rename it to fixup().

This patch also makes it happen automagically as part of parsing.
2019-10-09 18:54:34 +02:00