Commit graph

1767 commits

Author SHA1 Message Date
Ben Wiederhake
b2de1ba779 Browser: Mark default action in context menu of hyperlinks 2020-08-30 09:47:49 +02:00
Ben Wiederhake
a5f7b7e3e7 Browser: Mark default action in context menu of bookmarks 2020-08-30 09:47:49 +02:00
Ben Wiederhake
bc1dc2b688 IRCClient: Unbreak building with extra debug macros 2020-08-30 09:43:49 +02:00
AnotherTest
054638c355 Spreadsheet: Add (limited) support for custom cell formatting 2020-08-29 17:42:03 +02:00
AnotherTest
e75247a75b DisplaySettings+LibGUI: Move ItemListModel into LibGUI
Without this model, comboboxes are abysmal to work with, so let's not
redefine it every time.
2020-08-29 17:42:03 +02:00
Andreas Kling
87f36b0852 Spreadsheet: Make cells right-aligned by default
Until we have better control over cell content alignment, let's make
them all right-aligned by default since that makes numbers look nice,
and numbers are the bread & butter of spreadsheets. :^)
2020-08-29 00:49:15 +02:00
Andreas Kling
64e448eef0 Spreadsheet: Treat Return as a cursor key in the cell editing delegate
This allows you to enter many rows of cells like so:

    1<return>2<return>3<return>...

Very cool! :^)
2020-08-28 21:29:59 +02:00
Andreas Kling
c3b2495320 Spreadsheet: Have cursor movement keys commit and stop cell editing
Customize the cell editing delegate to stop editing when one of the
various cursor movement keys is hit. This allows you to type into a
cell and then move to an adjacent cell by simply pressing an arrow.

This may not be the best factoring for this feature, but it's pretty
dang cool and we'll see how it evolves over time. :^)
2020-08-28 21:26:16 +02:00
Andreas Kling
057d04d98f Spreadsheet: Enable "tab key navigation" in the spreadsheet tables
Moving left/right with the tab key is a classic spreadsheet behavior.
2020-08-28 21:10:12 +02:00
Andreas Kling
cd930e0f3d Spreadsheet: Make Return move the cursor one step down
This seems to be a common behavior in spreadsheet applications,
so let's replicate it here by hooking the activation signal.
2020-08-28 21:03:09 +02:00
Andreas Kling
c43f0f012d Spreadsheet: Enable the "any key pressed" edit trigger in spreadsheets 2020-08-28 20:49:51 +02:00
Andreas Kling
ccea1b2376 Spreadsheet: Let GUI::TableView paint the grid and cursor :^) 2020-08-28 17:09:30 +02:00
AnotherTest
6614ee703b Spreadsheet: Setup and prepare for cell types
This commit adds a generic interface for cell types and hooks it up.
There is no way to set these from the UI, and so they're not saved
anywhere yet.
Also implicitly converts numeric values (strictly integers) to numeric
javascript values, as numbery-looking + numbery-looking === string is
not very interesting. :^)
2020-08-28 17:08:09 +02:00
AnotherTest
5715ed3dd6 Spreadsheet: Reorganise the sources a bit
This commit just moves some code around:
- Give Cell its own file
- Pull all forward-declared classes/structs into Forward.h
- Clean up the order of member functions a bit
2020-08-28 17:08:09 +02:00
Andreas Kling
6cf064e4c6 Spreadsheet: Open help pages immediately when selecting them 2020-08-28 13:56:26 +02:00
Andreas Kling
60cf97726f Spreadsheet: Don't store help window's widgets in raw pointers
We can just use RefPtr for these and lighten the cognitive burden.
2020-08-28 13:56:19 +02:00
Andreas Kling
0a7d9319af ChessEngine: Move from Applications to Services
This is not a stand-alone application. :^)
2020-08-28 12:53:02 +02:00
AnotherTest
e0b7833078 Spreadsheet: Do not clear cells when ctrl-selecting 2020-08-28 09:22:17 +02:00
Andreas Kling
9f3b1b8e21 Spreadsheet: Draw cell borders as 1px thin line :^) 2020-08-27 19:28:04 +02:00
Andreas Kling
56e80fafd6 Spreadsheet: Draw cell cursor and selected cells differently
Now that the table view has a cursor, we can distinguish it from the
selected cells. Draw the cells with a nice variant of the selection
color as background.
2020-08-27 18:38:39 +02:00
thankyouverycool
8a364c503d Base: Rename icon subdirectories by explicit app name
Renames widgets/ to hackstudio/, vbwidgets/ to visualbuilder/ and
paintbrush/ to pixelpaint/.
2020-08-27 15:38:02 +02:00
thankyouverycool
ebba297b42 Base: Move 16x16 common icons to /res/icons/16x16/
Drops the '16' suffix from filenames. Resizes inconsistent
audio-volume icons to intended size.
2020-08-27 15:38:02 +02:00
thankyouverycool
61ba39dfa0 Base: Create /res/graphics/ and relocate system art assets 2020-08-27 15:38:02 +02:00
Andreas Kling
d876c49ec7 Spreadsheet: Don't advertise the SpreadsheetModel as sortable 2020-08-27 10:38:36 +02:00
AnotherTest
a5a3e5a178 Spreadsheet: Add support for changing multiple cells at once
Just select many cells and use the cell editor! so easy!
2020-08-27 10:27:20 +02:00
AnotherTest
7465c51ef2 Base+LibGUI+Spreadsheet: Add icons for Spreadsheet
Also adds a Spreadsheet.af.
2020-08-27 10:27:20 +02:00
AnotherTest
dd4bd0943a Spreadsheet: Track selections across sheet switches 2020-08-27 10:27:20 +02:00
AnotherTest
8db5057dc4 Spreadsheet: Show errors and make them red 2020-08-27 10:27:20 +02:00
AnotherTest
cb7fe4fe7c Spreadsheet: Add support for multiple sheets
This also refactors the js integration stuff to allow sheets to
reference each other safely.
2020-08-27 10:27:20 +02:00
AnotherTest
e1f5f709ee Spreadsheet: Move sheet management to a Workbook class 2020-08-27 10:27:20 +02:00
Ben Wiederhake
9f7ec33180 Meta: Force semi-colon after MAKE_AK_NONXXXABLE()
Before, we had about these occurrence counts:
COPY: 13 without, 33 with
MOVE: 12 without, 28 with

