Commit Graph

12394 Commits

Author SHA1 Message Date
Daniel Mustieles
2e31166f6a Updated Spanish translation 2012-05-31 15:29:31 +02:00
Daniel Mustieles
4f04247a19 Updated Spanish translation 2012-05-31 13:19:37 +02:00
Dan Winship
69e12cd3d5 GConverterInputStream: fix an edge case
Reading from a GConverterInputStream with both input_buffer and
converted_buffer non-empty would return bogus data (the data from
converted_buffer would essentially get skipped over, though the
returned nread reflected what the count would be if it hadn't been).

This was never noticed before because (a) it can't happen if all of
your reads are at least as large as either the internal buffer size or
the remaining length of the stream (which covers most real-world use),
and (b) it can't happen if all of your reads are 1 byte (which covers
most of tests/converter-test). (And (c) it only happens for some
converters/input streams.) But this was happening occasionally in
libsoup when content-sniffing a gzipped response, because the
SoupContentSnifferStream would first read 512 bytes (to sniff), and
then pass through larger reads after that.

Fixed and added a test to converter-test.

https://bugzilla.gnome.org/show_bug.cgi?id=676478
2012-05-30 09:02:33 -04:00
Christian Persch
0fd9863abe build: Add missing AM_V_GEN to silence the build 2012-05-29 19:10:57 +02:00
Christian Persch
4979c1d075 application: Add dbus register/unregister hooks
When the application is using its D-Bus backend, it is useful to be able
to export extra D-Bus objects at the right time, i.e. *before* the application
tries to own the bus name. This is accomplished here by adding a hook
in GApplicationClass for this; and a corresponding hook that will be called
on unregistration to undo whatever the register hook did.

Bug #675509.
2012-05-29 19:01:42 +02:00
Philip Withnall
f642209ef4 gobject: Document notify signal deduplication with freeze/thaw
Expand the documentation for g_object_[freeze|thaw]_notify() to explain that
it deduplicates “notify” signals emitted by frozen objects, so that at most
one signal is emitted per property.

https://bugzilla.gnome.org/show_bug.cgi?id=676937
2012-05-28 15:47:07 +01:00
Matej Urbančič
1637f08ed1 Updated Slovenian translation 2012-05-28 14:57:02 +02:00
Guillaume Desmottes
ae421c9f6c Link to gvariant-format-strings-pointers in getter API
https://bugzilla.gnome.org/show_bug.cgi?id=674777
2012-05-28 10:54:59 +02:00
Colin Walters
175864b83c gappinfo: Fix uninitialized-variable gcc warning 2012-05-26 11:53:14 -04:00
Colin Walters
151e37816b Annotate API introduced for 2.34 with GLIB_AVAILABLE_IN_2_34
https://bugzilla.gnome.org/show_bug.cgi?id=676816
2012-05-26 10:13:30 -04:00
Colin Walters
1cc7162c95 Annotate API introduced for 2.32 with GLIB_AVAILABLE_IN_2_32
https://bugzilla.gnome.org/show_bug.cgi?id=676816
2012-05-26 10:13:30 -04:00
Colin Walters
a963712646 Annotate API introduced for 2.30 with GLIB_AVAILABLE_IN_2_30
I didn't do this comprehensively, since there's a lot of it, mainly
due to the GDBus object manager stuff, but anyone trying to use
that would fail fast due to lack of the gdbus code generator.

My main goal was to get API additions to existing classes like
g_data_input_stream_read_line_utf8(), as well as the lower level new
API like glib-unix.h.

https://bugzilla.gnome.org/show_bug.cgi?id=676816
2012-05-26 10:13:30 -04:00
Marc-Antoine Perennou
9c86e1168c gio: fix symbol name
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2012-05-26 10:35:05 +02:00
Dan Winship
800d6ff111 gio: add GBytes-based input/output stream methods
Using a caller-supplied buffer for g_input_stream_read() doesn't
translate well to the semantics of many other languages, and using a
non-refcounted buffer for read_async() and write_async() makes it
impossible to manage the memory correctly currently in
garbage-collected languages.

Fix both of these issues by adding a new set of methods that work with
GBytes objects rather than plain buffers.

