Commit Graph

15822 Commits

Author SHA1 Message Date
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
Philip Withnall
b9c94b344e gfileutils: Mark the return value from g_path_skip_root() as nullable
It returns NULL for non-absolute paths.

https://bugzilla.gnome.org/show_bug.cgi?id=719966
2015-03-03 17:59:50 +00:00
Philip Withnall
32956587f3 docs: Remove redundant header examples from GObject tutorial
These are in the header boilerplate section, but are actually source
boilerplate which is covered in later sections.

https://bugzilla.gnome.org/show_bug.cgi?id=744060
2015-03-03 17:25:43 +00:00
Philip Withnall
88e011a7cf docs: Change tutorial encodings from ISO-8859-1 to UTF-8
ISO-8859-1 — that’s a blast from the past.

https://bugzilla.gnome.org/show_bug.cgi?id=744060
2015-03-03 17:25:43 +00:00
Chun-wei Fan
6be1e678dc Visual Studio Builds: "Install" .pdb files
They are helpful in debugging in a stack.
2015-03-03 19:21:40 +08:00
Chun-wei Fan
6e117b3fcc MSVC Builds: GIO: Standardize zlib Linking
Link to zlib1.lib for all builds, as:
-The notion of zlib1d.lib is rather not standardized across the board for
 most cases.
-Easier for the grand all-in-one solution file.
2015-03-03 18:24:58 +08:00
Chun-wei Fan
d76ac1560e Visual Studio 2008 Builds: Speed Up Release Builds
Use the /MP option so that each project can build multiple sources in
parallel, which can cut down release build times by quite a bit.  This will
cause a brief warning for debug builds due to their use of /Gm, and builds
would otherwise proceed as they did before.

Unfortunately Visual Studio 2008 is too old to support the /d2Zi+ flag, so
we can't make a better debug situation for it at the moment.
2015-03-03 18:09:42 +08:00
Chun-wei Fan
7b1729f3c0 MSVC Builds: Improve Build Speed and Debugging
Use Multiprocessor compilation which can cut down build times by quite a
bit and use the /d2Zi+ flag to have better debugging info being logged to
the .pdb for release builds.

These are only applicable for Visual Studio 2010/2012 and later.
2015-03-03 13:52:22 +08:00
Chun-wei Fan
94b9d87a43 MSVC Builds: Fix and Update "Installation"
The gobjectnotifyqueue.c was accidently dropped from the files to copy, and
a new public header for GIO was added, so address these parts.
2015-03-03 12:06:22 +08:00