platform/upstream/glib.git
12 years agoconfigure.ac: Use AS_HELP_STRING throughout
Matthias Clasen [Mon, 6 Aug 2012 12:49:30 +0000 (08:49 -0400)]
configure.ac: Use AS_HELP_STRING throughout

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

12 years agogtlscertificate: Don't confuse certificate and public key in docs
Stef Walter [Fri, 3 Aug 2012 19:51:08 +0000 (21:51 +0200)]
gtlscertificate: Don't confuse certificate and public key in docs

 * A certificate sorta acts as a public key, but more specifically
   it contains a public key (in its subjectPublicKeyInfo) field.
 * Documentation was confusing and could have read like the
   certificate and certificate-pem properties were returning the
   public key part of the certificate.

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

12 years agogchecksum: Add g_compute_checksum_for_bytes()
Stef Walter [Tue, 31 Jul 2012 14:47:45 +0000 (16:47 +0200)]
gchecksum: Add g_compute_checksum_for_bytes()

 * Add a GBytes based version of g_compute_checksum_for_data()
 * Add appropriate tests

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

12 years agochecksum: Use functions instead of macros when building tests
Stef Walter [Fri, 3 Aug 2012 16:19:36 +0000 (18:19 +0200)]
checksum: Use functions instead of macros when building tests

 * No need for hard to debug and maintain macros here.

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

12 years agoMake gtk-doc not a hard dependency of GLib
Javier Jardón [Tue, 17 Apr 2012 11:59:11 +0000 (12:59 +0100)]
Make gtk-doc not a hard dependency of GLib

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

12 years agogclosure: do not copy and leak when generically marshalling return value
Mark Nauwelaerts [Wed, 25 Apr 2012 12:21:06 +0000 (14:21 +0200)]
gclosure: do not copy and leak when generically marshalling return value

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

12 years agotests: add check for leaking signal return value
Mark Nauwelaerts [Thu, 19 Jul 2012 14:38:59 +0000 (16:38 +0200)]
tests: add check for leaking signal return value

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

12 years agotests: make refcount signals test slightly valgrind cleaner
Mark Nauwelaerts [Thu, 19 Jul 2012 14:38:06 +0000 (16:38 +0200)]
tests: make refcount signals test slightly valgrind cleaner

12 years agoNEWS updates for 2.33.8
Matthias Clasen [Sat, 4 Aug 2012 21:49:53 +0000 (17:49 -0400)]
NEWS updates for 2.33.8

12 years agodocs: Improve man page consistency
Matthias Clasen [Thu, 2 Aug 2012 22:36:25 +0000 (00:36 +0200)]
docs: Improve man page consistency

Make Options sections refsect1 instead of refsect2, and use
uppercase for argument names. Also add a product name, and
shorten some argument names.

12 years agodocs: Improve man page generation
Matthias Clasen [Thu, 2 Aug 2012 22:33:34 +0000 (00:33 +0200)]
docs: Improve man page generation

Use $(AM_V_GEN) for generating man pages, and set some parameters
for the XSL stylesheets. Among other things, don't generate AUTHORS
and COPYRIGHT sections.

12 years agoRework the man page configury
Matthias Clasen [Thu, 2 Aug 2012 21:52:46 +0000 (23:52 +0200)]
Rework the man page configury

Default to generate man pages if the required tools and
stylesheets are found. Error out if --enable-man is given
but tools or stylesheets are missing.

12 years agodocs: Don't put links in section titles
Matthias Clasen [Thu, 2 Aug 2012 21:51:52 +0000 (23:51 +0200)]
docs: Don't put links in section titles

12 years agogtlscertificate: Add g_tls_certificate_is_same() function
Stef Walter [Wed, 1 Aug 2012 08:41:02 +0000 (10:41 +0200)]
gtlscertificate: Add g_tls_certificate_is_same() function

 * Certificate equality in PKIX in general is equality between
   the DER encoding of the certificates.

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

