platform/upstream/glib.git
12 years agoAdd a test for menu subscriptions
Matthias Clasen [Mon, 28 Nov 2011 04:28:53 +0000 (23:28 -0500)]
Add a test for menu subscriptions

12 years agoTake out excessive width
Matthias Clasen [Sun, 27 Nov 2011 23:52:15 +0000 (18:52 -0500)]
Take out excessive width

12 years agoReduce excessive width
Matthias Clasen [Sun, 27 Nov 2011 23:50:04 +0000 (18:50 -0500)]
Reduce excessive width

12 years agowhitespace fix
Matthias Clasen [Sun, 27 Nov 2011 23:46:57 +0000 (18:46 -0500)]
whitespace fix

12 years agoAdd some tests for links
Matthias Clasen [Sun, 27 Nov 2011 23:12:52 +0000 (18:12 -0500)]
Add some tests for links

12 years agoAdd parser roundtrip tests
Matthias Clasen [Sun, 27 Nov 2011 21:51:13 +0000 (16:51 -0500)]
Add parser roundtrip tests

12 years agoGMenuMarkup: fixes uncovered by roundtrip testing
Matthias Clasen [Sun, 27 Nov 2011 21:50:17 +0000 (16:50 -0500)]
GMenuMarkup: fixes uncovered by roundtrip testing

The print function was forgetting to emit type information for
attributes, and the parser was not handling types properly either.

12 years agoImprove docs
Matthias Clasen [Sun, 27 Nov 2011 18:46:49 +0000 (13:46 -0500)]
Improve docs

Specify that g_menu_item_set_attribute_value consumes floating
@values.

12 years agoGApplication: Add a menu example to the docs
Matthias Clasen [Sun, 27 Nov 2011 07:16:51 +0000 (02:16 -0500)]
GApplication: Add a menu example to the docs

12 years agoGMenu: Enforce attribute name restrictions
Matthias Clasen [Sun, 27 Nov 2011 06:44:14 +0000 (01:44 -0500)]
GMenu: Enforce attribute name restrictions

The code assumes in various places that ':' does not occur
in attribute names. We are a little more strict than that,
and only allow lowercase ASCII, digits and '-'.

12 years agoReduce excessive width of gmenu.h
Matthias Clasen [Sun, 27 Nov 2011 06:16:39 +0000 (01:16 -0500)]
Reduce excessive width of gmenu.h

12 years agoMatch up a parameter name
Matthias Clasen [Sun, 27 Nov 2011 06:06:17 +0000 (01:06 -0500)]
Match up a parameter name

12 years agoDescribe the org.gtk.Menus interface
Matthias Clasen [Sun, 27 Nov 2011 05:54:17 +0000 (00:54 -0500)]
Describe the org.gtk.Menus interface

Even though we consider the interface to be an implementation
detail, we should have internal documentation of the interface.

12 years agoDescribe the org.gtk.Actions interface
Matthias Clasen [Sun, 27 Nov 2011 05:52:51 +0000 (00:52 -0500)]
Describe the org.gtk.Actions interface

Even though we consider the interface to be an implementation
detail, we should have internal documentation for the interface.

12 years agoRename exporter APIs
Matthias Clasen [Sun, 27 Nov 2011 04:21:12 +0000 (23:21 -0500)]
Rename exporter APIs

There are no public 'exporter' objects, so don't allude to them
in the function names. At the same time, we want to make it clear
that these functions are D-Bus specific.

The new APIs are
g_action_group_dbus_export_start
g_action_group_dbus_export_query
g_action_group_dbus_export_stop
g_menu_model_dbus_export_start
g_menu_model_dbus_export_query
g_menu_model_dbus_export_stop

12 years agoGActionGroup: Mention GMenuModel in the docs
Matthias Clasen [Sun, 27 Nov 2011 02:44:46 +0000 (21:44 -0500)]
GActionGroup: Mention GMenuModel in the docs

12 years agoAdd g_application_set_menu
Matthias Clasen [Sun, 27 Nov 2011 03:17:47 +0000 (22:17 -0500)]
Add g_application_set_menu

This adds ane asy way to export menu information alongside
the actions that are already exported by GApplication.

