platform/upstream/glib.git
12 years agoUpdated Telugu Translation
Sasi Bhushan Boddepalli [Sat, 23 Jun 2012 04:46:28 +0000 (10:16 +0530)]
Updated Telugu Translation

12 years agoGIOScheduler: Use a GList, not GSList for jobs
Colin Walters [Thu, 21 Jun 2012 15:10:00 +0000 (11:10 -0400)]
GIOScheduler: Use a GList, not GSList for jobs

In general, code using g_slist_delete_link() is broken, because it
potentially requires an O(n) traversal.  Just switch to GList in this
case.

The performance hit here was exacerbated by the fact that we were
holding a mutex that needed to be accessed by all threads.

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

12 years agoGIOScheduler: Avoid constant iteration over pending job list
Colin Walters [Thu, 21 Jun 2012 14:20:20 +0000 (10:20 -0400)]
GIOScheduler: Avoid constant iteration over pending job list

The iteration over the list (while holding a mutex) was a serious
performance hit for asynchronous I/O.  We can just use
g_cancellable_connect().

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

12 years agoGRand: Check return value of fopen directly
Colin Walters [Thu, 21 Jun 2012 19:44:16 +0000 (15:44 -0400)]
GRand: Check return value of fopen directly

This doesn't fix anything, it should just silence some static analysis
tools.

12 years agogspawn: Abort if we can't open /dev/null
Colin Walters [Thu, 21 Jun 2012 19:37:39 +0000 (15:37 -0400)]
gspawn: Abort if we can't open /dev/null

This really "shouldn't happen", but if we have an assertion here, it
will help static analysis tools know we're not hitting undefined
state.

12 years agotests/unix: Ensure buffer is NUL terminated
Colin Walters [Thu, 21 Jun 2012 19:33:51 +0000 (15:33 -0400)]
tests/unix: Ensure buffer is NUL terminated

12 years agogsignal: Properly handle NULL nodes
Colin Walters [Thu, 21 Jun 2012 16:12:53 +0000 (12:12 -0400)]
gsignal: Properly handle NULL nodes

12 years agogresourcefile.c: Remove stray semicolon
Colin Walters [Thu, 21 Jun 2012 16:12:33 +0000 (12:12 -0400)]
gresourcefile.c: Remove stray semicolon

12 years agogmenu: Remove stray semicolon in g_menu_clear_item()
Colin Walters [Thu, 21 Jun 2012 16:08:05 +0000 (12:08 -0400)]
gmenu: Remove stray semicolon in g_menu_clear_item()

12 years agotests: Add missing initializer for return value
Colin Walters [Thu, 21 Jun 2012 16:06:34 +0000 (12:06 -0400)]
tests: Add missing initializer for return value

12 years agotests: Add missing va_end()
Colin Walters [Thu, 21 Jun 2012 16:05:39 +0000 (12:05 -0400)]
tests: Add missing va_end()

12 years agogfileutils: Remove extra fclose()
Colin Walters [Thu, 21 Jun 2012 16:00:04 +0000 (12:00 -0400)]
gfileutils: Remove extra fclose()

This is a regression introduced by:
commit 6ac8e6108cf15884e28fe1ecd3042dfce0e11dfd
Author: Matthias Clasen <mclasen@redhat.com>
Date:   Tue Jun 14 10:12:46 2011 -0400

    Don't leak resources in error cases

12 years agoUpdated Spanish translation
Daniel Mustieles [Fri, 22 Jun 2012 11:44:29 +0000 (13:44 +0200)]
Updated Spanish translation

12 years agogresolver: More robust parsing of DNS responses
Stef Walter [Sun, 13 May 2012 05:44:57 +0000 (07:44 +0200)]
gresolver: More robust parsing of DNS responses

 * Handle truncated responses, and invalid names

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

12 years agoAdd g_dbus_object_manager_server_is_exported()
Matthew Barnes [Fri, 22 Jun 2012 03:39:14 +0000 (23:39 -0400)]
Add g_dbus_object_manager_server_is_exported()

Returns whether a GDBusObjectSkeleton is exported on a
GDBusObjectManagerServer.

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

