1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 22:37:35 +00:00

LibDesktop+Taskbar: Add 'WorkingDirectory' property to app files

This commit is contained in:
cflip 2022-10-15 19:07:21 -06:00 committed by Linus Groh
parent 953520df49
commit 05e7b338ad
3 changed files with 13 additions and 3 deletions

View file

@ -82,6 +82,11 @@ String AppFile::category() const
return m_config->read_entry("App", "Category").trim_whitespace();
}
String AppFile::working_directory() const
{
return m_config->read_entry("App", "WorkingDirectory").trim_whitespace();
}
String AppFile::icon_path() const
{
return m_config->read_entry("App", "IconPath").trim_whitespace();
@ -145,7 +150,7 @@ bool AppFile::spawn() const
if (!is_valid())
return false;
auto pid = Core::Process::spawn(executable());
auto pid = Core::Process::spawn(executable(), Span<String const> {}, working_directory());
if (pid.is_error())
return false;

View file

@ -29,6 +29,7 @@ public:
String executable() const;
String category() const;
String description() const;
String working_directory() const;
String icon_path() const;
GUI::Icon icon() const;
bool run_in_terminal() const;