Commit Graph

23 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
Matthias Clasen
26c8b29ee1 settings: Make the keyfile backend parameterless
Make it possible to instantiate a keyfile settings backend
without specifying parameters, by turning the arguments to
the new() function into construct-only properties. If no
filename is specified, default to
$XDG_CONFIG_HOME/glib-2.0/settings/keyfile
2019-01-20 21:03:35 -05: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
698970f1f7 gsettingsbackend: a minor simplification
Change the order of the arguments on the (internal) keys_changed callback in
GSettingsListenerVTable.

This means that all functions in the table now fit the following signature:

  void (* f) (GObject             *target,
              GSettingsBackend    *backend,
              const gchar         *name_or_path,
              gpointer             origin_tag,
              const gchar * const *names);

allowing the possibility of arguments ignored at the end.

This allows us to simplify our dispatch-to-thread code in GSettingsBackend,
making it a bit less generic.

So far, this should be a straight refactor.

https://bugzilla.gnome.org/show_bug.cgi?id=710367
2014-03-14 09:46:39 -04:00
Daniel Mustieles
078dbda148 Updated FSF's address 2014-01-31 14:31:55 +01:00
Ryan Lortie
84a6e651c2 GSettingsBackend: add read_user_value() API
This will get the 'user' value from the database (ie: the one that the user has
control over).

Provide a default implementation that chains to ->read().  That will work for
all of our internal backends which don't have a concept of layering or
lockdown.

The delayed backend implments "user value" by returning anything that's
in the changeset (incuding an explicit NULL) or chaining up otherwise.

We will use this for g_settings_get_user_value().

https://bugzilla.gnome.org/show_bug.cgi?id=668233
2013-10-28 10:19:49 -07:00
Colin Walters
6f8f1f7097 Remove most use of G_GNUC_INTERNAL
Now that we use an explicit list of symbols to export, the
G_GNUC_INTERNAL is redundant.

https://bugzilla.gnome.org/show_bug.cgi?id=688681
2013-01-18 13:03:28 -05:00
William Hua
69d929e67f Be more precise about Carbon v. Cocoa. 2012-04-11 23:25:09 -04:00
William Hua
9c10083844 GSettings: nextstep settings backend 2012-01-01 19:40:56 -05:00
Christian Persch
8d74c96b76 Make the memory and null settings backends public
Bug #636806.
2011-01-05 20:31:50 +01:00
Ryan Lortie
0bd50b39eb Bug 623400 - acquire context before dispatching
For GSettings.

Use the functionality introduced in the last commit to simplify our
notify dispatching and increase the safety of doing so (by ensuring that
the context is acquired in the current thread for the duration of the
dispatch).

This closes bugs #623400 and #629849.
2010-10-03 17:34:16 -04:00
Ryan Lortie
7b4cbbb7b2 Create GSettingsListenerVTable
...instead of passing a whole whack of function pointers around

This is an internal API.
2010-09-09 16:42:55 -04:00
Ryan Lortie
d5bd531d96 Cleanup the GSettingsBackend API
This is a substantial ABI break.  Rebuild dconf.
2010-07-22 18:39:50 -04:00
Ryan Lortie
6c3ae976e6 Bug 621266 - GSettings "context" clarification
Remove the concept of "context" in favour of dealing with
GSettingsBackend directly.
2010-06-17 14:05:40 -04:00
Ryan Lortie
a8b5353b14 Add g_settings_sync() and use it 2010-06-10 22:30:44 -04:00
Ryan Lortie
61f3f45cb9 add get_permission API to GSettingsBackend
implement it in the various in-tree backends

also, lots of whitespace changes to realign the vtable members
2010-06-05 00:10:05 +02:00
Ryan Lortie
799e0242ae improve thread safety in GDelayedSettingsBackend
- hold a lock while accessing the tree of delayed values
  - use weak reference counts with the owner object to avoid doing
    g_object_notify on a dead object
  - dispatch the "has-unapplied" notify to the proper main context
2010-05-17 07:16:37 -04:00
Ryan Lortie
61219e2640 GSettingsBackend: make signal dispatch threadsafe
This commit fixes up a few race conditions in the GSettingsBackend, mostly with
respect to change notifications occuring at the same time as the last reference
count on a GSettings is dropped.  With GDBus feeding us our incoming signals in
a separate thread, this is something that could easily happen.
2010-05-17 07:16:37 -04:00
Ryan Lortie
984258c662 GSettings: support emitting signals in threads
The thread-default context that was in effect at the time that the
GSettings was created will be used for emitting signals on that
GSettings.
2010-05-17 07:16:37 -04:00
Ryan Lortie
8dddf6499e GSettingsBackend API/ABI change
- add list() virtual method
  - add 'default_value' flag to read() call
2010-04-28 14:41:42 -05:00
Ryan Lortie
04c1eadfff GSettings: more PLT/visibility fixups 2010-04-16 12:02:29 -04:00
Ryan Lortie
c2675af4d7 GSettings: Modify backend API 2010-04-15 18:22:04 -04:00
Ryan Lortie
18ba085d0a merge GSettingsBackend 2010-04-15 14:59:41 -04:00