platform/upstream/glib.git
10 years agogio tests: rm xdgconfighome on 'make clean'
Ryan Lortie [Mon, 26 May 2014 21:01:25 +0000 (23:01 +0200)]
gio tests: rm xdgconfighome on 'make clean'

10 years agoRevert "gvariant: Fix confusion between type and format strings in the docs"
Ryan Lortie [Mon, 26 May 2014 15:33:57 +0000 (17:33 +0200)]
Revert "gvariant: Fix confusion between type and format strings in the docs"

This reverts commit fca1b83be74c9840037cfee84015fd8460cc33f9.

The original documentation was correct.

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

10 years agogtestutils: Error out if /dev/null stdin redirection fails
Philip Withnall [Fri, 16 May 2014 22:08:10 +0000 (23:08 +0100)]
gtestutils: Error out if /dev/null stdin redirection fails

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

10 years agogio: port annotations from the Vala metadata.
Evan Nemerson [Wed, 21 May 2014 07:27:36 +0000 (00:27 -0700)]
gio: port annotations from the Vala metadata.

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

10 years agoconfig.h.win32.in: Define _WIN32_WINNT Conditionally
Chun-wei Fan [Fri, 23 May 2014 02:14:16 +0000 (10:14 +0800)]
config.h.win32.in: Define _WIN32_WINNT Conditionally

This is done so that _WIN32_WINNT may be overridden in the project files,
if needed, so that one can access the Vista+ (or so) Windows APIs easier
by using "preprocessor defines" (or so) in the Visual C++ project files.

10 years agoTry to fix mapping-test
Matthias Clasen [Thu, 22 May 2014 21:22:56 +0000 (17:22 -0400)]
Try to fix mapping-test

The mapping-test is failing under gnome-continuous. I suspect this
is simply due to running many tests in parallel, and mapping-test
being racy. Replace the blind sleep by signals, to avoid the
races.

10 years agoGDBusError enum: Remove trailing comma.
Murray Cumming [Tue, 29 Apr 2014 11:21:41 +0000 (13:21 +0200)]
GDBusError enum: Remove trailing comma.

This is helpful to people using the g++ --pedantic option.

10 years agogobject: unref unused class
Marek Kasik [Thu, 22 May 2014 09:00:14 +0000 (11:00 +0200)]
gobject: unref unused class

If g_type_class_ref() returns a class which is not
a GObjectClass we need to unref it before return in
object_interface_check_properties().

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

10 years agoTrivial: fix a guard comment
Matthias Clasen [Wed, 21 May 2014 11:40:09 +0000 (07:40 -0400)]
Trivial: fix a guard comment

The conventional comment for the #endif at the bottom of the
header was not matching the #ifdef at the top in glib-private.h.
Fix that.

10 years agogdbus-tool: Remove dead variables
Philip Withnall [Sat, 17 May 2014 11:08:58 +0000 (12:08 +0100)]
gdbus-tool: Remove dead variables

Coverity issues: #1159447, #1159446

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

10 years agogthread: Fix use of a local variable after it went out of scope
Philip Withnall [Fri, 16 May 2014 20:47:24 +0000 (21:47 +0100)]
gthread: Fix use of a local variable after it went out of scope

This could theoretically cause problems, although in practice we would
have seen them by now (the bug was introduced in 2012).

Coverity issue: #1159486

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

10 years agogsubprocess: Add a missing va_end() call
Philip Withnall [Fri, 16 May 2014 21:09:29 +0000 (22:09 +0100)]
gsubprocess: Add a missing va_end() call

Coverity issues: #1214070, #1214069

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

10 years agoUpdate config.h.win32.in for Newer Windows
Chun-wei Fan [Mon, 19 May 2014 06:49:39 +0000 (14:49 +0800)]
Update config.h.win32.in for Newer Windows

Make use of if_indextoname() and if_nametoindex() when building against
Window Vista/Server 2008 or later, as these are provided by the system.

This is not turned on by default as we still want to support XP and
Server 2003-turn this on by changing _WIN32_WINNT to 0x600 or later prior
to compiling GLib.

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

