platform/upstream/glib.git
10 years agogio: remove an unneeded pragma
Dan Winship [Thu, 24 Apr 2014 16:15:55 +0000 (12:15 -0400)]
gio: remove an unneeded pragma

ddf82a25 removed the use of non-literal format strings from
gthreadedresolver.c, but left the "#pragma GCC diagnostic ignored
-Wformat-nonliteral" behind.

10 years agodocs: Remove <!-- --> comment before plural s
Volker Sobek [Wed, 16 Apr 2014 21:56:02 +0000 (23:56 +0200)]
docs: Remove <!-- --> comment before plural s

These did show up in the html. Since symbol names are checked for a
trailing plural s when generating the docs, the links stay functional
after removing these comments.

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

10 years agogaction: Minor clarifications in the GAction documentation
Philip Withnall [Wed, 6 Nov 2013 10:54:06 +0000 (10:54 +0000)]
gaction: Minor clarifications in the GAction documentation

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

10 years agoplatform_get_argv0: drop unneeded headers for OpenBSD
Antoine Jacoutot [Wed, 16 Apr 2014 08:27:09 +0000 (10:27 +0200)]
platform_get_argv0: drop unneeded headers for OpenBSD

And properly set the size of len.
There is also no need for realloc(), g_malloc0 will do just fine.

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

10 years agogfile: More explicitly document the context for GFileProgressCallback
Philip Withnall [Sat, 19 Apr 2014 17:22:24 +0000 (18:22 +0100)]
gfile: More explicitly document the context for GFileProgressCallback

Be more explicit in the documentation for g_file_copy_async() about
which GMainContext its progress callback is executed in.

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

10 years agoUpdated Greek translation
marablack3 [Fri, 18 Apr 2014 17:55:02 +0000 (17:55 +0000)]
Updated Greek translation

10 years agogio: Document that GSocket is not thread safe
Philip Withnall [Wed, 16 Apr 2014 18:03:56 +0000 (19:03 +0100)]
gio: Document that GSocket is not thread safe

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

10 years agohmac: Add support for SHA-512 in GHmac
Philip Withnall [Wed, 19 Feb 2014 18:02:37 +0000 (18:02 +0000)]
hmac: Add support for SHA-512 in GHmac

The block size wasn’t configured before, so calling g_hmac_new() with
G_CHECKSUM_SHA512 would hit a g_assert_not_reached() and explode.

Implement G_CHECKSUM_SHA512 and add unit tests for HMACs with SHA-256
and SHA-512 using the test vectors from RFC 4868.

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

10 years agoRevert "Bug 724590 - GSlice slab_stack corruption"
Ryan Lortie [Wed, 16 Apr 2014 11:53:58 +0000 (07:53 -0400)]
Revert "Bug 724590 - GSlice slab_stack corruption"

This reverts commit c49ec3c8d7a90589308ce1b87a92bc627335ffd2.

10 years agoBug 724590 - GSlice slab_stack corruption
John Ralls [Mon, 17 Feb 2014 23:51:38 +0000 (15:51 -0800)]
Bug 724590 - GSlice slab_stack corruption

Dereference allocation->contention_counters before trying to take the
address of an element.

10 years agodocs: Use markdown links in all .c and .h files
Volker Sobek [Tue, 15 Apr 2014 14:18:59 +0000 (16:18 +0200)]
docs: Use markdown links in all .c and .h files

Commit e7fd3de86d60 already did most of this.

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

10 years agogdesktopappinfo: fix a crasher
Ryan Lortie [Tue, 15 Apr 2014 18:10:39 +0000 (14:10 -0400)]
gdesktopappinfo: fix a crasher

During the time that we are expanding the strv, it is not
null-terminated.  Use the strv_len variable instead to bound the search
for duplicates.

10 years agogio: fix g-i annotations in g_settings_schema_source_list_schemas()
Alberto Ruiz [Tue, 15 Apr 2014 16:56:26 +0000 (18:56 +0200)]
gio: fix g-i annotations in g_settings_schema_source_list_schemas()

10 years agotests: use mimeapps.list over defaults.list
Ryan Lortie [Thu, 10 Apr 2014 16:00:40 +0000 (12:00 -0400)]
tests: use mimeapps.list over defaults.list

defaults.list is deprecated, so use mimeapps.list as a filename instead.

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