https://bugzilla.gnome.org/show_bug.cgi?id=671139
2012-05-24 17:48:13 -04:00
Christian Persch
4b456635e4 Revert "application: Don't print a critical warning here"
This reverts commit 1541478bac.
2012-05-24 17:51:35 +02:00
Christian Persch
ee1965b888 application: Save a few bytes in the library
There's really no need to put useless whitespace into the .so.
2012-05-24 17:34:08 +02:00
Christian Persch
1541478bac application: Don't print a critical warning here
It's a runtime error, not a programming error.
2012-05-24 17:33:37 +02:00
Marc-Antoine Perennou
9217309a5c glib: fix build
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2012-05-22 20:38:52 +02:00
Christian Persch
481191f118 gspawn: Add GSpawnFlag to use the PATH from envp
Add a G_SPAWN_SEARCH_PATH_FROM_ENVP flag to GSpawnFlags so that
g_spawn_async() etc use the PATH variable from the passed-in child
environment to search for the executable.
If both this flag and the G_SPAWN_SEARCH_PATH flag are set, the
child environment is searched first and only falls back to the
PATH from the process environment if it is unset.

Bug #676398.
2012-05-22 19:47:28 +02:00
Christian Persch
6969b63827 environ: Allow NULL envp
https://bugzilla.gnome.org/show_bug.cgi?id=676397
2012-05-22 19:47:22 +02:00
Colin Walters
44d4990442 GMemoryOutputStream: Add API to return data as a GBytes
Matches the corresponding additions to GMemoryInputStream.

https://bugzilla.gnome.org/show_bug.cgi?id=672102
2012-05-21 13:45:15 -04:00
Colin Walters
1bedf24879 GMemoryInputStream: Add API to accept GBytes
And s/Chunk/GBytes/ internally.  GBytes is really a perfect match for
GMemoryInputStream.

https://bugzilla.gnome.org/show_bug.cgi?id=672102
2012-05-21 13:45:15 -04:00
Debarshi Ray
6e32f0a601 gio: The tmpl parameter to g_file_new_tmp can be NULL
Fixes: https://bugzilla.gnome.org/676208
2012-05-21 17:54:25 +02:00
Dan Winship
7cadf4f15f g_utf8_validate: @str shouldn't end up annotated as utf8
In order for this function to have any point, it has to be possible to
pass non-UTF-8 data to it, so annotate @str as being array-of-guint8
instead of utf8.

https://bugzilla.gnome.org/show_bug.cgi?id=672548
2012-05-18 12:36:12 -04:00
Dan Winship
8df2b96a69 proxy-test: work even when the upstream DNS lies
Rather than depending on the host's DNS configuration to properly
return an error for a non-existent hostname, just substitute in
a dummy GResolver implementation that does it for us.
2012-05-18 12:18:23 -04:00
Dan Winship
555cd1923f g_app_info_launch_default_for_uri: don't use GFile if we don't have to
GFile doesn't handle some "real" URIs, so check if there's a default
handler for the URI scheme first, and only use g_file_new_for_uri()
and g_file_query_default_handler() if not. Eg, this fixes the case of
opening http URIs with "%2F" in the path.

https://bugzilla.gnome.org/show_bug.cgi?id=666386
2012-05-18 12:17:28 -04:00
Holger Berndt
0e6d9df35c Document that g_app_info_create_from_commandline() does unquoting according to fd.o
https://bugzilla.gnome.org/show_bug.cgi?id=676277
2012-05-18 15:20:40 +02:00
Dan Winship
17e95c59c9 gnetworkmonitornetlink: don't leak the list of networks
https://bugzilla.gnome.org/show_bug.cgi?id=676265
2012-05-17 13:48:56 -04:00
Dan Winship
0ecbb0a404 g_clear_pointer: work around gcc helpfulness
gcc gets upset when we do "((GDestroyNotify) destroy) (_p)" because
it's non-portable. But we don't care; we already know glib wouldn't
work on any platform where different pointer types have different
calling conventions. So tweak the code to avoid the warning.

https://bugzilla.gnome.org/show_bug.cgi?id=674634
2012-05-17 10:47:05 -04:00
Matthias Clasen
787f808783 gsettings: add reset-recursively to bash completion
https://bugzilla.gnome.org/show_bug.cgi?id=675832
2012-05-17 00:44:36 -04:00
Matthias Clasen
431d3adacd Improve libelf configure check
system libelf is not sufficient for glib (lacks elf_getshdrstrndx and
elf_getshdrnum) so let's make sure we don't define HAVE_LIBELF
2012-05-17 00:41:52 -04:00
Ravi Sankar Guntur
aded15c9d1 glib: fix memory leaks in gutils, protocol, and strfuncs tests
https://bugzilla.gnome.org/show_bug.cgi?id=672329