12 years agoAdd GMenuModel testcases
Ryan Lortie [Sat, 22 Oct 2011 03:51:48 +0000 (23:51 -0400)]
Add GMenuModel testcases

12 years agoAdd GMenuProxy
Ryan Lortie [Sat, 22 Oct 2011 02:49:54 +0000 (22:49 -0400)]
Add GMenuProxy

GMenuProxy can be used as a client-side wrapper
for the a menu model that has been exported on D-Bus.

12 years agoAdd GMenuModel D-Bus exporter
Matthias Clasen [Sun, 27 Nov 2011 02:02:15 +0000 (21:02 -0500)]
Add GMenuModel D-Bus exporter

12 years agoAdd GMenu markup
Matthias Clasen [Sun, 27 Nov 2011 03:00:48 +0000 (22:00 -0500)]
Add GMenu markup

These functions serialize and deserialize a GMenuModel
to and from XML.

12 years agoAdd GMenu
Matthias Clasen [Sun, 27 Nov 2011 03:48:24 +0000 (22:48 -0500)]
Add GMenu

12 years agoAdd GMenuModel
Matthias Clasen [Sun, 27 Nov 2011 03:46:51 +0000 (22:46 -0500)]
Add GMenuModel

12 years agoGApplication: use GDBusActionGroup
Matthias Clasen [Sun, 27 Nov 2011 03:30:02 +0000 (22:30 -0500)]
GApplication: use GDBusActionGroup

instead of the internal version of the same

12 years agoAdd GDBusActionGroup
Ryan Lortie [Fri, 1 Jul 2011 01:41:30 +0000 (02:41 +0100)]
Add GDBusActionGroup

GDBusActionGroup can be used as a client-side wrapper
for the an action group that has been exported on D-Bus.

12 years agoGApplication: port action client to new D-Bus API
Ryan Lortie [Thu, 30 Jun 2011 09:40:51 +0000 (10:40 +0100)]
GApplication: port action client to new D-Bus API

for compatibility with GActionGroup exporter

12 years agoGApplication: use GActionGroup exporter
Ryan Lortie [Thu, 30 Jun 2011 08:52:24 +0000 (09:52 +0100)]
GApplication: use GActionGroup exporter

instead of home-grown internal implementation of the same

12 years agoAdd GActionGroup D-Bus exporter
Ryan Lortie [Wed, 29 Jun 2011 00:02:21 +0000 (01:02 +0100)]
Add GActionGroup D-Bus exporter

12 years agoRevert "Use an XML blob for gapplication interface info"
Ryan Lortie [Fri, 2 Dec 2011 21:22:13 +0000 (16:22 -0500)]
Revert "Use an XML blob for gapplication interface info"

This reverts commit 8013401f6e4edb01dd31b716c179806b55d4064b.

12 years agoRevert "Forgot one interface..."
Ryan Lortie [Fri, 2 Dec 2011 21:22:01 +0000 (16:22 -0500)]
Revert "Forgot one interface..."

This reverts commit 30580bdca7764525a49899dd56dcdde25a300a21.

12 years agoUpdates
Matthias Clasen [Thu, 8 Dec 2011 01:41:33 +0000 (20:41 -0500)]
Updates

12 years agoClarify docs around main loop vfuncs
Matthias Clasen [Wed, 7 Dec 2011 19:36:56 +0000 (14:36 -0500)]
Clarify docs around main loop vfuncs

Mention that the vfuncs are no longer used, and tweak the
wording around what g_application_run() does.

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

12 years agoBug 665733 – GDBusConnection holds lock while calling destroynotify
David Zeuthen [Wed, 7 Dec 2011 15:25:24 +0000 (10:25 -0500)]
Bug 665733 – GDBusConnection holds lock while calling destroynotify

Fix this problem by always running the destroynotify from an idle.

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

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agounicode: Fix a few issues with G_UNICHAR_MAX_DECOMPOSITION_LENGTH
Philip Withnall [Tue, 6 Dec 2011 19:41:31 +0000 (19:41 +0000)]
unicode: Fix a few issues with G_UNICHAR_MAX_DECOMPOSITION_LENGTH

Raised by Matthias in bgo#665685 but which I didn't spot until after pushing
commit 3ac7c35656649b1d1fcf2ccaa670b854809d4cd8.