12 years agoGUnixVolumeMonitor: Make use of new g_list_copy_deep()
Colin Walters [Thu, 21 Jun 2012 22:32:06 +0000 (18:32 -0400)]
GUnixVolumeMonitor: Make use of new g_list_copy_deep()

12 years agoAdds g_list_copy_deep and g_slist_copy_deep
Jonh Wendell [Thu, 21 Jun 2012 15:23:23 +0000 (12:23 -0300)]
Adds g_list_copy_deep and g_slist_copy_deep

They make a full (deep) copy of a list.

In contrast with g_[s]list_copy(), these functions take a function as a argument
to make a copy of each list element, in addition to copying the list container itself.

The functions g_[s]list_copy() were reimplemented to just call the new functions
with NULL as the function argument, which will behave like current implementation.

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

12 years agogio/tests/proxy-test: fix cleanup
Dan Winship [Thu, 21 Jun 2012 19:13:06 +0000 (15:13 -0400)]
gio/tests/proxy-test: fix cleanup

make sure the proxy threads are in the "waiting for a connection"
state when we do the final cleanup, or else there are race conditions
involving which thread processes the GCancellable cancellation first.

12 years agoInstall bash completion files in /usr/share/
Matthias Clasen [Thu, 21 Jun 2012 10:11:58 +0000 (06:11 -0400)]
Install bash completion files in /usr/share/

The bash-completion code nowadays expects completion files to
be installed in  /usr/share/bash-completion/completions, and
expects them to be named like the command they are completing
for.

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

12 years agogio/tests/pollable: add can_poll() assertions
Dan Winship [Wed, 20 Jun 2012 14:14:01 +0000 (10:14 -0400)]
gio/tests/pollable: add can_poll() assertions

Assert that socket streams and socket/pipe-based unix streams are
pollable, and file-based unix streams are not.

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

12 years agogdbus: fix generated code to not warn under -Wfloat-equal
Dan Winship [Mon, 18 Jun 2012 19:31:47 +0000 (15:31 -0400)]
gdbus: fix generated code to not warn under -Wfloat-equal

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

12 years agomsvc_recommended_pragmas.h: Re-enable C4819 warnings
Chun-wei Fan [Wed, 20 Jun 2012 02:19:14 +0000 (10:19 +0800)]
msvc_recommended_pragmas.h: Re-enable C4819 warnings

Apparently the C4819 warnings appear due to a bug on Visual C++ on DBCS
locales, so re-enable this.

Add a note in the Visual C++ Readme.txt's regarding this.

12 years agoAssamese translation reviewed
Nilamdyuti Goswami [Tue, 19 Jun 2012 13:21:26 +0000 (18:51 +0530)]
Assamese translation reviewed

12 years agoBug 678332-gio/gconverterinputstream.c: Fix build
Chun-wei Fan [Tue, 19 Jun 2012 08:35:26 +0000 (16:35 +0800)]
Bug 678332-gio/gconverterinputstream.c: Fix build

Apparently the previous change to this file broke GCC builds, so fix that.

12 years agoBug 678332-GIO: Fix build on Windows/non-GCC
Chun-wei Fan [Tue, 19 Jun 2012 04:04:28 +0000 (12:04 +0800)]
Bug 678332-GIO: Fix build on Windows/non-GCC

-gconverterinputstream.c: Avoid GCCism by not using non-standard pointer
 arithmetic on void*, but do a cast to char * as that seems to be what the
 variable was used for.
-gtestdbus.c: Don't include unistd.h unconditionally, and use g_usleep()
 instead of usleep(), as usleep() is not universally available.

12 years agobuild/win32/vs9/glib.vsprops: Cosmetics
Chun-wei Fan [Mon, 18 Jun 2012 09:09:56 +0000 (17:09 +0800)]
build/win32/vs9/glib.vsprops: Cosmetics

Make it more consistent accross the board by using CopyDir as the
output/"install" folder.

12 years agoFix g_utf8_validate() out argument transfer mode
Martin Pitt [Mon, 18 Jun 2012 05:39:23 +0000 (07:39 +0200)]
Fix g_utf8_validate() out argument transfer mode

The "end" argument is unusual in g_utf8_validate(): it's not a classic out
argument which gets allocated by the called function, but merely points into
one of its input arguments. Thus it is "transfer none".

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

