Commit Graph

4273 Commits

Author SHA1 Message Date
Andreas Kling
482d5295f1 FileManager: Allow deleting without confirmation via Shift+Delete
A powerful command for powerful users. :^)
2019-09-18 21:53:47 +02:00
Andreas Kling
33b8c807a6 FileManager: Implement basic file deletion
The delete action now actually deletes files (after asking the user for
confirmation, of course.) Deleting directories is not yet supported.

Fixes #541.
2019-09-18 21:46:14 +02:00
Andreas Kling
101b32236c SystemMonitor: Use GAboutDialog :^) 2019-09-18 18:43:23 +02:00
Andreas Kling
1fc2bca856 SystemServer: Don't wake up every single second 2019-09-18 18:39:30 +02:00
Andreas Kling
270adea22f WindowServer: Remove the default background wallpaper
Booting without a wallpaper is significantly faster in QEMU when the
host machine is under load (e.g while recording the screen..)

Using a wallpaper is now optional. :^)
2019-09-18 16:36:15 +02:00
Andreas Kling
229dbd0ab2 GTableView: Only paint the currently visible table rows
This makes painting way faster for models with large amounts of data.
2019-09-18 14:10:09 +02:00
Andreas Kling
bd45a55d86 SystemServer: Let's only spawn one TTYServer by default
We're rarely/never accessing these anyway, and this tidies up the
process table a little bit. A futile pursuit, perhaps..
2019-09-18 13:53:36 +02:00
Andreas Kling
a48feea1e3 Meta: Time for a new screnshot! :^) 2019-09-18 12:15:02 +02:00
Dan MacDonald
9145a720ec Emoji: Add “Unicorn” (#581) 2019-09-18 07:19:07 +02:00
Andreas Kling
664dff0581 VisualBuilder: Disallow moving managed widgets with the arrow keys 2019-09-17 22:41:42 +02:00
Andreas Kling
4f184114de VisualBuilder: Add icons for the layout menu actions 2019-09-17 22:39:48 +02:00
Andreas Kling
3d0dba94ec Emoji: Add "Face With Tears of Joy"
By request from Sergey. :^)
2019-09-17 22:17:28 +02:00
Andreas Kling
9d460d55d1 VisualBuilder: Don't allow moving/resizing widgets that are in a layout
Also paint these widgets' grabbers differently to make it stand out
visually which widgets have managed geometry. :^)
2019-09-17 22:17:28 +02:00
Andreas Kling
5e439bb3c8 VisualBuilder: Fix hit testing for composite widgets
When we ask LibGUI to hit test, it may return a subwidget of a widget
composed of many smaller widgets. In those cases we need to locate the
appropriate corresponding VBWidget for the composite widget.
2019-09-17 22:17:28 +02:00
Andreas Kling
b37fc9f655 VisualBuilder: Make it possible to add a layout to a widget
This patch adds horizontal and vertical layout options to the widget
context menu.

This is going to need a lot of work, but it's a cool start. :^)
2019-09-17 22:17:28 +02:00
Andreas Kling
9acdf9bb0a VisualBuilder: Support nested widgets
This patch makes it possible to put widgets inside one another. The way
you do this right now is by having a (single) widget selected when you
insert a new widget. The new widget then becomes a child of the
selected widget. (In the future we'll make it possible to drag widgets
into each other, and things like that.)

I've also changed the grabber coordinates to be window-relative instead
of parent-relative in order to simplify things for myself. Maybe that's
not the ideal design and we can revisit that.
2019-09-17 22:17:28 +02:00
Andreas Kling
ce44d9a32f GWidget: Add a flag to ignore greediness in GWidget::hit_test()
Normally if a GWidget has the is_greedy_for_hits() flag set, all hit
tests will hit the widget itself instead of its descendants.