Clearly, 'with' was the preferred way. However, this introduced double-semicolons
all over the place, and caused some warnings to trigger.

This patch *forces* the usage of a semi-colon when calling the macro,
by removing the semi-colon within the macro. (And thus also gets rid
of the double-semicolon.)
2020-08-27 10:12:04 +02:00
Andreas Kling
368dc8ad08 Spreadsheet: Tweak row height slightly
Add 2px of height to the rows. This makes editing a cell inline look
better since we no longer cut off the text while editing.
2020-08-26 20:35:09 +02:00
Andreas Kling
d125c624c6 Spreadsheet: Use a fixed-width font in the cell editor 2020-08-26 17:00:40 +02:00
Andreas Kling
c5278dac99 Spreadsheet: Don't ignore selections in the A column :^)
This was a leftover from when the first column contained row numbers.
2020-08-26 17:00:40 +02:00
Andreas Kling
8cacac32b5 Spreadsheet: Enable row headers for the spreadsheet TableView 2020-08-26 17:00:40 +02:00
Andreas Kling
695b283b8c Spreadsheet: Get rid of the "row numbers" column
Let's use TableView's row headers for this instead. :^)
2020-08-26 17:00:40 +02:00
AnotherTest
394e4c04cd LibJS: Add a helper for calling JS::Function's with arguments
The fact that a `MarkedValueList` had to be created was just annoying,
so here's an alternative.
This patchset also removes some (now) unneeded MarkedValueList.h includes.
2020-08-26 08:45:01 +02:00
Ben Wiederhake
cd93fb9656 LibC: Deduplicate declaration of strcasecmp 2020-08-26 00:55:13 +02:00
Andreas Kling
cfc30b11ba LibGUI: Rename table view's "cell painting delegate" to "column *"
What you install with this API is a delegate that manages painting of
all the items in a specific column, so let's make the API reflect that.
2020-08-26 00:51:35 +02:00
Andreas Kling
44e371635e LibGUI: Move table view headers into their own widget
This patch introduces the HeaderView class, which is a widget that
implements the column headers of TableView and TreeView.

This greatly simplifies event management in the view implementations
and also makes it much easier to eventually implement row headers.
2020-08-26 00:51:35 +02:00
Andreas Kling
965ccf5242 Spreadsheet: Focus the spreadsheet table on startup 2020-08-26 00:51:35 +02:00
Linus Groh
9ea6ef4ed1 LibJS: Make Interpreter::throw_exception() a void function
The motivation for this change is twofold:

- Returning a JS::Value is misleading as one would expect it to carry
  some meaningful information, like maybe the error object that's being
  created, but in fact it is always empty. Supposedly to serve as a
  shortcut for the common case of "throw and return empty value", but
  that's just leading us to my second point.
- Inconsistent usage / coding style: as of this commit there are 114
  uses of throw_exception() discarding its return value and 55 uses
  directly returning the call result (in LibJS, not counting LibWeb);
  with the first style often having a more explicit empty value (or
  nullptr in some cases) return anyway.
  One more line to always make the return value obvious is should be
  worth it.

So now it's basically always these steps, which is already being used in
the majority of cases (as outlined above):

- Throw an exception. This mutates interpreter state by updating
  m_exception and unwinding, but doesn't return anything.
