2 #include <glib-object.h>
4 void schema_id_literal() {
6 settings
= g_settings_new("org.gnome.evolution-data-server.addressbook");
7 g_object_unref(settings
);
10 #define SELF_UID_PATH_ID "org.gnome.evolution-data-server.addressbook"
11 int schema_id_from_constant() {
13 settings
= g_settings_new(SELF_UID_PATH_ID
);
14 g_object_unref(settings
);
17 void schema_id_autoptr() {
18 g_autoptr(GSettings
) settings
= NULL
;
19 settings
= g_settings_new("org.gnome.evolution.calendar");
22 void schema_id_with_backend() {
24 settings
= g_settings_new_with_backend("org.gnome.evolution-data-server.addressbook", g_settings_backend_get_default());
25 g_object_unref(settings
);
28 void schema_id_with_backend_and_path() {
30 settings
= g_settings_new_with_backend_and_path("org.gnome.seahorse.nautilus.window", g_settings_backend_get_default(), "/org/gnome/seahorse/nautilus/windows/123/");
31 g_object_unref(settings
);
34 void schema_id_with_path() {
36 settings
= g_settings_new_with_path("org.gnome.seahorse.nautilus.window", "/org/gnome/seahorse/nautilus/windows/123/");
37 g_object_unref(settings
);
42 schema_id_from_constant();
44 schema_id_with_backend();
45 schema_id_with_backend_and_path();
46 schema_id_with_path();