Renames G_UNICHAR_MAX_DECOMPOSITION_LEN to G_UNICHAR_MAX_DECOMPOSITION_LENGTH
and fixes a few documentation issues.

See: bgo#665685

12 years agoBug 665685 — Add a #define for the max length of a Unicode decomposition
Philip Withnall [Tue, 6 Dec 2011 18:30:43 +0000 (18:30 +0000)]
Bug 665685 — Add a #define for the max length of a Unicode decomposition

Add G_UNICHAR_MAX_DECOMPOSITION_LEN for the maximum length of the
decomposition of a single Unicode character.

Closes: bgo#665685

12 years agoGDBus: Note in docs that g_dbus_node_info_new_for_xml() is using GMarkup
David Zeuthen [Tue, 6 Dec 2011 18:32:12 +0000 (13:32 -0500)]
GDBus: Note in docs that g_dbus_node_info_new_for_xml() is using GMarkup

This was discussed in bug 665634.

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

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoGDBus: fix link to D-Bus spec
David Zeuthen [Tue, 6 Dec 2011 18:29:01 +0000 (13:29 -0500)]
GDBus: fix link to D-Bus spec

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoMinor doc fix.
Behdad Esfahbod [Tue, 6 Dec 2011 18:20:39 +0000 (13:20 -0500)]
Minor doc fix.

12 years agoMinor
Behdad Esfahbod [Tue, 6 Dec 2011 18:18:47 +0000 (13:18 -0500)]
Minor

12 years agoMake the qsort_r check cross-compile friendly
Matthias Clasen [Tue, 6 Dec 2011 12:43:35 +0000 (07:43 -0500)]
Make the qsort_r check cross-compile friendly

Pointed out by Daniel Mack.

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

12 years agooutputstream: Clarify docs of flush()
Benjamin Otte [Mon, 5 Dec 2011 21:40:18 +0000 (22:40 +0100)]
outputstream: Clarify docs of flush()

After questioning the semantics of flush on IRC, it seemed necessary to
clarify what flushing is supposed to do. The Linux man page for fflush()
seemed to cover it perfectly, so I just copied it.

I did not add the "via the underlying write mechanism" part as that in
my opinion is not something subclasses should need to guarantee.

12 years agoSend CHANGES_DONE_HINT on file moves if no IN_CLOSE_WRITE is emitted
Cosimo Alfarano [Wed, 19 Jan 2011 19:08:15 +0000 (19:08 +0000)]
Send CHANGES_DONE_HINT on file moves if no IN_CLOSE_WRITE is emitted

This patch makes GFileMonitor to emit EVENT_CHANGES_DONE_HINT when
EVENT_CREATED is emitted but the file is not opened for writing.

On file moves across different mounted volumes, inotify will always emit
IN_CREATE and IN_CLOSE_WRITE (plus other events).
This translates into GIO's _EVENT_CREATED and _EVENT_CHANGES_DONE_HINT.

On file moves across the same mounted volumes, inotify will emit
IN_MOVED_FROM/IN_MOVED_TO which will be translated into
_EVENT_DELETED/_EVENT_CREATED GIO's side. No _EVENT_CHANGES_DONE_HINT is
emited afterwards.
Under such circumstances a file indexer does not know when actually the
file is ready to be indexed, either waiting too much or triggering the
indexing twice. On small devices it's not advisable.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=640077
Bug-NB: NB#219982
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Tomas Bzatek <tbzatek@redhat.com>
12 years agoGDBusConnection: propagate error correctly if flags are inappropriate
Simon McVittie [Mon, 28 Nov 2011 17:54:46 +0000 (17:54 +0000)]
GDBusConnection: propagate error correctly if flags are inappropriate

Previously, this would fail the assertion
"connection->initialization_error != NULL" after the label "out".

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=665067
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: David Zeuthen <davidz@redhat.com>
12 years agoLink to libpcre correctly when static linking
Sam Thursfield [Thu, 1 Dec 2011 15:48:27 +0000 (15:48 +0000)]
Link to libpcre correctly when static linking

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

12 years agoUpdated Spanish translation
Daniel Mustieles [Fri, 2 Dec 2011 17:27:07 +0000 (18:27 +0100)]
Updated Spanish translation

