mirror of
https://github.com/RGBCube/serenity
synced 2025-05-30 22:38:12 +00:00
FileManager: Open PNG files with QuickShow when activated.
This commit is contained in:
parent
d563dc0565
commit
5ca62f356b
3 changed files with 23 additions and 0 deletions
|
@ -236,6 +236,16 @@ void DirectoryTableModel::activate(const GModelIndex& index)
|
|||
return;
|
||||
}
|
||||
|
||||
if (path.string().ends_with(".png")) {
|
||||
if (fork() == 0) {
|
||||
int rc = execl("/bin/qs", "/bin/qs", path.string().characters(), nullptr);
|
||||
if (rc < 0)
|
||||
perror("exec");
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (fork() == 0) {
|
||||
int rc = execl("/bin/TextEditor", "/bin/TextEditor", path.string().characters(), nullptr);
|
||||
if (rc < 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue