Commit Graph

15730 Commits

Author SHA1 Message Date
Ryan Lortie
0de16c98f7 ContextSpecificGroup: some fixups
For all of the effort spent ensuring that this algorithm would be
correctly threadsafe, I messed up the order of operations within a
single thread when porting to the new approach.

Fix that up.

Also: fix some overzealous asserting in the testcases.  Since shutdown
is now lazy, we can never surely say !is_running at any particular point
in time.
2015-03-13 17:39:50 -04:00
Samir Ribic
7a3c8e900a Updated Bosnian translation 2015-03-13 20:57:49 +00:00
Sebastian Rasmussen
3a2c358508 Updated Swedish translation 2015-03-13 17:16:00 +00:00
Philip Withnall
c5c8bac693 goption: Mention type of G_OPTION_ARG_CALLBACK in documentation 2015-03-13 09:10:25 +00:00
Tim-Philipp Müller
627a145e16 threads: use FUTEX_WAIT_PRIVATE and FUTEX_WAKE_PRIVATE if possible
This avoids some expensive code paths in the kernel, see
http://lwn.net/Articles/229668/

https://bugzilla.gnome.org/show_bug.cgi?id=741442
2015-03-12 21:01:36 -04:00
Ryan Lortie
6fffce2588 docs: clean up a few glib issues
Fix a few typical problems, and also stop wrapping the inline definition
of g_steal_pointer in parens, since it is not necessary and it confuses
gtk-doc.
2015-03-12 17:24:05 -04:00
Ryan Lortie
bf19b8e6c3 gio docs: remote errant colon from docstring
This does not belong there.
2015-03-12 17:01:00 -04:00
Ryan Lortie
d9de830b65 Convert remaining uses of 'Rename to:'
This was replaced by (rename-to) in 2013 (see bug 676133).

They're also causing gtk-doc trouble, so let's get rid of them.
2015-03-12 16:55:22 -04:00
Ryan Lortie
eff505ed3c docs: more cleanups for GIO 2015-03-12 16:43:02 -04:00
Xavier Claessens
497b294510 Doc: Fix missing API from GOptionGroup boxing 2015-03-12 16:09:14 -04:00
Xavier Claessens
15a4af545e Doc: Mark a few things as private 2015-03-12 16:09:14 -04:00
Xavier Claessens
8b654e24a5 Win32: Move g_win32_check_windows_version() to the correct place in header
It was added after G_END_DECLS, outside the #ifdef G_PLATFORM_WIN32,
and inside a #ifndef __GTK_DOC_IGNORE__ block. So it was missing from
the doc.

https://bugzilla.gnome.org/show_bug.cgi?id=743661
2015-03-12 16:09:14 -04:00
Rūdolfs Mazurs
3626e1426d Updated Latvian translation 2015-03-12 21:54:49 +02:00
Changwoo Ryu
5c825d3272 Updated Korean translation 2015-03-12 02:51:35 +09:00
Tom Tryfonidis
8668631baa Updated Greek translation 2015-03-11 13:12:14 +00:00
Jordi Mas
b4d6a5fb18 Update Catalan translation 2015-03-10 17:44:19 -04:00
Benjamin Steinwender
a866155e8e Updated German translation 2015-03-10 20:56:05 +00:00
Piotr Drąg
f6ccb19e1a Updated POTFILES.in 2015-03-10 19:50:30 +01:00
Philip Withnall
4f1f68e6be gtask: Add a GTask:completed property
This can be used to query whether the task has completed, in the sense
that it has had a result set on it, and has already – or will soon –
invoke its callback function.

Notifications for this property are emitted immediately after the task’s
main callback, in the same main context as that callback. This allows
for multiple bits of code to listen for completion of the GTask, which
opens the door for blocking on cancellation of the GTask and improved
handling of ‘pending’ behaviour.

