Commit Graph

9003 Commits

Author SHA1 Message Date
William Jon McCann
7bafb3be95 Remove g_desktop_app_info_lookup_get_type symbol from gio.types
It was removed in 9b262f1c5f
2010-10-07 13:51:21 -04:00
Tor Lillqvist
46390c9d10 Don't call close() on -1
Of course, a proper implementation of close() will just ignore an
invalid parameter silently, and set errno. But apparently the "debug"
version of the Microsoft C library generates some noise in this
case. So avoid that. Thanks to John Emmas for reporting.
2010-10-07 12:06:48 +03:00
Yaron Shahrabani
200e3d7307 Updated Hebrew translation. 2010-10-06 02:18:30 +02:00
Bastien Nocera
9b262f1c5f Replace "gio-desktop-app-info-lookup" extension point
With a native version, that looks for desktop items supporting
x-scheme-handler/foo, when looking for a handler for the "foo"
URI scheme handler.

https://bugzilla.gnome.org/show_bug.cgi?id=631410
2010-10-05 17:15:37 +01:00
Ryan Lortie
1612a4d506 volume monitor: don't unref NULL
Fix a couple more cases of blindly calling g_object_unref() on the
result of a function that is documented as sometimes returning NULL.
2010-10-05 02:29:47 -04:00
Ryan Lortie
a7662ef315 GVariant tests: fix bad allignment assumption
One of the GVariant test cases allocates a pair of character arrays on
the stack and then passes them to functions that assume that they will
be aligned to a multiple of two.

This is not the case for some versions of GCC (4.0.3 on PowerPC).
2010-10-05 02:11:22 -04:00
Ryan Lortie
3c5b50c424 GSettings test: fix error match strings
The name of the internal function that appears in an assertion message
has changed.  Update the tests.
2010-10-04 21:07:50 -04:00
Ryan Lortie
c4037230d4 gsettings-tool: Add 'range' subcommand
Provides access to the g_settings_get_range() functionality, converting
its return value to something that's reasonable for printing at the
console and potentially parseable.  The format may change.

Bug #631264.
2010-10-04 03:42:57 -04:00
Ryan Lortie
59bdba3cbb gsettings-tool: implement range-checking
Prevent assertion messages from spewing forth and also ensure that we
exit with an error status in the event that the value was out of range.

Bug #631264.
2010-10-04 03:42:43 -04:00
Ryan Lortie
e740c5b4cd Update symbols and docs sections 2010-10-04 03:36:09 -04:00
Ryan Lortie
e81d856159 GSettings: add g_settings_range_check() API
Checks if a given value is within the correct range for a key.
2010-10-04 03:33:06 -04:00
Ryan Lortie
d6d76783ae Bug 631263 - GSettings needs range/choice APIs
Add g_settings_get_range() to describe the possible values that may be
provided to g_settings_set_value() without causing an error.

Add a test case.
2010-10-04 02:58:46 -04:00
Ryan Lortie
833e389516 schema compiler: Don't store zero-valued flags
Don't store the "none" value for flags into the compiled schema file.
"none" should never appear as a value -- no flags set is indicated by an
empty array.
2010-10-04 02:57:06 -04:00
Ryan Lortie
136e705e83 Bug 627126 - gsettings schemas on FreeBSD
Rewrite the install rule for GSettings schemas to not depend on an
obscure chunk of non-portable sed that nobody understands the purpose
of.

Instead, use make's VPATH feature to resolve the paths of the files that
need to be installed.  No need to depend on the .valid targets here
since automake already ensures that 'make all' is complete before 'make
install' is permitted to run.
2010-10-04 01:51:11 -04:00
Ryan Lortie
8efcc0d8c8 glib-compile-schemas: write strinfo little endian
Ensure that the strinfo is output in little-endian byte order on big
endian machines.

GSettings is now passing all of its tests on PowerPC.

Bug #630968 is closed.
2010-10-03 23:26:18 -04:00
Ryan Lortie
61563d5f55 GSettings strinfo: byteswap integers
strinfo is always strictly little endian, so ensure that we byteswap to
native when comparing and returning.
2010-10-03 23:25:29 -04:00
Ryan Lortie
9211d2b00c GSettings endian: missed a spot
Missed an instance of get_value -> get_raw_value search/replace.
2010-10-03 23:15:27 -04:00
Ryan Lortie
c84441fbb3 GSettings big endian tweaks
GSettings relies on parts of the schema infromation remaining
unbyteswapped (the strinfo database, for example) while requiring other
parts to be in native order (the default value, constraints, etc.).

Lift the byteswapping into a place where we can do it selectively.
2010-10-03 23:04:00 -04:00
Ryan Lortie
73ca8b4754 Merge remote branch 'gvdb/master' 2010-10-03 23:03:12 -04:00
Ryan Lortie
e5e491c969 Add gvdb_table_get_raw_value() API for GSettings 2010-10-03 23:02:45 -04:00
Ryan Lortie
90822327ac GSettings test: fix unsafe GObject properties use
The test case was passing a guint16 to g_object_get() for a guint
property.  That's invalid on all systems, although it works (more or
less) on little endian ones.  On big endian it's a total no-go.
2010-10-03 22:55:53 -04:00
Ryan Lortie
2ce2d587ed GVariant: avoid byteswapping in some cases
Make g_variant_byteswap() merely return a new reference on the given
value in the event that we know that byteswapping will have no effect
(ie: types which have no alignment requirement).