- Let the caller explicitly return an empty value, nullptr or anything
  else itself.
2020-08-25 18:30:31 +02:00
AnotherTest
3320bb45d1 Spreadsheet: Add "Save As" 2020-08-25 09:46:28 +02:00
AnotherTest
fdf0660064 Spreadsheet: Implement state-preserving saves and loads 2020-08-25 09:46:28 +02:00
Luke
694b86a4bf LibDebug: Move everything into the "Debug" namespace 2020-08-25 09:46:06 +02:00
AnotherTest
4c65bd3731 Spreadsheet: Add back the menubar 2020-08-24 19:15:07 +02:00
AnotherTest
1e14b93407 Spreadsheet: Fix crash when a row number is selected 2020-08-24 19:15:07 +02:00
AnotherTest
e65d54a2fa Spreadsheet: Avoid crashing when a cell is created mid-update
To reproduce:
- make sure A0, A1, A2 do not exist (i.e. have not been selected or
  written to)
- select A0
- type in =A1+A2
- see crash
2020-08-24 19:15:07 +02:00
AnotherTest
de13c6939d Spreadsheet: Add a syntax highlighter to the cell editor 2020-08-24 19:15:07 +02:00
Andreas Kling
50bca8fcef SystemMonitor: Tweak processor feature display a little bit
Flatten the CPU features array instead of showing it as raw JSON data.
2020-08-24 18:22:09 +02:00
AnotherTest
682b2fdb75 LibWeb: Move OutOfProcessWebView into the Web namespace 2020-08-24 18:21:33 +02:00
AnotherTest
3a07f6e345 Spreadsheet: Document runtime functions and add a help window
...that can automatically generate documentation pages from the objects.
2020-08-24 18:21:33 +02:00
AnotherTest
12cf3e13c0 Spreadsheet: Add a topbar with a text editor 2020-08-24 18:21:33 +02:00
AnotherTest
a6ebd29aa5 Spreadsheet: Start making a spreadsheet application 2020-08-24 18:21:33 +02:00
Andreas Kling
4eb1fd6ea3 SystemMonitor: Use bottom-side tabs for the per-process info tabs
Let's try this out and see how it feels! :^)
2020-08-23 23:53:45 +02:00
Andreas Kling
1b075ffe3b ThemeEditor: Paint the minimize/maximize/close window button icons 2020-08-23 15:02:44 +02:00
Andreas Kling
26cc733f93 ThemeEditor: Add window buttons (no bitmaps yet) 2020-08-23 14:58:15 +02:00
Andreas Kling
690c736c3a ThemeEditor: Add a handful of widgets to the preview
This needs to be spruced up a bit, but having a set of common widgets
gives you a quick idea of what the theme will look like. :^)
2020-08-23 14:12:42 +02:00
Emanuele Torre
553889b2f5 ThemeEditor: Use m_inactive_window_icon when painting the inactive..
..window

`m_inactive_window_icon` wasn't being used.
2020-08-23 10:20:52 +02:00
thankyouverycool
ab3fff4211 LibGUI+Calendar: Make Calendar a common widget in LibGUI
Refactors the Calendar widget into LibGUI and updates the Calendar
app interface. Calendar widget lets layout engine manage most of
its geometry now and has a few new features like tile click
navigation, hover highlighting and a togglable year/month mode.
2020-08-22 11:54:30 +02:00
Itamar
0e69ebbce4 Meta: Add missing license header to ThemeEditor 2020-08-22 09:48:59 +02:00
Andreas Kling
dd9d5d6c72 ThemeEditor: Tweak the main UI layout 2020-08-21 21:16:13 +02:00
Andreas Kling
84a272ad2a ThemeEditor: Set window icon and title 2020-08-21 21:16:13 +02:00
Andreas Kling
7703dad36b ThemeEditor: Allow editing of theme colors one at a time
This is not perfect and kinda clunky to use, but these are the best
input widgets we have available at the moment, so let's make do with
what we have. :^)
2020-08-21 21:16:13 +02:00
Andreas Kling
dfe8adde3f ThemeEditor: Start working on a window theme editor :^) 2020-08-21 21:16:13 +02:00
Peter Elliott
1e57e32a93 ChessEngine: Add ChessEngine
This engine is pretty bad, but doesn't let itself get checkmated
2020-08-21 12:26:30 +02:00
Luke
4dfe797263 SystemMonitor: Add a Processors tab 2020-08-21 12:01:36 +02:00
Jake Wilson
0f6de0c45a Browser: add urls to browser history on load start
urls were previously added to history in the Tab::load()
function, which excluded the setter on window.location.href.
This commit adds all urls to browser history when the page loads,
as long as the load_type is not LoadType::HistoryNavigation.
Closes #3148
2020-08-19 21:11:10 +02:00
Abu Sakib
8abf5048b8 Calendar: Add help menuitem 2020-08-18 17:24:14 +02:00
Andreas Kling
d1e83b4f6e FileManager: Make DirectoryView vend indexes from view model
Instead of translating between the sorting proxy and the underlying
file system model at all the DirectoryView API boundaries, just hand
out indexes into the sorting proxy model.

