Commit graph

3956 commits

Author SHA1 Message Date
Andreas Kling
227bfd79d3 Snake: Merge "Game" menu into the app menu 2019-08-27 13:25:08 +02:00
Andreas Kling
9a80554943 WindowServer: Reverse the menu background colors
Let's try putting the warm gray under the icons/checkboxes. This makes
the checkboxes look more natural.
2019-08-27 13:24:05 +02:00
Andreas Kling
d3c21163a5 WindowServer: Don't highlight disabled menu items when hovered 2019-08-27 10:20:10 +02:00
Andrew Weller
ed0553fe10 GTextEditor: Fixed bug on KeyCode::Key_Right pressed.
Pressing right did nothing when the very last characters of the buffer
were selected.

The expected action would be for the cursor to move to the end of the
buffer.

This patch fixes that.
2019-08-27 07:17:22 +02:00
Andrew Weller
b50ffaf7e1 GTextEditor: Fixed bug in find_prev
Find_prev returned invalid when the contents of the file were equal to
the contents of the search box.

This is due to the checker walking on an empty character at the end of
a line.
2019-08-27 07:17:22 +02:00
Andreas Kling
2147b587b2 WindowServer: Improve look of disabled menu items somewhat 2019-08-27 06:57:14 +02:00
Andreas Kling
161c862f21 WindowServer: Add an icon for the system menu / About action
It's a little ladybug. Maybe someday we'll have a fancy icon, but until
then, this ladybug character is a cute placeholder. :^)
2019-08-27 06:53:23 +02:00
Andreas Kling
b0b94560c3 FileManager: Add "go home" action to the "Go" menu 2019-08-26 21:20:39 +02:00
Andreas Kling
1077c15917 WindowServer: Add some app icons to the system menu 2019-08-26 21:15:35 +02:00
Andreas Kling
c0d81bea06 WindowServer: Make the global menubar selection consistent with items 2019-08-26 21:14:50 +02:00
Andreas Kling
0f48e3b007 WindowServer: Align menu separators correctly
These were off by one vertically, oops!
2019-08-26 20:53:33 +02:00
Andreas Kling
11bb88f513 WindowServer: Improve the menu look a bit
Take some inspiration from the first release of Visual Studio .NET and
add a left-hand stripe to contain the icons. And various other tweaks.
This isn't quite perfect, but it's pretty neat! :^)
2019-08-26 20:46:19 +02:00
Andreas Kling
08d7c86e90 FileManager: Move "File" menu entries to the app menu 2019-08-26 19:18:54 +02:00
Andreas Kling
1e604b7984 WindowServer+LibGUI: Show action icons in the menus when possible
Any GAction that has an icon assigned will now show up with that icon
when added to a menu as well.

I made the menu items 2px taller to accomodate the icons. I think this
turned out quite nice as well :^)
2019-08-26 18:54:44 +02:00
Andreas Kling
d522a6fe4c WindowServer: Improved look of checkable menu items
Paint a little checkbox frame for checkable items to make it obvious
that they are indeed checkable. This looks quite nice :^)

We also now shift all menu items to the right if we have any checkable
items in the menu.
2019-08-26 18:10:07 +02:00
Andreas Kling
cef2c04952 TextEditor: Move all "File" menu entries into the app menu instead
It felt weird to have both the app menu *and* a "File" menu.
2019-08-26 17:59:05 +02:00
Andreas Kling
dde10f534f Revert "Kernel: Avoid a memcpy() of the whole block when paging in from inode"
This reverts commit 11896d0e26.

This caused a race where other processes using the same InodeVMObject
could end up accessing the newly-mapped physical page before we've
actually filled it with bytes from disk.

It would be nice to avoid these copies without breaking anything.
2019-08-26 13:50:55 +02:00
Andreas Kling
f5d779f47e Kernel: Never forcibly page in entire executables
We were doing this for the initial kernel-spawned userspace process(es)
to work around instability in the page fault handler. Now that the page
fault handler is more robust, we can stop worrying about this.