https://bugzilla.gnome.org/show_bug.cgi?id=743636
2015-03-10 08:37:45 +00:00
Alexander Shopov
e83f9e5254 Updated Bulgarian translation 2015-03-10 10:35:24 +02:00
Dušan Kazik
a065c7c5d4 Updated Slovak translation 2015-03-09 11:48:33 +00:00
Trần Ngọc Quân
ec9f16846f Updated Vietnamese translation
Signed-off-by: Trần Ngọc Quân <vnwildman@gmail.com>
2015-03-09 13:26:18 +07:00
Daniel Mustieles
dfb9f09c28 Updated Spanish translation 2015-03-08 21:25:11 +01:00
Aurimas Černius
81473a0fff Updated Lithuanian translation 2015-03-08 20:26:36 +02:00
Baurzhan Muftakhidinov
65efd817b2 Updated Kazakh translation 2015-03-08 18:06:01 +00:00
Balázs Úr
1e317331e4 Updated Hungarian translation 2015-03-08 17:38:41 +00:00
Milo Casagrande
3deaf41e87 Updated Italian translation 2015-03-08 15:32:40 +00:00
Piotr Drąg
4a7e68fd73 Updated Polish translation 2015-03-08 15:42:16 +01:00
Piotr Drąg
d4122b954f Updated POTFILES.in 2015-03-08 15:39:02 +01:00
Changwoo Ryu
fdcfe58401 Updated Korean translation 2015-03-08 03:31:59 +09:00
Dan Winship
6ce79e586f GSocketClient: fix handling of application proxies
g_socket_client_add_application_proxy() claimed "When the indicated
proxy protocol is returned by the #GProxyResolver, #GSocketClient will
consider this protocol as supported but will not try to find a #GProxy
instance to handle handshaking." But in fact, it did the checks in the
wrong order, so GProxy proxies ended up overriding
application-specified ones. Fix that.

Also, simplify the code a bit by making use of g_hash_table_add() and
g_hash_table_contains().

https://bugzilla.gnome.org/show_bug.cgi?id=733876
2015-03-06 16:01:07 -05:00
Paolo Borelli
ed4a742946 HTTP proxy support
Based on code from "WockyHttpProxy" written by Nicolas Dufresne
and Marc-André Lureau. Initial glib patch by Brian J. Murrell.

https://bugzilla.gnome.org/show_bug.cgi?id=733876
2015-03-06 21:23:58 +01:00
Chun-wei Fan
6fe28eef3c Windows: Use Standard Networking Functions If Possible
Currently, the Windows code use Winsock2-specific APIs to try to emulate
calls such as inet_pton(), inet_ntop() and if_nametoindex(), which may not
do the job all the time.  On Vista and later, Winsock2 does provide a
proper implementation for these functions, so we can use them if they exist
on the system, by querying for them during g_networking_init().  Otherwise,
we continue to use the original code path for these, in the case of XP and
Server 2003.

This enables many of the network-address tests to pass on Windows as a
result, when the native Winsock2 implementations can be used.

https://bugzilla.gnome.org/show_bug.cgi?id=730352
2015-03-06 23:40:03 +08:00
ria.freelander@gmail.com
ec1edef3ab gfdonotificationbackend: support themed icons
The spec allows setting the "image-path" hint to an icon name as well.

https://bugzilla.gnome.org/show_bug.cgi?id=745634
2015-03-05 14:54:33 +01:00
Chun-wei Fan
b9c8cecc9d gresolver.c: Windows: Fix IPv6 Address Handling
Check the IPv6 addresses on Windows, as we need to reject those that have
brackets/ports around them as valid addresses in this form would have been
accepted during the call to g_inet_address_new_from_string ().

https://bugzilla.gnome.org/show_bug.cgi?id=730352
2015-03-05 12:44:31 +08:00
Marc-Antoine Perennou
fecec08702 gio: add some missing autocleanup
https://bugzilla.gnome.org/show_bug.cgi?id=745589

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2015-03-04 14:08:19 +01:00
Chun-wei Fan
74c9eaac11 MSVC Builds: Few More Enahncements
Update the .pdb file generation for the MSVC 2010+ DLLs (and the x64 gspawn
helper programs), so that they match the names of the DLLs/EXEs that are
built.  Also update the .lib generation so that all will use -$(ApiVersion)
from the property sheets instead of the -2.0 which was previously hard
coded (as we will eventually move into GLib 3.x in the future, for example)
2015-03-04 20:11:43 +08:00
Philip Withnall
6d030ea0ae gobject: Mark a helper variable as const
It’s only used for argv values, which are not modified here.