This fixes a somewhat complicated interaction between GVariant,
GSettings and GVDB on big endian machines:  GSettings assumes that it
can unref values returned from GVDB without losing access to the
underlying data.  This only works if the underlying data is in the
mapped file -- not a freshly-allocated buffer that GVariant byteswapped
into.
2010-10-03 22:55:39 -04:00
Ryan Lortie
63adeda086 Merge remote branch 'gvdb/master' 2010-10-03 21:11:17 -04:00
Ryan Lortie
a35852bda3 Fix reader on big endian
Some of the hashtable code was failing to byteswap properly.
2010-10-03 21:10:35 -04:00
Ryan Lortie
cdab385ad9 allow libtool 2.4
It's released now and it seems to work OK.
2010-10-03 20:47:26 -04: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
92974b80fc Bug 618737 - "dispatch to context" functionality
Adds a new function g_main_context_invoke() (and _full() variant).

This function takes a main context, a function and a user_data.  If the
main context is already acquired in the current thread, the function is
invoked directly.  If the main context is the default main context of
the current thread and it can be acquired then the function is invoked
directly while the context is owned.  Otherwise, the function is
scheduled as an idle on the context.
2010-10-03 17:34:16 -04:00
Žygimantas Beručka
63fb3ff774 Updated Lithuanian translation by Aurimas Černius <aurisc4@gmail.com> 2010-10-03 15:45:33 +02:00
Ryan Lortie
2d6f8a8ea4 gsettings-tool: Rewrite
Rewrite the GSettings tool.

Improvements/changes:

 - simplify the code by performing common actions (like creating a
   schema) in only one place instead of one per-command

 - new features (list schemas, list keys, monitor multiple, etc)

 - factor-out bash completion and implement in shellscript

 - input validation: should never abort due to invalid inputs

Still to do:

 - proper error checking for ranges/choices

 - support for querying range/choice information

 - bash completion support for enums

Closes bug #629289, possibly among others.
2010-10-03 02:48:07 -04:00
Ryan Lortie
ed9db23f9a GSettings: implement .property_get('path')
This was unimplemented in g_settings_get_property(), leading to a failed
'g_assert_not_reached()'.
2010-10-03 01:53:09 -04:00
Ryan Lortie
5af11ae4bc Add 'Since:' tags for schema listing APIs 2010-10-02 22:46:53 -04:00
Ryan Lortie
d2c0699440 Clean up g_settings_list_schemas()
In its previous form, g_settings_list_schemas() was not useful as a tool
to prevent aborts due to using g_settings_new() with an invalid schema
name.  This is because g_settings_list_scheams() also listed relocatable
schemas, and calling g_settings_new() for those would abort just the
same as if you called it for a non-existent schema.

Modify g_settings_list_schemas() so that it only returns schemas for
which it is safe to call g_settings_new().  Add another call for sake of
completeness: g_settings_list_relocatable_schemas().
2010-10-02 22:42:02 -04:00
Damyan Ivanov
1fee36f72b Updated Bulgarian translation 2010-10-02 08:57:09 +03:00
Ryan Lortie
ba0e608478 Improve .gitignore 2010-10-01 11:21:17 -04:00
Ryan Lortie
3e771509b4 Bug 628937 - gracefully handle broken schemas
Implement the second feature requested in the bug: silently ignore
override files that attempt to override schemas that are not currently
installed.

Also, support 'strictness' being optional for other errors when parsing
override files (ie: inability to open the file, unknown key name, parse
errors, out of range).  We don't completely back out the file in this
case — as that is difficult with the current implementation — but just
ignore the override for the single key.
2010-10-01 11:21:13 -04:00
Ryan Lortie
bd290081ff glib-compile-schemas: improve error accuracy
We wrote "<enum> must contain at least one <value>" for empty <flags>.
Fix that.
2010-10-01 11:21:07 -04:00
Ryan Lortie
e40f3932dd Bug 628937 - gracefully handle broken schemas
Implement the first of two features requested in the bug: when
encountering a broken .xml schema file, back out the changes in that
file and continue to parse other files.

This prevents a single broken .xml file from messing up GSettings for
everyone else.

Add a --strict option to get the old behaviour.  Use this from the test
cases.
2010-10-01 11:21:02 -04:00
Ryan Lortie
fff6814973 Bug 630077 - GDateTime week number support
Fully implement support for ISO 8601 week dates in GDateTime and
document that this is the case.

Add an exhaustive test case to ensure correctness.
2010-10-01 11:20:55 -04:00
Matthias Clasen
fe1186a842 message_to_write_data_free: Don't unref data->message if it is NULL
After the recent changes to message filtering, it can happen that
data->message is NULL when we get here.
2010-09-30 14:40:50 -04:00
Giannis Katsampirhs
faaa8a9f8a l10n: Updated Greek translation for glib 2010-09-30 14:48:06 +03:00
Piotr Drąg
98a0ce64a3 Updated Polish translation 2010-09-29 18:46:10 +02:00
Colin Walters
755c2dad72 introspection: Fix one annotation syntax 2010-09-29 10:38:59 -04:00
Gabor Kelemen
01735d6cc0 Updated Hungarian translation 2010-09-29 14:07:17 +02:00
Bruno Brouard
38e476ac7d Updated French translation 2010-09-29 09:07:12 +02:00
Petr Kovar
36ba8ffb87 Update Czech translation 2010-09-29 04:41:25 +02:00
Peter Kragelj
e458687fac Updated Slovenian translation 2010-09-28 21:21:38 +02:00
Fran Diéguez
afb6e1b458 Updated Galician translations 2010-09-28 17:35:23 +02:00
Peter Kragelj
339182f575 Updated Slovenian translation 2010-09-28 15:12:00 +02:00
Peter Kragelj
974ab9cfa0 Updated Slovenian translation 2010-09-28 15:10:33 +02:00
Gintautas Miliauskas
e44f695f64 Updated Lithuanian translation (thanks Aurimas Cernius). 2010-09-28 00:12:42 +03:00