The only thing those indexes are used for on the outside is to
retrieve a GUI::FileSystemModel::Node for an index, so add a nice
helper on DirectoryView that turns a ModelIndex into a Node&.
2020-08-17 22:49:52 +02:00
Andreas Kling
f0349323c4 LibGUI: Don't require passing model to FileSystemModel::Node APIs
The Node API was obnoxiously requiring you to pass the model into it
all the time, simply because nodes could not find their way back to
the containing model. This patch adds a back-reference to the model
and simplifies the API.
2020-08-17 22:02:21 +02:00
Andreas Kling
38d8426f32 FileManager: Move the "create new file" action into DirectoryView
This makes it available in both desktop and windowed modes. :^)
2020-08-17 21:34:14 +02:00
Andreas Kling
be48f58d41 FileManager: Move "create new directory" action into DirectoryView
This makes it available in both desktop and windowed mode. :^)
2020-08-17 21:34:14 +02:00
Andreas Kling
0ffd319bda FileManager: Partially bring back the desktop context menu 2020-08-17 21:34:14 +02:00
Andreas Kling
66cedfa13b FileManager: Don't pass DirectoryView subview to hooks that don't care 2020-08-17 21:34:14 +02:00
Andreas Kling
0083fe0118 FileManager: Use DirectoryView for both windowed and desktop mode
This patch begins the process of converting FileManager's desktop mode
to using the DirectoryView class.

This will allow us to share most of the code between the two different
runtime modes of FileManager.

We lose a bit of functionality in this patch, but we'll bring it back!
2020-08-17 21:34:14 +02:00
Andreas Kling
b6e18133ae LibWeb: Rename WebContentView => OutOfProcessWebView 2020-08-17 18:05:35 +02:00
Andreas Kling
56c3748dcc LibWeb: Rename PageView => InProcessWebView 2020-08-17 18:05:35 +02:00
Luke
c434a91c91 FileManager: Apply wallpaper on startup
I noticed that nothing actually applies the wallpaper on startup.
I wasn't sure where to put the responsibility, so I gave it to
the desktop mode file manager.

Also adds a save_config option to set_wallpaper so it doesn't
needlessly save the config.
2020-08-17 17:47:14 +02:00
Andreas Kling
a27d782dd6 FileManager: Don't close() twice when copying a file 2020-08-17 13:12:46 +02:00
Brian Gianforcaro
73ab030f88 FileManager: Fix descriptor leak in copy_file, found by Coverity 2020-08-17 09:17:57 +02:00
Brian Gianforcaro
e43d5d5eaa FileManger: Fix file descriptor leak in copy_file_or_directory, found by Coverity 2020-08-17 09:17:57 +02:00
Brian Gianforcaro
f7b1591a5c SystemMonitor: Uninitialized struct member in ProcessModel, found by Coverity
This is really a nop, as the cpu_percent is computed later. Zero the
value just to keep things sane.
2020-08-17 09:17:57 +02:00
Brian Gianforcaro
3ee0917dcb SoundPlayer: Uninitialized variable in SoundPlayerWidget, found by Coverity 2020-08-17 09:17:57 +02:00
Brian Gianforcaro
e160181a73 Piano: Uninitialized member variables in RollWidet, found by Coverity
This seem like they wouldn't cause any problems in reality,
but it's nice to fix them to avoid any future misuse.
2020-08-17 09:17:57 +02:00
Andreas Kling
154a184c1b Browser: Add a debug menu action for triggering a JS garbage collection
Triggering a GC this way will print a report afterwards so you can see
how much memory is currently used by the JS heap. :^)
2020-08-16 20:35:03 +02:00
thankyouverycool
15cb4207fc TextEditor: Put fonts in exclusive action group 2020-08-16 19:39:06 +02:00
thankyouverycool
5558b2cf9f Base: Rename Pebbleton to reflect actual height
And update programs loading it from file.
2020-08-16 19:38:21 +02:00
Andreas Kling
9102b624ac LibGUI+DevTools+Applications: Use ModelIndex::data() in many places
This way you don't have to keep track of which model it came from.
2020-08-16 16:44:09 +02:00
Andreas Kling
96f98b1fc9 LibGUI: Simplify TableCellPaintingDelegate API slightly
No need to pass the Model *and* a ModelIndex, the index knows which
model it belongs to anyway.
2020-08-16 16:44:09 +02:00
Andreas Kling
a1e381a0f8 LibGUI: Move GUI::Model::Role to GUI::ModelRole
This is preparation for using ModelRole in the ModelIndex API.
2020-08-16 16:44:09 +02:00
Andreas Kling
b9ae937279 SystemMonitor: Invalidate ProcessModel indexes when necessary
If the process table grows or shrinks, we need to invalidate all the
ProcessModel indexes. This is not great, but it's the most precise
invalidation we can do at the moment.
2020-08-16 16:44:09 +02:00
Andreas Kling
e1ed71ef9e LibGUI: Make model sorting imperative and move order to AbstractView
Instead of SortingProxyModel having a column+order, we move that state
to AbstractView. When you click on a column header, the view tells the
model to resort the relevant column with the new order.