12 years agogtlsdatabase: Don't complain if no callbacks for async functions
Stef Walter [Wed, 1 Aug 2012 12:22:53 +0000 (14:22 +0200)]
gtlsdatabase: Don't complain if no callbacks for async functions

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

12 years agoUpdated gujarati file
Sweta Kothari [Fri, 3 Aug 2012 08:05:05 +0000 (13:35 +0530)]
Updated gujarati file

12 years agoUpdated gujarati file
Sweta Kothari [Fri, 3 Aug 2012 08:02:12 +0000 (13:32 +0530)]
Updated gujarati file

12 years agoGDBusError: Fix up G_STATIC_ASSERT guidance
David Zeuthen [Wed, 1 Aug 2012 15:57:22 +0000 (11:57 -0400)]
GDBusError: Fix up G_STATIC_ASSERT guidance

This was reported in bug 680994.

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

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agogthreadpool: set default max_unused_threads and max_idle_time values
Dan Winship [Wed, 25 Jul 2012 18:41:04 +0000 (14:41 -0400)]
gthreadpool: set default max_unused_threads and max_idle_time values

GThreadPool defaulted to 0 for max_unused_threads (meaning thread-pool
threads would exit immediately if there was not already another task
waiting for them), and 0 for max_idle_time (meaning unused threads
would linger forever, though this is only relevant if you changed
max_unused_threads).

However, GIOScheduler changed the global defaults to 2 and 15*1000,
respectively, arguing that these were more useful defaults. And they
are, so let's use them.

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

12 years agogmain: allow g_source_get_context() on destroyed sources
Dan Winship [Mon, 30 Jul 2012 12:06:57 +0000 (08:06 -0400)]
gmain: allow g_source_get_context() on destroyed sources

g_source_get_context() was checking that the source wasn't destroyed
(since a source doesn't hold a ref on its context, and so
source->context might point to garbage in that case). However, it's
useful to be allowed to call g_source_get_context() on a source that
is destroyed-but-currently-running.

So instead, let g_source_get_context() return the context whenever
it's non-NULL, and clear the source->context of any sources that are
still in a context's sources list when the context is freed. Since
sources are only removed from the list when the source is freed (not
when it is destroyed), this means that now whenever a source has a
non-NULL context pointer, then that pointer is valid.

This also means that g_source_get_time() will now return-if-fail
rather than crashing if it is called on a source whose context has
been destroyed.

Add tests to glib/tests/mainloop to verify that g_source_get_context()
and g_source_get_time() work on destroyed sources.

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

12 years agoglib/tests/mainloop: test g_source_get_time()
Dan Winship [Sun, 29 Jul 2012 17:06:53 +0000 (13:06 -0400)]
glib/tests/mainloop: test g_source_get_time()

Verify that

  - g_source_get_time() does not change within a single callback
    (even if the real time does)

  - g_source_get_time() does not change between different callbacks in
    the same mainloop iteration

  - g_source_get_time() does change between iterations if the real
    time did.

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

12 years agog_file_make_directory_with_parents: Fix error propagation
Owen W. Taylor [Mon, 30 Jul 2012 11:33:05 +0000 (13:33 +0200)]
g_file_make_directory_with_parents: Fix error propagation

When creating a directory fails for some reason other than
the parent not existing, don't clear the error before we try
to propagate it.

To reproduce, run 'ostadmin init' on /ostree or otherwise try to
run the function on a directory with a parent directory where the
current user is not allowed to write.

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

12 years agoGFile: Note semantics of g_file_delete()
Colin Walters [Mon, 30 Jul 2012 09:11:08 +0000 (05:11 -0400)]
GFile: Note semantics of g_file_delete()

Particularly for someone programming on Unix, this helps them
understand that we will unlink symbolic links, and not follow them.

12 years agoGFile: Add g_file_delete_async()
Colin Walters [Sat, 28 Jul 2012 13:30:22 +0000 (09:30 -0400)]
GFile: Add g_file_delete_async()

This looks like it was stubbed out but not implemented; the vtable
entry dates to commit 3781343738de4abddf56982325a77bd70a98cd26 which
is just alex's initial merge of gio into glib.

