Commit graph

1494 commits

Author SHA1 Message Date
Linus Groh
caa11503b1 DisplaySettings: Fix a typo 2020-07-11 20:24:02 +02:00
Peter Elliott
e650be98a1 Piano: Fix cliping of bottom notes when scrolling in RollWidget
fixes #2577
2020-07-11 18:51:41 +02:00
Peter Elliott
b8cf07166f Piano: Handle octave slider jumps of greater than 1
The previous slider handler relied on the new value being 1 different
than the previous.

fixes #1163.
2020-07-11 18:51:41 +02:00
Tom
8d5fde440a FileManager: Specify "Open in Text Editor" action as default in context menu
Since double-clicking the item would trigger the "Open in Text Editor"
action, specify it as the default action when displaying the
context menu.
2020-07-11 11:45:49 +02:00
Nico Weber
97aaf95265 FontEditor: Add a "Save" menu item 2020-07-11 11:34:38 +02:00
Nico Weber
315dc8d81b FontEditor: Add a "Save as..." menu item 2020-07-11 11:34:38 +02:00
Nico Weber
03e722f664 FontEditor: Add an "Open..." menu item 2020-07-11 11:34:38 +02:00
thankyouverycool
deceb91c48 FileManager: Show an open folder icon for the selected directory
The currently selected directory now displays an open folder icon
in the directory tree.
2020-07-10 19:44:18 +02:00
Nico Weber
2dd40aac4d Piano: Make menu bar consistent with other apps
"Help" should be after "Edit".

The "Quit" menu item should be at the end of the app menu, and
after a separator.
2020-07-07 23:11:08 +02:00
Linus Groh
87465f7c54 Help: Handle external links
Links which do not have the "file" protocol (most commonly links to
external websites - http and https) are now not treated as file paths
anymore but instead handled by Desktop::Launcher.

The same applies to files outside of /usr/share/man.

Fixes #2727.
2020-07-07 17:42:50 +02:00
Andreas Kling
1493dd9dc6 Browser: Simplify the History class and fix back/forward history push
This code was previously relying on the PageView::on_load_start hook
firing synchronously when calling PageView::load(). This was not
happening with WebContentView, so it broke the back/forward history.

Instead, we now differentiate between history navigations and normal
loads in Tab::load(). History navigations don't push new entries into
history, but instead just move the history pointer.
2020-07-07 15:09:26 +02:00
thankyouverycool
d86dbfe9e8 Help: Make section books open and close when toggled
Much more satisfying!
2020-07-07 13:38:35 +02:00
thankyouverycool
27109c3467 Base+Help: Add new Help app icons
This adds a new 32x32 Help application icon, a new open book icon,
copies the current book icon as Help's 16x16 icon, and updates
the Help application file to reflect these changes.
2020-07-07 13:38:35 +02:00
AnotherTest
a163ee8b3b TextEditor: Use ArgsParser and allow the user to specify preview mode
This makes looking at HTML files that somehow fail a little less
painful by allowing the user to actually _see_ the html.
2020-07-06 22:40:38 +02:00
Andreas Kling
a94ef9e021 Browser: Add a way to start Browser in multi-process mode :^)
You can enable the new multi-process mode by using "Browser -m".
2020-07-06 21:50:45 +02:00
Andreas Kling
d8be535579 Browser+LibWeb: Pave the way for using WebContentView in Browser
This commit sets everything up, but we still always instantiate a plain
Web::PageView in Browser::Tab..
2020-07-06 21:46:37 +02:00
Andreas Kling
49b9a0a665 LibWeb: Add a shared WebViewHooks base class for both web view widgets
This will make it easier for Browser to share code between both views.
2020-07-06 21:19:03 +02:00
Andreas Kling
fd65a24834 LibWeb: Make the link context menu hook include the destination URL 2020-07-06 20:00:56 +02:00
Andreas Kling
02c5e22f06 LibWeb: Make the link click hooks include the destination URL
We have all the context needed for relative URL resolution inside the
engine, so let's not make embedders worry about this.
2020-07-06 19:41:10 +02:00
Andreas Kling
0c4b0c0312 Terminal+LibVT: Add "clear including history" action (Ctrl+Shift+K) :^)
Sometimes you just want to get rid of all your scrollback history in
the terminal, and now there's a way to do that.
2020-07-05 23:34:02 +02:00
Andreas Kling
e8a59ef842 DisplaySettings: Fix crash on exit (due to Core::Object on the stack) 2020-07-05 21:17:14 +02:00
Andreas Kling
63d796312d LibWeb: Tweak PageView::on_link_hover hook
Change: on_link_hover(String) -> on_link_hover(URL)

Also, we now fire the hook when a link is unhovered as well, allowing
the embedder to react to nothing being hovered anymore.
2020-07-05 17:02:44 +02:00
Andreas Kling
56d14d5701 LibWeb: Move fragment link handling to Frame
Activating a "#foo" fragment link will now be handled internally by
the Frame instead of involving the widget layer.

If the viewport needs to be scrolled as a result, we will simply ask
the PageClient to scroll a new rect into view.
2020-07-05 15:57:07 +02:00
Andreas Kling
efc335c457 TextEditor: Allow turning off the preview mode
This patch adds a PreviewMode enum with the following values:

- None
- Markdown
- HTML