Sometimes it may be desirable to override this behavior, and so this
flag now allows you to do that.
2019-09-17 22:17:28 +02:00
Andreas Kling
a77814bdee VisualBuilder: Use GAboutDialog :^) 2019-09-17 22:17:28 +02:00
Sergey Bugaev
72acccb051 Userland: Add copy and paste commands
You can now copy into the system clipboard like this:
  $ copy hello friends
or like this:
  $ copy < ReadMe.md
or like this:
  $ copy --type png < /res/wallpapers/sunset-retro.png

And paste just with
  $ paste
or to view the copied type:
  $ paste --print-type
2019-09-17 21:56:42 +02:00
Sergey Bugaev
053419dc3c Terminal: Ensure a \t always advances by at least one column 2019-09-17 21:56:42 +02:00
Sergey Bugaev
3824f572ef LibC: Ensure getopt error messages end with a newline
This is what POSIX seems to specify, and also what glibc getopt does.
2019-09-17 21:56:42 +02:00
Sergey Bugaev
e9dd94063f Kernel: Do not panic on fstat(fifo)
Instead, let's return an empty buffer with st_mode indicating it's a fifo.
2019-09-17 21:56:42 +02:00
Andreas Kling
68c06b8fac GComboBox: Use a down-arrow (instead of an up-arrow) for the button 2019-09-17 19:57:39 +02:00
Drew Stratford
6e51ebad8c Kernel: Stop hardcoding syscall in signal trampoline.
We now no longer hardcode the sigreturn syscall in
the signal trampoline. Because of the way inline asm inputs
work, I've had to enclose the trampoline in the function
signal_trampoline_dummy.
2019-09-17 16:00:37 +02:00
Conrad Pankoff
224fbb7910 Kernel: Fix returning pages to regions >= 2GB 2019-09-17 09:27:23 +02:00
Conrad Pankoff
9c5e3cd818 Kernel: Ignore memory the bootloader gives us above 2^32 2019-09-17 09:27:23 +02:00
Brandon Scott
a4d52b122d FileManager+LibGUI: Fix two folder-related crashes (#569)
Fix a crash when opening a folder, and another one when trying to open
a newly created folder.

It was not safe to modify a GModelSelection while it's being iterated over.

Fixes #536.
2019-09-17 09:26:10 +02:00
Andreas Kling
caf1b37e75 GTextEditor: Unbreak right-aligned single-line text boxes
This makes the Calculator app look right once again! :^)
2019-09-16 20:57:32 +02:00
Andreas Kling
fcf5b1ff5b Rect: Add set_right_without_resize() and set_bottom_without_resize()
Sometimes you want to move the Rect by its right or bottom edge without
resizing the rect in the process. There are probably better names for
this but nothing comes to mind at the moment.
2019-09-16 20:56:23 +02:00
Andreas Kling
3596522d23 Shell: Add a "time" builtin to show how long a command took to run 2019-09-16 19:46:34 +02:00
Andreas Kling
f2b6e1b577 LibGUI: Add a fullscreen action to GCommonActions 2019-09-16 18:42:38 +02:00
Andreas Kling
d92e26d023 WindowServer+LibGUI: Allow switching windows in/out of fullscreen mode
You can now call GWindow::set_fullscreen(bool) and it will go in or out
of fullscreen mode.

WindowServer will also remember the previous window rect when switching
to fullscreen, and restore it when switching back. :^)
2019-09-16 18:38:42 +02:00
Andreas Kling
a34f3a3729 Kernel: Fix some bitrot in MemoryManager debug logging code 2019-09-16 14:45:44 +02:00
Andreas Kling
5d491fa1cd Kernel: Add a simple slab allocator for small allocations
This is a freelist allocator with static size classes that works as a
complement to the generic kmalloc(). It's a lot faster than kmalloc()
since allocation just means popping from the freelist.

It's also significantly more compact when there are a lot of objects
smaller than the minimum kmalloc chunk size (32 bytes.)