12 years agodocs: fix an example
Dan Winship [Sat, 16 Jun 2012 14:38:45 +0000 (10:38 -0400)]
docs: fix an example

12 years agoGKeyFile: Deal better with blank lines
Matthias Clasen [Fri, 15 Jun 2012 22:53:09 +0000 (18:53 -0400)]
GKeyFile: Deal better with blank lines

There is no need to store a has_trailing_blank_line boolean for
each group, we can just check this at the time we assemble the data.

This fixes a problem without roundtrips where we would sometimes
add an extra blank line between groups.

The testcase here is inspired by
https://bugzilla.gnome.org/show_bug.cgi?id=677817

12 years agoGWakeup: Avoid extraneous wakeups
Matthias Clasen [Fri, 15 Jun 2012 19:16:13 +0000 (15:16 -0400)]
GWakeup: Avoid extraneous wakeups

We were checking the wrong number here, and waking up unnecessarily.
https://bugzilla.gnome.org/show_bug.cgi?id=678052

12 years agoImprove g_find_program_in_path documentation
Paolo Borelli [Fri, 15 Jun 2012 12:41:20 +0000 (14:41 +0200)]
Improve g_find_program_in_path documentation

Document that g_find_program_in_path returns a newly-allocated string

12 years agoUpdated Greek translation
Tom Tryfonidis [Fri, 15 Jun 2012 10:15:48 +0000 (13:15 +0300)]
Updated Greek translation

12 years agoUpdated Spanish translation
Daniel Mustieles [Thu, 14 Jun 2012 11:48:29 +0000 (13:48 +0200)]
Updated Spanish translation

12 years agoUpdated Arabic translation
Khaled Hosny [Wed, 13 Jun 2012 19:00:44 +0000 (21:00 +0200)]
Updated Arabic translation

12 years agoUpdate to use XDG cache home for thumbnails
William Jon McCann [Mon, 30 Apr 2012 16:51:25 +0000 (12:51 -0400)]
Update to use XDG cache home for thumbnails

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

12 years agoImprove GTimeZone test coverage
Matthias Clasen [Wed, 13 Jun 2012 18:43:29 +0000 (14:43 -0400)]
Improve GTimeZone test coverage

12 years agoglib-compile-resources: Forward errors from spawned processes
Benjamin Otte [Wed, 13 Jun 2012 15:33:01 +0000 (17:33 +0200)]
glib-compile-resources: Forward errors from spawned processes

We just grab stderr from gdk-pixbuf-to-csource and xmllint and include
it in the error message. It's the best we can do.

12 years agogtype: make these cases fatal.
Stefan Sauer [Tue, 12 Jun 2012 18:22:39 +0000 (20:22 +0200)]
gtype: make these cases fatal.

Otherwise we crash with a null-ptr deref in g_object_newv and ever there we
should not return null, as we're saying that object creation will not return
null.

12 years agoupdate .gitignore
Dan Winship [Tue, 12 Jun 2012 11:09:53 +0000 (07:09 -0400)]
update .gitignore

12 years agogunixoutputstream: add missing can_poll() implementation
Dan Winship [Tue, 12 Jun 2012 11:08:26 +0000 (07:08 -0400)]
gunixoutputstream: add missing can_poll() implementation

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

12 years agoRemove trailing commas from enums
Murray Cumming [Tue, 12 Jun 2012 08:35:52 +0000 (10:35 +0200)]
Remove trailing commas from enums

12 years agoCorrect the docs for g_time_zone_adjust_time
Matthias Clasen [Mon, 11 Jun 2012 14:24:03 +0000 (10:24 -0400)]
Correct the docs for g_time_zone_adjust_time

March 13, 2010 is very ordinary.
March 14, 2010 is the special day.

12 years agoImprove GTimeZone test coverage
Matthias Clasen [Mon, 11 Jun 2012 14:23:42 +0000 (10:23 -0400)]
Improve GTimeZone test coverage

12 years agoCosmetic changes
Matthias Clasen [Mon, 11 Jun 2012 11:19:42 +0000 (07:19 -0400)]
Cosmetic changes

12 years agoImprove GOptionContext test coverage
Matthias Clasen [Mon, 11 Jun 2012 11:19:14 +0000 (07:19 -0400)]
Improve GOptionContext test coverage