10 years agoGDesktopAppInfo: rewrite content type code
Ryan Lortie [Wed, 9 Apr 2014 12:44:18 +0000 (08:44 -0400)]
GDesktopAppInfo: rewrite content type code

Redo the code for type-based selection of applications (all,
recommended, default, fallback) based on the new DesktopFileDir
structures that we introduced last cycle.

At the same time, we expand the functionality to add support for the new
features of the specification:

 - moving ~/.local/share/applications/mimeapps.list to ~/.config/

 - per-desktop default applications (via XDG_CURRENT_DESKTOP)

 - sysadmin customisation of defaults (via /etc/xdg/mimeapps.list)

 - deprecation of the old defaults.list, favouring the use of
   /usr/share/applications/mimeapps.list (or gnome-mimeapps.list) to
   accomplish the same

We modify the mimeapps testcase to check for mimeapps.list having been
created in XDG_CONFIG_HOME instead of XDG_DATA_HOME.

The modification is a net reduction of code (due to less duplication in
bookkeeping).  It is also an increase in performance and reduction in
memory consumption (due to simplified data structures).  Finally, it
removes the stat-based timestamp checking in favour of the
GFileMonitor-based approach that was already being used in the
implementation of DesktopFileDir (in order to know if we had to rescan
the desktop files themselves).

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

10 years agomimetype tests: don't depend on specific behaviour
Ryan Lortie [Fri, 11 Apr 2014 02:32:28 +0000 (22:32 -0400)]
mimetype tests: don't depend on specific behaviour

We currently assume that setting an application as the default will take
it to the front of the list of supported applications for a given type,
but this is not necessarily true.

Check instead that the application is actually set as default.

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

10 years agoappmonitor test: avoid /usr/share
Ryan Lortie [Thu, 10 Apr 2014 15:49:21 +0000 (11:49 -0400)]
appmonitor test: avoid /usr/share

Set XDG_DATA_DIRS to make sure we don't use /usr/share from the
appmonitor test.  We will soon throw a warning if we find defaults.list,
so make sure we don't open ourselves up to that if there is one on the
system.

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

10 years agotests: expand 'apps' tool
Ryan Lortie [Wed, 9 Apr 2014 22:59:20 +0000 (18:59 -0400)]
tests: expand 'apps' tool

Add modes to output the applications found for get_default_,
get_recommended_, get_fallback_ and get_all_for_type().

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

10 years agomimeapps test: fix defaults vs. recommended
Ryan Lortie [Wed, 9 Apr 2014 23:14:37 +0000 (19:14 -0400)]
mimeapps test: fix defaults vs. recommended

The desktop file for myapp3 didn't declare support for image/png, but
the testcase expects it to be recommended on the basis of it being the
default app according to defaults.list.

This will not work in the future -- we will only list apps that actually
support the filetype in question, unless they've been explicitly added
as associations.

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

10 years agodesktop-app-info test: use g_assert_strcmp()
Ryan Lortie [Wed, 9 Apr 2014 23:23:27 +0000 (19:23 -0400)]
desktop-app-info test: use g_assert_strcmp()

Replace some assert(strcmp()) with g_assert_strcmp() so that we get
better output in case of failures.

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

10 years agobuild: also unset LIBS when LDFLAGS is unset
Antoine Jacoutot [Thu, 10 Apr 2014 09:16:44 +0000 (11:16 +0200)]
build: also unset LIBS when LDFLAGS is unset

On OpenBSD, libintl is installed under /usr/local/lib. When configure
checks unset LDFLAGS, LIBS should also be unset otherwise we end up with
-lintl which cannot be found resulting to the compile check to fail.

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

10 years agogdesktopappinfo: Don't double free sn_id
Colin Walters [Sat, 12 Apr 2014 17:26:29 +0000 (13:26 -0400)]
gdesktopappinfo: Don't double free sn_id

Not sure why mclasen added a g_free() in that path, it was just wrong.
We free it correctly later.

10 years agogdesktopappinfo: Initialize sn_id to NULL
Colin Walters [Sat, 12 Apr 2014 17:21:20 +0000 (13:21 -0400)]
gdesktopappinfo: Initialize sn_id to NULL

Otherwise we'll be freeing a random stack pointer.

10 years agoopenbsd: remove -pthread
Antoine Jacoutot [Thu, 10 Apr 2014 08:40:16 +0000 (10:40 +0200)]
openbsd: remove -pthread

