diff options
author | Andreas Kling <kling@serenityos.org> | 2021-07-25 21:51:35 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-07-26 00:39:10 +0200 |
commit | 89ab55b44b0fe0bbc5dfc6e93fde664ed74d8285 (patch) | |
tree | 0a37a85a9cf0d8932c375fa40b18753005856021 /Userland | |
parent | c17304a8f6cf7c9c760ce9f911eba815ed90753b (diff) | |
download | serenity-89ab55b44b0fe0bbc5dfc6e93fde664ed74d8285.zip |
LibDesktop: Add an optional "Description" field to .af files
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibDesktop/AppFile.cpp | 5 | ||||
-rw-r--r-- | Userland/Libraries/LibDesktop/AppFile.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/Userland/Libraries/LibDesktop/AppFile.cpp b/Userland/Libraries/LibDesktop/AppFile.cpp index f97030b78d..17fb52b2ac 100644 --- a/Userland/Libraries/LibDesktop/AppFile.cpp +++ b/Userland/Libraries/LibDesktop/AppFile.cpp @@ -77,6 +77,11 @@ String AppFile::executable() const return executable; } +String AppFile::description() const +{ + return m_config->read_entry("App", "Description").trim_whitespace(); +} + String AppFile::category() const { return m_config->read_entry("App", "Category").trim_whitespace(); diff --git a/Userland/Libraries/LibDesktop/AppFile.h b/Userland/Libraries/LibDesktop/AppFile.h index 1952c0e690..ffcbc5fde9 100644 --- a/Userland/Libraries/LibDesktop/AppFile.h +++ b/Userland/Libraries/LibDesktop/AppFile.h @@ -26,6 +26,7 @@ public: String name() const; String executable() const; String category() const; + String description() const; bool run_in_terminal() const; Vector<String> launcher_file_types() const; Vector<String> launcher_protocols() const; |