Commit Graph

27 Commits

Author SHA1 Message Date
Philip Withnall
5942cd7984 gio: Add SPDX license headers automatically
Add SPDX license (but not copyright) headers to all files which follow a
certain pattern in their existing non-machine-readable header comment.

This commit was entirely generated using the command:
```
git ls-files gio/*.[ch] | xargs perl -0777 -pi -e 's/\n \*\n \* This library is free software; you can redistribute it and\/or\n \* modify it under the terms of the GNU Lesser General Public/\n \*\n \* SPDX-License-Identifier: LGPL-2.1-or-later\n \*\n \* This library is free software; you can redistribute it and\/or\n \* modify it under the terms of the GNU Lesser General Public/igs'
```

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Helps: #1415
2022-05-18 09:18:52 +01:00
Sébastien Wilmet
3bf4a720c3 gio/: LGPLv2+ -> LGPLv2.1+
Sub-directories inside gio/ already processed in a previous commit:
- fam/
- gdbus-2.0/ (which contains only codegen/)
- gvdb/
- inotify/
- tests/
- win32/
- xdgmime/

Other sub-directories inside gio/:
- completion/: no license headers
- kqueue/: not LGPL, BSD-style license

https://bugzilla.gnome.org/show_bug.cgi?id=776504
2017-05-29 19:53:34 +02:00
Ryan Lortie
82fcfeb3b0 GSettingsSchema: add g_settings_schema_list_keys()
The list of keys in a GSettings object depends entirely on the schema,
so it makes sense to expose this API there.

Move the implementation out of gsettings.c and into gsettingsschema.c,
replacing the earlier with a simple call to the new location.

We don't do the same for children because the children can change.

https://bugzilla.gnome.org/show_bug.cgi?id=740308
2015-06-05 15:24:02 -04:00
Lars Uebernickel
6d55189d8c gsettings: add g_settings_schema_list_children
https://bugzilla.gnome.org/show_bug.cgi?id=743517
2015-01-28 18:09:28 +00:00
Lars Uebernickel
d95bb1f08b gsettings: add g_settings_schema_key_get_name
https://bugzilla.gnome.org/show_bug.cgi?id=743517
2015-01-28 18:09:28 +00:00
Daniel Mustieles
078dbda148 Updated FSF's address 2014-01-31 14:31:55 +01:00
Rico Tzschichholz
5ca9bee524 gio: Fix some header/source parameter-naming mismatches 2014-01-22 14:21:41 +01:00
Ryan Lortie
b227528f32 GSettingsSchemaSource: fix parameter name in header
list_schemas() had the parameters called 'recursive' and 'non-recursive'
in the header instead of 'relocatable'.  Fix that.
2013-10-28 20:50:01 -07:00
Ryan Lortie
bcb030a474 GSettingsSchemaKey: add introspection APIs
Add g_settings_schema_has_key() and _get_range(), _range_check(),
_get_value_type(), _get_default_value() methods on GSettingsSchemaKey.

Deprecate the equivalent APIs on GSettings.

https://bugzilla.gnome.org/show_bug.cgi?id=683017
2013-10-28 11:31:48 -07:00
Ryan Lortie
6f386341bd Add g_settings_schema_source_list_schemas()
g_settings_list_schemas() and g_settings_list_relocatable_schemas() are
now deprecated.

This will allow listing off schemas on non-default sources and is a
better fit with the new direction the API is going.

https://bugzilla.gnome.org/show_bug.cgi?id=680838
2013-10-27 17:12:57 -07:00
Ryan Lortie
96a053e025 Add g_settings_schema_key_get_summary/description
Add an API to read the summary and description from the .xml schema
files.

This will be used by dconf-editor and gnome-tweak-tool.

This API is a bit heavy -- it parses the XML and builds a table.  It
also loads gettext domains for translation.  It only does these things
if it is used, however, so it will not impact normal applications.

