platform/upstream/glib.git
13 years agoGVariant docs: be clear that the serialisation format isn't the same as D-Bus
Simon McVittie [Wed, 13 Oct 2010 11:21:22 +0000 (12:21 +0100)]
GVariant docs: be clear that the serialisation format isn't the same as D-Bus

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=632049
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Ryan Lortie <desrt@desrt.ca>
13 years agoBe clear that g_str_hash etc. don't accept NULL
Simon McVittie [Tue, 4 Oct 2011 08:48:35 +0000 (09:48 +0100)]
Be clear that g_str_hash etc. don't accept NULL

This covers the str, double, int, int64 hash and equal functions, but not
anything that takes an "object", since the convention is that "object
methods" never accept NULL anyway.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=592715
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Colin Walters <walters@verbum.org>
13 years agoBe completely clear about what g_direct_hash, g_direct_equal do
Simon McVittie [Tue, 4 Oct 2011 08:44:27 +0000 (09:44 +0100)]
Be completely clear about what g_direct_hash, g_direct_equal do

Also annotate them as (allow-none), more for the benefit of gtk-doc
readers than introspection.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=592715
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Colin Walters <walters@verbum.org>
13 years agoGHashTable: be more clear what g_int_hash wants
Simon McVittie [Tue, 4 Oct 2011 08:42:28 +0000 (09:42 +0100)]
GHashTable: be more clear what g_int_hash wants

Using g_int_hash, g_int_equal with keys like GINT_TO_POINTER (n) seems to
be a reasonably common GLib-novice mistake. It doesn't help that the
documentation for GHashFunc was ambiguous about this.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=592715
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Colin Walters <walters@verbum.org>
13 years agoWarn when classes/instances exceed the allowed size, if possible
Simon McVittie [Mon, 3 Oct 2011 17:48:15 +0000 (18:48 +0100)]
Warn when classes/instances exceed the allowed size, if possible

It's impossible to check this if the library user is using
g_type_register_static, but in that case their compiler should hopefully
warn about the truncation. This fixes it for G_DEFINE_TYPE and friends,
at least.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=659916
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Colin Walters <walters@verbum.org>
13 years agoUpdate glibconfig.h.win32(.in)
Chun-wei Fan [Tue, 4 Oct 2011 06:06:10 +0000 (14:06 +0800)]
Update glibconfig.h.win32(.in)

Update typedef of GStaticMutex here to match the typedef of GMutex
in glib/gthread.h (due to commit c5634df6)

13 years agoImprove test coverage in the thread tests
Matthias Clasen [Tue, 4 Oct 2011 04:46:10 +0000 (00:46 -0400)]
Improve test coverage in the thread tests

Use g_thread_new_full() in some places.

13 years agoImprove test coverage in the GString tests
Matthias Clasen [Tue, 4 Oct 2011 04:45:42 +0000 (00:45 -0400)]
Improve test coverage in the GString tests

13 years agoImprove testcoverage in the rec-mutex test
Matthias Clasen [Tue, 4 Oct 2011 04:44:58 +0000 (00:44 -0400)]
Improve testcoverage in the rec-mutex test

Test g_rec_mutex_trylock() in both locked and unlocked cases.

13 years agoAdd a few more tests
Matthias Clasen [Tue, 4 Oct 2011 03:55:02 +0000 (23:55 -0400)]
Add a few more tests

This brings test coverage for glist.c and glist.c to the
coveted 100% lines mark.

13 years agoRemove bits of dead code identified by coverage tests
Matthias Clasen [Tue, 4 Oct 2011 03:54:08 +0000 (23:54 -0400)]
Remove bits of dead code identified by coverage tests

These lines could were not hit by our tests, and examination
of the code reveals that they can't ever be hit.

13 years agoAdd some more thread tests
Matthias Clasen [Tue, 4 Oct 2011 02:22:55 +0000 (22:22 -0400)]
Add some more thread tests

13 years agoGAsyncQueue: properly set free function
Ryan Lortie [Tue, 4 Oct 2011 02:18:01 +0000 (22:18 -0400)]
GAsyncQueue: properly set free function

The copying of code from g_async_queue_new() to g_async_queue_new_full()
in ef08aa786bca87c520ef319b97df4b3ed0782233 copied the setting of the
free function to NULL (instead of the one passed in by the user).