I was working on some code that wants an asynchronous rm -rf
equivalent, and so yeah, this is desirable.

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

12 years agoAdd .dir-locals.el to tell Emacs users not to use tabs for C
Colin Walters [Sun, 29 Jul 2012 13:29:03 +0000 (09:29 -0400)]
Add .dir-locals.el to tell Emacs users not to use tabs for C

Requested by Ryan.

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

12 years agoUpdated Galician translations
Fran Diéguez [Mon, 30 Jul 2012 00:42:30 +0000 (02:42 +0200)]
Updated Galician translations

12 years agoUpdated Slovenian translation
Andrej Žnidaršič [Sun, 29 Jul 2012 11:11:18 +0000 (13:11 +0200)]
Updated Slovenian translation

12 years agoglib: fix locale detection on android
Lionel Landwerlin [Fri, 27 Jul 2012 12:52:17 +0000 (14:52 +0200)]
glib: fix locale detection on android

g_utf8_strup() tries to call setlocale() before starting to compute
the length of its first argument. Calling setlocale() can return NULL
(as specified in the man page), and obviously that happens on android.

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

12 years agoUpdated Serbian translation
Мирослав Николић [Wed, 25 Jul 2012 08:33:27 +0000 (10:33 +0200)]
Updated Serbian translation

12 years agoUpdated Hebrew translation.
Yaron Shahrabani [Tue, 24 Jul 2012 19:39:15 +0000 (22:39 +0300)]
Updated Hebrew translation.

12 years ago[l10n] Updated German translation
Tobias Endrigkeit [Mon, 23 Jul 2012 20:11:53 +0000 (22:11 +0200)]
[l10n] Updated German translation

12 years agoUpdated Norwegian bokmål translation
Kjartan Maraas [Mon, 23 Jul 2012 09:42:22 +0000 (11:42 +0200)]
Updated Norwegian bokmål translation

12 years agoRevert unintential IAPI break for g_key_file_load_from_data()
Colin Walters [Fri, 20 Jul 2012 14:40:56 +0000 (10:40 -0400)]
Revert unintential IAPI break for g_key_file_load_from_data()

The old (length) annotation actually wasn't being read.  Changing
it to an array was telling g-i that it was an array of utf8, which
is clearly not true.

We *could* add (element-type guint8), but that would change it to a
byte array, as opposed to the original utf8 version.

Just removing the annotation should bring us back to where we
were, which was fine.

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

12 years agogio/Makefile.am: Filter out gcontenttype.c for MSVC builds
Chun-wei Fan [Thu, 19 Jul 2012 15:15:59 +0000 (23:15 +0800)]
gio/Makefile.am: Filter out gcontenttype.c for MSVC builds

gcontenttype.c was split into gcontenttype.c and gcontenttype-win32.c
in commit 32192ee9 ("Split gcontenttype.c"), so we don't want to include
gcontenttype.c in the Visual C++ build as it is no longer a source file
meant for Windows.

Thanks to Thomas H.P. Anderson for pointing this out.

12 years agoCheck for PR_SET_NAME
Matthias Clasen [Thu, 19 Jul 2012 10:37:59 +0000 (06:37 -0400)]
Check for PR_SET_NAME

Bug 680148 claims that PR_SET_NAME may not be defined when
using an old kernel. Deal with it.

12 years agoBe more careful when using xlocale
Matthias Clasen [Thu, 19 Jul 2012 10:32:29 +0000 (06:32 -0400)]
Be more careful when using xlocale

Bug 680074 shows that we may end up in situations where only
some of the xlocale functions we need are available. Rather than
trying to find the minimal set of required functions for each
use, define a global USE_XLOCALE and only use any xlocale functions
if we have a full set.

12 years agoCosmetic: Fix up line endings
Matthias Clasen [Thu, 19 Jul 2012 10:20:10 +0000 (06:20 -0400)]
Cosmetic: Fix up line endings

Somehow a few ^M sneaked in here.

12 years agogmain: handle child sources being destroyed before parent
Dan Winship [Wed, 18 Jul 2012 19:08:44 +0000 (15:08 -0400)]
gmain: handle child sources being destroyed before parent