12 years agoGDBusInterfaceSkeleton: make it possible to export on multiple connections
Tristan Van Berkom [Fri, 2 Dec 2011 16:20:21 +0000 (11:20 -0500)]
GDBusInterfaceSkeleton: make it possible to export on multiple connections

This is useful in peer-to-peer connections.

With minor changes by David Zeuthen <davidz@redhat.com>.

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

Signed-off-by: David Zeuthen <davidz@redhat.com>
12 years agoGVariant: add preconditions to ref. counting functions
Philip Withnall [Wed, 30 Nov 2011 10:20:13 +0000 (10:20 +0000)]
GVariant: add preconditions to ref. counting functions

These prevent GVariants from accidentally being brought back to life after
being freed, and should make it easier to track down ref. counting issues.

Closes: bgo#665184

12 years agoUpdated Norwegian bokmål translation
Kjartan Maraas [Thu, 1 Dec 2011 17:01:02 +0000 (18:01 +0100)]
Updated Norwegian bokmål translation

12 years agoGMemoryInputStream/GMemoryOutputStream: fix bug in previous commit
Dan Winship [Thu, 1 Dec 2011 12:10:25 +0000 (13:10 +0100)]
GMemoryInputStream/GMemoryOutputStream: fix bug in previous commit

A g_input_stream_read_async() implementation can't call
g_input_stream_read() on itself directly because it will fail because
the pending flag is already set. So fix that by invoking the vmethod
directly rather than calling the wrapper. Likewise with
GMemoryOutputStream.

Add a test to gio/tests/memory-input-stream.c to catch read_async
failures in the future.

12 years agoGMemoryInputStream/GMemoryOutputStream: make these properly subclassable
Dan Winship [Wed, 30 Nov 2011 09:32:42 +0000 (10:32 +0100)]
GMemoryInputStream/GMemoryOutputStream: make these properly subclassable

The async methods were directly invoking their own implementations of
the sync methods, making it impossible for a subclass to reimplement
them.

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

12 years agoDon't abort if g_ascii_strtod tests fail
Matthias Clasen [Wed, 30 Nov 2011 03:53:50 +0000 (22:53 -0500)]
Don't abort if g_ascii_strtod tests fail

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

12 years agoRemove two useless lines of code
Geek87 [Mon, 25 Jul 2011 11:08:24 +0000 (13:08 +0200)]
Remove two useless lines of code

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

12 years agoFix a little comment error in the _GTreeNode struct
Geek87 [Mon, 25 Jul 2011 11:06:02 +0000 (13:06 +0200)]
Fix a little comment error in the _GTreeNode struct

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

12 years agoClarify local_command_line docs
Matthias Clasen [Wed, 30 Nov 2011 03:09:58 +0000 (22:09 -0500)]
Clarify local_command_line docs

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

12 years agoDo not use static GTypeInfo and GInterfaceInfo
Nicola Fontana [Wed, 30 Nov 2011 03:02:00 +0000 (22:02 -0500)]
Do not use static GTypeInfo and GInterfaceInfo

Either g_type_register_static_simple (used by G_DEFINE_TYPE_EXTENDED)
and G_IMPLEMENT_INTERFACE use automatic variables for GTypeInfo and
GInterfaceInfo structs, while tutorials and source code often use
static variables. This commit consistently adopts the former method.

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

12 years agognetworkmonitornetlink.c: Make the error messages less geeky
Dan Winship [Tue, 29 Nov 2011 20:45:37 +0000 (21:45 +0100)]
gnetworkmonitornetlink.c: Make the error messages less geeky

This makes several different errors have identical messages, but
they're pretty much "can't happen" situations anyway.

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

12 years agogzlibdecompressor.c: fix a comment
Dan Winship [Tue, 29 Nov 2011 20:42:41 +0000 (21:42 +0100)]
gzlibdecompressor.c: fix a comment

12 years agoAdd missing annotation to g_file_set_attribute()
Michael Vogt [Tue, 29 Nov 2011 11:00:38 +0000 (12:00 +0100)]
Add missing annotation to g_file_set_attribute()