10 years agoUpdated Czech translation
Marek Černocký [Sun, 18 May 2014 06:38:05 +0000 (08:38 +0200)]
Updated Czech translation

10 years agoUpdated Hebrew translation
Yosef Or Boczko [Fri, 16 May 2014 01:37:21 +0000 (04:37 +0300)]
Updated Hebrew translation

10 years agogsocket: Add missing preconditions to g_socket_send_message()
Philip Withnall [Thu, 15 May 2014 11:16:00 +0000 (12:16 +0100)]
gsocket: Add missing preconditions to g_socket_send_message()

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

10 years agogresource-tool: Fix an FD leak in an error path
Philip Withnall [Thu, 15 May 2014 09:18:38 +0000 (10:18 +0100)]
gresource-tool: Fix an FD leak in an error path

Coverity issues: #1214054, #1214055, #1214056

10 years agogtestutils: Don’t free unassigned variables in an error path
Philip Withnall [Thu, 15 May 2014 09:15:26 +0000 (10:15 +0100)]
gtestutils: Don’t free unassigned variables in an error path

If the stream is invalid, msg.nums and msg.strings have not been
assigned to, so don’t free them.

Coverity issue: #1159505

10 years agoAvoid overeager warning about deprecated properties
Matthias Clasen [Tue, 13 May 2014 03:05:41 +0000 (23:05 -0400)]
Avoid overeager warning about deprecated properties

Construct properties are always set during construction.
It makes no sense to warn about this even if the property
is marked as deprecated; the deprecation warning should
only be issues for explicit uses of the property after
construction.

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

10 years agoRemove some markup from docs
Matthias Clasen [Thu, 8 May 2014 03:08:50 +0000 (23:08 -0400)]
Remove some markup from docs

10 years agogio/gtestdbus.c: Fix write_config_file() for Windows
Chun-wei Fan [Tue, 18 Mar 2014 04:54:10 +0000 (12:54 +0800)]
gio/gtestdbus.c: Fix write_config_file() for Windows

Windows does not like g_unlink() to be called on files whose file
descriptor is still open, so doing that would cause a permission
denied error.  Since the fd is not used in that function after
acquiring the temp file, close it earlier before
g_file_set_contents(), so that it can complete successfully.

This fixes a number of GTK+ tests on Windows.

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

10 years agodoc: better ordering of GSubprocessLauncher functions
Sébastien Wilmet [Sun, 11 May 2014 21:41:23 +0000 (23:41 +0200)]
doc: better ordering of GSubprocessLauncher functions

Take the same order as the header.

10 years agoUpdated Spanish translation
Daniel Mustieles [Sat, 10 May 2014 17:43:59 +0000 (19:43 +0200)]
Updated Spanish translation

10 years agogobject.py: Port to gdb 7.7 frame filter API
Tom Tromey [Fri, 21 Feb 2014 19:16:00 +0000 (19:16 +0000)]
gobject.py: Port to gdb 7.7 frame filter API

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

10 years agodoc: various improvements
Sébastien Wilmet [Mon, 21 Apr 2014 12:50:53 +0000 (14:50 +0200)]
doc: various improvements

- GSubprocessLauncher exists since 2.40, not 2.36
- more logical order for g_markup functions
- fix short description of GMarkup
- GMarkupParser: specify that some parameters are NULL-terminated.
- g_string_new (NULL); is possible.
- other trivial fixes.

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

10 years agogio: cleanup gdbusmessage.c file
Lukasz Skalski [Fri, 9 May 2014 13:06:52 +0000 (15:06 +0200)]
gio: cleanup gdbusmessage.c file

* removed passing GError to ensure_input_padding() function
  - it was necessary before commit 3e5214c15c2a19b64d74e714
  when we used GData*Streams and GMemoryInputStream with
  g_seekable_seek() - now it's useless,

* removed checking return value of ensure_input_padding()
  function - in previous implementation (like above)
  g_seekable_seek() could return FALSE - now it's always TRUE,

* removed passing GError to g_memory_buffer_read_*() functions
  and checking returned value - it also has been inherited after
  old implementation with g_data_input_stream_read_*() functions
  - now it's also useless