This is implemented in SortingProxyModel by simply walking all the
reified source/proxy mappings and resorting their row indexes.
2020-08-16 16:44:09 +02:00
Andreas Kling
7b110fad56 FileManager: Use one SortingProxyModel for all DirectoryView subviews
This removes one major source of confusion in DirectoryView. It's still
weird that we mix sorting model indexes with filesystem model indexes
a bit willy-nilly but we'll improve that separately.
2020-08-16 16:44:09 +02:00
Nico Weber
af96cfe9ef SystemMonitor: Move memory graph caption from KB to KiB
This changes the graph caption from KB to KiB, but it keeps just "K"
instead of "KiB" for all the numbers in columns in the table, since "K"
is fairly well-established as abbreviation of "KiB" (the SI prefix is
lower-case), and space is at a premium here.
2020-08-16 16:33:28 +02:00
Nico Weber
aa97166739 Everywhere: Consolidate human_readable_size() implementations
Let's use the one in AK/NumberFormat.h everywhere.

It has slightly different behavior than some of the copies this
removes, but it's probably nice to have uniform human readable
size outputs across the system.
2020-08-16 16:33:28 +02:00
Nico Weber
430b265cd4 AK: Rename KB, MB, GB to KiB, MiB, GiB
The SI prefixes "k", "M", "G" mean "10^3", "10^6", "10^9".
The IEC prefixes "Ki", "Mi", "Gi" mean "2^10", "2^20", "2^30".

Let's use the correct name, at least in code.

Only changes the name of the constants, no other behavior change.
2020-08-16 16:33:28 +02:00
Linus Groh
2e5c434e22 Misc: Use automatic window positioning in more applications
This is a follow up to #2936 / d3e3b4ae56aa79d9bde12ca1f143dcf116f89a4c.

Affected programs:
- Applications: Browser (Download, View source, Inspect DOM tree, JS
  console), Terminal (Settings)
- Demos: Cube, Eyes, Fire, HelloWorld, LibGfxDemo, WebView,
  WidgetGallery
- DevTools: HackStudio, Inspector, Profiler
- Games: 2048, Minesweeper, Snake, Solitaire
- Userland: test-web

A few have been left out where manual positioning is done on purpose,
e.g. ClipboardManager (to be close to the menu bar) or VisualBuilder (to
preserve alignment of the multiple application windows).
2020-08-15 17:38:19 +02:00
Linus Groh
0cab3bca2f LibGUI: Add and use Window::center_on_screen()
Various applications were using the same slightly verbose code to center
themselves on the screen/desktop:

Gfx::IntRect window_rect { 0, 0, width, height };
window_rect.center_within(GUI::Desktop::the().rect());
window->set_rect(window_rect);

Which now becomes:

window->resize(width, height);
window->center_on_screen();
2020-08-15 17:38:19 +02:00
Ben Wiederhake
cebf8ae3b7 SystemMonitor: ProcessStack is now ThreadStack
This is a follow-up to #3095. In particular:
    https://github.com/SerenityOS/serenity/pull/3095#discussion_r469113354
2020-08-15 13:38:24 +02:00
Andreas Kling
75b8f4e4e6 LibGUI: Make focus events more aware of why focus is changing
This patch adds GUI::FocusEvent which has a GUI::FocusSource.
The focus source is one of three things:

- Programmatic
- Mouse
- Keyboard

