Commit Graph

13272 Commits

Author SHA1 Message Date
John Ralls
489e031f22 Extract function init_zone_from_iana_info 2012-12-18 15:43:40 -08:00
John Ralls
47de8646e2 Extract function zone_info_unix 2012-12-18 15:43:40 -08:00
Ryan Lortie
5df1edaf70 gtype: disallow adding interfaces after the fact
Add a check to prevent adding an interface to a class that has already
had its class_init done.

This is an incompatible change but it is suspected that there are not
many users of this functionality.  Two known exceptions are pygobject
(fixed in bug 686149) and our own testsuite (affected tests have been
temporarily disabled by this patch).

Once we confirm that nobody else is using this functionality we can
remove a rather large amount of code for dealing with this case.

https://bugzilla.gnome.org/show_bug.cgi?id=687659
2012-12-18 21:37:07 +01:00
Rico Tzschichholz
d04faab327 gio: Fix build with -Werror=format-security 2012-12-18 21:32:01 +01:00
Rico Tzschichholz
d1ab41c940 Revert "gtype: disallow adding interfaces after the fact"
This reverts commit d6a075b0d8.
2012-12-18 21:23:13 +01:00
PHO
f0f6c8d231 gsocket: Work around broken CMSG_FIRSTHDR()
As RFC 2292 points out, some platforms (e.g. Darwin 9.8.0) provide
CMSG_FIRSTHDR(msg) which just returns msg.msg_control without first
checking if msg.msg_controllen is non-zero. We need a workaround for
such platforms not to let g_socket_receive_message() segfault.

https://bugzilla.gnome.org/show_bug.cgi?id=690388
2012-12-18 13:31:02 -05:00
Colin Walters
780871d273 GOutputStream: Fix a compiler warning 2012-12-18 13:21:24 -05:00
Dan Winship
07bb8097e5 gtask: don't deadlock when tasks block on other tasks
If tasks block waiting for other tasks to complete then the system can
end up starved for threads. Avoid this by bumping up max-threads in
that case.

This also reverts 7b1f8c58 and reverts max-threads for GTask's
GThreadPool back to 10.

https://bugzilla.gnome.org/show_bug.cgi?id=687223
2012-12-18 13:19:08 -05:00
Colin Walters
2149b29468 Add g_get_num_processors()
Based on a patch from John Cupitt <jcupitt@gmail.com>

Useful for thread pools which should scale to number of processors.

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

https://bugzilla.gnome.org/show_bug.cgi?id=614930
2012-12-18 13:13:15 -05:00
Dan Winship
ed5accf16c gio: port file/vfs-related classes from GSimpleAsyncResult to GTask
https://bugzilla.gnome.org/show_bug.cgi?id=661767
2012-12-18 09:07:24 -05:00
Dan Winship
669505e354 gio: port basic I/O classes from GSimpleAsyncResult to GTask
https://bugzilla.gnome.org/show_bug.cgi?id=661767
2012-12-18 09:07:19 -05:00
Shantha kumar
586adb9790 Tamil translation updated 2012-12-18 16:48:21 +05:30
Shantha kumar
8a4567aaeb Tamil translation updated 2012-12-18 16:35:48 +05:30
Shantha kumar
5eb2e087ce Tamil translation updated 2012-12-18 16:29:08 +05:30
Shantha kumar
e3d6bb41c5 Tamil translation updated 2012-12-18 16:07:10 +05:30
Shantha kumar
b1eb481e47 Tamil translation updated 2012-12-18 16:01:25 +05:30
Matej Urbančič
99d92b1f53 Updated Slovenian translation 2012-12-18 08:40:39 +01:00
Matthias Clasen
9061d91605 bump version 2012-12-17 19:18:13 -05:00
Matthias Clasen
6262a48678 2.35.3 2012-12-17 19:15:29 -05:00
Matthias Clasen
c23122b5e9 Fix distcheck 2012-12-17 19:15:29 -05:00
Christophe Fergeau
b055c82815 Fix g_type_add_class_private() name in g_warning
When g_type_class_get_private is called without calling
g_type_add_class_private first, a g_warning is issued, but
the name of the function to call is wrong:
g_type_class_add_class_private.

https://bugzilla.gnome.org/show_bug.cgi?id=690348
2012-12-17 15:51:07 +01:00
Dan Winship
df334d6e00 gsocket: improve sockopt handling for IPv4-wrapped-IPv6 sockets
On IPv6 sockets, set both the IPv4 and IPv6 versions of IP socket
options, in case the socket is (or might become) IPv4-wrapped. (But
ignore errors when setting the IPv4 version.)