Fix that up so that the test passes again.

https://bugzilla.gnome.org/show_bug.cgi?id=660843

13 years agoGUnixMountPoint: expose options
David Zeuthen [Fri, 30 Sep 2011 03:46:28 +0000 (23:46 -0400)]
GUnixMountPoint: expose options

Make the options from an /etc/fstab entry available as public API -
this can be used to support options such as

 comment=gvfs.name=Foo\040Bar

to e.g. set the name of an fstab mount in the UI to "Foo Bar".

https://bugzilla.gnome.org/show_bug.cgi?id=660536

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoRevert "GSettings: don't abort on missing schemas"
Ryan Lortie [Mon, 3 Oct 2011 14:19:14 +0000 (10:19 -0400)]
Revert "GSettings: don't abort on missing schemas"

This reverts commit c841c2ce3fda6f754c88ae2c9099f36dff2f0814.

This approach has been an unmitigated disaster.  We're getting all sorts
of crashes due to functions that are returning NULL because they can't
find the schema for the default value.  The people who get these crashes
are then confused about the root cause of the problem and waste a lot of
time trying to figure it out.

Until we find a better solution, we should go back to what we had
before.

https://bugzilla.gnome.org/show_bug.cgi?id=655366

13 years agoCosmetics
Matthias Clasen [Mon, 3 Oct 2011 03:53:56 +0000 (23:53 -0400)]
Cosmetics

13 years agoDocumentation fixes
Matthias Clasen [Mon, 3 Oct 2011 03:43:17 +0000 (23:43 -0400)]
Documentation fixes

13 years agoFix doc build
Matthias Clasen [Mon, 3 Oct 2011 02:38:49 +0000 (22:38 -0400)]
Fix doc build

The markup here was not only broken, it was also unnecessary,
since gtk-doc knows to apply <function></function> tags to things
that end with () already.

13 years agolocks: Add initialisation notes
Ryan Lortie [Mon, 3 Oct 2011 03:37:20 +0000 (23:37 -0400)]
locks: Add initialisation notes

For each of the 4, mention that static storage or _init() is needed.

13 years agolocks: change the ABI just a bit
Ryan Lortie [Mon, 3 Oct 2011 00:59:15 +0000 (20:59 -0400)]
locks: change the ABI just a bit

Add a little bit more room in the ABI for our synchronisation primatives
since we're going to need it when we add native implementations on
Linux.

Also: rename the pointer field and add /*< private >*/ annotations.

13 years agolocks: drop _INIT macros
Ryan Lortie [Mon, 3 Oct 2011 00:51:38 +0000 (20:51 -0400)]
locks: drop _INIT macros

All locks are now zero-initialised, so we can drop the G_*_INIT macros
for them.

Adjust various users around GLib accordingly and change the docs.

https://bugzilla.gnome.org/show_bug.cgi?id=659866

13 years agoRe-enable 'include' testcase
Ryan Lortie [Mon, 3 Oct 2011 01:03:49 +0000 (21:03 -0400)]
Re-enable 'include' testcase

The bug is fixed now.

https://bugzilla.gnome.org/show_bug.cgi?id=659866

13 years agoGThread posix: switch to Windows ABI
Ryan Lortie [Mon, 3 Oct 2011 00:43:28 +0000 (20:43 -0400)]
GThread posix: switch to Windows ABI

Modify the POSIX implementation of the synchronisation primatives to use
the same ABI as Windows: one pointer for each type.

This frees us from having to #include <pthread.h> and avoids the problem
with pthread_rwlock_t not being defined under certain compiler defines.

A few more changes are expected to the ABI -- they will be committed
separately.

https://bugzilla.gnome.org/show_bug.cgi?id=659866

13 years agoDon't use g_thread_foreach in tests
Matthias Clasen [Mon, 3 Oct 2011 02:31:45 +0000 (22:31 -0400)]
Don't use g_thread_foreach in tests

13 years agoDeprecate GStaticPrivate and g_thread_foreach
Matthias Clasen [Sun, 2 Oct 2011 05:29:08 +0000 (01:29 -0400)]
Deprecate GStaticPrivate and g_thread_foreach

This commit moves GStaticPrivate, g_thread_foreach and all
related functions and variables to gthread-deprecated.c. We
introduce some internal API to make this possible.