This patch enables it for the Region and PhysicalPage classes.
In the PhysicalPage (8 bytes) case, it's a huge improvement since we
no longer waste 75% of the storage allocated.

There are also a number of ways this can be improved, so let's keep
working on it going forward.
2019-09-16 10:33:27 +02:00
Andreas Kling
1c692e87a6 Kernel: Move kmalloc() into a Kernel/Heap/ directory 2019-09-16 09:01:44 +02:00
Jesse
6557a31049 Terminal: Scroll cursor into view when typing (#568)
When the user has scrolled up and begins typing, the scrollbar will
automatically return them to the current cursor position so that they
can see what they're typing.
2019-09-16 07:52:27 +02:00
Jesse
444a4e4d39 DisplayProperties: Auto-resolution and graphical fix (#566)
The program will now automatically select the user's currently
chosen resolution when it is loaded up, however it is not
"visually selected" in the `GListView`

Moved the `resolution_list` list to be on the top to keep it consistent
with the wallpaper tab.
2019-09-16 07:50:47 +02:00
Conrad Pankoff
aa95bd7037 LibGUI: Fix move() of const StringView& 2019-09-16 07:49:43 +02:00
Conrad Pankoff
6fd096999e Applications: Add "Welcome" application, inspired by Windows 98 2019-09-16 07:49:43 +02:00
Conrad Pankoff
0706bf470f Meta: Add a LINK alias to the common makefile for running ld explicitly 2019-09-16 07:49:43 +02:00
Conrad Pankoff
bfde6acd8c PNGLoader: Add load_png_from_memory method 2019-09-16 07:49:43 +02:00
Andreas Kling
814346606f SystemServer: Drop GID before dropping UID
Otherwise the setgid() will fail :^)
2019-09-15 21:18:48 +02:00
Andreas Kling
e60bbadbbc Kernel: Add LogStream operator<< for PhysicalAddress 2019-09-15 20:47:49 +02:00
Andreas Kling
a40afc4562 Kernel: Get rid of MemoryManager::allocate_page_table()
We can just use the physical page allocator directly, there's no need
for a dedicated function for page tables.
2019-09-15 20:34:03 +02:00
willmcpherson2
dccab569d2 Shell: Tab completion for programs in PATH
This patch adds a function to LineEditor that takes the current shell
buffer, searches PATH for the first program that starts with that
buffer and then compares that to any other programs starting with the
buffer to remove any mismatching characters off the end. The result is
appended to the buffer.

This may be faster with a data structure but that seems overkill.
2019-09-15 19:27:44 +02:00
Andreas Kling
4463adc0ff FileManager: Show human-readable file size info in the status bar
Fixes #553.
2019-09-15 17:50:15 +02:00
Jesse Buhagiar
2976e889e9 Shell: Fixed pushd and popd
Fixed a few issues with both `pushd` and `popd`. There was a few
typos etcetera causing it to behave errantly in certain situations.
2019-09-15 16:02:44 +02:00
Andreas Kling
77d6dbc236 GItemView: Elide item names that won't fit
This isn't perfect since now you will just see "Long name..." instead
of the whole name, but at least it doesn't look totally wrong either.
2019-09-15 15:47:26 +02:00
Andreas Kling
9f99e285d1 Utf8View: Don't print potentially unterminated string in debug message 2019-09-15 15:46:40 +02:00
Jesse Buhagiar
ecdaf991c6 Shell: Added pushd, popd and dirs builtins
Added a few builtin functions to the shell to make navigating a bit
easier in the terminal.

`pushd` allows a user to "push" the current directory to the directory
stack, and then `cd` to the new directory.
`popd` allows the used to take the directory on the top of the stack
off before `cd`'ing to it.
`dirs` gives the state of the current directory stack.

This is only a partial implementation of the `bash` version
(gnu.org/software/bash/manual/html_node/Directory-Stack-Builtins.html)
, and doesn't include any of the +N or -N commands as of yet.
2019-09-15 14:16:40 +02:00