platform/upstream/glib.git
12 years agoRealign the hash set example with added api
Matthias Clasen [Sat, 7 Jan 2012 01:48:04 +0000 (20:48 -0500)]
Realign the hash set example with added api

Change the name of set_insert to set_add, to better match the
newly added g_hash_table_add.

12 years agodrop debian/ directory
Ryan Lortie [Mon, 9 Jan 2012 13:28:10 +0000 (14:28 +0100)]
drop debian/ directory

12 years agoFix GHashTable GDB pretty printing (bug #667420)
Dan Vrátil [Mon, 9 Jan 2012 08:29:20 +0000 (09:29 +0100)]
Fix GHashTable GDB pretty printing (bug #667420)

12 years agoUpdated Bulgarian translation
Alexander Shopov [Sun, 8 Jan 2012 14:48:13 +0000 (16:48 +0200)]
Updated Bulgarian translation

12 years agogthread-posix: Remove misleading documentation comments
Jasper St. Pierre [Fri, 6 Jan 2012 19:29:45 +0000 (14:29 -0500)]
gthread-posix: Remove misleading documentation comments

g_thread_init() has done nothing since 2.32, so while the function
still can be used if "g_thread_init() has not yet been called",
it won't do nothing in that case, it will just perform normally.

12 years agogbacktrace: g_get_prgname () isn't called for a NULL argument
Jasper St. Pierre [Tue, 13 Sep 2011 03:14:32 +0000 (23:14 -0400)]
gbacktrace: g_get_prgname () isn't called for a NULL argument

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

12 years agoUpdated Norwegian bokmål translation
Kjartan Maraas [Fri, 6 Jan 2012 19:35:34 +0000 (20:35 +0100)]
Updated Norwegian bokmål translation

12 years agoUpdated Spanish translation
Daniel Mustieles [Fri, 6 Jan 2012 19:31:54 +0000 (20:31 +0100)]
Updated Spanish translation

12 years agominor fixup to last commit
Ryan Lortie [Fri, 6 Jan 2012 15:25:03 +0000 (10:25 -0500)]
minor fixup to last commit

12 years agoGHashTable: new 'add' and 'contains' APIs
Ryan Lortie [Fri, 6 Jan 2012 15:09:32 +0000 (10:09 -0500)]
GHashTable: new 'add' and 'contains' APIs

These are both convenience APIs that make it slightly nicer to use
GHashTable as a set (which is something we document as officially
supported).

12 years agogio/gsocks5proxy: typo fix
Nguyễn Thái Ngọc Duy [Fri, 6 Jan 2012 09:58:57 +0000 (16:58 +0700)]
gio/gsocks5proxy: typo fix

12 years agoUpdated Vietnamese translation
Nguyễn Thái Ngọc Duy [Fri, 6 Jan 2012 09:58:28 +0000 (16:58 +0700)]
Updated Vietnamese translation

12 years agopo/vi: import from Damned Lies
Nguyễn Thái Ngọc Duy [Fri, 6 Jan 2012 09:48:13 +0000 (16:48 +0700)]
po/vi: import from Damned Lies

12 years agoRemove some cruft from an older version of the code
Dan Winship [Thu, 5 Jan 2012 17:57:01 +0000 (12:57 -0500)]
Remove some cruft from an older version of the code

12 years agogdesktopappinfo: Fix gtk-doc to mention Keywords not X-GNOME-Keywords
Michael Terry [Wed, 4 Jan 2012 19:48:53 +0000 (14:48 -0500)]
gdesktopappinfo: Fix gtk-doc to mention Keywords not X-GNOME-Keywords

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

12 years agoMention g_test_undefined() when documenting assert_failed, assert_stderr
Simon McVittie [Thu, 5 Jan 2012 15:10:04 +0000 (15:10 +0000)]
Mention g_test_undefined() when documenting assert_failed, assert_stderr

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=666116
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Colin Walters <walters@verbum.org>
12 years agoSkip tests of incorrect property usage under gtester -m no-undefined
Simon McVittie [Thu, 5 Jan 2012 15:02:07 +0000 (15:02 +0000)]
Skip tests of incorrect property usage under gtester -m no-undefined

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=666116
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Colin Walters <walters@verbum.org>
12 years agoglib/*: Use g_slist_free_full() convenience function
Javier Jardón [Thu, 5 Jan 2012 03:31:21 +0000 (04:31 +0100)]
glib/*: Use g_slist_free_full() convenience function

12 years agogio/*: Use g_slist_free_full() convenience function
Javier Jardón [Thu, 5 Jan 2012 03:27:20 +0000 (04:27 +0100)]
gio/*: Use g_slist_free_full() convenience function

12 years agogdesktopappinfo: Avoid crash by NULL-ing data.pid_envvar before launch
Michael Terry [Wed, 4 Jan 2012 18:08:56 +0000 (13:08 -0500)]
gdesktopappinfo: Avoid crash by NULL-ing data.pid_envvar before launch

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

12 years agoGSocket: fix a couple of return values
Claudio Saavedra [Tue, 3 Jan 2012 22:18:59 +0000 (00:18 +0200)]
GSocket: fix a couple of return values

g_socket_receive_with_blocking() and g_socket_send_with_blocking claim
to return -1 in error, their return type is gssize, and yet they
return FALSE if the initial g_return_val_if_fail() call fails.

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

12 years agoGSocket: add some more g_return_if_fail()s
Claudio Saavedra [Tue, 3 Jan 2012 22:13:50 +0000 (00:13 +0200)]
GSocket: add some more g_return_if_fail()s

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

12 years agoClarify g_utf8_strlen docs a bit
Matthias Clasen [Wed, 4 Jan 2012 05:10:11 +0000 (00:10 -0500)]
Clarify g_utf8_strlen docs a bit

12 years agoAdd a testcase for an old regex bug.
Paolo Borelli [Tue, 3 Jan 2012 10:49:55 +0000 (11:49 +0100)]
Add a testcase for an old regex bug.

Add a testcase for bug #455640, which was fixed in PCRE versions newer
than 7.2.

12 years agoglib/*: Use g_list_free_full()
Javier Jardón [Mon, 2 Jan 2012 15:10:35 +0000 (16:10 +0100)]
glib/*: Use g_list_free_full()

12 years agogio/*: Use g_list_free_full() convenience function
Javier Jardón [Mon, 2 Jan 2012 15:30:11 +0000 (16:30 +0100)]
gio/*: Use g_list_free_full() convenience function

12 years agogio/gdbus-2.0/codegen/codegen.py: Use g_list_free_full()
Javier Jardón [Mon, 2 Jan 2012 15:09:50 +0000 (16:09 +0100)]
gio/gdbus-2.0/codegen/codegen.py: Use g_list_free_full()

12 years agoFix parameter name mismatches in GWeakRef api
Matthias Clasen [Tue, 3 Jan 2012 15:48:50 +0000 (10:48 -0500)]
Fix parameter name mismatches in GWeakRef api

12 years agoAdd GWeakRef to the docs
Matthias Clasen [Tue, 3 Jan 2012 13:02:49 +0000 (08:02 -0500)]
Add GWeakRef to the docs

12 years agogio/tests: Use g_list_free_full() convenience function
Javier Jardón [Mon, 2 Jan 2012 14:20:42 +0000 (15:20 +0100)]
gio/tests: Use g_list_free_full() convenience function

12 years agogvariant: Never break out of g_variant_iter_loop
Stef Walter [Mon, 14 Nov 2011 17:03:47 +0000 (18:03 +0100)]
gvariant: Never break out of g_variant_iter_loop

 * Document how to break out of g_variant_iter_loop style loops.

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

12 years agoAdd test for GDBusConnection singleton access racing with destruction
Simon McVittie [Wed, 7 Dec 2011 15:04:59 +0000 (15:04 +0000)]
Add test for GDBusConnection singleton access racing with destruction

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

12 years agoGDBusConnection: use GWeakRef to make the singletons thread-safe
Simon McVittie [Tue, 6 Dec 2011 12:44:36 +0000 (12:44 +0000)]
GDBusConnection: use GWeakRef to make the singletons thread-safe

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

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

12 years agoAdd regression test for GWeakRef used to cache a singleton
Simon McVittie [Wed, 7 Dec 2011 15:04:13 +0000 (15:04 +0000)]
Add regression test for GWeakRef used to cache a singleton

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

12 years agoAdd deterministic tests for the API of GWeakRef
Simon McVittie [Thu, 8 Dec 2011 17:35:19 +0000 (17:35 +0000)]
Add deterministic tests for the API of GWeakRef

These don't address the thread-safety, but do address basic use.

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

12 years agoGWeakRef: add a weak GObject reference believed to be thread-safe
Ryan Lortie [Tue, 6 Dec 2011 12:27:07 +0000 (12:27 +0000)]
GWeakRef: add a weak GObject reference believed to be thread-safe

This patch is a joint work with Simon McVittie.

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

12 years agog_object_weak_ref, g_object_add_weak_pointer: document non-thread-safety
Simon McVittie [Tue, 6 Dec 2011 11:37:45 +0000 (11:37 +0000)]
g_object_weak_ref, g_object_add_weak_pointer: document non-thread-safety

Transparent access to a weak pointer from the thread performing the
weak -> strong conversion is incompatible with thread-safety: that
thread will have to do something special. This is GNOME#548954.

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

12 years agoGBitLock: turn assumptions of g_futex_int_address into a static assertion
Simon McVittie [Tue, 6 Dec 2011 11:35:02 +0000 (11:35 +0000)]
GBitLock: turn assumptions of g_futex_int_address into a static assertion

We'll probably never encounter a platform where these fail, but that's
what static assertions are for...

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

12 years agogthread.h: avoid anonymous union
Ryan Lortie [Mon, 2 Jan 2012 16:38:40 +0000 (11:38 -0500)]
gthread.h: avoid anonymous union

This is a GNU extension.

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

12 years agonextstep gsettings backend: whitespace police
William Hua [Mon, 2 Jan 2012 02:53:28 +0000 (21:53 -0500)]
nextstep gsettings backend: whitespace police

12 years agothread-safe nextstep gsettings backend
William Hua [Mon, 2 Jan 2012 02:38:05 +0000 (21:38 -0500)]
thread-safe nextstep gsettings backend

simplified key reset logic

12 years agoGSettings: nextstep settings backend
William Hua [Mon, 26 Dec 2011 15:04:38 +0000 (10:04 -0500)]
GSettings: nextstep settings backend

12 years agoginetaddressmask: plug leak
Xan Lopez [Sun, 1 Jan 2012 18:01:14 +0000 (19:01 +0100)]
ginetaddressmask: plug leak

==24706== 52 bytes in 1 blocks are definitely lost in loss record 7,248 of 13,092
==24706==    at 0x4A074CD: malloc (vg_replace_malloc.c:236)
==24706==    by 0x70E9F5F: standard_malloc (gmem.c:85)
==24706==    by 0x70E9FE8: g_malloc (gmem.c:159)
==24706==    by 0x71018EC: g_slice_alloc (gslice.c:1003)
==24706==    by 0x710192B: g_slice_alloc0 (gslice.c:1029)
==24706==    by 0x7068526: g_type_create_instance (gtype.c:1872)
==24706==    by 0x705067B: g_object_constructor (gobject.c:1835)
==24706==    by 0x704FE47: g_object_newv (gobject.c:1699)
==24706==    by 0x7050612: g_object_new_valist (gobject.c:1816)
==24706==    by 0x704F894: g_object_new (gobject.c:1531)
==24706==    by 0x6F0F2F0: g_inet_address_new_from_bytes (ginetaddress.c:459)
==24706==    by 0x6F5D703: remove_network (gnetworkmonitornetlink.c:256)
==24706==    by 0x6F5DD80: read_netlink_messages (gnetworkmonitornetlink.c:386)
==24706==    by 0x6F2D5CA: socket_source_dispatch (gsocket.c:2505)
==24706==    by 0x70E1D45: g_main_dispatch (gmain.c:2513)
==24706==    by 0x70E2A06: g_main_context_dispatch (gmain.c:3050)
==24706==    by 0x70E2BE9: g_main_context_iterate (gmain.c:3121)
==24706==    by 0x70E2CAD: g_main_context_iteration (gmain.c:3182)
==24706==    by 0x6F60A05: g_application_run (gapplication.c:1599)
==24706==    by 0x42D011: main (ephy-main.c:472)

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

12 years agoUpdated Hebrew translation.
Yaron Shahrabani [Fri, 30 Dec 2011 08:47:56 +0000 (10:47 +0200)]
Updated Hebrew translation.

12 years agoconfig.h.win32.in: Cleanups
Chun-wei Fan [Fri, 30 Dec 2011 07:27:31 +0000 (15:27 +0800)]
config.h.win32.in: Cleanups

-Make the contents of the preconfigured config.h.win32(.in) more like the
 contents of config.h.in
-Correct the sizing of void* on x64 platforms (which should be 8, unlike
 4 on x86-32 platforms)

12 years agoCorrect some Since tags
Matthias Clasen [Thu, 29 Dec 2011 16:57:42 +0000 (11:57 -0500)]
Correct some Since tags

As pointed out in bug 666951, g_mkdtemp and g_mkdtemp_full
were only added in 2.30.

12 years agoFix to handle '\v' (vertical tab) by g_strescape() and g_strcompress().
Ravi Sankar Guntur [Tue, 20 Dec 2011 09:19:53 +0000 (14:49 +0530)]
Fix to handle '\v' (vertical tab) by g_strescape() and g_strcompress().

fix enables g_strescape() and g_strcompress() to handle '\v' along with other
special characters - '\b', '\f', '\n', '\r', '\t', '\'.

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

Signed-off-by: Ravi Sankar Guntur <ravi.g@samsung.com>
12 years agoSome minor updates of building.sgml
Matthias Clasen [Tue, 27 Dec 2011 23:10:42 +0000 (18:10 -0500)]
Some minor updates of building.sgml

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

12 years agoSome minor updates of HACKING
Matthias Clasen [Tue, 27 Dec 2011 23:10:26 +0000 (18:10 -0500)]
Some minor updates of HACKING

12 years agoAdd undefined/no-undefined mode options to GTester
Simon McVittie [Wed, 14 Dec 2011 17:31:23 +0000 (17:31 +0000)]
Add undefined/no-undefined mode options to GTester

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

12 years agovarious tests: do not provoke SIGTRAP with -m no-undefined
Simon McVittie [Wed, 14 Dec 2011 18:08:59 +0000 (18:08 +0000)]
various tests: do not provoke SIGTRAP with -m no-undefined

Some of the GLib tests deliberately provoke warnings (or even fatal
errors) in a forked child. Normally, this is fine, but under valgrind
it's somewhat undesirable. We do want to follow fork(), so we can check
for leaks in child processes that exit gracefully; but we don't want to
be told about "leaks" in processes that are crashing, because there'd
be no point in cleaning those up anyway.

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

12 years agoClarify documentation of fast/slow/thorough and quiet/verbose tests
Simon McVittie [Wed, 14 Dec 2011 17:32:16 +0000 (17:32 +0000)]
Clarify documentation of fast/slow/thorough and quiet/verbose tests

It turns out that there is no middle setting between fast and
slow/thorough, but there *is* a middle setting between quiet and verbose.

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

12 years agoRemove another unused AC_DEFINE
Matthias Clasen [Tue, 27 Dec 2011 22:45:40 +0000 (17:45 -0500)]
Remove another unused AC_DEFINE

Nothing was using the HAVE_GCOV define.

12 years agoDrop unused AC_SUBST
Matthias Clasen [Tue, 27 Dec 2011 22:20:36 +0000 (17:20 -0500)]
Drop unused AC_SUBST

DISABLE_MEM_POOLS is only used as define.

12 years agoRemove a bashism
Matthias Clasen [Tue, 27 Dec 2011 22:15:44 +0000 (17:15 -0500)]
Remove a bashism

12 years agoDrop a lot of dead configury for threads
Matthias Clasen [Tue, 27 Dec 2011 22:12:39 +0000 (17:12 -0500)]
Drop a lot of dead configury for threads

Much of this became obsolete by the recent rewrite of our
threading support.

12 years agoDon't put documentation in glibconfig.h
Matthias Clasen [Tue, 27 Dec 2011 21:22:13 +0000 (16:22 -0500)]
Don't put documentation in glibconfig.h

12 years agoMake glibconfig.h include guards consistent
Matthias Clasen [Tue, 27 Dec 2011 21:18:19 +0000 (16:18 -0500)]
Make glibconfig.h include guards consistent

12 years agoRemove a commented-out macro
Matthias Clasen [Tue, 27 Dec 2011 21:16:24 +0000 (16:16 -0500)]
Remove a commented-out macro

12 years agoRemove obsolescent AC_HEADER_STDC macro
Matthias Clasen [Tue, 27 Dec 2011 20:55:04 +0000 (15:55 -0500)]
Remove obsolescent AC_HEADER_STDC macro

We only used the resulting define in one place, and really,
these headers just have to be around or its not worth trying.

12 years agodocs: g_atexit: do not point in a direction for where to find details
Thomas Hindoe Paaboel Andersen [Sat, 24 Dec 2011 14:31:55 +0000 (15:31 +0100)]
docs: g_atexit: do not point in a direction for where to find details

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

12 years agoUpdated Norwegian Nynorsk translation
Åsmund Skjæveland [Mon, 26 Dec 2011 16:15:32 +0000 (17:15 +0100)]
Updated Norwegian Nynorsk translation

12 years agoDon't leak references to the menus
Matthias Clasen [Sun, 25 Dec 2011 04:01:17 +0000 (23:01 -0500)]
Don't leak references to the menus

12 years agoAdd a test for ids on submenu and section elements
Matthias Clasen [Sun, 25 Dec 2011 03:59:10 +0000 (22:59 -0500)]
Add a test for ids on submenu and section elements

The test checks that menus which are created via
<submenu id=...> or <section id=...> end up in the objects
hash table.

12 years agoMenu markup: Support ids on submenu and section elements
Matthias Clasen [Sun, 25 Dec 2011 03:58:16 +0000 (22:58 -0500)]
Menu markup: Support ids on submenu and section elements

This was supposed to work, but didn't.
Bug 666595.

12 years agodocs: Clarify non-NUL requirement in g_utf8_validate()
Benjamin Otte [Sat, 24 Dec 2011 13:26:24 +0000 (14:26 +0100)]
docs: Clarify non-NUL requirement in g_utf8_validate()

UTF8 validation is not about your character on a dating site, so don't
talk about meeting.

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

12 years agoAdd GSocketClient::event, for tracking socket client status
Dan Winship [Fri, 20 Aug 2010 17:04:19 +0000 (13:04 -0400)]
Add GSocketClient::event, for tracking socket client status

This can be used for debugging, or for progress UIs ("Connecting to
example.com..."), or to do low-level tweaking on the connection at
various points in the process.

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

12 years agoAdd g_socket_connection_connect(), etc
Dan Winship [Sun, 12 Jun 2011 20:29:04 +0000 (16:29 -0400)]
Add g_socket_connection_connect(), etc

Previously it was more or less assumed that GSocketConnections were
always connected, although this was not enforced. Make it explicit
that they don't need to be, and add methods to connect them, and
simplify GSocketClient by using those methods.

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

12 years agoUpdate GIO Visual C++ projects
Chun-wei Fan [Thu, 22 Dec 2011 12:18:11 +0000 (20:18 +0800)]
Update GIO Visual C++ projects

Link to zlib1.lib for release builds and zlib1d.lib for debug builds-
this is to be consistent across the board for the GTK+ stack (and many
other opensource code linking to the ZLib DLL on Windows)

12 years agoUpdate Visual C++ property sheets
Chun-wei Fan [Thu, 22 Dec 2011 10:49:01 +0000 (18:49 +0800)]
Update Visual C++ property sheets

"Install" the newly-introduced gremoteactiongroup.h header.

12 years agoGSettingsBackend: allow floating refs from read()
Ryan Lortie [Thu, 22 Dec 2011 05:24:20 +0000 (00:24 -0500)]
GSettingsBackend: allow floating refs from read()

Use g_variant_take_ref() to allow for backends to return floating
GVariant instances from their read() implementations.

12 years agoBug 666551-Fix a few dangling pointers
rodrigorivascosta [Thu, 22 Dec 2011 02:48:09 +0000 (10:48 +0800)]
Bug 666551-Fix a few dangling pointers

When removing an item from the list, check the next one's my_owner,
and fix it accordingly. And take this case into account when last
of the list is deleted.

Also, assign NULL to 'my_owner' in g_thread_xp_WakeConditionVariable.

12 years agoglib/tests/private.c: Fix compilation on Windows
Chun-wei Fan [Wed, 21 Dec 2011 03:24:09 +0000 (11:24 +0800)]
glib/tests/private.c: Fix compilation on Windows

-process.h must be included for _beginthreadex
-Use a cast to HANDLE on _beginthreadex to silence warnings on different
 types

12 years agoUpdated Norwegian bokmål translation
Kjartan Maraas [Wed, 21 Dec 2011 21:22:05 +0000 (22:22 +0100)]
Updated Norwegian bokmål translation

12 years agomenu: documentation fixes
Cosimo Cecchi [Wed, 21 Dec 2011 11:36:19 +0000 (12:36 +0100)]
menu: documentation fixes

g_menu_new_section() does not exist, the comment meant
g_menu_item_new_section().

12 years agoGObject: do checks on interface property install
Ryan Lortie [Wed, 21 Dec 2011 00:45:57 +0000 (19:45 -0500)]
GObject: do checks on interface property install

Add some checks to g_object_interface_install_property() similar to
those in g_object_class_install_property().

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

12 years agoGObject: require READ or WRITE on property install
Ryan Lortie [Wed, 21 Dec 2011 00:43:21 +0000 (19:43 -0500)]
GObject: require READ or WRITE on property install

g_object_class_install_property() currently lets you install properties
that are neither readable nor writable.  Add a check to prevent that.

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

12 years agoGObject: allow G_PARAM_CONSTRUCT on any override
Ryan Lortie [Wed, 21 Dec 2011 00:33:02 +0000 (19:33 -0500)]
GObject: allow G_PARAM_CONSTRUCT on any override

We were previously preventing implementations of an interface from
specifying G_PARAM_CONSTRUCT for a property of that interface if the
interface didn't specify it itself (or was readonly).

This is something that should only interest the implementation, so we
remove this restriction.

This allows 6 new possible override scenarios:

 - writable                 -> writable/construct
 - writable                 -> readwrite/construct
 - readwrite                -> readwrite/construct
 - writable/construct-only  -> writable/construct
 - writable/construct-only  -> readwrite/construct
 - readwrite/construct-only -> readwrite/construct

and we update the testcase to reflect this.

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

12 years agoGObject: add test for interface property overrides
Ryan Lortie [Tue, 20 Dec 2011 23:44:48 +0000 (18:44 -0500)]
GObject: add test for interface property overrides

Add a testcase to check all possibilities for overriding a property
specified on an interface from an implementation of that interface,
changing the type and flags.

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

12 years agoGObject: change the order of property checks
Ryan Lortie [Tue, 20 Dec 2011 23:41:03 +0000 (18:41 -0500)]
GObject: change the order of property checks

Change the order of the checks so that we hear about the 'biggest'
problem first.  Also, stop reporting problems after we report the first
one for a particular property.

Add some comments.

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

12 years agoGObject: fix property override type checks
Ryan Lortie [Tue, 20 Dec 2011 23:26:14 +0000 (18:26 -0500)]
GObject: fix property override type checks

The property override typecheck was meant to enforce the type on the
overriding property being exactly equal to the type on the interface
property.  Instead, g_type_is_a() was incorrectly used.

We could try to enforce equality, but if a property is read-only then it
should be possible for the implementation to type the property with any
subtype of the type specified on the interface (because returning a more
specific type will still satisfy the interface).  Likewise, if the
property is write-only then it should be possible for the implementation
to type the property with any supertype.

We implement the check this way.

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

12 years agoGSimpleAction: fix some whitespace fail
Ryan Lortie [Wed, 21 Dec 2011 00:12:56 +0000 (19:12 -0500)]
GSimpleAction: fix some whitespace fail

12 years agoGSimpleAction: tweak property flags
Ryan Lortie [Wed, 21 Dec 2011 00:11:19 +0000 (19:11 -0500)]
GSimpleAction: tweak property flags

There's no need for 'enabled' and 'state' to be marked construct-only.
These properties are writable at all times.

12 years agoGObject: fixup reversed logic in last commit
Ryan Lortie [Tue, 20 Dec 2011 20:29:16 +0000 (15:29 -0500)]
GObject: fixup reversed logic in last commit

Accidentally dropped a !.

12 years agogobject: Clean up logic in property checks
Ryan Lortie [Tue, 20 Dec 2011 20:12:44 +0000 (15:12 -0500)]
gobject: Clean up logic in property checks

Simplify some of the logic in this function.

  1) Simplify flag checks as per Colin's suggestions in
     https://bugzilla.gnome.org/show_bug.cgi?id=605667

  2) Don't repeatedly recheck if class_pspec is NULL.

12 years agoGAction: back out changes to property flags
Ryan Lortie [Tue, 20 Dec 2011 19:43:15 +0000 (14:43 -0500)]
GAction: back out changes to property flags

41e5ba86a791a17bb560dd7813ad7e849e0230dc introduced some changes to the
property flags of GAction.  These changes were not a reflection of the
actual interface of GAction but were necessary due to GObject being
overly-sensitive to flag changes on property overrides.

Now that the GObject bug is fixed, we can restore the GAction flags to
their correct values.

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

12 years agogobject: loosen property override flag restrictions
Ryan Lortie [Tue, 20 Dec 2011 19:36:29 +0000 (14:36 -0500)]
gobject: loosen property override flag restrictions

GObject enforces the following restrictions on property overrides:

  - must only add abilities: if the parent class supports
    readability/writability then the subclass must also support them.
    Subclasses are free to add readability/writability.

  - must not add additional restrictions: if the parent class doesn't
    have construct/construct-only restrictions then the subclass must
    not add them.  Subclasses are free to remove restrictions.

The problem with the previous implementation is that the check against
adding construct/construct-only restrictions was being done even if the
property was not previously writable.  As an example:

  "readable" and "writable only on construct"

was considered as being more restrictive than

  "read only".

This patch tweaks the check to allow the addition of
construct/construct-only restrictions for properties that were
previously read-only and are now being made writable.

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

12 years agoAdd references to the dbus interface docs on the wiki
Matthias Clasen [Tue, 20 Dec 2011 17:15:05 +0000 (12:15 -0500)]
Add references to the dbus interface docs on the wiki

And strip out the (now) redundant copy of that information
from the sources.

12 years agodocs: remove duplicate GMenuModel from gio.types
Ryan Lortie [Tue, 20 Dec 2011 03:56:05 +0000 (22:56 -0500)]
docs: remove duplicate GMenuModel from gio.types

12 years agowinxp threads: fix some condition variable races
Ryan Lortie [Mon, 19 Dec 2011 22:35:31 +0000 (17:35 -0500)]
winxp threads: fix some condition variable races

There are some races in the condition variable emulation code for
Windows XP with respect to timeouts while waiting.

First, in the event of a timeout, we never remove the waiter from the
condition variable.  This can cause crashes later.  That problem was
found by Rodrigo Rivas Costa.

Second, if the waiting thread times out and exits just as we were about
to call SetEvent() on its waiter event, we could end up trying to access
the waiter after it was closed/freed.  We need to hold on to the lock a
little bit longer to ensure that that's not possible.

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

12 years ago*bump*
Ryan Lortie [Mon, 19 Dec 2011 20:24:52 +0000 (15:24 -0500)]
*bump*

12 years agognetworkmonitornetlink.c: Fix a gsize->gssize
Dan Winship [Mon, 19 Dec 2011 20:19:19 +0000 (15:19 -0500)]
gnetworkmonitornetlink.c: Fix a gsize->gssize

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

12 years agoglib 2.31.6 2.31.6
Ryan Lortie [Mon, 19 Dec 2011 18:38:21 +0000 (13:38 -0500)]
glib 2.31.6

12 years agogitignore
Ryan Lortie [Mon, 19 Dec 2011 18:37:06 +0000 (13:37 -0500)]
gitignore

12 years agoDrop public menu APIs from GApplication
Ryan Lortie [Mon, 19 Dec 2011 15:47:45 +0000 (10:47 -0500)]
Drop public menu APIs from GApplication

This is moving to Gtk, but we don't want to do it all right now.

12 years agoDrop the GApplication menu test
Ryan Lortie [Mon, 19 Dec 2011 15:47:28 +0000 (10:47 -0500)]
Drop the GApplication menu test

12 years agoUpdated Spanish translation
Daniel Mustieles [Mon, 19 Dec 2011 16:13:11 +0000 (17:13 +0100)]
Updated Spanish translation

12 years agogsettings-tool: allow specifying custom schema dirs
Giovanni Campagna [Sat, 17 Dec 2011 19:08:50 +0000 (20:08 +0100)]
gsettings-tool: allow specifying custom schema dirs

It happens that one wants to customize settings for plugins or
shell extensions, that installing schemas in nonstandard locations.
This patch adds the --schemadir option to gsettings, and ensure
that the appropriate schema is found.

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

12 years agogdesktopappinfo: Use "Keywords" instead of "X-GNOME-Keywords"
Florian Müllner [Mon, 19 Dec 2011 13:52:10 +0000 (14:52 +0100)]
gdesktopappinfo: Use "Keywords" instead of "X-GNOME-Keywords"

The field has now been standardized, so drop the prefix.

12 years agoTeach gtk-doc about G_GNUC_WARN_UNUSED_RESULT
Matthias Clasen [Mon, 19 Dec 2011 12:45:43 +0000 (07:45 -0500)]
Teach gtk-doc about G_GNUC_WARN_UNUSED_RESULT