g_thread_foreach is not a very useful function, since there is
virtually nothing you can do with a GThread*, and implementing
it requires us to keep a list of threads around.

GStaticPrivate has been made redundant by adding comparable
capabilities to GPrivate.

https://bugzilla.gnome.org/show_bug.cgi?id=660635

13 years agoDon't put threads created with g_thread_new() on the list
Matthias Clasen [Sun, 2 Oct 2011 13:51:13 +0000 (09:51 -0400)]
Don't put threads created with g_thread_new() on the list

This lets us avoid the overhead of maintaining the global
list in the non-deprecated case.

https://bugzilla.gnome.org/show_bug.cgi?id=660635

13 years agoMake thread names useful in a debugger
Matthias Clasen [Sun, 2 Oct 2011 13:27:08 +0000 (09:27 -0400)]
Make thread names useful in a debugger

Associate the name with the system thread, so that debuggers
can see it. This is currently only implemented for Linux, using
prctl.

https://bugzilla.gnome.org/show_bug.cgi?id=660635

13 years agoAdd new thread creation API
Matthias Clasen [Sun, 2 Oct 2011 14:01:57 +0000 (10:01 -0400)]
Add new thread creation API

Deprecate both g_thread_create functions and add
g_thread_new() and g_thread_new_full(). The new functions
expect a name for the thread.

Change GThreadPool, GMainContext and GDBus to create named threads.

https://bugzilla.gnome.org/show_bug.cgi?id=660635

13 years agoDefine GLIB_COMPILATION when building libgthread.so
Matthias Clasen [Mon, 3 Oct 2011 01:57:06 +0000 (21:57 -0400)]
Define GLIB_COMPILATION when building libgthread.so

This is necessary, because gthreadprivate.h can only be
included inside GLib, otherwise single-include guards trigger.

13 years agoReplace static privates by privates
Matthias Clasen [Mon, 3 Oct 2011 01:57:40 +0000 (21:57 -0400)]
Replace static privates by privates

GStaticPrivate is heading for deprecation soon, and GPrivate
can replace these uses now.

13 years agowin32: fix GPrivate fallout
Ryan Lortie [Mon, 3 Oct 2011 01:13:14 +0000 (21:13 -0400)]
win32: fix GPrivate fallout

Fix minor mistake in win32 GPrivate code.

13 years agolocks: rename a bunch of parameters
Ryan Lortie [Mon, 3 Oct 2011 00:24:18 +0000 (20:24 -0400)]
locks: rename a bunch of parameters

13 years agoStop dithering over GPrivate
Ryan Lortie [Fri, 30 Sep 2011 18:22:04 +0000 (14:22 -0400)]
Stop dithering over GPrivate

Take out the half-private g_private_init() stuff and replace it with a
G_PRIVATE_INIT macro that allows specifying a GDestroyNotify.

Expose the GPrivate structure in a public header.

Add a g_private_replace() to (sort of) match the functionality of
g_static_mutex_set().

Improve the documentation.

Deprecate g_private_new().

13 years agoAdd a few comments
Matthias Clasen [Sun, 2 Oct 2011 23:10:16 +0000 (19:10 -0400)]
Add a few comments

13 years agoAdd another GCond test
Matthias Clasen [Sun, 2 Oct 2011 23:09:24 +0000 (19:09 -0400)]
Add another GCond test

This test shows how to implement a barrier using a GCond.

13 years agoRework the way GStaticPrivate data is freed
Matthias Clasen [Sun, 2 Oct 2011 05:21:46 +0000 (01:21 -0400)]
Rework the way GStaticPrivate data is freed

To avoid iterating threads in g_static_private_free(), defer freeing
the per-thread data to thread exit. The one complication here is
that it is possible for the static private index to be reused while
'old' data is still around. To deal with that case, store the 'owner'
with each per-thread data node, and free old data in
g_static_private_get() if the owner doesn't match. The remaining
possibility that a private index could be reused by a GStaticPrivate
with the same address is sufficiently unlikely that we can probably
ignore it.

With this change, per-thread data is now truly private again,
and we can drop the lock for it as well.

https://bugzilla.gnome.org/show_bug.cgi?id=660635