Specifically, the page fault handler was previous not able to handle
getting a page fault in anything but the currently executing task's
page directory.
2019-08-26 13:20:01 +02:00
Andreas Kling
e29fd3cd20 Kernel: Display virtual addresses as V%p instead of L%x
The L was a leftover from when these were called linear addresses.
2019-08-26 11:31:58 +02:00
Sergey Bugaev
3439a479af LibThread: Move CLock to LibThread::Lock
And adapt all the code that uses it.
2019-08-26 11:31:14 +02:00
Sergey Bugaev
0826cc5a35 LibCore: Remove CThread
It's been replaced with Thread::Thread.
2019-08-26 11:31:14 +02:00
Sergey Bugaev
7c92f7d537 LibGUI: Port threading to LibThread 2019-08-26 11:31:14 +02:00
Sergey Bugaev
8d59b10022 WindowServer: Port threading to LibThread 2019-08-26 11:31:14 +02:00
Sergey Bugaev
1ac7fedefe AudioServer: Port threading to LibThread 2019-08-26 11:31:14 +02:00
Sergey Bugaev
d91efd4cd0 Piano: Port threading to LibThread 2019-08-26 11:31:14 +02:00
Sergey Bugaev
e1a6f8a27d LibThread: Introduce a new threading library
This library is meant to provide C++-style wrappers over lower
level APIs such as syscalls and pthread_* functions, as well as
utilities for easily running pieces of logic on different
threads.
2019-08-26 11:31:14 +02:00
Andreas Kling
d5f3487203 TextEditor: Select everything in the find textbox when pressing Ctrl+F
This allows you to press Ctrl+F and immediately start typing a new
search string, instead of having to remove the old one first. :^)
2019-08-25 21:46:39 +02:00
Andreas Kling
e8e8741c88 LibGUI+TextEditor: Make GButton activate its action if present
Previously even if you assigned a GAction to a GButton, you still had
to activate() the action manually by hooking the GButton::on_click
callback.
2019-08-25 21:46:39 +02:00
Andreas Kling
ded005500d TextEditor: Add actions for find next/previous (Ctrl+G, Ctrl+Shift+G) 2019-08-25 21:46:39 +02:00
Andreas Kling
d88c40568f TextEditor: Add search-related actions to the text editor context menu
Using the new GTextEditor::add_custom_context_menu_action() mechanism.

Fixes #478.
2019-08-25 21:46:28 +02:00
Andreas Kling
a6be213287 GTextEditor: Add add_custom_context_menu_action()
This allows embedders to add their own custom GAction set to a text
editor's context menu.
2019-08-25 21:33:08 +02:00
rhin123
0df7213670 Terminal: Fixed bounding issue when clearing the selection on type
We were checking the columns of the whole selection instead of the
the specfic line were modifying. Because of this, the selection
remained if the selection's column on another line was less than
the cursor.
2019-08-25 19:53:57 +02:00
Rok Povsic
eb9ccf1c0a FileSystem: Add FIXME about resolve_path bug 2019-08-25 19:47:37 +02:00
Rok Povsic
e36b9635df Userland: Add realpath 2019-08-25 19:47:37 +02:00
Rok Povsic
2ca8158a73 LibC: Add realpath 2019-08-25 19:47:37 +02:00
Rok Povsic
18fbe4ac83 Kernel: Add realpath syscall 2019-08-25 19:47:37 +02:00
Andreas Kling
8f50d75184 AK: Make HashTable.h compile inside the SDL2 port 2019-08-25 17:47:48 +02:00
Andreas Kling
9bc3444626 LibDraw: Fix wrong installation path 2019-08-25 17:42:16 +02:00
Andreas Kling
11896d0e26 Kernel: Avoid a memcpy() of the whole block when paging in from inode 2019-08-25 14:34:53 +02:00
Andreas Kling
fa20dcafb5 GTextEditor: Simplify computation of visual selection start/end
Add Line::visual_line_containing(int column) to easily convert a column
number into a visual line index.
2019-08-25 14:04:46 +02:00
Andreas Kling
97a695403b TextEditor: Add a menu action for turning line-wrapping on/off 2019-08-25 12:23:34 +02:00
Andreas Kling
5aac652b4b GTextEditor: Relayout when the line-wrapping setting is changed 2019-08-25 12:23:14 +02:00
Andreas Kling
453ca65a96 Ports/ncurses: Unbreak patch so we can build with latest ncurses master
Maybe we should build a specific version of ncurses instead but this at
least makes it work again for now.
2019-08-25 11:43:48 +02:00
Andreas Kling
e0b4f14eb8 Meta: Add funding links to get a "Sponsor" button on GitHub 2019-08-25 11:41:30 +02:00
Andreas Kling
64617f56ed Meta: Add note about the first line of commit messages to contrib guide 2019-08-25 11:24:23 +02:00
Andreas Kling
3ca1c72c77 GTextEditor: Unbreak selection painting in the new line-wrapping world
To expand a bit on how the line-wrapping works, each physical line of
text is broken up into multiple visual lines. This is recomputed when
the document changes, or when the widget is resized.

Each GTextEditor::Line keeps track of the visual breaking points, and
also their visual rect in content coordinates. This allows us to do
painting and hit testing reasonably efficiently for now.

This code needs some cleanup, but it's finally in a working state, so
here it goes. :^)
2019-08-25 11:24:23 +02:00
Andreas Kling
7b5bcec562 GTextEditor: Fix computing content x/rect values with line wrapping
This makes the cursor actually get painted on the right visual line
when in line-wrapping mode.
2019-08-25 11:24:23 +02:00
Andreas Kling
2e31b6627e GTextEditor: Take horizontal padding into account for line visual rects 2019-08-25 11:24:23 +02:00
Andreas Kling
9752e683f6 GTextEditor: Start working on a line-wrapping feature
This is not finished, but since the feature is controlled by a runtime
flag, the broken implementation should not affect users of this widget
too much (in theory :^).)
2019-08-25 11:24:23 +02:00
rhin123
280a9a2f34 Terminal: Clear selection if we type behind/inside it 2019-08-25 10:44:31 +02:00