We store the summary/description in a pair of hash tables on the schema
source (which we have a backref to as of a few commits ago).  We can't
use a global table because people might want to request summary and
description from non-default sources.  We don't want to use per-schema
tables because we'd have to reparse the directory every time (since we
cannot guess which file a schema may have been in).

https://bugzilla.gnome.org/show_bug.cgi?id=668232
2013-10-27 10:42:55 -07:00
Ryan Lortie
84fa07aeb1 Make GSettingsSchemaKey public
Take this private API and make it public along with a boxed type and
ref/unref functions.

Future commits will add accessors with new functionality and some that
allow us to deprecate functions on GSettings itself (such as
g_settings_get_range).

https://bugzilla.gnome.org/show_bug.cgi?id=668232
2013-10-27 10:42:50 -07:00
Martin Ejdestig
4cd7bcaf00 Add missing G_BEGIN/END_DECLS to gsettingsschema.h.
Without this fix, using any of the enclosed functions when building with a
C++ compiler will result in undefined references.

https://bugzilla.gnome.org/show_bug.cgi?id=703478
2013-07-03 09:03:20 -04:00
Ryan Lortie
52c608dd0d gio: GLIB_AVAILABLE_IN to more APIs
Useful on its own, but also for a future patch for symbol visibility.

https://bugzilla.gnome.org/show_bug.cgi?id=688681
2012-11-29 14:07:27 -05:00
Colin Walters
1cc7162c95 Annotate API introduced for 2.32 with GLIB_AVAILABLE_IN_2_32
https://bugzilla.gnome.org/show_bug.cgi?id=676816
2012-05-26 10:13:30 -04:00
Jasper St. Pierre
6339b5fe2d schema source: avoid introspection confusion
Any method that has its prefix'd argument as its first parameter will be
interpreted by introspection as a method. We don't want this, so we need
to swap the first two parameters.
2011-11-17 14:03:39 +00:00
Ryan Lortie
fee2c87ba1 Add g_settings_schema_source_new_from_directory()
It is now possible for plugin loading systems to do the right thing.
2011-11-17 14:03:39 +00:00
Ryan Lortie
269c999463 add boxed types for GSettingSchema{,Source} 2011-11-17 14:03:39 +00:00
Ryan Lortie
48b99017de speak of 'schema id' rather than 'schema name'
Schemas are identified by id='' in the xml file, so we should use the
same language on the C and GObject property APIs.
2011-11-17 14:03:39 +00:00
Ryan Lortie
d5fb032f72 new public header: gsettingsschema.h
Expose some GSettingsSchemaSource and GSettingsSchema APIs.

These are mostly useless so far...
2011-11-17 14:03:39 +00:00
Ryan Lortie
11ef4d7981 rename gsettingsschema.h to -internal.h 2011-11-17 14:03:38 +00:00
Ryan Lortie
577faeae5b unGObjectify GSettingsSchema 2011-11-17 14:03:38 +00:00
Ryan Lortie
597290d5c8 GSettings: major refactor. Add enums, range. 2010-06-16 18:17:53 -04:00
Ryan Lortie
3a062d2e33 GSettings: store (default, options) in gvdb
gvdb just dropped the ability to have a separate "options" field.  We
now store the options into a GVariant along with the default value.

For now, we use a small shim in GSettingsSchema in order not to touch
too much code.  A more complete rewrite will follow.

This represents a change to the schema file format with another likely
to follow.  glib-compile-schemas needs to be re-run after installing
this change.
2010-06-10 13:49:57 -04:00
Ryan Lortie
43a72ce1be GSettingsSchema: add call to get list of keys 2010-04-16 23:21:08 -04:00
Ryan Lortie
04c1eadfff GSettings: more PLT/visibility fixups 2010-04-16 12:02:29 -04:00
Ryan Lortie
2bc8157735 merge GSettingsSchema 2010-04-15 22:30:11 -04:00