13 years agoWhitespace fixes
Matthias Clasen [Sun, 2 Oct 2011 13:59:26 +0000 (09:59 -0400)]
Whitespace fixes

13 years agoClean up includes
Matthias Clasen [Sun, 2 Oct 2011 21:05:03 +0000 (17:05 -0400)]
Clean up includes

13 years agoAdd tests for GPrivate and GStaticPrivate
Matthias Clasen [Sun, 2 Oct 2011 20:48:17 +0000 (16:48 -0400)]
Add tests for GPrivate and GStaticPrivate

13 years agotests: Use G_VALUE_INIT
Javier Jardón [Fri, 30 Sep 2011 16:21:52 +0000 (17:21 +0100)]
tests: Use G_VALUE_INIT

13 years agodocs: Use G_VALUE_INIT
Javier Jardón [Fri, 30 Sep 2011 16:04:23 +0000 (17:04 +0100)]
docs: Use G_VALUE_INIT

13 years agomutex testcase: add a performance test
Ryan Lortie [Sat, 1 Oct 2011 03:05:27 +0000 (23:05 -0400)]
mutex testcase: add a performance test

Add a reasonable performance test for uncontended and contended cases.

13 years agoMove all hash functions to ghash.c
Matthias Clasen [Sun, 2 Oct 2011 04:08:54 +0000 (00:08 -0400)]
Move all hash functions to ghash.c

This matches their location in the headers.

13 years agoGHash: Cosmetic changes
Matthias Clasen [Sun, 2 Oct 2011 04:08:13 +0000 (00:08 -0400)]
GHash: Cosmetic changes

13 years agoOne forgotten moved doc
Matthias Clasen [Sun, 2 Oct 2011 03:38:52 +0000 (23:38 -0400)]
One forgotten moved doc

13 years agoMove GStringChunk into its own files
Matthias Clasen [Sun, 2 Oct 2011 03:38:23 +0000 (23:38 -0400)]
Move GStringChunk into its own files

13 years agoMove GString docs inline
Matthias Clasen [Sun, 2 Oct 2011 03:27:45 +0000 (23:27 -0400)]
Move GString docs inline

13 years agoGString: cosmetic cleanups
Matthias Clasen [Sun, 2 Oct 2011 03:23:40 +0000 (23:23 -0400)]
GString: cosmetic cleanups

13 years agoMove file utility docs inline
Matthias Clasen [Sun, 2 Oct 2011 03:03:09 +0000 (23:03 -0400)]
Move file utility docs inline

13 years agoMove string utility docs inline
Matthias Clasen [Sun, 2 Oct 2011 02:48:27 +0000 (22:48 -0400)]
Move string utility docs inline

13 years agoMove test docs inline
Matthias Clasen [Sun, 2 Oct 2011 02:00:41 +0000 (22:00 -0400)]
Move test docs inline

13 years agoMove keyfile docs inline
Matthias Clasen [Sun, 2 Oct 2011 01:03:14 +0000 (21:03 -0400)]
Move keyfile docs inline

13 years agoGAsyncQueue: simplify an internal function
Matthias Clasen [Sun, 2 Oct 2011 00:16:32 +0000 (20:16 -0400)]
GAsyncQueue: simplify an internal function

g_cond_timed_wait() behaves like g_cond_wait() when given
NULL, so no need have different branches for that in
g_async_queue_pop_intern_unlocked().

13 years agoGAsyncQueue: internal cleanup
Matthias Clasen [Sun, 2 Oct 2011 00:11:38 +0000 (20:11 -0400)]
GAsyncQueue: internal cleanup

Turn the 'try' parameter of g_async_queue_pop_intern_unlocked
into a 'wait', for better alignment with the GCond api.

13 years agoGAsyncQueue: embed the GCond
Matthias Clasen [Sun, 2 Oct 2011 00:09:35 +0000 (20:09 -0400)]
GAsyncQueue: embed the GCond

Use g_cond_init/clear, now that we have them.

13 years agoGAsyncQueue: Cosmetic fixes
Matthias Clasen [Sat, 1 Oct 2011 23:24:24 +0000 (19:24 -0400)]
GAsyncQueue: Cosmetic fixes

Mostly doc formatting and whitespace fixes.