g_file_set_attribute() also permits a NULL value for value_p, and requires it
to be NULL to unset it. Also fix the wrong variable name in the documentation.

Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
12 years agoForgot one interface...
Matthias Clasen [Tue, 29 Nov 2011 00:57:44 +0000 (19:57 -0500)]
Forgot one interface...

12 years agoUse an XML blob for gapplication interface info
Matthias Clasen [Tue, 29 Nov 2011 00:33:24 +0000 (19:33 -0500)]
Use an XML blob for gapplication interface info

This is both more readable and more efficient. Double win !

12 years agogtester: Add command line option to skip tests
Carlos Garcia Campos [Fri, 25 Nov 2011 14:39:31 +0000 (15:39 +0100)]
gtester: Add command line option to skip tests

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

12 years agoRearrange GApplication docs
Matthias Clasen [Sun, 27 Nov 2011 03:38:32 +0000 (22:38 -0500)]
Rearrange GApplication docs

Move the GApplication docs to the front of the section,
where they belong.

12 years agogio.symbols: add g_application_[gs]et_default()
Ryan Lortie [Sat, 22 Oct 2011 03:54:31 +0000 (23:54 -0400)]
gio.symbols: add g_application_[gs]et_default()

12 years agoCosmetics
Matthias Clasen [Sat, 26 Nov 2011 06:42:21 +0000 (01:42 -0500)]
Cosmetics

Reword the title of GSimpleAction in the docs.

12 years agoGApplication: add default application
Ryan Lortie [Fri, 30 Sep 2011 03:52:16 +0000 (23:52 -0400)]
GApplication: add default application

12 years agoGApplication: unregister action interface export
Ryan Lortie [Thu, 30 Jun 2011 08:47:40 +0000 (09:47 +0100)]
GApplication: unregister action interface export

We missed a few cases of unexporting the action group interface (in
error cases, and on GApplication teardown).

12 years agoGApplication: Implement query_action
Matthias Clasen [Sun, 27 Nov 2011 00:43:46 +0000 (19:43 -0500)]
GApplication: Implement query_action

12 years agoGSimpleActionGroup: Implement query_action
Matthias Clasen [Sat, 26 Nov 2011 03:35:33 +0000 (22:35 -0500)]
GSimpleActionGroup: Implement query_action

12 years agoAdd g_action_group_query_action()
Ryan Lortie [Fri, 25 Nov 2011 00:52:48 +0000 (19:52 -0500)]
Add g_action_group_query_action()

This new API allows requesting multiple pieces of information about a
particular action in one go and also simplifies the burden for
GActionGroup implementations -- they need not implement all the separate
APIs now.

12 years agoGBytes: A new type for an immutable set of bytes.
Stef Walter [Fri, 11 Nov 2011 16:08:26 +0000 (17:08 +0100)]
GBytes: A new type for an immutable set of bytes.

 * Represents an immutable reference counted block of memory.
 * This is basically the internal glib GBuffer structure exposed,
   renamed, and with some additional capabilities.
 * The GBytes name comes from python3's immutable 'bytes' type
 * GBytes can be safely used as keys in hash tables, and have
   functions for doing so: g_bytes_hash, g_bytes_equal
 * GByteArray is a mutable form of GBytes, and vice versa. There
   are functions for converting from one to the other efficiently:
   g_bytes_unref_to_array() and g_byte_array_free_to_bytes()
 * Adds g_byte_array_new_take() to support above functions

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

12 years agoFix distcheck
Matthias Clasen [Wed, 23 Nov 2011 23:13:44 +0000 (18:13 -0500)]
Fix distcheck

Now that we have switched to template-free docs, these
hand-rolled cleanup rules get in the way.

12 years agoGInitable, GAsyncInitable: not initializing gives undefined behaviour
Simon McVittie [Thu, 20 Oct 2011 14:01:47 +0000 (15:01 +0100)]
GInitable, GAsyncInitable: not initializing gives undefined behaviour

This is the ISO C sense of undefined behaviour, in which
works-by-coincidence, critical warning, abort, demons-fly-out-of-your-nose
are all valid implementations.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=662208
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: David Zeuthen <davidz@redhat.com>
12 years agoGDBusWorker: continue_writing: initialize flush_async_data if closing
Simon McVittie [Wed, 23 Nov 2011 11:20:15 +0000 (11:20 +0000)]
GDBusWorker: continue_writing: initialize flush_async_data if closing