This is not needed any longer; libpthread is properly included in
shared libs on OpenBSD where -pthread -lpthread mean the same.

10 years agoDeal with startup notify id being NULL
Matthias Clasen [Fri, 11 Apr 2014 22:46:38 +0000 (15:46 -0700)]
Deal with startup notify id being NULL

The app launch context may just not support startup notification,
in which case, g_app_launch_context_get_startup_notify_id() will
return NULL.

Failure to take this into account leads to criticals like this:
gnome-session[8489]: GLib-CRITICAL: g_variant_new_take_string: assertion 'string != NULL' failed
gnome-session[8489]: GLib-CRITICAL: g_variant_new_variant: assertion 'value != NULL' failed
gnome-session[8489]: GLib-CRITICAL: g_variant_get_type: assertion 'value != NULL' failed
gnome-session[8489]: GLib-CRITICAL: g_variant_type_is_subtype_of: assertion 'g_variant_type_check (type)' failed

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

10 years agogparam: Add G_PARAM_READWRITE to GParamFlags
Emmanuele Bassi [Mon, 10 Mar 2014 15:16:44 +0000 (15:16 +0000)]
gparam: Add G_PARAM_READWRITE to GParamFlags

Using a #define for an enumeration value buys us nothing, and it's
mostly historical baggage that makes binding GObject needlessly
complicated.

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

10 years agogapplication-tool: ensure object paths are valid
Cosimo Cecchi [Thu, 10 Apr 2014 01:07:38 +0000 (18:07 -0700)]
gapplication-tool: ensure object paths are valid

Hyphens are not valid characters for DBus object paths; see the similar
code in gapplicationimpl-dbus.c

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

10 years agogapplication-tool: fix a typo
Cosimo Cecchi [Thu, 10 Apr 2014 01:07:22 +0000 (18:07 -0700)]
gapplication-tool: fix a typo

This must have never worked.

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

10 years agog_str_has_prefix: don't call strlen(str)
Dan Winship [Wed, 9 Apr 2014 13:57:46 +0000 (09:57 -0400)]
g_str_has_prefix: don't call strlen(str)

There's no reason to check the length of @str in g_str_has_prefix(),
since if it's shorter than @prefix, the strncmp() will fail anyway.
And besides making the function less efficient, it also breaks code
like:

    if (buf->len >=3 && g_str_has_prefix (buf->data, "foo"))
      ...

which really looks like it ought to work whether buf->data is
nul-terminated or not.

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

10 years agogiomodule: Add a NULL guard to extension_point_get_extension_by_name
Debarshi Ray [Thu, 10 Apr 2014 13:26:45 +0000 (15:26 +0200)]
giomodule: Add a NULL guard to extension_point_get_extension_by_name

... otherwise a NULL input will lead to a crash in strcmp.

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

10 years agogobject: try to link with -Wl,-z,nodelete
Alexandre Rostovtsev [Mon, 2 Sep 2013 17:59:18 +0000 (13:59 -0400)]
gobject: try to link with -Wl,-z,nodelete

Since the type system does not support reloading its data and assumes
that libgobject remains loaded for the lifetime of the process, we
should link libgobject with a flag indicating that it can't be unloaded.

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

10 years agog_file_copy: Don't set GError when we intend to ignore errors
Colin Walters [Thu, 3 Apr 2014 18:05:45 +0000 (14:05 -0400)]
g_file_copy: Don't set GError when we intend to ignore errors

For better or worse, the current g_file_copy intention was to ignore
errors copying metadata, but we still set the GError, while returning
TRUE.

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

10 years agogio: Add newer dbus UnknownXxxx and PropertyReadOnly errors
Stef Walter [Wed, 9 Apr 2014 14:14:11 +0000 (16:14 +0200)]
gio: Add newer dbus UnknownXxxx and PropertyReadOnly errors

Add G_DBUS_ERROR codes for:

 * org.freedesktop.DBus.Error.UnknownObject
 * org.freedesktop.DBus.Error.UnknownInterface
 * org.freedesktop.DBus.Error.UnknownProperty
 * org.freedesktop.DBus.Error.PropertyReadOnly

These were discussed on the dbus mailing list
and introduced in the following libdbus commit:

2c34514620c4b79ea4ec71d1db583379138d01ac

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

10 years agogtlscertificate: fix certificate list parsing with trailing comments
Dan Winship [Wed, 9 Apr 2014 14:39:45 +0000 (10:39 -0400)]
gtlscertificate: fix certificate list parsing with trailing comments

