Age | Commit message (Collapse) | Author |
|
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.
|
|
Before this the delete action would be enabled in whenever was the case
in which the user had some selection made. This patch forces a check
to access() with the current folder path to see if the user actually can
delete nodes in it.
|
|
This action is a bit different to the regular paste action because it
takes into account the folder in which the context menu was opened,
so it can be enabled/disabled whether that folder is writable or not for
the current user.
Both paste action use the same logic, now moved to the function
do_action(const GUI::Action&), but in the case of the folder being
right clicked, it pastes inside of it.
|
|
|
|
Now the "New directory..." contextual menu is disabled if the current
user doesn't have enough permissions to create a node in the current
path.
This prevents the user going to the "New Directory" InputBox, writing
an appropriate name and accepting just to find they can't even do it :)
|
|
|
|
Now FileManager will paste the clipboard contents inside a folder if the
paste action was clicked through a folder context menu, being the target
directory the selected folder.
This mimicks most of the behaviours that the different file managers
have.
|
|
FileManager had this weird behaviour in which it would ignore the
current selection and try to copy and delete the current folder.
|
|
|
|
|
|
This mimics the Explorer toolbar container from Windows 2000 and looks
pretty neat! :^)
|
|
|
|
|
|
Kinda hackish, but it does work.
|
|
Only has the option to create a folder, but hey ;^)
|
|
|
|
Co-Authored-By: Andreas Kling <kling@serenityos.org>
|
|
A neat error message is displayed when failing to open a directory!
|
|
This patch adds GUI::Action::create_checkable() helpers that work just
like the existing create() helpers, but the actions become checkable(!)
Clients are no longer required to manage the checked state of their
actions manually, but instead they will be checked/unchecked as needed
by GUI::Action itself before the activation hook is fired.
|