Before bringing up the context menu, clicking...
- ...on an already selected item leaves selection alone
- ...on an unselected item makes it the only selected item
- ...outside any item clears the selection
Also, use the model_column() internally for selection as well as for
painting to keep things consistent.
Note that we always fire the on_context_menu_request hook, even if you
didn't click on an item. In those cases, you get a GModelIndex().
The fchdir() function is equivalent to chdir() except that the
directory that is to be the new current working directory is
specified by a file descriptor.
MAXPATHLEN defines the longest permissable path length after expanding
symbolic links. It is used to allocate a temporary buffer from the buffer
pool in which to do the name expansion, hence should be a power of two.
On UNIX MAXPATHLEN has the same size as PATH_MAX.
After some very confused debugging, I discovered that GNU make has a
main() function with this signature:
int main(int argc, char** argv, char** envp)
Apparently this is a non-standard but widely supported thing, so let's
do the same in Serenity so make works as expected.
This fixes an issue where you had to do "make PATH=..." instead of make
just picking up PATH from the environment. :^)
I don't know what's really right or wrong here. It seems fine to also
include the directories in the total byte count, and it makes it a bit
easier to stay consistent when adding up size numbers elsewhere.
RPC clients now send JSON-encoded requests to the RPC server.
The connection also stays alive instead of disconnecting automatically
after the initial CObject graph dump.
JSON payloads are preceded by a single host-order encoded 32-bit int
containing the length of the payload.
So far, we have three RPC commands:
- Identify
- GetAllObjects
- Disconnect
We'll be adding more of these as we go along. :^)
Both overloads should know how to set up a notifier callback in case
we get EINPROGRESS from connect().
It might be even better to merge the connect() overloads into a single
function..
We were returning a zero-length ByteBuffer in some cases. We should be
consistent about this and always return a null ByteBuffer if nothing
was read at all.
This breaks GSortingProxyModel selection preservation across resorts.
I'm not yet sure how we're going to solve that, but it's going to have
to work a bit differently than before, since the model itself no longer
knows what's selected.
Selection is now managed by GModelSelection which allows us to select
any arbitrary number of items, and to have different selections in
different views onto the same model. Pretty sweet. :^)
Each GAbstractView now has a GModelSelection backed by a simple
HashTable<GModelIndex>. When the selection changes somehow, the view
gets notified via the notify_selection_changed() callback.
In the future it will probably make sense to move to using some kind of
ranges as the internal representation instead.
`GTabWidget` now allows the user/caller to get the currently active
tab widget, meaning that actions that are applied globally (such as
an 'Apply' or 'OK' button) can now react to specific tabs etc.
An interactive application to modify the current display settings, such as
the current wallpaper as well as the screen resolution. Currently we're
adding the resolutions ourselves, because there's currently no way to
detect was resolutions the current display adapter supports (or at least
I can't see one... Maybe VBE does and I'm stupid). It even comes with
a very nice template'd `ItemList` that can support a vector of any type,
which makes life much simpler.
Now that the kernel supports thread-local storage, we can declare errno
with the __thread keyword, which causes it to be per-thread.
This should fix all the stupid issues that happen when many threads use
the same errno. :^)
We were already borrowing a getopt() from the BSD family until the day
we write our own. This patch borrows a slightly more modern one so we
also get getopt_long().
Fixes#190.
See also #91 for the desire to eventually NIH our own getopt()..
This was a workaround to be able to build on case-insensitive file
systems where it might get confused about <string.h> vs <String.h>.
Let's just not support building that way, so String.h can have an
objectively nicer name. :^)