g_tls_certificate_list_new_from_file() was supposed to ignore non-PEM
content, but it accidentally required that there not be anything after
the last certificate. Fix that.

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

10 years agoUpdated Ukrainian translation
Daniel Korostil [Sun, 6 Apr 2014 13:28:40 +0000 (16:28 +0300)]
Updated Ukrainian translation

10 years agoGApplication: Don't decrease use_count below 0
Marek Kasik [Thu, 3 Apr 2014 15:35:22 +0000 (17:35 +0200)]
GApplication: Don't decrease use_count below 0

Place an assert for use_count to be at least 1
in g_application_release() so we don't decrease
it below 0.

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

10 years agodocs: Fix typo in g_unichar_iswide_cjk() comment
David King [Fri, 4 Apr 2014 09:42:56 +0000 (10:42 +0100)]
docs: Fix typo in g_unichar_iswide_cjk() comment

10 years agoAdd a small note to g_cclosure_marshal_generic docs
Paolo Borelli [Thu, 3 Apr 2014 09:33:33 +0000 (11:33 +0200)]
Add a small note to g_cclosure_marshal_generic docs

reviewed-by: Emmanuele Bassi

10 years agonetworkaddress: fix parsing of uri with @ after authority
Wim Taymans [Mon, 10 Mar 2014 15:27:48 +0000 (16:27 +0100)]
networkaddress: fix parsing of uri with @ after authority

Make sure that the @ sign is inside the authority part before attempting
to parse the userinfo. We do this by checking if the @ sign comes before
any of the possible authority delimiters.
Add unit test to verify parsing of ftp://ftp.gnome.org/start?foo=bar@baz

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

10 years agobuild: Include Cocoa/Carbon in Libs.private if targetting Mac OS X
Philip Withnall [Thu, 20 Mar 2014 12:32:36 +0000 (12:32 +0000)]
build: Include Cocoa/Carbon in Libs.private if targetting Mac OS X

This allows static linking against GIO on OS X, which would previously
fail due to unresolved symbols from the above two frameworks.

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

10 years agonetworkmonitornetlink: IN6_IS_ADDR_MC_LINKLOCAL is only guaranteed to work on struct...
Olivier Crête [Wed, 26 Mar 2014 23:45:52 +0000 (19:45 -0400)]
networkmonitornetlink: IN6_IS_ADDR_MC_LINKLOCAL is only guaranteed to work on struct in6_addr*

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

10 years agogio: move Winsock error mapping to g_io_error_from_win32_error()
Dan Winship [Tue, 25 Mar 2014 17:52:45 +0000 (13:52 -0400)]
gio: move Winsock error mapping to g_io_error_from_win32_error()

Rather than having special code in gsocket.c, handle Winsock errors
along with other Win32 errors in gioerror.c

Also, reference g_win32_error_message() from the
g_io_error_from_win32_error() docs, and update the
g_win32_error_message() docs to clarify that it works with Winsock
error codes too.

10 years agogio/tests/socket: Update to check the error code
Dan Winship [Fri, 21 Mar 2014 20:57:56 +0000 (16:57 -0400)]
gio/tests/socket: Update to check the error code

Only treat IPv6 as unsupported if the attempt to create a socket
returns G_IO_ERROR_NOT_SUPPORTED: any other error is a bug.

10 years agogioerror: map some more values to G_IO_ERROR_NOT_SUPPORTED
Dan Winship [Fri, 21 Mar 2014 20:54:04 +0000 (16:54 -0400)]
gioerror: map some more values to G_IO_ERROR_NOT_SUPPORTED

Map EPROTONOSUPPORT, ESOCKTNOSUPPORT, EPFNOSUPPORT and EAFNOSUPPORT to
G_IO_ERROR_NOT_SUPPORTED in g_io_error_from_errno(). (GSocket's
socket_io_error_from_errno() already did this with the corresponding
Winsock errors.)

Also map EOPNOTSUPP, which on Linux is the same as ENOTSUP, but may
not be on other platforms.

Also, rewrite the EAGAIN/EWOULDBLOCK section to use the simpler idiom
used by EEXIST/ENOTEMPTY and (now) ENOTSUP/EOPNOTSUPP.

10 years agoUpdated Basque language
Inaki Larranaga Murgoitio [Sun, 30 Mar 2014 13:09:59 +0000 (15:09 +0200)]
Updated Basque language