13 years agoGAsyncQueue: Move private API to a private header
Matthias Clasen [Sat, 1 Oct 2011 22:42:48 +0000 (18:42 -0400)]
GAsyncQueue: Move private API to a private header

13 years agoGThreadPool: cosmetic cleanups
Matthias Clasen [Sat, 1 Oct 2011 22:20:27 +0000 (18:20 -0400)]
GThreadPool: cosmetic cleanups

Mostly documentation and formatting trivial, but also add
boolean return types to GError taking functions.

13 years agoGThread: cosmetic fix
Matthias Clasen [Sat, 1 Oct 2011 22:43:15 +0000 (18:43 -0400)]
GThread: cosmetic fix

Explicitly include gthread.h, don't rely on gthreadprivate.h
to pull it in.

13 years agoUpdated Vietnamese translation
Nguyễn Thái Ngọc Duy [Sun, 2 Oct 2011 00:21:18 +0000 (11:21 +1100)]
Updated Vietnamese translation

13 years agopo/vi: import from Damned Lies
Nguyễn Thái Ngọc Duy [Sun, 2 Oct 2011 00:08:49 +0000 (11:08 +1100)]
po/vi: import from Damned Lies

13 years agoAdd an index for 2.32 api additions
Matthias Clasen [Sat, 1 Oct 2011 17:47:54 +0000 (13:47 -0400)]
Add an index for 2.32 api additions

13 years agoMark g_thread_create_with_stack_size as new API
Matthias Clasen [Sat, 1 Oct 2011 17:47:09 +0000 (13:47 -0400)]
Mark g_thread_create_with_stack_size as new API

13 years agoGSettings schemas: allow for zero items in schema
Ryan Lortie [Mon, 26 Sep 2011 15:21:55 +0000 (11:21 -0400)]
GSettings schemas: allow for zero items in schema

GVDB deals with empty lists by returning NULL for the list instead of a
zero-length (non-NULL) strv.  We can work around that in GSettingsSchema
by checking for the NULL case and treating it like a zero-length list.

https://bugzilla.gnome.org/show_bug.cgi?id=660147

13 years agoFix URL to strlcpy(3) manpage in comment.
Jasper Lievisse Adriaanse [Sat, 1 Oct 2011 08:46:52 +0000 (10:46 +0200)]
Fix URL to strlcpy(3) manpage in comment.

13 years agomarkup-subparser test: use a real GError domain
Simon McVittie [Thu, 29 Sep 2011 14:42:47 +0000 (15:42 +0100)]
markup-subparser test: use a real GError domain

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Matthias Clasen <mclasen@redhat.com>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=660371

13 years agosleepy-stream test: use a real GError domain
Simon McVittie [Thu, 29 Sep 2011 14:42:33 +0000 (15:42 +0100)]
sleepy-stream test: use a real GError domain

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Matthias Clasen <mclasen@redhat.com>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=660371

13 years agog_dbus_error_encode_gerror: don't segfault on bad domains
Simon McVittie [Thu, 29 Sep 2011 12:57:09 +0000 (13:57 +0100)]
g_dbus_error_encode_gerror: don't segfault on bad domains

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Matthias Clasen <mclasen@redhat.com>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=660371

13 years agoPrevent data loss in gdesktopappinfo.c
Matthias Clasen [Fri, 30 Sep 2011 03:32:20 +0000 (23:32 -0400)]
Prevent data loss in gdesktopappinfo.c

Don't loose the content of mimeapps.list when it doesn't contain
a [Added Associations] group. Pointed out by Alexander Larsson.

https://bugzilla.gnome.org/show_bug.cgi?id=660130

13 years agoClean up atomic cruft
Matthias Clasen [Fri, 30 Sep 2011 03:13:49 +0000 (23:13 -0400)]
Clean up atomic cruft

Nothing is using these defines anymore, and the messages
are misleading. Based on a patch by Kean Johnston.

https://bugzilla.gnome.org/show_bug.cgi?id=660013

13 years agoSome more gthread reshuffling
Matthias Clasen [Sun, 25 Sep 2011 05:51:33 +0000 (01:51 -0400)]
Some more gthread reshuffling

13 years agoGUnixFileMonitor: Clean up /proc/mounts monitoring
David Zeuthen [Thu, 29 Sep 2011 19:49:09 +0000 (15:49 -0400)]
GUnixFileMonitor: Clean up /proc/mounts monitoring

