Age | Commit message (Collapse) | Author |
|
This will let the WindowManager choose the location of the window
|
|
Similar to MessageBox::show, this encourages passing in a window.
|
|
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.
|
|
Since FilePicker almost always should be modal, add the parent
window as mandatory first argument.
|
|
|
|
|
|
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.
|
|
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.
|
|
Get rid of the weird old signature:
- int StringType::to_int(bool& ok) const
And replace it with sensible new signature:
- Optional<int> StringType::to_int() const
|
|
This fits nicer with FloatRect,FloatPoint,FloatSize and gives a much
better visual clue about what type of metric is being used.
|
|
And move canonicalized_path() to a static method on LexicalPath.
This is to make it clear that FileSystemPath/canonicalized_path() only
perform *lexical* canonicalization.
|
|
|
|
Closes https://github.com/SerenityOS/serenity/issues/2080
|
|
The API for adding a submenu to a menu is now:
auto& submenu = menu.add_submenu("Name");
submenu.add_action(my_action);
|
|
HexEditor crashes during try OpenFile dialog.
|
|
|
|
|
|
This makes it show up in Inspector with all the menus inside it. :^)
|
|
This allows us to construct menus in a more natural way:
auto& file_menu = menubar->add_menu("File");
file_menu.add_action(...);
Instead of the old way:
auto file_menu = GUI::Menu::construct();
file_menu->add_action(...);
menubar->add_menu(file_menu);
|
|
Fixes #1444
|
|
|
|
We also clean up some old references to the old G prefixed GUI classes
This also fixes a potential bug with using: C_OBJECT_ABSTRACT(GAbstractButton)
instead of C_OBJECT_ABSTRACT(AbstractButton)
|
|
Now that add() returns a WidgetType&, we can't rely on the parent of a
GUI::Dialog to still keep it alive after exec() returns. This happens
because exec() will call remove_from_parent() on itself before
returning.
And so we go back to the old idiom for creating a GUI::Dialog centered
above a specific window. Just call GUI::Dialog::construct(), passing
the "parent" window as the last parameter.
|
|
|
|
|
|
|
|
The overwhelming majority of GUI::Frame users set the same appearance,
so let's just make it the default.
|
|
This matches what we already do for string types.
|
|
Also updates the ruler style a bit to be more consitent with TextEditor.
|
|
|
|
Fixing out of bounds cursor in three different cases:
- when the buffer is empty
- when loading new files
- when entering values at the end of the buffer
|
|
This patch adds <LibGUI/Forward.h> and uses it a bunch.
It also dragged various header dependency reduction changes into it.
|
|
|
|
|
|
This patch adds <LibGfx/Forward.h> with forward declarations for Gfx.
|
|
You can now #include <AK/Forward.h> to get most of the AK types as
forward declarations.
Header dependency explosion is one of the main contributors to compile
times at the moment, so this is a step towards smaller include graphs.
|
|
|
|
|
|
|
|
Code that just wants to open a Gfx::Bitmap from a file should not be
calling the PNG codec directly.
|
|
|
|
|
|
I started adding things to a Draw namespace, but it somehow felt really
wrong seeing Draw::Rect and Draw::Bitmap, etc. So instead, let's rename
the library to LibGfx. :^)
|
|
|
|
This took me a moment. Welcome to the new world of GUI::Widget! :^)
|
|
I've been wanting to do this for a long time. It's time we start being
consistent about how this stuff works.
The new convention is:
- "LibFoo" is a userspace library that provides the "Foo" namespace.
That's it :^) This was pretty tedious to convert and I didn't even
start on LibGUI yet. But it's coming up next.
|
|
|
|
As suggested by Joshua, this commit adds the 2-clause BSD license as a
comment block to the top of every source file.
For the first pass, I've just added myself for simplicity. I encourage
everyone to add themselves as copyright holders of any file they've
added or modified in some significant way. If I've added myself in
error somewhere, feel free to replace it with the appropriate copyright
holder instead.
Going forward, all new source files should include a license header.
|
|
This patch adds a new "accept" promise that allows you to call accept()
on an already listening socket. This lets programs set up a socket for
for listening and then dropping "inet" and/or "unix" so that only
incoming (and existing) connections are allowed from that point on.
No new outgoing connections or listening server sockets can be created.
In addition to accept() it also allows getsockopt() with SOL_SOCKET
and SO_PEERCRED, which is used to find the PID/UID/GID of the socket
peer. This is used by our IPC library when creating shared buffers that
should only be accessible to a specific peer process.
This allows us to drop "unix" in WindowServer and LookupServer. :^)
It also makes the debugging/introspection RPC sockets in CEventLoop
based programs work again.
|
|
Add some basic pledges to the following apps:
- Calculator
- DisplayProperties
- FontEditor
- HexEditor
- PaintBrush
|