10 years agodocs: Remove escaping '\' from literals
Volker Sobek [Sun, 30 Mar 2014 00:01:17 +0000 (01:01 +0100)]
docs: Remove escaping '\' from literals

commit 35066ed6c6b51317f49069f2564c547aa309f9f1 replaced entities, but
escaped the replacement text also inside literals, which resulted in the
escaping '\' to also appear in the documentation.

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

10 years agoBump version to 2.41.0, add GLIB_VERSION_2_42, etc
Dan Winship [Tue, 25 Mar 2014 17:20:13 +0000 (13:20 -0400)]
Bump version to 2.41.0, add GLIB_VERSION_2_42, etc

10 years agogio: Add names to idles and timeouts
Bastien Nocera [Sat, 22 Mar 2014 12:15:45 +0000 (13:15 +0100)]
gio: Add names to idles and timeouts

This isn't too useful for some of the "return result in idle"
functions, but it's better than nothing.

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

10 years agoGNotification: Some small documentation fixes
Volker Sobek [Wed, 26 Mar 2014 22:10:00 +0000 (23:10 +0100)]
GNotification: Some small documentation fixes

Use #GVariant instead of GVariant.

g_notification_add_button_with_target,
g_notification_set_default_action_and_target:
Replace 'format_string' with 'target_format'.

g_notification_set_default_action_and_target_value:
Remove paragraph that apparently had been accidentally copied from
g_notification_set_default_action_and_target.

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

10 years agoGSocket: ignore timed out state when not relevant
Olivier Crête [Fri, 14 Mar 2014 21:46:38 +0000 (17:46 -0400)]
GSocket: ignore timed out state when not relevant

Do this by separating the timeout check from the other socket checks.

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

10 years agogio: fix two more g_task_return_error_if_cancelled() leaks
Dan Winship [Tue, 18 Mar 2014 13:56:23 +0000 (09:56 -0400)]
gio: fix two more g_task_return_error_if_cancelled() leaks

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

10 years agosocketclient: Fix leak
Olivier Crête [Tue, 18 Mar 2014 03:50:30 +0000 (23:50 -0400)]
socketclient: Fix leak

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

10 years agoUpdate Czech translation
Petr Kovar [Sun, 23 Mar 2014 15:12:50 +0000 (16:12 +0100)]
Update Czech translation

10 years agoUpdated Hungarian translation
Gábor Kelemen [Fri, 21 Mar 2014 21:34:26 +0000 (21:34 +0000)]
Updated Hungarian translation

10 years agogio/tests/socket: skip IPv6 tests on IPv6-less machines
Dan Winship [Sat, 1 Feb 2014 17:13:50 +0000 (18:13 +0100)]
gio/tests/socket: skip IPv6 tests on IPv6-less machines

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

10 years agoClarify expectations with error codes like G_IO_ERROR_FAILED
Dan Winship [Thu, 20 Mar 2014 13:25:19 +0000 (09:25 -0400)]
Clarify expectations with error codes like G_IO_ERROR_FAILED

If an error code enumeration is expected to be extended in the future,
people shouldn't compare explicitly against its generic "FAILED" value.

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

10 years agoUpdated Danish translation
Ask H. Larsen [Wed, 19 Mar 2014 20:47:30 +0000 (21:47 +0100)]
Updated Danish translation

10 years agoUpdated Serbian translation
Мирослав Николић [Tue, 18 Mar 2014 20:13:19 +0000 (21:13 +0100)]
Updated Serbian translation

10 years agogbinding: warn on failed value transformation
Dan Winship [Mon, 17 Mar 2014 19:11:31 +0000 (15:11 -0400)]
gbinding: warn on failed value transformation

GBinding warned if g_value_transform() returned FALSE, but it didn't
warn if there was no transformation available at all. Fix that and
test it.

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

10 years agoupdate Punjabi Translation 17March2014: Alam
A S Alam [Mon, 17 Mar 2014 21:39:21 +0000 (16:39 -0500)]
update Punjabi Translation 17March2014: Alam

10 years agoGLib 2.39.92 2.39.92
Ryan Lortie [Mon, 17 Mar 2014 21:18:47 +0000 (17:18 -0400)]
GLib 2.39.92

10 years agoUpdated French translation
Claude Paroz [Sat, 15 Mar 2014 19:45:27 +0000 (19:45 +0000)]
Updated French translation

