LibDesktop: Add support for RequiresRoot option to AppFile
This commit is contained in:
parent
b4456ecdbb
commit
7fc22896ee
Notes:
sideshowbarker
2024-07-17 05:58:32 +09:00
Author: https://github.com/ne0ndrag0n Commit: https://github.com/SerenityOS/serenity/commit/7fc22896ee Pull-request: https://github.com/SerenityOS/serenity/pull/15446 Reviewed-by: https://github.com/ADKaster ✅ Reviewed-by: https://github.com/linusg Reviewed-by: https://github.com/timschumi ✅
2 changed files with 6 additions and 0 deletions
Userland/Libraries/LibDesktop
|
@ -102,6 +102,11 @@ bool AppFile::run_in_terminal() const
|
|||
return m_config->read_bool_entry("App", "RunInTerminal", false);
|
||||
}
|
||||
|
||||
bool AppFile::requires_root() const
|
||||
{
|
||||
return m_config->read_bool_entry("App", "RequiresRoot", false);
|
||||
}
|
||||
|
||||
Vector<String> AppFile::launcher_mime_types() const
|
||||
{
|
||||
Vector<String> mime_types;
|
||||
|
|
|
@ -32,6 +32,7 @@ public:
|
|||
String icon_path() const;
|
||||
GUI::Icon icon() const;
|
||||
bool run_in_terminal() const;
|
||||
bool requires_root() const;
|
||||
Vector<String> launcher_mime_types() const;
|
||||
Vector<String> launcher_file_types() const;
|
||||
Vector<String> launcher_protocols() const;
|
||||
|
|
Loading…
Add table
Reference in a new issue