https://bugzilla.gnome.org/show_bug.cgi?id=614684
2015-03-04 08:55:30 +00:00
Philip Withnall
bdfc8231c6 gerror: Minor clarifications to the GError documentation
• Clarify that GError** parameters are for the return of _newly
   allocated_ GError*s.
 • Clarify that errors may need to be checked for explicitly if the
   return value of a function doesn’t reliably indicate them.

https://bugzilla.gnome.org/show_bug.cgi?id=741779
2015-03-04 08:45:00 +00:00
Мирослав Николић
7f159f13dc Updated Serbian translation 2015-03-03 20:05:47 +01:00
Philip Withnall
2a581fab7d gvariant: Use ‘UTF-8’ in docs rather than ‘utf8’
Nitpicky correction.

https://bugzilla.gnome.org/show_bug.cgi?id=741779
2015-03-03 18:40:33 +00:00
Philip Withnall
8df6e5fa3f gmain: Explicitly document the threading behaviour of g_timeout_add()
i.e. That calling g_timeout_add() from a thread other than the main one
probably doesn’t do what you want. Same for g_idle_add() and the
*_full() variants.

https://bugzilla.gnome.org/show_bug.cgi?id=741779
2015-03-03 18:40:33 +00:00
Philip Withnall
4aedc85fb3 gobject: Mention g_clear_object() in g_object_unref() documentation
https://bugzilla.gnome.org/show_bug.cgi?id=741779
2015-03-03 18:40:33 +00:00
Philip Withnall
18c9a4e17a gmem: Clarify that a NULL check is not needed before calling g_free()
It was documented before, but wasn’t especially clear. Doing
    if (X)
        g_free (X);
is apparently quite a pervasive real-world anti-pattern, so perhaps it
could be documented more explicitly.

https://bugzilla.gnome.org/show_bug.cgi?id=741779
2015-03-03 18:40:33 +00:00
Philip Withnall
984576c01e glist: Clarify that g_list_nth() is expensive
Just in case people have forgotten their basic algorithms course. Seen
in some pretty terrible code in the wild; hopefully mentioning the cost
in the documentation will make people think twice about using a counter
variable when iterating over a linked list.

https://bugzilla.gnome.org/show_bug.cgi?id=741779
2015-03-03 18:40:33 +00:00
Philip Withnall
c6312daba0 glist: Clarify how g_list_free_1() handles links
It doesn’t, which is fine, but could be unexpected if undocumented.

https://bugzilla.gnome.org/show_bug.cgi?id=741779
2015-03-03 18:40:33 +00:00
Philip Withnall
59748c3be0 ghash: Document that g_hash_get_[keys|values]() are expensive
And definitely not the right way to iterate over a hash table (as seen
in code in the wild).

https://bugzilla.gnome.org/show_bug.cgi?id=741779
2015-03-03 18:40:33 +00:00
Philip Withnall
c639b628ec gparamspecs: Recommend use of most specific GParamSpec types
It’s quite common to see a g_param_spec_pointer() used for GObject or
boxed types which, while not incorrect, does make memory management
unsafe, since no copying or reference counting can be performed
automatically.

Similarly, people often use g_param_spec_boolean() when an enum would be
more appropriate, cf.
    http://blog.ometer.com/2011/01/20/boolean-parameters-are-wrong/
Using enums also means that the set of allowable values can be extended
in future if needed.

In the hope that people who write code like that read the documentation,
mention the more specific types in the documentation.

https://bugzilla.gnome.org/show_bug.cgi?id=741779
2015-03-03 18:40:33 +00:00
Philip Withnall
430814992d docs: Expand introduction to mention using async calls over sync ones
As discussed on the mailing list (see the whole thread):
    https://mail.gnome.org/archives/desktop-devel-list/2015-February/msg00126.html

Expand the GIO documentation introduction to talk a little about when to
use async and sync functions, and how the former should almost always be
preferred over the latter.

Link to this from the GFile documentation, which is an entry point for a
lot of async calls.

https://bugzilla.gnome.org/show_bug.cgi?id=744722
2015-03-03 18:27:45 +00:00
Philip Withnall
f829bde76a gstring: Mark the return value from g_string_free() as nullable
It’s NULL iff free_segment is TRUE, so the annotation doesn’t quite
capture all the function definition, but is a safe over-estimate of the
return value’s nullability.

https://bugzilla.gnome.org/show_bug.cgi?id=719966
2015-03-03 17:59:50 +00:00