10 years agoGSettingsBackend: fix a nasty race condition
Ryan Lortie [Wed, 12 Mar 2014 01:41:36 +0000 (21:41 -0400)]
GSettingsBackend: fix a nasty race condition

In the event that a GSettings object is being destroyed just as a change
signal is being delivered, the destroying thread will race with the
dconf worker thread for acquiring the lock on the GSettingsBackend.

If the signalling thread gets there first then the destroying thread
will block on the lock.  The signalling thread adds a reference to the
GSettings object that is being destroyed and releases the lock.  The
idea is that this should prevent the GSettings object from being
destroyed and thus maintain its entry in the list.  Unfortunately, the
weak reference notify function is already running and as soon as we
release the lock, the list entry is removed.

The signalling thread crashes.

This bug is indicative of a serious problem encountered in many
situations where GObject instances are touched from multiple threads.
Ideally, we will move to a place where g_object_ref() is not called at
all on the GSettings object from the dconf worker thread and instead, a
dispatch will be done without holding a reference (similar to how
GAppInfoMonitor presently works).  This would also prevent the
unfortunate case of someone dropping what they assume to be the last
reference on a GSettings object, only to have an already-pending signal
delivered once they return to the mainloop, crashing their program.

Making this change for GSettings (with multiple instances per thread,
the possibility of multiple backends and each instance being interested
in different events) is going to be extremely non-trivial, so it's not a
change that makes sense at this point in the cycle.

For now, we can do a relatively small and isolated tweak so that we
never access the list except under a lock.  We still perform the bad
pattern of acquiring a ref in a foreign thread which means that we still
risk delivering a signal to a GSettings object that the user has assumed
is dead (unless they explicitly disconnect their signal handler).  This
is a problem that we already had, however.

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

10 years agogsettingsbackend: a minor simplification
Ryan Lortie [Wed, 26 Feb 2014 22:09:59 +0000 (17:09 -0500)]
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

10 years agoUpdate config.h.win32.in
Chun-wei Fan [Wed, 12 Mar 2014 09:26:45 +0000 (17:26 +0800)]
Update config.h.win32.in

Make the entries of config.h.win32.in match those that are being checked
in config.h.in.

10 years agoUpdated Portuguese translation
Duarte Loreto [Wed, 12 Mar 2014 02:10:55 +0000 (02:10 +0000)]
Updated Portuguese translation

10 years agoGUnixVolume: implement _finish functions
Ryan Lortie [Tue, 11 Mar 2014 16:19:19 +0000 (12:19 -0400)]
GUnixVolume: implement _finish functions

The _finish functions for GUnixVolume _mount and _eject functions were
never implemented, having been simply stubbed out as 'return TRUE;'.

Implement them.

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

10 years agoGUnixVolume: port to GSubprocess
Ryan Lortie [Mon, 3 Mar 2014 02:24:14 +0000 (21:24 -0500)]
GUnixVolume: port to GSubprocess

Do the same as we just did for GUnixMount, for GUnixVolume too.

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

10 years agoGUnixMount: port unmount to GSubprocess
Ryan Lortie [Sun, 2 Mar 2014 22:39:11 +0000 (17:39 -0500)]
GUnixMount: port unmount to GSubprocess

The existing code is buggy and now that we have GSubprocess, we should just use
it instead, allowing for some substantial reduction in complexity.

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

10 years agoUpdated Russian translation
Yuri Myasoedov [Tue, 11 Mar 2014 17:21:57 +0000 (21:21 +0400)]
Updated Russian translation

10 years agoglocalfileinfo: don't special-case directory icons
Lars Uebernickel [Mon, 10 Mar 2014 18:46:23 +0000 (19:46 +0100)]
glocalfileinfo: don't special-case directory icons

As of e6af432, g_content_type_get_symbolic_icon() returns non-symbolic
fallbacks. Thus, we can't append another symbolic icon to the fallbacks.

The special case was a bit of a hack anyway. It was only applied to
themed icons and there was no generic fallback for mime types that are
not folders.

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

10 years agoAdd g_application_command_line_get_options_dict() to docs
David King [Mon, 10 Mar 2014 19:16:28 +0000 (19:16 +0000)]
Add g_application_command_line_get_options_dict() to docs