12 years agoFix a typo
Matthias Clasen [Mon, 11 Jun 2012 11:18:29 +0000 (07:18 -0400)]
Fix a typo

It is 'entries', not 'entires'.

12 years agoGDBusProxy: Treat org.freedesktop.systemd1.Masked error as non-fatal
David Zeuthen [Fri, 8 Jun 2012 17:30:48 +0000 (13:30 -0400)]
GDBusProxy: Treat org.freedesktop.systemd1.Masked error as non-fatal

This is useful otherwise we'll fail if a systemd service is
masked. See bug 677718 for details.

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

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
12 years agoFix path to aclocal in output message
Daniel Macks [Thu, 7 Jun 2012 02:40:26 +0000 (22:40 -0400)]
Fix path to aclocal in output message

datadir is defined in terms of datarootdir by default in configure
(datadir='${datarootdir}' with ${datarootdir} not expanded), so
defining datadir must happen *after* datarootdir is defined in the
glib-gettextize shell script. Otherwise ${datarootdir} is null when it
is expanded at runtime.

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

12 years agoconfigure: Add --disable-libelf option
Martin Jansa [Thu, 7 Jun 2012 01:38:28 +0000 (21:38 -0400)]
configure: Add --disable-libelf option

See http://git.openembedded.org/openembedded-core/tree/meta/recipes-core/glib-2.0/glib-2.0/nolibelf.patch?id=1f73485a143f0aa6cd87636f3d36a7d1dfc40a3b

Signed-off-by: Colin Walters <walters@verbum.org>
12 years agogdbus: Implement g_dbus_connection_get_last_serial()
Tomas Bzatek [Wed, 6 Jun 2012 17:44:39 +0000 (19:44 +0200)]
gdbus: Implement g_dbus_connection_get_last_serial()

This patch brings an ability to retrieve serial number of the last
message sent within the current thread.

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

12 years agotests/spawn-multithreaded: Decrease parallelism to avoid crashing on OS X
Colin Walters [Wed, 6 Jun 2012 11:15:48 +0000 (07:15 -0400)]
tests/spawn-multithreaded: Decrease parallelism to avoid crashing on OS X

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

12 years agoPass -framework sub-flag without embedded whitespace
Daniel Macks [Tue, 5 Jun 2012 23:20:13 +0000 (19:20 -0400)]
Pass -framework sub-flag without embedded whitespace

The "-framework" linker flag takes a second word as a parameter. If
they are passed separated with whitespace, some flag-handling routines
may not know to keep the two words together as a single unit. Use
-Wl,, to pass multiple words without embedded whitespace.

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

12 years agoconfigure: Require libelf 0.8.12
Daniel Macks [Tue, 5 Jun 2012 18:16:24 +0000 (14:16 -0400)]
configure: Require libelf 0.8.12

Older versions don't have the required API.

(Commit message written by Colin Walters <walters@verbum.org>)

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

12 years agog_dbus_gvariant_to_gvalue(): Add missing out annotation
Martin Pitt [Tue, 5 Jun 2012 16:50:36 +0000 (18:50 +0200)]
g_dbus_gvariant_to_gvalue(): Add missing out annotation

12 years agoGLib 2.33.2 2.33.2
Ryan Lortie [Mon, 4 Jun 2012 17:17:47 +0000 (13:17 -0400)]
GLib 2.33.2

12 years agoUpdates for 2.33.2
Matthias Clasen [Sun, 3 Jun 2012 17:18:39 +0000 (13:18 -0400)]
Updates for 2.33.2

12 years agoImprove GResource test coverage
Matthias Clasen [Mon, 4 Jun 2012 10:00:45 +0000 (06:00 -0400)]
Improve GResource test coverage

12 years agoImprove GSocketAddress test coverage
Matthias Clasen [Mon, 4 Jun 2012 10:00:03 +0000 (06:00 -0400)]
Improve GSocketAddress test coverage

12 years agoImprove GNetworkMonitor test coverage
Matthias Clasen [Mon, 4 Jun 2012 09:59:46 +0000 (05:59 -0400)]
Improve GNetworkMonitor test coverage