Fix a crash when a child source is destroyed before its parent. Also,
add a test case for this and the previous fix.

12 years agog_source_add_child_source: sync blocked state
Dan Winship [Wed, 18 Jul 2012 18:19:36 +0000 (14:19 -0400)]
g_source_add_child_source: sync blocked state

Child sources are supposed to be blocked when their parents are, so
when adding a source to a blocked source, block the child too. Fixes a
warning when unblocking the parent.

12 years agogio/tests/converter-stream: add a new test, rename an old one
Dan Winship [Tue, 17 Jul 2012 20:21:03 +0000 (16:21 -0400)]
gio/tests/converter-stream: add a new test, rename an old one

Add a test that the decompressor input streams handle truncated data
correctly. (They do; I wrote the test thinking there was a bug there,
but there isn't.)

Also, rename the "corruption" tests to "roundtrip", since "corruption"
makes it sound like we're testing how the converters deal with
corrupted data, as opposed to merely testing that they don't corrupt
data themselves. And fix the bug reference.

12 years agog_cancellable_source_new: don't use a file descriptor
Dan Winship [Tue, 17 Jul 2012 17:17:01 +0000 (13:17 -0400)]
g_cancellable_source_new: don't use a file descriptor

Rather than implementing GCancellableSource by polling on its fd,
implement it by just waking its GMainContext up from the "cancelled"
signal handler, thereby helping to reduce file descriptor usage.
Suggested by Ryan Lortie.

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

12 years agoBump version
Matthias Clasen [Tue, 17 Jul 2012 18:23:08 +0000 (14:23 -0400)]
Bump version

12 years agoMore updates 2.33.6
Matthias Clasen [Tue, 17 Jul 2012 17:50:58 +0000 (13:50 -0400)]
More updates

12 years agoGIOScheduler: Fix access after free in "cancelled" handler
Stef Walter [Tue, 17 Jul 2012 16:34:16 +0000 (18:34 +0200)]
GIOScheduler: Fix access after free in "cancelled" handler

 * GCancellable can be "cancelled" more than once if
   g_cancellable_reset() is called.
 * Don't assume that because the "cancelled" signal fired
   it won't fire again.

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

12 years ago2.33.6
Matthias Clasen [Tue, 17 Jul 2012 17:00:00 +0000 (13:00 -0400)]
2.33.6

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

12 years agoGAsyncInitable: partially revert the init_finish changes
Dan Winship [Tue, 17 Jul 2012 13:12:39 +0000 (09:12 -0400)]
GAsyncInitable: partially revert the init_finish changes

g_async_initable_real_init_finish() was previously handling all
GSimpleAsyncResults, even if they weren't created by
g_async_initable_real_init_async(), and libnm-glib accidentally relied
on that behavior. So remove the g_simple_async_result_is_valid()
check.

12 years agoGVariantType: Add (constructor) annotation for some constructors.
Krzesimir Nowak [Sun, 15 Jul 2012 17:10:43 +0000 (19:10 +0200)]
GVariantType: Add (constructor) annotation for some constructors.

This are mistaken by g-ir-scanner as GVariantType's methods, because
they take a GVariantType* as a first parameter.

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

12 years agoUpdated Spanish translation
Daniel Mustieles [Mon, 16 Jul 2012 14:42:49 +0000 (16:42 +0200)]
Updated Spanish translation

12 years agowin32: g_getenv() should return "" if variable exists and empty
Marc-André Lureau [Mon, 9 Jul 2012 02:12:02 +0000 (04:12 +0200)]
win32: g_getenv() should return "" if variable exists and empty

On Windows, GetEnvironmentVariable() returns 0 for empty variables.
Checking GetLastError() == ERROR_ENVVAR_NOT_FOUND helps make a
difference between a variable that does not exist or an empty one
which should return "".

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

12 years agowin32: fix g_get_environ()
Marc-André Lureau [Mon, 9 Jul 2012 01:54:55 +0000 (03:54 +0200)]
win32: fix g_get_environ()

The current code create the strv array incorrectly, it is too big and
leaves invalid holes. This may result in crashes when freeing the
returned value.

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

12 years agoBump version
Matthias Clasen [Mon, 16 Jul 2012 10:01:55 +0000 (06:01 -0400)]
Bump version

12 years agoMore updates 2.33.4
Matthias Clasen [Mon, 16 Jul 2012 00:36:10 +0000 (20:36 -0400)]
More updates

12 years agoUpdated Belarusian translation.
Ihar Hrachyshka [Sun, 15 Jul 2012 09:27:03 +0000 (12:27 +0300)]
Updated Belarusian translation.

12 years agoUpdated Polish translation
Piotr Drąg [Sat, 14 Jul 2012 23:23:25 +0000 (01:23 +0200)]
Updated Polish translation

12 years agoUpdated Traditional Chinese translation(Hong Kong and Taiwan)
Chao-Hsiung Liao [Sat, 14 Jul 2012 05:51:12 +0000 (13:51 +0800)]
Updated Traditional Chinese translation(Hong Kong and Taiwan)

12 years agoFix GModule documentation a bit
Matthias Clasen [Fri, 13 Jul 2012 21:37:37 +0000 (17:37 -0400)]
Fix GModule documentation a bit

The documentation for g_module_make_resident was for some reason
in the doc comment for g_module_name.

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

12 years agoFix doc build
Matthias Clasen [Fri, 13 Jul 2012 21:37:12 +0000 (17:37 -0400)]
Fix doc build

12 years agoAssamese translation updated
Nilamdyuti Goswami [Fri, 13 Jul 2012 12:23:45 +0000 (17:53 +0530)]
Assamese translation updated

12 years agoUpdate NEWS
Matthias Clasen [Fri, 13 Jul 2012 03:40:43 +0000 (23:40 -0400)]
Update NEWS

12 years agowin32: fix build g_spawn_check_exit_status() with mingw
Marc-André Lureau [Wed, 11 Jul 2012 17:41:58 +0000 (19:41 +0200)]
win32: fix build g_spawn_check_exit_status() with mingw

With mingw, only gspawn-win32.c is compiled, but it is missing some
new symbols.

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

12 years agoGRegex, GConvert: Add some missing annotations.
Krzesimir Nowak [Thu, 12 Jul 2012 14:09:57 +0000 (16:09 +0200)]
GRegex, GConvert: Add some missing annotations.

Also, removed pointless (allow-none) return annotation.

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

12 years agomount-operation: add a Since tag to the show-unmount-progress signal
Cosimo Cecchi [Thu, 12 Jul 2012 00:25:59 +0000 (20:25 -0400)]
mount-operation: add a Since tag to the show-unmount-progress signal

12 years agomount-operation: add show-unmount-progress signal
Cosimo Cecchi [Fri, 6 Jul 2012 19:41:47 +0000 (15:41 -0400)]
mount-operation: add show-unmount-progress signal

The actual implementation will be in gvfs.

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

12 years agoUpdated Greek translation
Tom Tryfonidis [Wed, 11 Jul 2012 23:38:20 +0000 (02:38 +0300)]
Updated Greek translation

12 years agoGDBusNodeInfo: remove a spurious for loop
Rui Matos [Tue, 10 Jul 2012 09:38:34 +0000 (11:38 +0200)]
GDBusNodeInfo: remove a spurious for loop

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

12 years agoGDBusNodeInfo: the XML string must contain exactly one node element
Rui Matos [Tue, 10 Jul 2012 09:37:56 +0000 (11:37 +0200)]
GDBusNodeInfo: the XML string must contain exactly one node element

Make the documentation clear about this.

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

12 years agoAdd g_spawn_check_exit_status()
Colin Walters [Tue, 10 Jul 2012 15:27:22 +0000 (11:27 -0400)]
Add g_spawn_check_exit_status()

Many (if not "almost all") programs that spawn other programs via
g_spawn_sync() or the like simply want to check whether or not the
child exited successfully, but doing so requires use of
platform-specific functionality and there's actually a fair amount of
boilerplate involved.

This new API will help drain a *lot* of mostly duplicated code in
GNOME, from gnome-session to gdm.  And we can see that some bits even
inside GLib were doing it wrong; for example checking the exit status
on Unix, but ignoring it on Windows.

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

12 years agogio: add g_async_result_is_tagged()
Dan Winship [Thu, 10 May 2012 15:09:52 +0000 (11:09 -0400)]
gio: add g_async_result_is_tagged()

Rather than doing a two step first-check-the-GAsyncResult-subtype-then-
check-the-tag, add a GAsyncResult-level method so that you can do them
both at once, simplifying the code for "short-circuit" async return
values where the vmethod never gets called.

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

12 years agogio: Add g_async_result_legacy_propagate_error()
Dan Winship [Thu, 10 May 2012 13:00:45 +0000 (09:00 -0400)]
gio: Add g_async_result_legacy_propagate_error()

Finish deprecating the "handle GSimpleAsyncResult errors in the
wrapper function" idiom (and protect against future GSimpleAsyncResult
deprecation warnings) by adding a "legacy" GAsyncResult method
to do it in those classes/methods where it had been traditionally
done.

