32 G_IMPLEMENT_INTERFACE(fl_settings_get_type(),
35 static FlClockFormat fl_gnome_settings_get_clock_format(FlSettings* settings) {
36 FlGnomeSettings*
self = FL_GNOME_SETTINGS(settings);
40 if (self->interface_settings !=
nullptr) {
41 g_autofree gchar*
value =
51 FlGnomeSettings*
self = FL_GNOME_SETTINGS(settings);
55 if (self->interface_settings !=
nullptr) {
57 g_autofree gchar*
value =
75 FlGnomeSettings*
self = FL_GNOME_SETTINGS(settings);
77 gdouble scaling_factor = 1.0;
79 if (self->interface_settings !=
nullptr) {
80 scaling_factor = g_settings_get_double(self->interface_settings,
83 return scaling_factor;
87 GSettings* settings) {
88 g_return_if_fail(G_IS_SETTINGS(settings));
90 g_signal_connect_object(settings,
"changed::clock-format",
93 g_signal_connect_object(settings,
"changed::gtk-theme",
96 g_signal_connect_object(settings,
"changed::text-scaling-factor",
100 self->interface_settings = G_SETTINGS(g_object_ref(settings));
107 FlGnomeSettings*
self = FL_GNOME_SETTINGS(
object);
111 self, G_SETTINGS(g_value_get_object(
value)));
114 G_OBJECT_WARN_INVALID_PROPERTY_ID(
object,
prop_id,
pspec);
120 FlGnomeSettings*
self = FL_GNOME_SETTINGS(
object);
122 g_clear_object(&self->interface_settings);
124 G_OBJECT_CLASS(fl_gnome_settings_parent_class)->dispose(
object);
128 GObjectClass* object_class = G_OBJECT_CLASS(klass);
132 g_object_class_install_property(
136 g_settings_get_type(),
137 static_cast<GParamFlags
>(G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY |
138 G_PARAM_STATIC_STRINGS)));
142 iface->get_clock_format = fl_gnome_settings_get_clock_format;
152 GSettings* settings =
nullptr;
153 GSettingsSchemaSource* source = g_settings_schema_source_get_default();
154 if (source !=
nullptr) {
155 g_autoptr(GSettingsSchema) schema =
156 g_settings_schema_source_lookup(source, schema_id,
TRUE);
157 if (schema !=
nullptr) {
158 settings = g_settings_new_full(schema,
nullptr,
nullptr);
165 g_autoptr(GSettings) interface_settings =
167 return FL_SETTINGS(g_object_new(fl_gnome_settings_get_type(),