This was a regression in commit f41178c6c: flush_async_data wasn't
necessarily NULL in the "don't flush" case.

Also move initialization of these variables up so that it's
unconditional, since that's easier to verify than checking
that each branch gets it right.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=664617
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
12 years agoAdd some more mainloop tests
Matthias Clasen [Wed, 23 Nov 2011 04:57:18 +0000 (23:57 -0500)]
Add some more mainloop tests

13 years agoRemove unnecessary includes
Matthias Clasen [Wed, 23 Nov 2011 00:31:30 +0000 (19:31 -0500)]
Remove unnecessary includes

These were meant for some other test that ended up not getting
added. This fixes bug 664559.

13 years agoFix !debug builds
Matthias Clasen [Wed, 23 Nov 2011 00:25:03 +0000 (19:25 -0500)]
Fix !debug builds

As pointed out by Chun-wei Fan in bug 664455, parts of the merged
gobjectnotifyqueue.c code ended up inside an #ifdef G_ENABLE_DEBUG
section.

13 years agoAdd back required _XOPEN_SOURCE define
Matthias Clasen [Wed, 23 Nov 2011 00:12:48 +0000 (19:12 -0500)]
Add back required _XOPEN_SOURCE define

This got lost somewhere between 2.30 and now, but it is needed
for isnan(). See bug 664354, reported by Tim Mooney.

13 years agoGApplication: don't fail if can't get session bus
Ryan Lortie [Tue, 22 Nov 2011 22:32:04 +0000 (17:32 -0500)]
GApplication: don't fail if can't get session bus

If we can't get on the session bus, just behave like a normal non-unique
application.

This turns out to be remarkably easy to implement and lets us avoid
adding a 'dummy' backend.

Add a test for this case as well.

Idea from Zachary Dovel.

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

13 years agogio: Move gmodule to Requires.private
Matthias Clasen [Tue, 22 Nov 2011 16:06:07 +0000 (11:06 -0500)]
gio: Move gmodule to Requires.private

Users of GIO are not generally expected to use gmodule API,
so don't force them all to link against it.

13 years agoGDBusConnection: don't pass boolean > 1 to _g_dbus_worker_new
Simon McVittie [Tue, 22 Nov 2011 12:39:54 +0000 (12:39 +0000)]
GDBusConnection: don't pass boolean > 1 to _g_dbus_worker_new

This happens to work at the moment (because GDBusWorker.frozen is a
gboolean and not just a 1-bit bitfield), but isn't right: the gboolean
ends up with values 0 or G_DBUS_CONNECTION_FLAGS_DELAY_MESSAGE_PROCESSING
(which is more than 1).

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=664558
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: David Zeuthen <davidz@redhat.com>
13 years agoGSocketInputStream/GSocketOutputStream: fix win32 build
Dan Winship [Tue, 22 Nov 2011 13:56:54 +0000 (08:56 -0500)]
GSocketInputStream/GSocketOutputStream: fix win32 build

based on a patch from Chun-wei Fan

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

13 years agogio/tests: Fix for -Werror=format-security
Rico Tzschichholz [Mon, 21 Nov 2011 22:06:15 +0000 (23:06 +0100)]
gio/tests: Fix for -Werror=format-security

13 years agopost-release bump
Ryan Lortie [Mon, 21 Nov 2011 20:21:23 +0000 (15:21 -0500)]
post-release bump

13 years agorelease glib 2.31.2 2.31.2
Ryan Lortie [Mon, 21 Nov 2011 17:18:32 +0000 (12:18 -0500)]
release glib 2.31.2

13 years agodist gio/tests/key8.pem
Ryan Lortie [Mon, 21 Nov 2011 17:36:43 +0000 (12:36 -0500)]
dist gio/tests/key8.pem

13 years agoAdd test case for #662395
Simon McVittie [Tue, 1 Nov 2011 18:03:12 +0000 (18:03 +0000)]
Add test case for #662395

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=662395
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
13 years agoGDBus tests: factor out TestIOStream, test_pipe and test_bidi_pipe
Simon McVittie [Tue, 1 Nov 2011 16:49:36 +0000 (16:49 +0000)]
GDBus tests: factor out TestIOStream, test_pipe and test_bidi_pipe

