Commit Graph

4298 Commits

Author SHA1 Message Date
Andreas Kling
83b5f6c11a LibGUI: Convert GGroupBox to ObjectPtr 2019-09-21 16:13:33 +02:00
Andreas Kling
4f4438c04c LibGUI: Convert GSplitter to ObjectPtr 2019-09-21 16:11:02 +02:00
Andreas Kling
efb8f9d538 LibGUI: Convert GTreeView to ObjectPtr 2019-09-21 16:06:43 +02:00
Andreas Kling
e7b55037f4 LibGUI: Convert GTableView to ObjectPtr 2019-09-21 16:03:59 +02:00
Andreas Kling
c13b9e2214 LibGUI: Convert GItemView to ObjectPtr 2019-09-21 15:47:58 +02:00
Andreas Kling
93851c3832 LibGUI: Convert GTextBox, GTextEditor and GResizeCorner to ObjectPtr 2019-09-21 15:46:47 +02:00
Andreas Kling
4ea229accd LibCore: Convert CTCPServer to ObjectPtr
Also get rid of the custom CNotifier::create() in favor of construct().
2019-09-21 15:25:08 +02:00
Andreas Kling
bce58bbbca LibGUI: Convert GScrollBar to ObjectPtr 2019-09-21 15:25:08 +02:00
Andreas Kling
4616a13e94 Build: Let's put the kernel in /boot/kernel for all builds 2019-09-21 15:25:08 +02:00
Andreas Kling
4381dd2640 LibGUI: Make the GLabel constructors protected
You should use GLabel::construct(...) to create new GLabels instead of
invoking the constructor directly via "new".
2019-09-21 15:25:08 +02:00
Andreas Kling
2e76ac3aff FormCompiler: Generate code that uses ObjectPtr for widgets 2019-09-21 15:25:08 +02:00
Andreas Kling
c7437f9caa LibGUI: Convert GLabel to ObjectPtr 2019-09-21 15:25:08 +02:00
Andreas Kling
6b347747f2 LibCore: Convert CHttpJob to ObjectPtr 2019-09-21 15:25:08 +02:00
Andreas Kling
953cb4e436 LibCore: Convert CLocalServer to ObjectPtr 2019-09-21 15:25:08 +02:00
Andreas Kling
c83da29a9d LibCore: Convert CLocalSocket to ObjectPtr 2019-09-21 15:25:08 +02:00
Andreas Kling
4298ba25c3 LibCore: Convert CTCPSocket to ObjectPtr, add construct() helper
The C_OBJECT macro now also inserts a static construct(...) helper into
the class. Now we can make the constructor(s) private and instead call:

    auto socket = CTCPSocket::construct(arguments);

construct() returns an ObjectPtr<T>, which we'll later switch to being
a NonnullRefPtr<T>, once everything else in in place for ref-counting.
2019-09-21 15:25:08 +02:00
Dan MacDonald
1f5a9762a2 Meta: Add installation guide (#588) 2019-09-21 15:23:53 +02:00
Andreas Kling
fcc3745b02 LibCore+LibGUI+WindowServer: Make events bubble up through ancestors
With this patch, CEvents no longer stop at the target object, but will
bubble up the ancestor chain as long as CEvent::is_accepted() is false.

To the set accepted flag, call CEvent::accept().
To clear the accepted flag, call CEvent::ignore().

Events start out in the accepted state, so if you want them to bubble
up, you have to call ignore() on them.

Using this mechanism, we now ignore non-tabbing keydown events in
GWidget, causing them to bubble up through the widget's ancestors. :^)
2019-09-20 20:37:31 +02:00
Andreas Kling
74c4e62659 GCommonActions: Add "Open..." action
Make use of this in PaintBrush and TextEditor. :^)
2019-09-20 19:36:39 +02:00
Andreas Kling
48b1b55629 Emoji: Make the "Unicorn" emoji transparent :^) 2019-09-20 15:41:39 +02:00
Andreas Kling
db9172b509 Base: Add a 16x16 "book" icon, requested by Sergey 2019-09-20 15:39:36 +02:00
Andreas Kling
d1bacb9885 LibCore: Convert CNotifier to ObjectPtr 2019-09-20 15:39:15 +02:00
Andreas Kling
50a6560413 LibCore: Convert CTimer to ObjectPtr 2019-09-20 15:20:10 +02:00
Andreas Kling
c34fd10b5b LibCore: Introduce ObjectPtr, a step towards reference-counted CObject
Long-term we should use reference counting for the CObject hierarchy.
Since we've already accumulated a fair amount of code, this is quite a
large task, so I'm breaking it into some steps.

So, ObjectPtr is a "smart" pointer for CObject-derived types.
It becomes null when moved from, and will destroy unparented CObjects
in its destructor.

The idea here is to convert the codebase over to ObjectPtr piece by
piece, and then when everything is moved and CObject itself refactored
for ref-counting, we can just replace ObjectPtr with RefPtr everywhere.
2019-09-20 15:19:11 +02:00
Andreas Kling
8cfb859368 IPv4: Support overriding the default TTL (64)
Made getsockopt() and setsockopt() virtual so we can handle them in the
various Socket subclasses. The subclasses map kinda nicely to "levels".

This will allow us to implement things like "traceroute", although..
I spent some time trying to do that, but then hit a wall when it turned
out that the user-mode networking in QEMU doesn't preserve TTL in the
ICMP packets passing through.
2019-09-19 21:42:59 +02:00
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