Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
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.
|
|
|
|
Since the returned object is now owned by the callee object, we can
simply vend a ChildType&. This allows us to use "." instead of "->"
at the call site, which is quite nice. :^)
|
|
|
|
|
|
This patch adds two new API's:
- WidgetType& GUI::Window::set_main_widget<WidgetType>();
This creates a new main widget for a window, assigns it, and returns
it to you as a WidgetType&.
- LayoutType& GUI::Widget::set_layout<LayoutType>();
Same basic idea, creates a new layout, assigns it, and returns it to
you as a LayoutType&.
|
|
The more stuff we save in save_to() overrides, the more interesting it
becomes inspecting GUI programs. :^)
|
|
There was but a single user of this parameter and it's a bit tedious
to write it out every time, so let's get rid of it.
|
|
Now it actually defaults to "a < b" comparison, instead of forcing you
to provide a trivial less-than comparator. Also you can pass in any
collection type that has .begin() and .end() and we'll sort it for you.
|
|
The computation of the tree column x offset was not taking padding into
account. This patch fixes that and collects the logic in a helper.
|
|
|
|
|
|
Provide wrappers in the String and StringView classes, and add some tests.
|
|
Now that Vector uses size_t, we can remove a whole bunch of redundant
casts to size_t.
|
|
It's no longer possible rely on negative VectorIterator when iterating
backwards. It would be nice to have a general solution for reverse
iteration, but for now let me just patch this up.
|
|
Clean up some unused code, clean up FIXMEs, and remove premature
--dynamic-loader/-pie from LinkDemo (so it runs again on master)
|
|
|
|
Add an extra out-parameter to shbuf_get() that receives the size of the
shared buffer. That way we don't need to make a separate syscall to
get the size, which we always did immediately after.
|
|
|
|
This feels a lot more consistent and Unixy:
create_shared_buffer() => shbuf_create()
share_buffer_with() => shbuf_allow_pid()
share_buffer_globally() => shbuf_allow_all()
get_shared_buffer() => shbuf_get()
release_shared_buffer() => shbuf_release()
seal_shared_buffer() => shbuf_seal()
get_shared_buffer_size() => shbuf_get_size()
Also, "shared_buffer_id" is shortened to "shbuf_id" all around.
|
|
This is causing FilePicker to log a bunch of debug noise due to the
missing support for tree models in SortingProxyModel and it's not
helping anyone so let's just disable it.
This needs fixing in SortingProxyModel.
|
|
|
|
|
|
Previously, this function was using `AK::String::to_uint()`, which is
wrong considering the function returns type `int`. This also means that
configuration files would revert to the default value on negative
values.
|
|
|
|
Only take the horizontal scroll into account when hit testing the
table view headers.
|
|
|
|
If a directory is renamed or deleted before 'make clean', git will
delete the Makefile but leave all of the object and dependency files
around. When make would try to recurse into that directory from the
wildcard, it would error out since there is no Makefile.
|
|
|
|
AbstractView does not know which column it's displaying which makes it
impossible to implement the select_all functionality up there. Now
descendants override the pure virtual select_all method and implement
it themselves.
|
|
SystemTheme.h:81:1: error: 'SystemTheme' defined as a struct here but previously declared as a class; this is valid, but may result in linker errors under the Microsoft C++ ABI
|
|
|
|
We were only forwarding the value to the subviews, but not storing it
in m_model_column. This would cause MultiView::model_column() to return
the wrong value.
Thanks to Daniel Bos for spotting this! :^)
|
|
The not initialized variables can lead to compiler warnings that
become errors with the -Werror flag.
|
|
In the old model, before bc319d9e8873734bb8e8cea3d762d7fab2ded887, the parent
(the background thread) would delete us when it exits (i.e. never), so we had to
keep track of our own refcount in order to destroy ourselves when we're done.
With bc319d9e8873734bb8e8cea3d762d7fab2ded887, the parent keeps additional
reference to us, so:
* There should be no need to explicitly ref() ourselves
* The unref() would not get rid of the last reference to us anymore
The latter is why all the BackgroundAction's were getting leaked. Fix this by
simply unparenting ourselves from the background thread when we're done.
|
|
We'll enable it once ColumnsView is less crashy. :^)
|
|
FilePicker was not showing thumbnails correctly because once each
thumbnail rendering BackgroundAction completed, it posted a deferred
invocation event to the *main* event loop.
Since FilePicker runs in a nested event loop, those completion
callbacks never ran until it was too late and the FilePicker was gone.
|
|
There is some sort of issue with using a SortingProxyModel together
with ColumnsView. This is a workaround to allow FilePicker to use a
MultiView for now, but this needs to be fixed separately somehow.
|
|
This allows the user to switch between different view modes.
Fixes #1283.
|
|
A MultiView is a combination of ItemView, TableView and ColumnsView
smashed into a single widget. You can switch between the view modes
by calling MultiView::set_view_mode().
Note that MultiView inherits from StackWidget, not AbstractView.
That's purely for practical reasons, although I'm not entirely sure
if there would be some benefit to having it inherit from AbstractView.
|
|
Let's face it: Taking RefPtr<T>&& arguments is obnoxious and puts too
much unnecessary burden on the caller.
|
|
Previously it was only possible to change these window attributes when
creating a new window. This patch adds an IPC message that allows you
to change them at runtime.
|
|
|
|
This method is useful for later usage.
|
|
|
|
Since we take the parent object as a raw pointer, we should handle the
case where it's null.
|
|
This patch adds the following convenience helper:
auto tab_widget = GUI::TabWidget::construct();
auto my_widget = tab_widget->add_tab<GUI::Widget>("My tab", ...);
The above is equivalent to:
auto tab_widget = GUI::TabWidget::construct();
auto my_widget = GUI::Widget::construct(...);
tab_widget->add_widget("My tab", my_widget);
|