These might even make useful public API if they grew a Windows
implementation, but for now they can be Unix-only test API.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=662395
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
13 years ago_g_dbus_worker_flush_sync: always flush if we need to
Simon McVittie [Mon, 21 Nov 2011 17:20:52 +0000 (17:20 +0000)]
_g_dbus_worker_flush_sync: always flush if we need to

We didn't previously flush in a couple of cases where we should have
done:

* a write is running when flush is called: we should flush after it
  finishes

* writes have been made since the last flush, but none are pending or
  running right now: we should flush the underlying transport straight
  away

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=662395
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
13 years agoGDBusWorker: move flush async op into continue_writing()
Simon McVittie [Mon, 21 Nov 2011 17:18:01 +0000 (17:18 +0000)]
GDBusWorker: move flush async op into continue_writing()

This makes it easier to schedule a flush, by putting it on the same code
path as writing and closing.

Also change message_written to expect the lock to be held, since all
that's left in that function either wants to hold the lock or doesn't
care, and it's silly to release the lock immediately before calling
message_written, which just takes it again.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=662395
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
13 years agoschedule_write_in_worker_thread: require caller to lock; rename accordingly
Simon McVittie [Mon, 21 Nov 2011 17:16:16 +0000 (17:16 +0000)]
schedule_write_in_worker_thread: require caller to lock; rename accordingly

When we use this function to schedule a flush, it'll be called
with the lock held. Releasing and immediately re-taking the lock would
be pointless.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=662395
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
13 years agoGDBusWorker: rename some functions
Simon McVittie [Fri, 21 Oct 2011 13:43:44 +0000 (14:43 +0100)]
GDBusWorker: rename some functions

maybe_write_next_message now also closes, and I'm about to make it
consider whether to flush as well, so its name is increasingly
inappropriate. Similarly, write_message_in_idle_cb is a wrapper around
it which could do any of those things.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=662395
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
13 years agoGDBusWorker: distinguish between 3 sorts of output that might be pending
Simon McVittie [Mon, 21 Nov 2011 17:14:55 +0000 (17:14 +0000)]
GDBusWorker: distinguish between 3 sorts of output that might be pending

If the user calls flush_sync() with no messages in the queue, but an
async write call pending, then we ought to flush after that async write
returns (although we don't currently do that). If it was an async close
or flush that was pending, there's no need to flush (again) afterwards.
So, we need to distinguish.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=662395
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
13 years agoDrop last uses of @returns:
Ryan Lortie [Mon, 21 Nov 2011 17:02:02 +0000 (12:02 -0500)]
Drop last uses of @returns:

13 years agoMissed a couple of @returns
Ryan Lortie [Mon, 21 Nov 2011 16:39:52 +0000 (11:39 -0500)]
Missed a couple of @returns

13 years agoGVariant: drop use of @returns
Ryan Lortie [Mon, 21 Nov 2011 16:33:05 +0000 (11:33 -0500)]
GVariant: drop use of @returns

13 years agogbitlock: Drop @returns syntax from doc comments
Matthias Clasen [Mon, 21 Nov 2011 16:09:42 +0000 (11:09 -0500)]
gbitlock: Drop @returns syntax from doc comments

13 years agoGBuffer: Drop @returns syntax from doc comments
Matthias Clasen [Mon, 21 Nov 2011 16:05:43 +0000 (11:05 -0500)]
GBuffer: Drop @returns syntax from doc comments

13 years agoGSocketClient: Drop @returns syntax from doc comments
Matthias Clasen [Mon, 21 Nov 2011 16:03:31 +0000 (11:03 -0500)]
GSocketClient: Drop @returns syntax from doc comments

13 years agoGSimplePermission: Drop @returns syntax in doc comments
Matthias Clasen [Mon, 21 Nov 2011 16:02:30 +0000 (11:02 -0500)]
GSimplePermission: Drop @returns syntax in doc comments

13 years agoGPermission: Drop @returns syntax from doc comments
Matthias Clasen [Mon, 21 Nov 2011 16:01:16 +0000 (11:01 -0500)]
GPermission: Drop @returns syntax from doc comments