* cleaned up code formatting,

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

10 years agotests: add testcase for {Only,Not}ShowIn
Ryan Lortie [Thu, 8 May 2014 20:16:35 +0000 (16:16 -0400)]
tests: add testcase for {Only,Not}ShowIn

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

10 years agoAppInfo: use XDG_CURRENT_DESKTOP for OnlyShowIn
Ryan Lortie [Thu, 8 May 2014 12:57:50 +0000 (08:57 -0400)]
AppInfo: use XDG_CURRENT_DESKTOP for OnlyShowIn

Expand the functionality of g_desktop_app_info_set_desktop_env() to
include the possibility of passing strings containing ':' characters (as
some apps, such as gnome-session, are directly passing the value of
XDG_CURRENT_DESKTOP).  At the same time, deprecate it, since now we get
the list from the environment variable for ourselves.

Modify the checks in g_desktop_app_info_get_show_in() to deal with
multiple items listed in XDG_CURRENT_DESKTOP.  For example, if we find
that we have

  XDG_CURRENT_DESKTOP=GNOME-Classic:GNOME

and a desktop file contains:

  OnlyShowIn=GNOME

then we will show this file because of the fallback to GNOME.  If the
file _also_ contains the line:

  NotShowIn=GNOME-Classic

Then we will not show it, because GNOME-Classic comes before GNOME in
XDG_CURRENT_DESKTOP.

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

10 years agotests: add tests for GDesktopAppInfo Implements=
Ryan Lortie [Fri, 15 Nov 2013 19:44:33 +0000 (14:44 -0500)]
tests: add tests for GDesktopAppInfo Implements=

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

10 years agodocs: add two missing symbols on GDesktopAppInfo
Ryan Lortie [Fri, 15 Nov 2013 19:44:11 +0000 (14:44 -0500)]
docs: add two missing symbols on GDesktopAppInfo

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

10 years agoAdd g_desktop_app_info_get_implementations()
Ryan Lortie [Fri, 15 Nov 2013 19:40:37 +0000 (14:40 -0500)]
Add g_desktop_app_info_get_implementations()

This provides support for the draft addition of 'Implements=' to the Desktop
Entry specification.

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

10 years agoAdd a testcase for the previous fix
Matthias Clasen [Tue, 6 May 2014 00:30:35 +0000 (20:30 -0400)]
Add a testcase for the previous fix

This testcase tests that short option arguments are
not erroneously added to the remaining argument array
when g_option_context_set_ignore_unknown_options is
called.
https://bugzilla.gnome.org/show_bug.cgi?id=729563

10 years agogoption: Don't include parsed option values in G_OPTION_REMAINING
Kjell Ahlstedt [Mon, 5 May 2014 12:40:31 +0000 (14:40 +0200)]
goption: Don't include parsed option values in G_OPTION_REMAINING

After a call to g_option_context_set_ignore_unknown_options(context, TRUE),
the values of short options were included in the array returned by a
G_OPTION_REMAINING option.

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

10 years agogio: iostream: use GTask instead of internal pointer
Lionel Landwerlin [Tue, 21 Jan 2014 19:12:08 +0000 (19:12 +0000)]
gio: iostream: use GTask instead of internal pointer

This fixes an infinite recursion loop when calling
g_io_stream_close_async() on a SoupIOStream.

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

10 years agoFix some typos in documentation
Mathieu Bridon [Mon, 5 May 2014 10:30:56 +0000 (18:30 +0800)]
Fix some typos in documentation

10 years agodocs: Add a README.rationale documenting major design decisions
Philip Withnall [Fri, 2 May 2014 07:42:06 +0000 (09:42 +0200)]
docs: Add a README.rationale documenting major design decisions

It will be useful to document the major decisions which affect the whole
of GLib in one centralised, easily-greppable file, otherwise they will
get lost forever in Bugzilla.

This file should contain a brief explanation of the decision and its
rationale, plus a link to further discussion (e.g. on a mailing list or
bug report).

This contains an initial discussion about use of compiler attributes in
GLib.

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