(This applies only to wrapper methods; in cases where an _async
vmethod explicitly uses GSimpleAsyncResult, its corresponding _finish
vmethod still uses g_simple_async_result_propagate_error.)

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

12 years agogio: handle GSimpleAsyncResult errors in _finish vmethods
Dan Winship [Mon, 11 Jun 2012 17:44:19 +0000 (13:44 -0400)]
gio: handle GSimpleAsyncResult errors in _finish vmethods

Originally, the standard idiom with GSimpleAsyncResult was to handle
all errors in the _finish wrapper function, so that vmethods only had
to deal with successful results. But this means that chaining up to a
parent _finish vmethod won't work correctly. Fix this by also checking
for errors in all the relevant vmethods. (We have to redundantly check
in both the vmethod and the wrapper to preserve compatibility.)

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

12 years agoGFile: remove some unnecessary code
Dan Winship [Tue, 17 Apr 2012 13:55:33 +0000 (09:55 -0400)]
GFile: remove some unnecessary code

The "mainloop_barrier" in copy_async_thread() is unnecessary, since
the g_simple_async_result_complete_in_idle() will be queued after all
of the g_io_scheduler_job_send_to_mainloop_async()s, and sources with
the same priority will run in the order in which they were queued.

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

12 years agogoptions: use G_N_ELEMENTS instead of nitems
Antoine Jacoutot [Mon, 9 Jul 2012 16:17:01 +0000 (18:17 +0200)]
goptions: use G_N_ELEMENTS instead of nitems