This makes it a bit more logical to implement exclusive behavior.
2020-07-04 21:21:04 +02:00
Andreas Kling
8476e3933b SystemMonitor: Change default update frequency to 3 seconds
1 second is just too annoyingly jumpy when you're trying to grab
something in the list.
2020-07-04 20:45:37 +02:00
Andreas Kling
bc1ec588f0 TextEditor: Tweak 16x16 icon
In keeping with the slightly-higher-contrast theme.
2020-07-04 19:44:27 +02:00
Andreas Kling
d851863704 Userspace: Remove a bunch of unnecessary Kernel/API/KeyCode.h includes 2020-07-04 17:25:31 +02:00
Andreas Kling
11c4a28660 Kernel: Move headers intended for userspace use into Kernel/API/ 2020-07-04 17:22:23 +02:00
Andreas Kling
ca93c22ae2 LibGUI: Turn GUI::Application::the() into a pointer
During app teardown, the Application object may be destroyed before
something else, and so having Application::the() return a reference was
obscuring the truth about its lifetime.

This patch makes the API more honest by returning a pointer. While
this makes call sites look a bit more sketchy, do note that the global
Application pointer only becomes null during app teardown.
2020-07-04 16:54:55 +02:00
Andreas Kling
1dd1595043 LibGUI: Make GUI::Application a Core::Object
Having this on the stack makes whole-program teardown iffy. Turning it
into a Core::Object allows anyone who needs it to extends its lifetime.
2020-07-04 14:05:57 +02:00
Andreas Kling
8001a85fc7 Browser: Don't crash when inspecting an anonymous LayoutNode
Not all LayoutNodes have a corresponding DOM node.
2020-07-03 21:34:12 +02:00
Linus Groh
1bc326f63b FileManager: Add "Open Terminal here..." action to menu and toolbar
Currently it's only available in the context menu, which isn't quite
obvious.
2020-07-03 12:29:18 +02:00
Nico Weber
526ca68786 SystemMonitor: Correctly check error of posix_spawn()
posix_spawn() has a bit of a whacky API in that it doens't return
0 on success and -1 on failure while writing the error code to
errno -- it instead returns 0 on success and the error code on
error.

So assign the return value to errno so that perror() does the
right thing.
2020-07-02 20:34:06 +02:00
Andreas Kling
a44e52cc14 SystemMonitor: Add "profile process" menu action :^)
You can now start profiling a process directly from SystemMonitor!
This is really neat.
2020-07-01 21:08:16 +02:00
Tom
cdc78515b6 SystemMonitor: Add a utilization graph for each processor 2020-07-01 12:07:01 +02:00
Linus Groh
1cffa28f95 Browser: Unset location bar icon on load start
This avoids having a stale icon from a previous page load in the
location box if a subsequently visited page doesn't trigger an icon
change.
2020-06-30 23:11:01 +02:00
Benoît Lormeau
310fbe48e5 LibVT/Terminal: add a scroll length to the TerminalWidget
The scroll length is the number of lines by which the terminal will go
up/down when scrolling the mouse wheel once.
2020-06-30 18:24:00 +02:00
Andreas Kling
167da1fa84 Browser: Show website favicons in the location bar :^) 2020-06-29 20:35:53 +02:00
Andreas Kling
b8a50e9d89 FileManager: Show a folder icon in the location text box :^) 2020-06-29 20:35:39 +02:00
Nico Weber
12cbc4ad0d Everywhere: Replace some uses of fork/exec with posix_spawn
It's less code, and it's potentially more efficient once
posix_spawn is a real syscall.
2020-06-29 12:04:27 +02:00
devashish
9f58624802 DisplaySettings: Allow setting wallpapers from outside /res/wallpapers
Ideally, we would copy the file to `/res/wallpapers`, add an entry to
`ComboBox` model and set the index to this entry. I didn't want to
touch anything outside of `DisplaySettings`, so this is more of a
workaround :^)
2020-06-28 00:06:09 +02:00
Andrew Kaster
3a4e121904 Browser: Add right-click context menu to tabs
Right clicking on a position in the PageView of a tab will open a
context menu with common actions like back, forward, reload, view
source and inspect DOM. :^)
2020-06-28 00:05:08 +02:00
Hüseyin ASLITÜRK
d28a824d4c
QuickShow: Fix for zooming with mouse wheel (#2650)
Fixes #2648.
2020-06-28 00:04:11 +02:00
Andreas Kling
85ac7dc1b1 TextEditor: Add live preview for HTML documents :^)
This allows you to edit HTML and see the changes live. This feature is
possibly my favorite feature in the world right now.
2020-06-26 22:47:29 +02:00
Andreas Kling
981f403287 IRCClient: Remove duplicate <div> wrapper around colored messages 2020-06-26 11:59:04 +02:00
Andreas Kling
6293d1a13c LibWeb+Browser: Remove old HTML parser :^)
The new parser is now used everywhere and it's working pretty well!
2020-06-26 00:53:25 +02:00
Andreas Kling
6c783dbf62 IRCClient: Use Web::Element::set_inner_html()
Instead of invoking the (old) fragment parser directly.
2020-06-26 00:53:25 +02:00
Andreas Kling
10255bc5c6 LibWeb+Browser: Decode non-animated images out-of-process :^)
We now use the ImageDecoder service in LibWeb for everything except
GIF images (we'll have to deal with them later, ofc.)

This has a little bit of overhead but we should be able to optimize
it until it becomes negligible.
2020-06-22 21:47:01 +02:00
Andreas Kling
1f97897b40 TextEditor: Use Web::PageView::load_html() for the markdown preview 2020-06-21 21:54:30 +02:00
Andreas Kling
1c54272b41 Help: Use Web::PageView::load_html()
Instead of invoking the HTML parser directly.
2020-06-21 21:54:30 +02:00