10 years agoUpdated Traditional Chinese translation(Hong Kong and Taiwan)
Chao-Hsiung Liao [Sun, 9 Mar 2014 03:39:30 +0000 (11:39 +0800)]
Updated Traditional Chinese translation(Hong Kong and Taiwan)

10 years agogtype – Mark _get_instance_private() function as G_GNUC_UNUSED
Sebastian Dröge [Sun, 9 Feb 2014 22:08:21 +0000 (23:08 +0100)]
gtype – Mark _get_instance_private() function as G_GNUC_UNUSED

clang likes to complain about it being unused.

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

10 years agoUpdated Latvian translation
Rūdolfs Mazurs [Sat, 8 Mar 2014 13:58:53 +0000 (15:58 +0200)]
Updated Latvian translation

10 years agoUpdated Chinese (China) translation
Wylmer Wang [Sat, 8 Mar 2014 12:26:07 +0000 (12:26 +0000)]
Updated Chinese (China) translation

10 years agogio tests: add codegen to BUILT_SOURCES
Ryan Lortie [Fri, 7 Mar 2014 12:41:50 +0000 (07:41 -0500)]
gio tests: add codegen to BUILT_SOURCES

We need to have these in BUILT_SOURCES so that 'make' knows to generate them
before attempting to compile other .c files in the same directory (since some
of these files include the header).

Should fix up remaining issues about partial versions of this file being
included under parallel builds.

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

10 years agoGObject: Remove more leftover markup from headers
Matthias Clasen [Fri, 7 Mar 2014 11:10:36 +0000 (06:10 -0500)]
GObject: Remove more leftover markup from headers

10 years agoUpdated Korean translation
Changwoo Ryu [Thu, 6 Mar 2014 17:02:27 +0000 (02:02 +0900)]
Updated Korean translation

10 years agoUpdated Norwegian bokmål translation
Kjartan Maraas [Wed, 5 Mar 2014 18:24:18 +0000 (19:24 +0100)]
Updated Norwegian bokmål translation

10 years agoUnskip GVariantDict
Giovanni Campagna [Tue, 4 Mar 2014 14:30:12 +0000 (15:30 +0100)]
Unskip GVariantDict

There is no reason to (skip) GVariantDict, it's a boxed type
and perfectly usable from gobject-introspection.

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

10 years agocond test: remove alarm() usage
Ryan Lortie [Wed, 5 Mar 2014 14:04:00 +0000 (09:04 -0500)]
cond test: remove alarm() usage

This means that the test can't build on Windows (and we do want it there).

This will be properly resolved with bug 725266, but let's not block the
build before then.

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

10 years agoWork around gtk-doc problems
Matthias Clasen [Wed, 5 Mar 2014 01:20:52 +0000 (20:20 -0500)]
Work around gtk-doc problems

Returns shall never be at the beginning of a line.

10 years agogsubprocess: test environment a bit more
Ryan Lortie [Tue, 4 Mar 2014 14:08:24 +0000 (09:08 -0500)]
gsubprocess: test environment a bit more

Add a test for GSubprocess to test setting, unsetting and inheritance of
environment variables.  Use communicate() to give it a bit more of a
workout as well.

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

10 years agoGSubprocessLauncher: don't get empty environment
Ryan Lortie [Tue, 4 Mar 2014 13:55:00 +0000 (08:55 -0500)]
GSubprocessLauncher: don't get empty environment

Use g_get_environ() to get the environment variables with their values
instead of g_listenv() which only lists off the keys.

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

10 years agogsubprocess: test empty splices
Ryan Lortie [Tue, 4 Mar 2014 02:25:16 +0000 (21:25 -0500)]
gsubprocess: test empty splices

Make sure we handle the case that our splice returns no data properly.

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

10 years agogsubprocess: fix communicate() with empty buffers
Ryan Lortie [Mon, 3 Mar 2014 02:01:12 +0000 (21:01 -0500)]
gsubprocess: fix communicate() with empty buffers

On the splice for stdout or stderr completing, GSubprocess calls
_slice_finish() to collect the result.

We assume that a zero return value here means failure, but in fact this
function returns a gssize -- the number of bytes transferred, or -1 for
an error.

This causes GSubprocess to mistakenly think that it has an error when it
actually just has an empty buffer (as would be the case when collecting
stderr from a successful command).

Check for -1 instead of FALSE to detect the error.

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

10 years agoGLib 2.39.91 2.39.91
Ryan Lortie [Mon, 3 Mar 2014 03:18:14 +0000 (22:18 -0500)]
GLib 2.39.91

