Introduce G_APPLICATION_DEFAULT_FLAGS

Enumeration members should either have the name of the type as their
prefix, or they should all have the same prefix.

The "default flags" enumeration member for GApplicationFlags is
unfortunately named G_APPLICATION_FLAGS_NONE, while every other member
of the same type has a G_APPLICATION prefix. The result is that the nick
name of the enumeration member is "flags-none", and that language
bindings will have to use something like
Gio.ApplicationFlags.FLAGS_NONE.

To fix this API wart, we can deprecate the FLAGS_NONE member, and add a
new DEFAULT_FLAGS.
This commit is contained in:
Emmanuele Bassi
2022-07-24 16:10:33 +01:00
parent 6629948adc
commit 09234b50fe
5 changed files with 18 additions and 13 deletions

View File

@@ -1486,7 +1486,7 @@ g_application_class_init (GApplicationClass *class)
g_param_spec_flags ("flags",
P_("Application flags"),
P_("Flags specifying the behaviour of the application"),
G_TYPE_APPLICATION_FLAGS, G_APPLICATION_FLAGS_NONE,
G_TYPE_APPLICATION_FLAGS, G_APPLICATION_DEFAULT_FLAGS,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class, PROP_RESOURCE_BASE_PATH,