Signed-off-by: Ravi Sankar Guntur <ravi.g@samsung.com>
2012-05-17 00:38:43 -04:00
Dan Winship
447a25ea50 update .gitignore 2012-05-16 12:00:44 -04:00
Giovanni Campagna
0417ddab6f GAppInfo: add a mechanism to query supported content types
This essentially adds an accessor for the MimeType field in desktop files,
to retrieve the list of all mime types supported by an application.
The interface though is part of GAppInfo, so it could be implemented
in the future by other backends.

https://bugzilla.gnome.org/show_bug.cgi?id=674111
2012-05-16 12:42:12 +02:00
Dan Winship
e011d2c921 Add g_type_ensure() and use it rather than playing games with volatile
https://bugzilla.gnome.org/show_bug.cgi?id=605976
2012-05-15 13:46:38 -04:00
Paolo Borelli
2a4235d0f3 gfile: add g_return_if_fail to g_file_make_directory_with_parents() 2012-05-15 17:39:38 +02:00
Colin Walters
5a57144d57 gfile: Plug memory leak in g_file_make_directory_with_parents()
The logic here is pretty twisted, but basically we were leaking a ref
for each non-existent parent.  The clearest way to fix this was to
move to more explicit refcounting logic; when a variable is pointing
to an object, it holds a ref.

https://bugzilla.gnome.org/show_bug.cgi?id=675446
2012-05-15 11:07:33 -04:00
Matthias Clasen
d5d3c7b3a4 Cover some malloc corner cases in tests 2012-05-14 17:57:42 -04:00
Matthias Clasen
215844b3a6 Add a test for g_clear_pointer 2012-05-14 17:57:42 -04:00
Jiro Matsuzawa
e153c8c58b [l10n] Update Japanese translation 2012-05-13 19:25:42 +09:00
Matthias Clasen
e3eb137bbb Use non-deprecated api in tests
https://bugzilla.gnome.org/show_bug.cgi?id=660851
2012-05-13 01:14:17 -04:00
Jasper St. Pierre
77695437b3 gkeyfile: Fix annotations for g_key_file_load_from_data
https://bugzilla.gnome.org/show_bug.cgi?id=675309
2012-05-11 19:31:52 -03:00
Lars Uebernickel
ebc3b928a3 docs: reference g_menu_item_new in gmenu convenience menuitem API 2012-05-10 09:35:03 -07:00
Christian Kirbach
748f44b12f [l10n] Updated German translation 2012-05-08 19:16:14 +02:00
Xavier Claessens
1b29ea3663 Set GLIB_VERSION_MAX_ALLOWED to GLIB_VERSION_CUR_STABLE by default 2012-05-08 16:49:53 +02:00
Emmanuele Bassi
744f36bb06 version macros: Make MIN_REQUIRED the current stable version
So that deprecation warnings will come into effect starting from the
stable release, instead of the next.
2012-05-08 15:12:42 +01:00
Jiro Matsuzawa
fb63c73bbe [l10n] Update Japanese translation 2012-05-08 20:26:18 +09:00
Michael Olbrich
a365684bf0 configure.ac: more AS_IF
It looks like JH_CHECK_XML_CATALOG has some prerequisite as well

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>

https://bugzilla.gnome.org/show_bug.cgi?id=674483
2012-05-07 17:18:06 -04:00
Colin Walters
54e31ab4f1 configure: Use AS_IF almost everywhere
Not doing so is an evil trap, sadly.  This patch has been
compile-checked on Fedora 16, and I've verified that the generated
config.status and config.h is exactly the same.

https://bugzilla.gnome.org/show_bug.cgi?id=674483
2012-05-07 17:18:04 -04:00
Michael Olbrich
e30823d93f configure.ac: use AS_IF
This way any prerequisites for e.g. AC_CHECK_HEADER are always executed
before the 'if'.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>

https://bugzilla.gnome.org/show_bug.cgi?id=674483
2012-05-07 17:18:03 -04:00