10 years agodesktopappinfo: add Exec to searchable keys
Ryan Lortie [Sun, 2 Mar 2014 14:38:51 +0000 (09:38 -0500)]
desktopappinfo: add Exec to searchable keys

Add the basename from the first component of the Exec line to the list of
strings to search for via g_desktop_app_info_search().

We treat Exec as a fairly strong match -- just below the visible name.

Add a testcase to make sure everything is working OK.

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

10 years agoUpdated Thai translation
Theppitak Karoonboonyanan [Mon, 3 Mar 2014 10:27:09 +0000 (17:27 +0700)]
Updated Thai translation

10 years agoAdd a few tests for G_MARKUP_TREAT_CDATA_AS_TEXT
Matthias Clasen [Mon, 3 Mar 2014 00:10:00 +0000 (19:10 -0500)]
Add a few tests for G_MARKUP_TREAT_CDATA_AS_TEXT

Related to
https://bugzilla.gnome.org/show_bug.cgi?id=725433

10 years agoAdd a way to test different markup parser flags
Matthias Clasen [Mon, 3 Mar 2014 00:02:23 +0000 (19:02 -0500)]
Add a way to test different markup parser flags

For now, we are mainly interested in G_MARKUP_TREAT_CDATA_AS_TEXT.
This commit makes markup-parse look for expected output files with
the extension .cdata-as-text in addition to .expected, and compares
the output of parsing with G_MARKUP_TREAT_CDATA_AS_TEXT against
them. markup-parse --cdata-as-text foo.gmarkup can be used to produce
such expected output.

10 years agodocs: Ditch more markup
Matthias Clasen [Sun, 2 Mar 2014 23:20:37 +0000 (18:20 -0500)]
docs: Ditch more markup

Some markup was hiding in docs in headers. Drop it there, too.

10 years agoUpdated Polish translation
Piotr Drąg [Sun, 2 Mar 2014 18:24:01 +0000 (19:24 +0100)]
Updated Polish translation

10 years agohmac: Make unit test const-correct
Philip Withnall [Wed, 19 Feb 2014 18:03:37 +0000 (18:03 +0000)]
hmac: Make unit test const-correct

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

10 years agogmain: simplify g_main_context_find_source_by_id()
Ryan Lortie [Sat, 8 Feb 2014 12:23:46 +0000 (12:23 +0000)]
gmain: simplify g_main_context_find_source_by_id()

Since we now keep a hashtable of sources, we can implement this function
without iteration.

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

10 years agogmain: Simplify source id tracking
Ryan Lortie [Sat, 8 Feb 2014 12:17:10 +0000 (12:17 +0000)]
gmain: Simplify source id tracking

Simplify our tracking of issued source id integers and fix some bugs.

Previously the source's id was remove from the 'used' table from
source_remove_from_context() which was also called if the source
priority was changed (in which case it would never be added back to the
table).  The source id could be reissued in that case.

In the new approach, we just always keep a hash table of sources, by
source id.  This simplifies the logic and will also allow us to improve
performance of g_main_context_find_source_by_id() which is called in some
fairly common cases, such as g_source_remove().  These improvements will be in
the following commits.

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

10 years agoTest content type icons more thoroughly
Matthias Clasen [Sun, 23 Feb 2014 17:03:13 +0000 (12:03 -0500)]
Test content type icons more thoroughly

Check we actually get the right icon names, and check
that symbolic icons fall back to non-symbolic ones.

10 years agoAdd non-symbolic fallback icons in g_content_type_get_symbolic_icon().
John Lindgren [Sun, 23 Feb 2014 05:52:31 +0000 (00:52 -0500)]
Add non-symbolic fallback icons in g_content_type_get_symbolic_icon().

This makes the behavior consistent with e.g. g_volume_get_symbolic_icon().

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

10 years agoasyncqueue: fix timeout math on 32bit systems
Ryan Lortie [Sun, 23 Feb 2014 06:11:50 +0000 (01:11 -0500)]
asyncqueue: fix timeout math on 32bit systems

88182d375e13ae6519a288d5295220c83ca27e73 caught this issue in
g_async_queue_timed_pop() but failed to fix the same bug in the _unlocked()
variant.

This is only a problem on 32bit systems.  On 64bit systems, the tv_sec
in a timeval is already 64 bits, so no overflow occurs.

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