Similarly, when joining or leaving a multicast group, pick the sockopt
to use based on the address family of the multicast address rather
than the address family of the socket.

https://bugzilla.gnome.org/show_bug.cgi?id=687092
2012-12-17 09:01:05 -05:00
PHO
72d7d23402 Remove an unneeded escaping in NAMESER_COMPAT_INCLUDE
In configure.ac, escaping '#' in NAMESER_COMPAT_INCLUDE results in the following gio/gnetworking.h, which obviously doesn't compile:

  #include <arpa/inet.h>
  #include <arpa/nameser.h>
  \#include <arpa/nameser_compat.h>

https://bugzilla.gnome.org/show_bug.cgi?id=690346
2012-12-17 08:54:12 -05:00
Daniel Mustieles
0eb28063a8 Updated Spanish translation 2012-12-16 20:47:11 +01:00
Piotr Drąg
bb4ced01f6 Updated Polish translation 2012-12-16 03:44:09 +01:00
Fran Diéguez
14ee3bc448 Updated Galician translations 2012-12-15 00:41:54 +01:00
Fran Diéguez
b0efb45234 Updated Galician translations 2012-12-15 00:40:16 +01:00
Chun-wei Fan
0b2919a93a Update Visual C++ property sheets
The last commit (Add a preconfigured gio/gnetworking.h for Windows) has to
be split into two as git am does not like a patch that deals with files
that have different line feeds.

This updates the property sheets to use the pre-configured
gio/gnetworking.h during the build process.

https://bugzilla.gnome.org/show_bug.cgi?id=690163
2012-12-15 00:28:30 +08:00
Chun-wei Fan
4b859e4e7a Add a preconfigured gio/gnetworking.h for Windows
Since Windows builds by Visual C++ do not make use of autotools during
its build process, we need to dist a pre-configured
gio/gnetworking.h(.win32) for such builds.

The vs9/vs10 (and therefore vs11) property sheets are updated as well

https://bugzilla.gnome.org/show_bug.cgi?id=690163
2012-12-15 00:22:37 +08:00
Tomas Bzatek
cc3171f680 docs: Fix return value of g_file_set_attributes_from_info()
GIO API usually returns FALSE and sets GError when something went wrong
and it was also the case of this method, just being badly documented.
2012-12-14 16:54:09 +01:00
Jasper St. Pierre
3c87ab97ff gfileenumerator: Add a g_file_enumerator_get_child method
This is a new convenience method designed to simplify some use
cases of GFileEnumerator, by making it easy to get the next file
from a file enumerator.

https://bugzilla.gnome.org/show_bug.cgi?id=690083
2012-12-13 21:38:18 -05:00
Piotr Drąg
6cce4790b7 Updated POTFILES.in 2012-12-12 22:21:17 +01:00
Dan Winship
211ed1775d gsocket: add getsockopt/setsockopt wrappers
Add g_socket_get_option() and g_socket_set_option(), wrapping
getsockopt/setsockopt for the case of integer-valued options. Update
code to use these instead of the underlying calls.

https://bugzilla.gnome.org/show_bug.cgi?id=623187
2012-12-12 15:20:22 +01:00
Dan Winship
b377e69685 Add gnetworking.h
Install a public "gnetworking.h" header that can be used to include
the relevant OS-dependent networking headers. This does not really
abstract away unix-vs-windows however; error codes, in particular,
are incompatible.

gnetworkingprivate.h now contains just a few internal URI-related
functions

Also add a g_networking_init() function to gnetworking.h, which can be
used to explicitly initialize OS-level networking, rather than having
that happen as a side-effect of registering GInetAddress.

https://bugzilla.gnome.org/show_bug.cgi?id=623187
2012-12-12 15:20:22 +01:00
Dan Winship
9e90575502 gio: move resolver utils from gresolver.c to gthreadedresolver.c
Since there is only one resolver implementation now, we can move the
resolver utility functions from gresolver.c into gthreadedresolver.c,
and remove the prototypes from gnetworkingprivate.h.

https://bugzilla.gnome.org/show_bug.cgi?id=623187
2012-12-12 15:20:22 +01:00
Colin Walters
c700721805 g_unix_open_pipe: Add missing F_SETFD
Spotted by Ray Strode <rstrode@redhat.com>

While we're here, microoptimize by skipping the fcntl() calls if flags
is 0.