Most suggestions from Colin Walters <walters@verbum.org>.

https://bugzilla.gnome.org/show_bug.cgi?id=660511

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agoGUnixFileMonitor: Use /proc/mounts for monitoring mount changes
David Zeuthen [Thu, 29 Sep 2011 19:09:43 +0000 (15:09 -0400)]
GUnixFileMonitor: Use /proc/mounts for monitoring mount changes

On recent Linux distros /etc/mtab is just a symlink to /proc/mounts
and GFileMonitor does not work there because of how the kernel conveys
that the file changes.

https://bugzilla.gnome.org/show_bug.cgi?id=660511

Signed-off-by: David Zeuthen <davidz@redhat.com>
13 years agogfile: Be clear about freeing GFile objects
Javier Jardón [Thu, 29 Sep 2011 19:00:16 +0000 (20:00 +0100)]
gfile: Be clear about freeing GFile objects

13 years agogthread: remove a stray reference to GStaticMutex
Dan Winship [Thu, 29 Sep 2011 13:58:57 +0000 (09:58 -0400)]
gthread: remove a stray reference to GStaticMutex

13 years agoUpdated Esperanto translation
Tiffany Antopolski [Thu, 29 Sep 2011 04:24:55 +0000 (06:24 +0200)]
Updated Esperanto translation

13 years agoupdate .gitignores
Dan Winship [Wed, 28 Sep 2011 16:18:10 +0000 (12:18 -0400)]
update .gitignores

13 years agotests: add signal marshalling return tests for int/uint
Dan Williams [Tue, 27 Sep 2011 00:51:42 +0000 (19:51 -0500)]
tests: add signal marshalling return tests for int/uint

https://bugzilla.gnome.org/show_bug.cgi?id=659881

13 years agotests: fix generic closure marshalling tests
Dan Williams [Mon, 26 Sep 2011 18:07:51 +0000 (13:07 -0500)]
tests: fix generic closure marshalling tests

We're testing enums here, not flags, so we need to make sure
we're trying to send enums through the marshalling.

https://bugzilla.gnome.org/show_bug.cgi?id=659881

13 years agotests: Add some return value torture testcases for the generic marshaller
Dan Williams [Fri, 23 Sep 2011 16:36:35 +0000 (11:36 -0500)]
tests: Add some return value torture testcases for the generic marshaller

Ensure that ENUM types are properly marshalled back from libffi types
to glib types, which was failing on ppc64.

https://bugzilla.gnome.org/show_bug.cgi?id=659881

13 years agoAdd thread-safety warnings to the g_setenv() and g_unsetenv() docs
Dan Winship [Mon, 26 Sep 2011 18:17:43 +0000 (14:17 -0400)]
Add thread-safety warnings to the g_setenv() and g_unsetenv() docs

https://bugzilla.gnome.org/show_bug.cgi?id=659326

13 years agoGDesktopAppInfo: simplify how defaults work
Ryan Lortie [Mon, 26 Sep 2011 07:56:22 +0000 (03:56 -0400)]
GDesktopAppInfo: simplify how defaults work

Previously, we took the default application for a particular mimetype
from the system and copied it into the user's configuration as the
default there.

Instead of doing that we leave the user's default unset, and at time of
use, if the user has no explicitly-set default value, we use the system
default.

This avoids complicated situations where inappropriate applications were
being set as the default in the user's configuration.

https://bugzilla.gnome.org/show_bug.cgi?id=658188

13 years agoAdd another mimeapps test
Edward Sheldrake [Wed, 21 Sep 2011 18:14:50 +0000 (19:14 +0100)]
Add another mimeapps test

This tests the interaction between mimeinfo.cache, defaults.list and
mimeapps.list to ensure g_app_info_set_as_last_used_for_type doesn't
incorrectly change the default.

https://bugzilla.gnome.org/show_bug.cgi?id=658188

13 years agog_simple_async_result_complete_in_idle: add a minor doc clarification
Dan Winship [Mon, 26 Sep 2011 16:42:23 +0000 (12:42 -0400)]
g_simple_async_result_complete_in_idle: add a minor doc clarification