12 years agoGVariant: fix string validation
Ryan Lortie [Mon, 9 Jul 2012 16:43:50 +0000 (12:43 -0400)]
GVariant: fix string validation

String validation was done by checking if the string was valid utf8 and
ensuring that the first non-utf8 character was the last character (ie:
the nul terminator).

No check was actually done to make sure that this byte actually
contained a nul, however, so it was possible that you could have a
string like "hello\xff" with length 6 that would correctly validate.

Fix that, and test it.

12 years agoFix up GObject interface documentation
Stef Walter [Sat, 5 May 2012 10:51:16 +0000 (12:51 +0200)]
Fix up GObject interface documentation

 * Document how to override interfaces already implemented
   in a base class, and also call those base class implementations
   from a derived reimplementation.
 * Don't recomend people use base_init() style functions to
   initialize interface signals and properties, use default_init()
   aka class_init() instead (as G_DEFINE_INTERFACE() uses).
 * The above solves the interface init called multiple times
   problem, so remove some needless naysaying about that.
 * Document default_init() in the interface initialization discussion
 * Linkify more stuff.
 * Remove some crud and typos

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

12 years agoUpdated Galician translations
Fran Diéguez [Mon, 9 Jul 2012 13:05:04 +0000 (15:05 +0200)]
Updated Galician translations