https://bugzilla.gnome.org/show_bug.cgi?id=690069
2012-12-11 17:12:19 -05:00
Colin Walters
5baa26be72 gobject.symbols: Update for g_checksum_get_type()
See previous commit.
2012-12-10 20:30:44 -05:00
Colin Walters
bf1e63c2aa Make GChecksum more fully introspectable
In 2.34, g_compute_checksum_for_bytes() was added, but this patch
allows binding users to use the incremental update API; this is
significantly more efficient than reading entire files into memory.

https://bugzilla.gnome.org/show_bug.cgi?id=689982
2012-12-10 20:08:09 -05:00
Dan Winship
afdb2abb13 gio: Don't leak the temp file when g_file_replace() fails or is cancelled
If the temp file still exists at the end of the close operation,
unlink it.

https://bugzilla.gnome.org/show_bug.cgi?id=629301
2012-12-10 17:04:05 +01:00
Alexander Larsson
e218b96a6b Add g_type_get_type_registration_serial()
This lets you cache type lookup information and then know when
the cache information is out of date. In particular, we want this
in order to be able to cache g_type_from_name() lookups in the Gtk+
theme machinery.

https://bugzilla.gnome.org/show_bug.cgi?id=689847
2012-12-10 12:55:28 +01:00
David Zeuthen
d77948eadf fileinfo: mark lost+found/ root directory as hidden
This was reported in bug 689800.

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

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
2012-12-06 16:21:58 -05:00
Timothy Arceri
510ba9b4ef Support for .hidden files
https://bugzilla.gnome.org/show_bug.cgi?id=587806
2012-12-06 16:18:19 -05:00
Ryan Lortie
6869454103 add two missing version macros 2012-12-06 13:58:42 -05:00
Ryan Lortie
7c98844760 various: add missing cases of #include "config.h" 2012-12-06 13:30:31 -05:00
Ryan Lortie
7523c04b54 g_get_home_dir(): honour $HOME
If the $HOME environment variable is set, prefer that to the entry in
/etc/passwd.

This brings us in line with almost every other utility and library on
UNIX-like systems while avoiding some of the more complicated
possibilities that have been suggested.

This incompatible change has been petitioned for quite some time by
many, and in particular from the Debian world, which carries a patch
that adds a new G_HOME environment variable with the same meaning as
this patch now assigns to HOME.

The primary motivation for the change was to increase the testability of
GLib-based programs from 'make check' types of frameworks: it is now
possible to set HOME to a temp directory to avoid the testsuite
modifying the user's real home directory.

The change also brings us increased compliance with the XDG Base
Directory Specification.  The specification specifically states that the
default values should be computed based on the HOME environment
variable, whereas we were basing them on the value from /etc/passwd.

The change was agreed to by all in attendence at the November 29 Gtk+
developer meeting.

https://bugzilla.gnome.org/show_bug.cgi?id=142568
2012-12-06 11:41:46 -05:00
Daniel Mustieles
28f88cf111 Updated Spanish translation 2012-12-05 20:08:15 +01:00
Colin Walters
1e74e46a00 gdbusobjectskeleton: Fix compiler warnings
The G_OBJECT_WARN_INVALID_PROPERTY_ID() macro uses a local variable
named "_object"; work around this by using "object" as the variable we
pass in.

https://bugzilla.gnome.org/show_bug.cgi?id=689377
2012-12-05 13:30:15 -05:00
Colin Walters
33de093b5a gobject: Use local variable names in macros less likely to clash
At least GDBus had code that had "_object" as a parameter to one of
its functions, but this clashes with the GObject macro
G_OBJECT_WARN_INVALID_PROPERTY_ID() which created a local "_object".

Since many of us cargo cult around copies of objects, let's be
defensive here and use local variable names less likely to clash with
application code.

https://bugzilla.gnome.org/show_bug.cgi?id=689377
2012-12-05 13:30:14 -05:00
Dan Winship
e97a2f4195 win32: suppress fatal error dialog box when running tests
When running a test program (ie, if g_test_init() has been called),
don't pop up a dialog box when a fatal error occurs. Just print the
message to stderr and exit.

https://bugzilla.gnome.org/show_bug.cgi?id=679683
2012-12-05 11:15:19 -05:00
Aleksander Morgado
ac025007cc gsocketlistener: set source object tag before completing the GTask
Otherwise, the finish() method won't find the source object.

https://bugzilla.gnome.org/show_bug.cgi?id=689538
2012-12-03 15:59:06 +01:00