This allows receivers of focus events to implement different behaviors
depending on how they receive/lose focus.
2020-08-15 00:05:45 +02:00
Andreas Kling
b97e42dcaa LibGUI: Make ModelSelection non-copyable and non-movable
These are meant to be attached to an AbstractView at all times.
2020-08-14 12:15:11 +02:00
Andreas Kling
686ee2bf04 LibGUI: Rename ModelClient::on_model_update() => model_did_update()
This follows the typical client callback naming scheme used elsewhere
and doesn't collide with the "on_foo" Function hook convention.
2020-08-13 20:18:11 +02:00
Andreas Kling
4088beb8eb LibGUI: Remove Model::sibling() since it's the same as index()
... I'm not sure what the idea was here, but since these functions do
the same thing, let's only have index().
2020-08-13 20:18:11 +02:00
Andreas Kling
82e949aa7c LibGUI: Rename SortingProxyModel "target" to "source" instead 2020-08-13 20:18:11 +02:00
Andreas Kling
6caaa2bfdb FileManager: Remove one direct call to FileSystemModel from outside
We should stop accessing the FileSystemModel outside DirectoryView.
This whole app is pretty badly factored, due to LibGUI being in its
infancy while it first developed.
2020-08-12 20:41:13 +02:00
Andreas Kling
aae296ef08 FileManager: Use FileIconProvider in the properties dialog
This removes the need for the properties dialog to access the internal
data model used by the directory view.
2020-08-12 20:41:13 +02:00
Ben Wiederhake
ef9a3b8e46 Applications: Mark compilation-unit-only functions as static
This enables a nice warning in case a function becomes dead code.
2020-08-12 20:40:59 +02:00
Ben Wiederhake
84e112be6b Browser: Avoid ninja-import of global variable 2020-08-12 20:40:59 +02:00
Linus Groh
7072806234 Meta: Replace remaining LibM/math.h includes with math.h 2020-08-12 16:18:33 +02:00
Ben Wiederhake
81b491a7a4 SystemMonitor: Show PPID, PGID, SID
With this information, it's a bit easier to intuit the current 'process tree'.
If you're reading this, can I convince you to implement a nice process tree for
SystemMonitor? It could be via PPID (unbounded depth), or SID+PGID (depth 3).
Or something else entirely :D
2020-08-12 11:28:45 +02:00
Ben Wiederhake
dbbdb39c1f SystemMonitor: Display the stack of only the selected thread
This uses the new ProcFS interface at /proc/<pid>/stacks/<tid>
2020-08-12 11:28:45 +02:00
Linus Groh
faab8a82cb TextEditor: Show pageview URLs in statusbar on hover 2020-08-11 15:45:02 +02:00
Linus Groh
1353edd090 TextEditor: Open links from Web::PageView using Desktop::Launcher
So far, clicking on a link from the Markdown/HTML preview Web::PageView did
nothing - now we pass that link to Desktop::Launcher, which will then
open it in Browser, FileManager, another TextEditor instance etc.
2020-08-11 15:23:10 +02:00
Andreas Kling
c3b6df60b7 Help: Spruce up the UI with some tasteful layout margins 2020-08-10 21:20:28 +02:00
Andreas Kling
d777583e28 FileManager: Make the desktop process show as "FileManager (Desktop)" 2020-08-10 20:29:08 +02:00
Valtteri Koskivuori
b0ab6b9e3f KeyboardSettings: Preselect the current keymap in the dropdown menu.
This is the little omission that I originally set out to fix, and
sure enough, I got to delve into Kernel land and back to implement
it. Lots of fun!
2020-08-07 09:11:04 +02:00
Nico Weber
ce95628b7f Unicode: Try s/codepoint/code_point/g again
This time, without trailing 's'. Ran:

    git grep -l 'codepoint' | xargs sed -ie 's/codepoint/code_point/g
2020-08-05 22:33:42 +02:00
Nico Weber
19ac1f6368 Revert "Unicode: s/codepoint/code_point/g"
This reverts commit ea9ac3155d.
It replaced "codepoint" with "code_points", not "code_point".
2020-08-05 22:33:42 +02:00
Andreas Kling
ad2e84b71a Browser: Move bookmarks.json to ~/.config 2020-08-05 17:40:47 +02:00
Andreas Kling
984683cf34 Revert "LibM: Always include <math.h> instead of <LibM/math.h>"
This reverts commit dc12cbca41.