12 years agoImprove GIcon test coverage
Matthias Clasen [Mon, 4 Jun 2012 09:59:27 +0000 (05:59 -0400)]
Improve GIcon test coverage

12 years agoFormatting cleanups
Matthias Clasen [Mon, 4 Jun 2012 01:37:32 +0000 (21:37 -0400)]
Formatting cleanups

12 years agoImprove GMenu test coverage
Matthias Clasen [Sun, 3 Jun 2012 23:51:47 +0000 (19:51 -0400)]
Improve GMenu test coverage

12 years agoImprove GApplication test coverage
Matthias Clasen [Sun, 3 Jun 2012 23:51:20 +0000 (19:51 -0400)]
Improve GApplication test coverage

12 years agoImprove GActionGroup test coverage
Matthias Clasen [Sun, 3 Jun 2012 23:51:05 +0000 (19:51 -0400)]
Improve GActionGroup test coverage

12 years agoImprove GIcon test coverage
Matthias Clasen [Sun, 3 Jun 2012 23:50:54 +0000 (19:50 -0400)]
Improve GIcon test coverage

12 years agoExpand GAppInfo tests
Matthias Clasen [Sun, 3 Jun 2012 20:30:58 +0000 (16:30 -0400)]
Expand GAppInfo tests

12 years agoUpdated French translation
Bruno Brouard [Sun, 3 Jun 2012 11:36:14 +0000 (13:36 +0200)]
Updated French translation

12 years agoglib: fix g_reload_user_special_dirs_cache
Marc-Antoine Perennou [Tue, 22 May 2012 19:56:10 +0000 (21:56 +0200)]
glib: fix g_reload_user_special_dirs_cache

We handle a special case for G_USER_DIRECTORY_DESKTOP
when we init the values but drop it when we reload them.
Fix this by preferring old values to NULL

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

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
12 years agoUpdated Spanish translation
Daniel Mustieles [Thu, 31 May 2012 13:29:31 +0000 (15:29 +0200)]
Updated Spanish translation

12 years agoUpdated Spanish translation
Daniel Mustieles [Thu, 31 May 2012 11:19:37 +0000 (13:19 +0200)]
Updated Spanish translation

12 years agoGConverterInputStream: fix an edge case
Dan Winship [Wed, 30 May 2012 12:30:27 +0000 (08:30 -0400)]
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

12 years agobuild: Add missing AM_V_GEN to silence the build
Christian Persch [Tue, 29 May 2012 17:10:57 +0000 (19:10 +0200)]
build: Add missing AM_V_GEN to silence the build

12 years agoapplication: Add dbus register/unregister hooks
Christian Persch [Sat, 5 May 2012 14:52:28 +0000 (16:52 +0200)]
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.

12 years agogobject: Document notify signal deduplication with freeze/thaw
Philip Withnall [Sun, 27 May 2012 21:40:44 +0000 (22:40 +0100)]
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

12 years agoUpdated Slovenian translation
Matej Urbančič [Mon, 28 May 2012 12:57:02 +0000 (14:57 +0200)]
Updated Slovenian translation

12 years agoLink to gvariant-format-strings-pointers in getter API
Guillaume Desmottes [Fri, 27 Apr 2012 08:02:54 +0000 (10:02 +0200)]
Link to gvariant-format-strings-pointers in getter API

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

12 years agogappinfo: Fix uninitialized-variable gcc warning
Colin Walters [Sat, 26 May 2012 15:53:14 +0000 (11:53 -0400)]
gappinfo: Fix uninitialized-variable gcc warning

12 years agoAnnotate API introduced for 2.34 with GLIB_AVAILABLE_IN_2_34
Colin Walters [Fri, 25 May 2012 13:22:06 +0000 (09:22 -0400)]
Annotate API introduced for 2.34 with GLIB_AVAILABLE_IN_2_34

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

12 years agoAnnotate API introduced for 2.32 with GLIB_AVAILABLE_IN_2_32
Colin Walters [Fri, 25 May 2012 12:59:09 +0000 (08:59 -0400)]
Annotate API introduced for 2.32 with GLIB_AVAILABLE_IN_2_32

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

12 years agoAnnotate API introduced for 2.30 with GLIB_AVAILABLE_IN_2_30
Colin Walters [Fri, 25 May 2012 12:42:50 +0000 (08:42 -0400)]
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

