Age | Commit message (Collapse) | Author |
|
These are meant to be attached to an AbstractView at all times.
|
|
This follows the typical client callback naming scheme used elsewhere
and doesn't collide with the "on_foo" Function hook convention.
|
|
... I'm not sure what the idea was here, but since these functions do
the same thing, let's only have index().
|
|
|
|
We should stop accessing the FileSystemModel outside DirectoryView.
This whole app is pretty badly factored, due to LibGUI being in its
infancy while it first developed.
|
|
This removes the need for the properties dialog to access the internal
data model used by the directory view.
|
|
|
|
|
|
Fixes #2932.
|
|
"Image" was a bit too vague, "ImageWidget" is obviously a widget of
some sort.
|
|
The home-directory icon now shows up in the FileManager title bar,
and alongside the path in the location textbox. Very nice. :^)
|
|
GUI::FileSystemModel can now be told to display (or not display) files
whose name start with a dot (other than . and ..)
|
|
Use this instead of disabling the name TextBox. This looks a little bit
nicer than the grayed-out appearance. :^)
|
|
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.
|
|
changing view
Ctrl-L focuses the location bar in all file managers I know of,
and does so in SerenityOS's browser too. It should work in
SerenityOS's file manager as well.
Unfortunately, Ctrl-L was already "View List", so change the
shortcuts of all the view modes to Ctrl-1/2/3 which is what
several other file managers use. (I tried Ctrl-Shift-1/2/3
which is what Windows Explorer uses after 8.1, but it didn't
Just Work, and Ctrl-1/2/3 are currently free anyways. If
we ever want to use them for tabs or whatever, we can
change the view shortcuts then.)
|
|
Also assert indexes are valid in a few more places.
Finally fixes https://github.com/SerenityOS/serenity/issues/1440 and
https://github.com/SerenityOS/serenity/issues/2787 :^)
|
|
This action was already present when running FileManager in desktop mode, but now it's also available in windowed mode. :)
|
|
By adding a special LauncherType::Application we can still
get meta data for the application, but also know that we should
consider executing that binary as the default action. LaunchServer
will not do this for us, as it should probably not be allowed to
run arbitrary binaries that haven't been registered as handlers.
|
|
|
|
This solves a problem where the SortingProxyModel doesn't
receive the on_update call because other code overwrote
the handler later on.
|
|
Since double-clicking the item would trigger the "Open in Text Editor"
action, specify it as the default action when displaying the
context menu.
|
|
The currently selected directory now displays an open folder icon
in the directory tree.
|
|
In keeping with the slightly-higher-contrast theme.
|
|
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.
|
|
Currently it's only available in the context menu, which isn't quite
obvious.
|
|
|
|
It's less code, and it's potentially more efficient once
posix_spawn is a real syscall.
|
|
The apply button used to be enabled directly after opening the dialog.
Changes in the permissions now enable/disable the apply button as well.
|
|
|
|
|
|
.. and make travis run it.
I renamed check-license-headers.sh to check-style.sh and expanded it so
that it now also checks for the presence of "#pragma once" in .h files.
It also checks the presence of a (single) blank line above and below the
"#pragma once" line.
I also added "#pragma once" to all the files that need it: even the ones
we are not check.
I also added/removed blank lines in order to make the script not fail.
I also ran clang-format on the files I modified.
|
|
And move canonicalized_path() to a static method on LexicalPath.
This is to make it clear that FileSystemPath/canonicalized_path() only
perform *lexical* canonicalization.
|
|
* In some cases, we can first call sigaction()/signal(), then *not* pledge
sigaction.
* In other cases, we pledge sigaction at first, call sigaction()/signal()
second, then pledge again, this time without sigaction.
* In yet other cases, we keep the sigaction pledge. I suppose these could all be
migrated to drop it or not pledge it at all, if somebody is interested in
doing that.
|
|
|
|
|
|
We will now actually use MIME types for clipboard. The default type is now
"text/plain" (instead of just "text").
This also fixes some issues in copy(1) and paste(1).
|
|
This commit moves the clipboard from WindowServer into a new Clipboard
service program. Clipboard runs as the unprivileged "clipboard" user
and with a much tighter pledge than WindowServer.
To keep things working as before, all GUI::Application users now make
a connection to Clipboard after making the connection to WindowServer.
It could be interesting to connect to Clipboard on demand, but right
now that would necessitate expanding every GUI app's pledge to include
"unix" and also unveiling the clipboard portal, which I prefer not to.
|
|
Closes https://github.com/SerenityOS/serenity/issues/2080
|
|
This will allow you us to implement special behavior when Ctrl+clicking
a button.
|
|
Moves DirectoryServices out of LibCore (because we need to link with
LibIPC), renames it Desktop::Launcher (because Desktop::DesktopServices
doesn't scan right) and ports it to use the LaunchServer which is now
responsible for starting programs for a file.
|
|
|
|
|
|
|
|
It's perfectly valid for a file to be owned by a UID or GID with no
corresponding entry in /etc/passwd or /etc/group respectively.
Fixes #1988.
|
|
|
|
TextBox already handles well its disabled state so it's no use to have a
way to prevent it from PropertiesDialog, too.
|
|
|
|
The FileManager PropertiesDialog always let the user change the name of
files and folders to then be prompted with write permissions error.
Now it checks for write permissions on the containing folder so it can
"disable" the TextBox input. We can't really disable TextBox right now,
hence the quotes.
|