12 years agoOpenBSD: explicitely define nitems
Antoine Jacoutot [Sun, 8 Jul 2012 17:23:18 +0000 (19:23 +0200)]
OpenBSD: explicitely define nitems

nitems is never guaranteed to be defined in sys/params.h as it is meant
to be defined within a protected ifdef __KERNEL condition.

12 years agogio: Add type macros for GFileAttributeInfoList and GFileAttributeMatcher
Torsten Schönfeld [Mon, 3 May 2010 18:33:50 +0000 (20:33 +0200)]
gio: Add type macros for GFileAttributeInfoList and GFileAttributeMatcher

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

12 years agogdbus-codegen: improve casting a tiny wee bit
David Zeuthen [Sat, 7 Jul 2012 21:10:46 +0000 (17:10 -0400)]
gdbus-codegen: improve casting a tiny wee bit

The in commit b79fbc5c3fc8d7093919dde2dc244d26a97596c3 for fixing
-Wstrict-aliasing warnings was a little too brutal, make it a bit
better.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoregex: Add new GRegexError code from PCRE 8.31
Christian Persch [Thu, 28 Jun 2012 21:20:39 +0000 (23:20 +0200)]
regex: Add new GRegexError code from PCRE 8.31

12 years agoregex: Enable fixed test
Christian Persch [Thu, 28 Jun 2012 21:21:16 +0000 (23:21 +0200)]
regex: Enable fixed test

This problem was fixed in PCRE 8.31, so uncomment the test.

12 years agoregex: Import PCRE 8.31
Christian Persch [Thu, 14 Jun 2012 20:15:27 +0000 (22:15 +0200)]
regex: Import PCRE 8.31

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

12 years agoGVariant: support comparing booleans
Ryan Lortie [Fri, 6 Jul 2012 21:27:54 +0000 (17:27 -0400)]
GVariant: support comparing booleans

g_variant_compare() is documented as working on booleans but somehow
this case was missed.  Add it and test it.

Problem discovered by Charles Kerr.

12 years agogdbus-codegen: neuter warnings when using -Wstrict-aliasing
David Zeuthen [Fri, 6 Jul 2012 17:45:09 +0000 (13:45 -0400)]
gdbus-codegen: neuter warnings when using -Wstrict-aliasing

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agogdbus-codegen: don't shadow variable
David Zeuthen [Fri, 6 Jul 2012 17:43:05 +0000 (13:43 -0400)]
gdbus-codegen: don't shadow variable

This avoids a warning when building with -Wshadow

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoGSettings: be more careful about keys names with /
Ryan Lortie [Fri, 6 Jul 2012 17:43:17 +0000 (13:43 -0400)]
GSettings: be more careful about keys names with /

Prevent attempts to access keys ending with slashes that exist in the
schema file as references to child schemas.

Also: don't emit change signals for these same keys.

12 years agoUpdated Norwegian bokmål translation
Kjartan Maraas [Fri, 6 Jul 2012 17:11:26 +0000 (19:11 +0200)]
Updated Norwegian bokmål translation

12 years agoClarify the GLIB_VERSION_MIN_REQUIRED/MAX_ALLOWED docs
Dan Winship [Thu, 26 Apr 2012 18:08:22 +0000 (14:08 -0400)]
Clarify the GLIB_VERSION_MIN_REQUIRED/MAX_ALLOWED docs

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

12 years agoDeal with GLIB_VERSION_MIN_REQUIRED/MAX_ALLOWED being a "future" value
Dan Winship [Thu, 26 Apr 2012 15:08:23 +0000 (11:08 -0400)]
Deal with GLIB_VERSION_MIN_REQUIRED/MAX_ALLOWED being a "future" value

If GLIB_VERSION_MIN_REQUIRED or GLIB_VERSION_MAX_ALLOWED was defined
to a future value, we were essentially treating it as
GLIB_VERSION_0_0. Fix to treat it as being in the future instead.

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

12 years agoGString: Tweak documentation, add g_string_free_to_bytes()
Colin Walters [Tue, 29 May 2012 21:58:41 +0000 (17:58 -0400)]
GString: Tweak documentation, add g_string_free_to_bytes()