12 years agogio: fix symbol name
Marc-Antoine Perennou [Sat, 26 May 2012 08:34:53 +0000 (10:34 +0200)]
gio: fix symbol name

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
12 years agogio: add GBytes-based input/output stream methods
Dan Winship [Thu, 5 Apr 2012 13:19:17 +0000 (09:19 -0400)]
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

12 years agoRevert "application: Don't print a critical warning here"
Christian Persch [Thu, 24 May 2012 15:51:35 +0000 (17:51 +0200)]
Revert "application: Don't print a critical warning here"

This reverts commit 1541478bac6fed26bcb77ebae5e50bb7a76954f7.

12 years agoapplication: Save a few bytes in the library
Christian Persch [Sat, 5 May 2012 15:29:44 +0000 (17:29 +0200)]
application: Save a few bytes in the library

There's really no need to put useless whitespace into the .so.

12 years agoapplication: Don't print a critical warning here
Christian Persch [Sat, 5 May 2012 15:26:34 +0000 (17:26 +0200)]
application: Don't print a critical warning here

It's a runtime error, not a programming error.

12 years agoglib: fix build
Marc-Antoine Perennou [Tue, 22 May 2012 18:38:52 +0000 (20:38 +0200)]
glib: fix build

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
12 years agogspawn: Add GSpawnFlag to use the PATH from envp
Christian Persch [Sat, 19 May 2012 22:01:35 +0000 (00:01 +0200)]
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.

12 years agoenviron: Allow NULL envp
Christian Persch [Sat, 19 May 2012 21:59:01 +0000 (23:59 +0200)]
environ: Allow NULL envp

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

12 years agoGMemoryOutputStream: Add API to return data as a GBytes
Colin Walters [Fri, 18 May 2012 14:39:05 +0000 (10:39 -0400)]
GMemoryOutputStream: Add API to return data as a GBytes

Matches the corresponding additions to GMemoryInputStream.

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

12 years agoGMemoryInputStream: Add API to accept GBytes
Colin Walters [Thu, 17 May 2012 18:36:15 +0000 (14:36 -0400)]
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

12 years agogio: The tmpl parameter to g_file_new_tmp can be NULL
Debarshi Ray [Thu, 17 May 2012 04:43:54 +0000 (06:43 +0200)]
gio: The tmpl parameter to g_file_new_tmp can be NULL

Fixes: https://bugzilla.gnome.org/676208

12 years agog_utf8_validate: @str shouldn't end up annotated as utf8
Dan Winship [Wed, 21 Mar 2012 13:22:38 +0000 (09:22 -0400)]
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

12 years agoproxy-test: work even when the upstream DNS lies
Dan Winship [Fri, 18 May 2012 16:18:23 +0000 (12:18 -0400)]
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.

12 years agog_app_info_launch_default_for_uri: don't use GFile if we don't have to
Dan Winship [Fri, 18 May 2012 12:49:05 +0000 (08:49 -0400)]
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

12 years agoDocument that g_app_info_create_from_commandline() does unquoting according to fd.o
Holger Berndt [Thu, 17 May 2012 20:24:10 +0000 (22:24 +0200)]
Document that g_app_info_create_from_commandline() does unquoting according to fd.o

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

12 years agognetworkmonitornetlink: don't leak the list of networks
Dan Winship [Thu, 17 May 2012 17:48:21 +0000 (13:48 -0400)]
gnetworkmonitornetlink: don't leak the list of networks

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

12 years agog_clear_pointer: work around gcc helpfulness
Dan Winship [Thu, 10 May 2012 17:29:39 +0000 (13:29 -0400)]
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

12 years agogsettings: add reset-recursively to bash completion
Matthias Clasen [Thu, 17 May 2012 04:44:36 +0000 (00:44 -0400)]
gsettings: add reset-recursively to bash completion

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

12 years agoImprove libelf configure check
Matthias Clasen [Thu, 17 May 2012 04:41:33 +0000 (00:41 -0400)]
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

12 years agoglib: fix memory leaks in gutils, protocol, and strfuncs tests
Ravi Sankar Guntur [Mon, 19 Mar 2012 15:47:32 +0000 (21:17 +0530)]
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>