summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-07-25 21:51:35 +0200
committerAndreas Kling <kling@serenityos.org>2021-07-26 00:39:10 +0200
commit89ab55b44b0fe0bbc5dfc6e93fde664ed74d8285 (patch)
tree0a37a85a9cf0d8932c375fa40b18753005856021 /Userland
parentc17304a8f6cf7c9c760ce9f911eba815ed90753b (diff)
downloadserenity-89ab55b44b0fe0bbc5dfc6e93fde664ed74d8285.zip
LibDesktop: Add an optional "Description" field to .af files
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibDesktop/AppFile.cpp5
-rw-r--r--Userland/Libraries/LibDesktop/AppFile.h1
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;