10 years agogstrfuncs: Add missing preconditions to g_str_match_string()
Philip Withnall [Thu, 28 Nov 2013 20:39:56 +0000 (20:39 +0000)]
gstrfuncs: Add missing preconditions to g_str_match_string()

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

10 years agogio: add a missing property to GDummyTlsConnection
Dan Winship [Sat, 3 May 2014 21:24:48 +0000 (17:24 -0400)]
gio: add a missing property to GDummyTlsConnection

GDummyTlsConnection didn't implement the "interaction" property,
meaning you'd get warnings if you tried to set it while creating a
GTlsConnection when using the dummy backend. (Of course, trying to
create the GTlsConnection will fail anyway, but it ought to fail
without hitting any g_warnings.)

10 years ago[l10n] Update Catalan translation
Pau Iranzo [Fri, 2 May 2014 10:41:30 +0000 (12:41 +0200)]
[l10n] Update Catalan translation

10 years agodocs: Fix some minor typos in the GVariant documentation
Philip Withnall [Wed, 30 Apr 2014 14:58:21 +0000 (16:58 +0200)]
docs: Fix some minor typos in the GVariant documentation

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

10 years agogvariant: Fix confusion between type and format strings in the docs
Philip Withnall [Wed, 30 Apr 2014 14:37:30 +0000 (16:37 +0200)]
gvariant: Fix confusion between type and format strings in the docs

‘@’ and ‘&’ are only used in format strings, not type strings.

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

10 years agogobject: Document that classes/objects/interfaces are zero-filled
Philip Withnall [Tue, 29 Apr 2014 07:47:14 +0000 (08:47 +0100)]
gobject: Document that classes/objects/interfaces are zero-filled

On initialisation, GObject guarantees to zero-fill
class/object/interface structures. Document this so people don’t spend
forever writing:
    my_object->priv->some_member = NULL;
    my_object->priv->some_other_member = NULL;

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

10 years agoUpdated Slovenian translation
Matej Urbančič [Mon, 28 Apr 2014 19:47:39 +0000 (21:47 +0200)]
Updated Slovenian translation

10 years agoUpdated Slovenian translation
Matej Urbančič [Mon, 28 Apr 2014 19:45:20 +0000 (21:45 +0200)]
Updated Slovenian translation

10 years agoUpdated Slovenian translation
Matej Urbančič [Mon, 28 Apr 2014 19:28:16 +0000 (21:28 +0200)]
Updated Slovenian translation

10 years agogmenuexporter: fix protocol documentation link
Lars Uebernickel [Mon, 28 Apr 2014 07:26:32 +0000 (09:26 +0200)]
gmenuexporter: fix protocol documentation link

10 years agoUpdated Brazilian Portuguese translation
Enrico Nicoletto [Sun, 27 Apr 2014 00:19:44 +0000 (00:19 +0000)]
Updated Brazilian Portuguese translation

10 years agoAdded type check to GPermission public functions.
Juan Pablo Ugarte [Fri, 25 Apr 2014 22:35:58 +0000 (19:35 -0300)]
Added type check to GPermission public functions.

10 years agogresolver: Ensure GThreadedResolver always sets an error if resolution fails
Philip Withnall [Thu, 24 Apr 2014 08:26:12 +0000 (09:26 +0100)]
gresolver: Ensure GThreadedResolver always sets an error if resolution fails

It was previously possible for GThreadedResolver to return an empty list
and no error in response to a g_resolver_lookup_by_name() call, if it
happened that all the addresses returned by getaddrinfo() could not be
converted from native addresses to GSocketAddresses.

Fix that by setting a G_RESOLVER_ERROR_NOT_FOUND if the returned list is
empty.

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

10 years agogresolver: Document that GResolver lists are non-empty on success
Philip Withnall [Thu, 24 Apr 2014 08:24:48 +0000 (09:24 +0100)]
gresolver: Document that GResolver lists are non-empty on success

The documentation previously wasn’t clear about whether the GResolver
methods could return an empty list and no error. On balance, this seems
like a bad idea, and GResolver should commit to always return a
non-empty list, or an error (which should be G_RESOLVER_ERROR_NOT_FOUND
if the list would otherwise be empty).

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

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