Sadly this broke the build due to some confusion about <new>.
Reverting until this can be solved fully.
2020-08-04 21:17:43 +02:00
Andreas Kling
90dcab381a SystemMonitor: Replace custom ProcessTableView with just GUI::TableView
This class was added in the very early days of LibGUI, when I wasn't
quite sure if subclassing table views made sense or not.
2020-08-04 21:03:53 +02:00
Andreas Kling
dc12cbca41 LibM: Always include <math.h> instead of <LibM/math.h>
This makes Lagom pick up the host math.h, which is what we want.
2020-08-04 19:06:27 +02:00
Andreas Kling
cf624550e5 Terminal: Disown child processes after spawning 2020-08-04 18:17:16 +02:00
Andreas Kling
256ad7b122 SystemMonitor: Disown child processes after spawning 2020-08-04 18:17:16 +02:00
Andreas Kling
27d3971ba6 QuickShow: Disown child process after spawning 2020-08-04 18:17:16 +02:00
Andreas Kling
46ab006c58 FileManager: Disown spawned processes 2020-08-04 18:17:16 +02:00
Andreas Kling
ea9ac3155d Unicode: s/codepoint/code_point/g
Unicode calls them "code points" so let's follow their style.
2020-08-03 19:06:41 +02:00
Ben Wiederhake
64a82100bd SystemMonitor: Provide new 'Inspect' action 2020-08-03 13:02:49 +02:00
Ben Wiederhake
b1f7632610 SystemMonitor: Use icon for 'Profile' action 2020-08-03 13:02:49 +02:00
Ben Wiederhake
45632986a4 SystemMonitor: Try to keep focus in 'Stacks' 2020-08-03 13:02:49 +02:00
Ben Wiederhake
cd39eea7a9 SystemMonitor: Split up kmalloc labels
Otherwise, the numbers overflow the space after a while.
2020-08-03 13:02:49 +02:00
AnotherTest
d366ad8232 PixelPaint: Make GenericConvolutionFilterInputDialog cancellable
Also tweaks the GUI to look a bit less...bad.
2020-08-01 17:44:40 +02:00
AnotherTest
3455876976 Help: Optionally take an argument to search for 2020-08-01 08:39:26 +02:00
AnotherTest
21094b4725 Help: Add a search mode
This closes #2685, and brings some much needed nostalgia :^)
2020-08-01 08:39:26 +02:00
Peter Elliott
4bf4a071a6 Applications: Stop setting initial window location
This will let the WindowManager choose the location of the window
2020-08-01 08:06:48 +02:00
Till Mayer
040848a2af FileManager: Build new path of renamed files correctly
Fixes #2932.
2020-08-01 07:57:15 +02:00
Andreas Kling
ef711f501e LibWeb: Move the Page/Frame/EventHandler classes into Page/ 2020-07-28 19:28:29 +02:00
Andreas Kling
7daeddb9e9 LibWeb: Move the CSS parser into CSS/Parser/ 2020-07-28 19:23:18 +02:00
asynts
21de20825a LibCore: Change the signature of Socket::send() to use Span. 2020-07-27 19:58:09 +02:00
Matthew Olsson
335916d8db LibGfx: Templatize Point, Size, and Rect 2020-07-27 01:06:26 +02:00
Andreas Kling
1f008c95b6 LibWeb: Move CSS classes into the Web::CSS namespace 2020-07-26 20:05:15 +02:00
Andreas Kling
11ff9d0f17 LibWeb: Move DOM classes into the Web::DOM namespace
LibWeb keeps growing and the Web namespace is filling up fast.
Let's put DOM stuff into Web::DOM, just like we already started doing
with SVG stuff in Web::SVG.
2020-07-26 20:05:15 +02:00
Andreas Kling
e0b8b4ac67 LibCore+LibGUI: Switch to using AK::is and AK::downcast 2020-07-26 17:51:00 +02:00
Andreas Kling
a565121793 LibWeb: Move HTML object model stuff into LibWeb/HTML/
Take a hint from SVG and more all the HTML classes into HTML instead of
mixing them with the DOM classes.
2020-07-26 17:51:00 +02:00
AnotherTest
9685080bd4 PixelPaint: Add a bunch of spatial filters
This patchset adds a generic convolution matrix spatial filter, and a
few named derivatives such as BoxBlur, Laplacian, Sharpen and
GaussianBlur.
2020-07-25 02:13:43 +02:00
Nico Weber
c4d9d5cc54 Browser: Escape JS source operators for HTML display in console
Console inputs to try before and after this patch:
- `0xffff & 0xff`
- `"a & b"`
- `"<div>"`
- `a &` (to see the escaping in the error hint)
2020-07-23 23:01:16 +02:00
Andreas Kling
65ec655b0d PixelPaint: Add GUI for editing layer names :^) 2020-07-23 20:48:28 +02:00
Andreas Kling
955d3c22c7 PixelPaint: Tidy up the LayerPropertiesWidget GUI layout a bit :^) 2020-07-23 20:43:52 +02:00
Andreas Kling
3a4351b2b5 PixelPaint: Don't hit test non-visible layers 2020-07-23 20:36:07 +02:00
Andreas Kling
b560445c84 PixelPaint: Add a GUI for editing opacity and visibility of layers
Also, make the layer stack rendering respect opacity and visibility.
2020-07-23 20:33:38 +02:00
Andreas Kling
7973f76790 PixelPaint: Scope tool actions to the containing window
We achieve this by deferring the construction of the tool buttons until
the toolbox widget has been added to a window.
2020-07-23 19:53:48 +02:00
Andreas Kling
299824de73 LibGUI: Rename GUI::Image => GUI::ImageWidget
"Image" was a bit too vague, "ImageWidget" is obviously a widget of
some sort.
2020-07-23 17:31:08 +02:00
Nico Weber
107db38a51 Browser: Focus input text field in JS console by default 2020-07-23 13:07:30 +02:00
Sahan Fernando
ccc929dcf9 TextEditor: Preserve preview scroll position across page refreshes 2020-07-20 21:04:19 +02:00
Andreas Kling
f286eb7fcd FileManager: Show a special icon for the home directory
The home-directory icon now shows up in the FileManager title bar,
and alongside the path in the location textbox. Very nice. :^)
2020-07-19 21:37:25 +02:00
Andreas Kling
9710c9742c LibGUI+FileManager: Add setting for showing/hiding dotfiles
GUI::FileSystemModel can now be told to display (or not display) files
whose name start with a dot (other than . and ..)
2020-07-19 21:15:00 +02:00
Andreas Kling
ad57a2f18b FileManager: Use new TextBox::DisplayOnly mode in the properties dialog
Use this instead of disabling the name TextBox. This looks a little bit
nicer than the grayed-out appearance. :^)
2020-07-19 21:15:00 +02:00
Nico Weber
b5565b478f System Monitor: Sort Address column in memory map numerically 2020-07-18 15:52:08 +02:00
Nico Weber
629410b3d6 TextEditor: Auto-select C++ syntax highlighting for more extensions 2020-07-18 15:19:58 +02:00
Tom
65a11fb5f9 LibGUI: Add InputBox::show with required parent window argument
Similar to MessageBox::show, this encourages passing in a window.
2020-07-16 16:10:21 +02:00
Tom
27bd2eab22 LibWeb: Require parent window argument for MessageBox
Since the vast majority of message boxes should be modal, require
the parent window to be passed in, which can be nullptr for the
rare case that they don't. By it being the first argument, the
default arguments also don't need to be explicitly stated in most
cases, and it encourages passing in a parent window handle.