13 years agoglib tests: Compile new thread tests on win32
Ryan Lortie [Mon, 26 Sep 2011 13:05:53 +0000 (09:05 -0400)]
glib tests: Compile new thread tests on win32

They accidentally got added inside of a 'if OS_UNIX'.  Move them out.

13 years agowinxp threads: detect SRWLock emulation reentrancy
Ryan Lortie [Mon, 26 Sep 2011 08:44:41 +0000 (04:44 -0400)]
winxp threads: detect SRWLock emulation reentrancy

We lack SRWLock on Windows XP, so we use CRITICAL_SECTION to emulate it
there.  SRWLock is non-recursive, but CRITICAL_SECTION will happily
allow itself to be acquired multiple times by the same thread.

We need to detect if our second acquire succeeded because of the
recursive nature of CRITICAL_SECTION.  In the case of a _lock()
operation, we would normally have deadlocked, so abort.  In the case of
a _trylock() operation, we need to ensure that FALSE is properly
returned.

Problem caught by Matthias Clasen and Chun-wei Fan.

https://bugzilla.gnome.org/show_bug.cgi?id=660096

13 years ago[l10n]Updated Catalan (Valencian) translation
Carles Ferrando [Mon, 26 Sep 2011 12:40:23 +0000 (14:40 +0200)]
[l10n]Updated Catalan (Valencian) translation

13 years agoUpdate Czech translation
Petr Kovar [Sun, 25 Sep 2011 21:35:27 +0000 (23:35 +0200)]
Update Czech translation

13 years ago[l10n]Updated Catalan translation
Gil Forcada [Sun, 25 Sep 2011 21:12:36 +0000 (23:12 +0200)]
[l10n]Updated Catalan translation

13 years agogvariant: Add g_variant_get_fixed_array()
Stef Walter [Fri, 23 Sep 2011 08:57:55 +0000 (10:57 +0200)]
gvariant: Add g_variant_get_fixed_array()

Using g_variant_new_from_data() for creating new byte arrays is non-obvious.
This patch adds a g_variant_new_fixed_array() function.

https://bugzilla.gnome.org/show_bug.cgi?id=659923

13 years agoMore GThread docs tweaks
Matthias Clasen [Sun, 25 Sep 2011 05:32:41 +0000 (01:32 -0400)]
More GThread docs tweaks

13 years agoMove GThread docs around
Matthias Clasen [Sun, 25 Sep 2011 04:53:47 +0000 (00:53 -0400)]
Move GThread docs around

13 years agoMove includes to the top of the file
Matthias Clasen [Sun, 25 Sep 2011 04:42:37 +0000 (00:42 -0400)]
Move includes to the top of the file

13 years agoMove deprecated GThread functions to a separate file
Matthias Clasen [Sun, 25 Sep 2011 04:37:31 +0000 (00:37 -0400)]
Move deprecated GThread functions to a separate file

13 years agoGThread: more doc updates
Matthias Clasen [Sun, 25 Sep 2011 03:40:18 +0000 (23:40 -0400)]
GThread: more doc updates

13 years agoDrop G_THREADS_IMPL_NONE from the docs
Matthias Clasen [Sun, 25 Sep 2011 03:13:55 +0000 (23:13 -0400)]
Drop G_THREADS_IMPL_NONE from the docs

GLib can no longer be built without thread support.

13 years agoFix warning/error C4013 (implicit declarations)
Chun-wei Fan [Fri, 23 Sep 2011 03:27:45 +0000 (11:27 +0800)]
Fix warning/error C4013 (implicit declarations)

-Include gthread.h in gregex.c as g_once_init_enter and g_once_init_leave
 are used.
-Define prototype for g_thread_DllMain in gthreadprivate.h for Windows

13 years agogthread.c: Declare variable at start of block
Chun-wei Fan [Fri, 23 Sep 2011 05:37:08 +0000 (13:37 +0800)]
gthread.c: Declare variable at start of block

This is so that C89 compilers will not complain.

13 years agoDocument G_THREADS_IMPL_WIN32
Matthias Clasen [Sat, 24 Sep 2011 23:04:46 +0000 (19:04 -0400)]
Document G_THREADS_IMPL_WIN32

13 years agoGThread doc additions
Matthias Clasen [Sat, 24 Sep 2011 23:00:19 +0000 (19:00 -0400)]
GThread doc additions