mirror of
https://github.com/flatpak/flatpak.git
synced 2026-01-26 14:13:26 +00:00
config: Support setting sideload-repos option
This commit is contained in:
parent
bea879c0d0
commit
1d1819840e
@ -199,6 +199,18 @@ get_lang_default (FlatpakDir *dir)
|
||||
return g_strjoinv (";", langs);
|
||||
}
|
||||
|
||||
static char *
|
||||
parse_string (const char *value, GError **error)
|
||||
{
|
||||
return g_strdup (value);
|
||||
}
|
||||
|
||||
static char *
|
||||
print_string (const char *value)
|
||||
{
|
||||
return g_strdup (value);
|
||||
}
|
||||
|
||||
typedef struct
|
||||
{
|
||||
const char *name;
|
||||
@ -210,6 +222,7 @@ typedef struct
|
||||
ConfigKey keys[] = {
|
||||
{ "languages", parse_lang, print_lang, get_lang_default },
|
||||
{ "extra-languages", parse_locale, print_locale, NULL },
|
||||
{ "sideload-repos", parse_string, print_string, NULL },
|
||||
};
|
||||
|
||||
static ConfigKey *
|
||||
|
||||
@ -1138,7 +1138,9 @@ handle_configure (FlatpakSystemHelper *object,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if ((strcmp (arg_key, "languages") != 0) && (strcmp (arg_key, "extra-languages") != 0))
|
||||
if ((strcmp (arg_key, "languages") != 0) &&
|
||||
(strcmp (arg_key, "extra-languages") != 0) &&
|
||||
(strcmp (arg_key, "sideload-repos") != 0))
|
||||
{
|
||||
g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS,
|
||||
"Unsupported key: %s", arg_key);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user