context: Add way to add custom option group

This will be used by gnome-shell.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
This commit is contained in:
Jonas Ådahl 2021-03-03 13:56:32 +01:00
parent d76743736f
commit ed53dd90f3
2 changed files with 15 additions and 0 deletions

View File

@ -72,6 +72,17 @@ meta_context_add_option_entries (MetaContext *context,
translation_domain); translation_domain);
} }
void
meta_context_add_option_group (MetaContext *context,
GOptionGroup *group)
{
MetaContextPrivate *priv = meta_context_get_instance_private (context);
g_return_if_fail (priv->option_context);
g_option_context_add_group (priv->option_context, group);
}
void void
meta_context_set_plugin_gtype (MetaContext *context, meta_context_set_plugin_gtype (MetaContext *context,
GType plugin_gtype) GType plugin_gtype)

View File

@ -38,6 +38,10 @@ void meta_context_add_option_entries (MetaContext *context,
const GOptionEntry *entries, const GOptionEntry *entries,
const char *translation_domain); const char *translation_domain);
META_EXPORT
void meta_context_add_option_group (MetaContext *context,
GOptionGroup *group);
META_EXPORT META_EXPORT
void meta_context_set_plugin_gtype (MetaContext *context, void meta_context_set_plugin_gtype (MetaContext *context,
GType plugin_gtype); GType plugin_gtype);