Commit Graph

11375 Commits

Author SHA1 Message Date
Alexandre Rostovtsev
dc89b51c2d _g_dbus_get_machine_id(): check /etc/machine-id too
machine-id can be in /etc or in /var/lib/dbus.

[amended with slightly revised error handling -smcv]

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=663928
2011-11-17 23:09:50 -05:00
Rico Tzschichholz
8d9f600aea Remove redefinition of typedef 'GSettingsSchemaSource' 2011-11-17 19:46:54 +01:00
Ryan Lortie
99718b9e22 start on the NEWS 2011-11-17 17:40:36 +00:00
Ryan Lortie
7f28529190 g_settings_new_full(): more docs 2011-11-17 17:33:19 +00:00
Ryan Lortie
ee31c7f4ed add plugin example for GSettingsSchemaSource 2011-11-17 14:03:39 +00:00
Ryan Lortie
a4421529b8 Add gtk-doc for gsettingsschema{,source} 2011-11-17 14:03:39 +00:00
Matthias Clasen
011a71cf71 'make dist' fixes 2011-11-17 14:03:39 +00:00
Matthias Clasen
97cf2d78c5 settings-source test: Check returned error as well 2011-11-17 14:03:39 +00:00
Matthias Clasen
a7ce1953fa Trivial typo fix 2011-11-17 14:03:39 +00:00
Jasper St. Pierre
f47264ef5c gsettings: add annotations for _new_full()
The path and backend arguments to g_settings_new_full are optional.
2011-11-17 14:03:39 +00: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
Jasper St. Pierre
bef773408c gsettingsschema: Use the trusted parameter 2011-11-17 14:03:39 +00:00
Ryan Lortie
148f731748 Add test case and fix some bugs
Add the first test case for the schema source functionality and fix a
couple of bugs that got uncovered by that.
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
446eda8c2b Clarify docs/params for 'schema' vs 'schema id'
Clean up our parameter naming and documentation to draw a clearer line
between a schema and its identifier.
2011-11-17 14:03:39 +00:00
Ryan Lortie
1e70072065 Add g_settings_new_full() taking GSettingsSchema 2011-11-17 14:03:39 +00:00
Ryan Lortie
1c8ae819ed GSettings: add 'settings-schema' property
Ideally we'd have called this 'schema', but it is already used.
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
c25a36c920 Drop the 'schema_name' field of GSettings
This is strictly redundant now that we can get the ID from the schema
itself.  Its only other purpose was to get the schema name from the
set_property() call to the constructed() call and we can avoid that by
doing the schema lookup at the time of the property being set.
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
736a286dce GSettings: deprecate 'schema' property
This should have been called 'schema-name'.
2011-11-17 14:03:39 +00:00
Ryan Lortie
3bcf1137f4 drop the now-trivial g_settings_schema_new
Combine it into g_settings_constructed()
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
2633f2903e Add non-aborting g_settings_schema_source_lookup()
And rewrite g_settings_schema_new() in terms of it
2011-11-17 14:03:39 +00:00
Ryan Lortie
bf5626ddc2 GSettingSchemaSource: add refcounting 2011-11-17 14:03:39 +00:00
Ryan Lortie
e01a43b621 GSettingsSchema: use our own linked lists
Switch from GSList for the list of schema sources to using our own
linked list type called GSettingsSchemaSource.
2011-11-17 14:03:39 +00:00
Ryan Lortie
5ec84e8056 GSettingsSchema: alter our 'reverse' technology
Instead of building a reversed linked list by prepending in order and
then reversing it at the end, prepend in reverse by iterating backwards
through the directories (to get a list in-order when we're done).
2011-11-17 14:03:38 +00:00
Ryan Lortie
104f7353a7 move GSettingsSchemaKey to gsettingsschema.c
These functions no longer have anything to do with GSettings itself, so
they should not be in that file anymore.

GSettings still wants direct access to the GSettingsSchemaKey structure,
so put that one in gsettingsschema-internal.h.
2011-11-17 14:03:38 +00:00
Ryan Lortie
53b5918545 GSettingsSchemaKey: store the GSettingsSchema* 2011-11-17 14:03:38 +00:00
Ryan Lortie
54964e22d4 g_settings_schema_key_init: take GSettingsSchema*
instead of of GSettings *
2011-11-17 14:03:38 +00:00
Ryan Lortie
10907cafc3 add internal g_settings_schema_get_name() 2011-11-17 14:03:38 +00:00
Ryan Lortie
e6b4074e41 rename GSettingsKeyInfo to GSettingsSchemaKey 2011-11-17 14:03:38 +00:00
Ryan Lortie
426b146e5f GSettingsKeyInfo: rename field 'key' to 'name' 2011-11-17 14:03:38 +00:00
Ryan Lortie
ca2004fe73 remove GSettings* from GSettingsKeyInfo
This way GSettingsKeyInfo depends strictly on the information in the
schema.  Pass the GSettings* around separately where we need it.
2011-11-17 14:03:38 +00:00
Ryan Lortie
d6c3c2f3c2 store some extra info in GSettingsKeyInfo 2011-11-17 14:03:38 +00:00
Ryan Lortie
f60e0e7242 GSettingsKeyInfo: drop unused variable 2011-11-17 14:03:38 +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
Christian Persch
eaaf18960f Fix the fix for G*_TO_POINTER casts on 32 bits
The 'fix' from commit 16292dd753 broke the
build on 32 bit because it was missing the parentheses around "gint" / "guint"
in glib_gp[u]i_cast.

https://bugzilla.gnome.org/show_bug.cgi?id=661546
2011-11-17 14:24:09 +01:00
Jorge González
affbdd8206 Updated Spanish translation 2011-11-17 14:21:12 +01:00
Daniel Mustieles
6d405f81c2 Updated Spanish translation 2011-11-17 12:36:54 +01:00
Matthias Clasen
9e19b6fe0f Fix doc formatting 2011-11-17 00:01:18 -05:00
Matthias Clasen
1a08591c3a Deal gracefully with NULL log domains 2011-11-16 21:42:28 -05:00
Ryan Lortie
877c0ad5b8 [notify] remove some rather bogus 'inline' use 2011-11-16 17:50:13 +00:00
Ryan Lortie
9253f38a90 [notify] add warning to gobjectnotifyqueue.c
Mention that this file gets installed, so people should probably not
modify it.
2011-11-16 17:50:13 +00:00
Ryan Lortie
ac0ddcf23f [notify] dispatch 'notify' directly if not frozen
Avoid the notify queue in the case that we're not already frozen.
2011-11-16 17:50:13 +00:00
Ryan Lortie
39458748dd [notify] add 'conditional' to _notify_queue_freeze
When the 'conditional' parameter is TRUE, the queue will only be frozen
(ie: have its freeze count increase by one) if it is already frozen.

This will allow us to avoid a freeze-notify-thaw in the case that we
just want to notify on a single property.

Another approach may have been to add an is_frozen() type call and avoid
even increasing the freeze count at all in this case.  Unfortunately,
I'm not totally sure what is the exact expected semantics of
simultaneous notifications in multiple threads and this may interact
badly with someone freezing or thawing in between our check and
emission.
2011-11-16 17:50:13 +00:00
Ryan Lortie
393d4c28b4 [notify] Remove GObjectNotifyContext indirection
This silly abstraction is causing more trouble than it's worth -- just
use the relevant bits directly.
2011-11-16 17:50:13 +00:00
Ryan Lortie
8215fc5f25 [notify] lift some logic out of _notify_queue_add
Lift the check-if-READABLE and redirect-target logic from out of
g_object_notify_queue_add() into its own function, get_notify_pspec().

Use that function at the site of our two calls to
g_object_notify_queue_add().
2011-11-16 17:50:12 +00:00
Ryan Lortie
760037ec46 [notify] remove an obviously false comment 2011-11-16 17:50:12 +00:00