The docs for GString should really mention GByteArray, and what makes
it different.  Drop the comparison to Java which is dated and actually
inaccurate (because StringBuffer operates on Unicode).

While we're here, add g_string_free_to_bytes(), which further
complements the spread of GBytes-based API.  For example, one can
create a buffer using GString, then send it off via
g_output_stream_write_bytes().

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

12 years agogdbus-codegen: Don't generate invalid GObject property names
David Zeuthen [Fri, 6 Jul 2012 13:19:48 +0000 (09:19 -0400)]
gdbus-codegen: Don't generate invalid GObject property names

For a D-Bus property with name "Type" (fairly common), we used to
generate a GObject property with name "type-" and C accessors
get_type_() (to avoid clashing with the GType getter), set_type_()
(for symmetri).

However, the rules for GObject property names are fairly rigid and
specifically prohibit names ending in a dash.

Therefore change things so the chosen GObject property name is "type"
but preserve the naming rules for the C getter and setter (for the
same reasons: avoiding name clashing and symmetri).

This change does break the API of generated code (but only on the
GObject property level, the C symbols are not changed) but strictly
speaking the behavior was undefined since "type-" was an invalid
GObject property name.

Also add a test case for this.

Bug 679473.

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

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoConstify collect and lcopy strings in GTypeValueTable
Emmanuele Bassi [Wed, 7 Mar 2012 12:54:04 +0000 (12:54 +0000)]
Constify collect and lcopy strings in GTypeValueTable

This avoids warnings when creating idiomatic value tables, like:

  static const GTypeValueTable _clutter_shader_float_value_table = {
    clutter_value_init_shader_float,
    clutter_value_free_shader_float,
    clutter_value_copy_shader_float,
    clutter_value_peek_pointer,
    "ip",
    clutter_value_collect_shader_float,
    "pp",
    clutter_value_lcopy_shader_float
  };

Because the strings are literals. And, really: nobody should be using
allocated values for the collection and lcopy strings.

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

12 years agoImprove the g_dir_read_name documentation
Matthias Clasen [Fri, 6 Jul 2012 02:25:49 +0000 (22:25 -0400)]
Improve the g_dir_read_name documentation

This function can return NULL in error cases as well. Document
this, and explain how to discriminate the cases.
https://bugzilla.gnome.org/show_bug.cgi?id=639771

12 years agoUpdated POTFILES.in
Piotr Drąg [Wed, 4 Jul 2012 02:25:41 +0000 (04:25 +0200)]
Updated POTFILES.in

12 years agoDrop unneeded includes
Matthias Clasen [Wed, 4 Jul 2012 01:14:41 +0000 (21:14 -0400)]
Drop unneeded includes

12 years agoSplit gcontenttype.c
Matthias Clasen [Wed, 4 Jul 2012 01:13:32 +0000 (21:13 -0400)]
Split gcontenttype.c

Instead of a giant #if G_OS_WIN32 #else #endif around the entire
file, just split it into gcontenttype.c and gcontenttype-win32.c.

12 years agowin32: fix build after bug 674452
Marc-André Lureau [Tue, 3 Jul 2012 18:04:05 +0000 (20:04 +0200)]
win32: fix build after bug 674452

12 years agoGObject docs fixup
Ryan Lortie [Tue, 3 Jul 2012 19:40:35 +0000 (15:40 -0400)]
GObject docs fixup

12 years agoglib/deprecated: Fix some version typos
Rico Tzschichholz [Tue, 3 Jul 2012 19:22:16 +0000 (21:22 +0200)]
glib/deprecated: Fix some version typos

12 years agoAssamese translation updated
Nilamdyuti Goswami [Tue, 3 Jul 2012 15:31:17 +0000 (21:01 +0530)]
Assamese translation updated

12 years agoUpdated Bulgarian translation
Alexander Shopov [Tue, 3 Jul 2012 13:55:12 +0000 (16:55 +0300)]
Updated Bulgarian translation