Fix up several message boxes that should have been modal.
2020-07-16 16:10:21 +02:00
Tom
6568765e8f LibGUI: Add parent window argument to FilePicker functions
Since FilePicker almost always should be modal, add the parent
window as mandatory first argument.
2020-07-16 16:10:21 +02:00
Nico Weber
6e0af349a2 FileManager: Make Ctrl-L focus location bar, and change shortcuts for changing view
Ctrl-L focuses the location bar in all file managers I know of,
and does so in SerenityOS's browser too. It should work in
SerenityOS's file manager as well.

Unfortunately, Ctrl-L was already "View List", so change the
shortcuts of all the view modes to Ctrl-1/2/3 which is what
several other file managers use. (I tried Ctrl-Shift-1/2/3
which is what Windows Explorer uses after 8.1, but it didn't
Just Work, and Ctrl-1/2/3 are currently free anyways. If
we ever want to use them for tabs or whatever, we can
change the view shortcuts then.)
2020-07-15 18:30:26 +02:00
Sergey Bugaev
5fd8dbacb1 LibGUI+FileManager: Fix forgetting to map sorting proxy model indexes
Also assert indexes are valid in a few more places.

Finally fixes https://github.com/SerenityOS/serenity/issues/1440 and
https://github.com/SerenityOS/serenity/issues/2787 :^)
2020-07-15 13:41:46 +02:00
Stijn
633301323b FileManager: Add a new file action to FileManager GUI
This action was already present when running FileManager in desktop mode, but now it's also available in windowed mode. :)
2020-07-15 13:26:38 +02:00
thankyouverycool
b2783a234a LibGUI: Use enum for TextEditor modes & add new DisplayOnly mode
Adds a new, more restrictive read-only state to TextEditor which
forbids copying, selecting, editor cursors, and context menus.
Provides a unique appearance on focus which accomodates ComboBox
widgets. All TextEditor modes are now accessed by enum and
set_mode() which sets the editor to Editable, ReadOnly or
DisplayOnly. Updates applications still using set_readonly().
2020-07-15 13:19:44 +02:00
Tom
7739497e34 FileManager: Allow double-clicking applications again
By adding a special LauncherType::Application we can still
get meta data for the application, but also know that we should
consider executing that binary as the default action. LaunchServer
will not do this for us, as it should probably not be allowed to
run arbitrary binaries that haven't been registered as handlers.
2020-07-15 00:11:30 +02:00
Tom
50903fd88c FileManager: Add "Open with" menu if alternative applications are available 2020-07-15 00:11:30 +02:00
Tom
b778804d20 LibGUI: Add ModelClient abstract class and allow registering clients
This solves a problem where the SortingProxyModel doesn't
receive the on_update call because other code overwrote
the handler later on.
2020-07-13 19:49:34 +02:00
Nico Weber
ac2470e66e FontEditor: Don't add duplicate extension in Save As dialog 2020-07-13 15:00:14 +02:00
Andreas Kling
7f394435da Debugger: Add some pledges required by LibLine
These are a bit unfortunate. We should reorganize LibLine so it sets
up the RPC server earlier, then we can drop these pledges later on.
2020-07-12 01:36:45 +02:00
Linus Groh
858f6dc1d1 SystemMonitor: Parse /proc/cpuinfo as JSON 2020-07-11 23:16:16 +02:00
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