Commit Graph

12894 Commits

Author SHA1 Message Date
Kjartan Maraas
0830e10e6f Updated Norwegian bokmål translation 2012-07-23 11:42:22 +02:00
Colin Walters
003e7a70e8 Revert unintential IAPI break for g_key_file_load_from_data()
The old (length) annotation actually wasn't being read.  Changing
it to an array was telling g-i that it was an array of utf8, which
is clearly not true.

We *could* add (element-type guint8), but that would change it to a
byte array, as opposed to the original utf8 version.

Just removing the annotation should bring us back to where we
were, which was fine.

https://bugzilla.gnome.org/show_bug.cgi?id=680310
2012-07-20 14:07:39 -04:00
Chun-wei Fan
1ae7c7d982 gio/Makefile.am: Filter out gcontenttype.c for MSVC builds
gcontenttype.c was split into gcontenttype.c and gcontenttype-win32.c
in commit 32192ee9 ("Split gcontenttype.c"), so we don't want to include
gcontenttype.c in the Visual C++ build as it is no longer a source file
meant for Windows.

Thanks to Thomas H.P. Anderson for pointing this out.
2012-07-19 23:15:59 +08:00
Matthias Clasen
23a2136fb5 Check for PR_SET_NAME
Bug 680148 claims that PR_SET_NAME may not be defined when
using an old kernel. Deal with it.
2012-07-19 06:37:59 -04:00
Matthias Clasen
4c255d4602 Be more careful when using xlocale
Bug 680074 shows that we may end up in situations where only
some of the xlocale functions we need are available. Rather than
trying to find the minimal set of required functions for each
use, define a global USE_XLOCALE and only use any xlocale functions
if we have a full set.
2012-07-19 06:32:29 -04:00
Matthias Clasen
dd098405ad Cosmetic: Fix up line endings
Somehow a few ^M sneaked in here.
2012-07-19 06:20:41 -04:00
Dan Winship
2357f67b1b gmain: handle child sources being destroyed before parent
Fix a crash when a child source is destroyed before its parent. Also,
add a test case for this and the previous fix.
2012-07-18 15:08:44 -04:00
Dan Winship
ee6e66cb44 g_source_add_child_source: sync blocked state
Child sources are supposed to be blocked when their parents are, so
when adding a source to a blocked source, block the child too. Fixes a
warning when unblocking the parent.
2012-07-18 14:19:36 -04:00
Dan Winship
2855b827da gio/tests/converter-stream: add a new test, rename an old one
Add a test that the decompressor input streams handle truncated data
correctly. (They do; I wrote the test thinking there was a bug there,
but there isn't.)

Also, rename the "corruption" tests to "roundtrip", since "corruption"
makes it sound like we're testing how the converters deal with
corrupted data, as opposed to merely testing that they don't corrupt
data themselves. And fix the bug reference.
2012-07-17 16:21:03 -04:00
Dan Winship
09c18537f4 g_cancellable_source_new: don't use a file descriptor
Rather than implementing GCancellableSource by polling on its fd,
implement it by just waking its GMainContext up from the "cancelled"
signal handler, thereby helping to reduce file descriptor usage.
Suggested by Ryan Lortie.

https://bugzilla.gnome.org/show_bug.cgi?id=680121
2012-07-17 15:32:48 -04:00
Matthias Clasen
0e37822e10 Bump version 2012-07-17 14:23:08 -04:00
Matthias Clasen
ffefa544d6 More updates 2012-07-17 13:50:58 -04:00
Stef Walter
a0b71839ee GIOScheduler: Fix access after free in "cancelled" handler
* GCancellable can be "cancelled" more than once if
   g_cancellable_reset() is called.
 * Don't assume that because the "cancelled" signal fired
   it won't fire again.

https://bugzilla.gnome.org/show_bug.cgi?id=680111
2012-07-17 13:47:26 -04:00
Matthias Clasen
e97a4c7e5e 2.33.6
https://bugzilla.gnome.org/show_bug.cgi?id=680111
2012-07-17 13:47:26 -04:00
Dan Winship
d90ad18055 GAsyncInitable: partially revert the init_finish changes
g_async_initable_real_init_finish() was previously handling all
GSimpleAsyncResults, even if they weren't created by
g_async_initable_real_init_async(), and libnm-glib accidentally relied
on that behavior. So remove the g_simple_async_result_is_valid()
check.
2012-07-17 09:15:44 -04:00
Krzesimir Nowak
cd8ec3359b GVariantType: Add (constructor) annotation for some constructors.
This are mistaken by g-ir-scanner as GVariantType's methods, because
they take a GVariantType* as a first parameter.

https://bugzilla.gnome.org/show_bug.cgi?id=679968
2012-07-16 17:58:22 +02:00
Daniel Mustieles
1b3578ec0b Updated Spanish translation 2012-07-16 16:42:49 +02:00
Marc-André Lureau
bfbfbec91e win32: g_getenv() should return "" if variable exists and empty
On Windows, GetEnvironmentVariable() returns 0 for empty variables.
Checking GetLastError() == ERROR_ENVVAR_NOT_FOUND helps make a
difference between a variable that does not exist or an empty one
which should return "".

https://bugzilla.gnome.org/show_bug.cgi?id=679617
2012-07-16 12:49:25 +02:00
Marc-André Lureau
6007a4b0b1 win32: fix g_get_environ()
The current code create the strv array incorrectly, it is too big and
leaves invalid holes. This may result in crashes when freeing the
returned value.

https://bugzilla.gnome.org/show_bug.cgi?id=679617
2012-07-16 12:49:24 +02:00
Matthias Clasen
11819933e2 Bump version 2012-07-16 06:01:55 -04:00
Matthias Clasen
d48bd70853 More updates 2012-07-15 20:36:10 -04:00
Ihar Hrachyshka
f81c2c753a Updated Belarusian translation. 2012-07-15 12:27:03 +03:00
Piotr Drąg
ef4bbecce7 Updated Polish translation 2012-07-15 01:26:12 +02:00
Chao-Hsiung Liao
160da82e39 Updated Traditional Chinese translation(Hong Kong and Taiwan) 2012-07-14 13:51:12 +08:00
Matthias Clasen
c182ee1f71 Fix GModule documentation a bit
The documentation for g_module_make_resident was for some reason
in the doc comment for g_module_name.

https://bugzilla.gnome.org/show_bug.cgi?id=679813
2012-07-13 17:37:37 -04:00
Matthias Clasen
34b2125edf Fix doc build 2012-07-13 17:37:12 -04:00
Nilamdyuti Goswami
3201bcd1b2 Assamese translation updated 2012-07-13 17:54:20 +05:30
Matthias Clasen
97676046f2 Update NEWS 2012-07-12 23:51:08 -04:00
Marc-André Lureau
d9af4259f7 win32: fix build g_spawn_check_exit_status() with mingw
With mingw, only gspawn-win32.c is compiled, but it is missing some
new symbols.

https://bugzilla.gnome.org/show_bug.cgi?id=679691
2012-07-12 23:19:52 -04:00
Krzesimir Nowak
ce1b50bf2a GRegex, GConvert: Add some missing annotations.
Also, removed pointless (allow-none) return annotation.

https://bugzilla.gnome.org/show_bug.cgi?id=679762
2012-07-12 16:09:57 +02:00
Cosimo Cecchi
99f26ab08f mount-operation: add a Since tag to the show-unmount-progress signal 2012-07-11 20:26:16 -04:00
Cosimo Cecchi
44375ad7c5 mount-operation: add show-unmount-progress signal
The actual implementation will be in gvfs.

https://bugzilla.gnome.org/show_bug.cgi?id=676111
2012-07-11 19:57:42 -04:00
Tom Tryfonidis
37fbd702d5 Updated Greek translation 2012-07-12 02:38:20 +03:00
Rui Matos
eda1735029 GDBusNodeInfo: remove a spurious for loop
https://bugzilla.gnome.org/show_bug.cgi?id=679671
2012-07-11 03:27:29 +02:00
Rui Matos
6f23c33831 GDBusNodeInfo: the XML string must contain exactly one node element
Make the documentation clear about this.

https://bugzilla.gnome.org/show_bug.cgi?id=679671
2012-07-11 03:27:29 +02:00
Colin Walters
f7abd3ce13 Add g_spawn_check_exit_status()
Many (if not "almost all") programs that spawn other programs via
g_spawn_sync() or the like simply want to check whether or not the
child exited successfully, but doing so requires use of
platform-specific functionality and there's actually a fair amount of
boilerplate involved.

This new API will help drain a *lot* of mostly duplicated code in
GNOME, from gnome-session to gdm.  And we can see that some bits even
inside GLib were doing it wrong; for example checking the exit status
on Unix, but ignoring it on Windows.

https://bugzilla.gnome.org/show_bug.cgi?id=679691
2012-07-10 18:03:56 -04:00
Dan Winship
82d914d808 gio: add g_async_result_is_tagged()
Rather than doing a two step first-check-the-GAsyncResult-subtype-then-
check-the-tag, add a GAsyncResult-level method so that you can do them
both at once, simplifying the code for "short-circuit" async return
values where the vmethod never gets called.

https://bugzilla.gnome.org/show_bug.cgi?id=661767
2012-07-10 10:49:20 -04:00
Dan Winship
f8532a13e2 gio: Add g_async_result_legacy_propagate_error()
Finish deprecating the "handle GSimpleAsyncResult errors in the
wrapper function" idiom (and protect against future GSimpleAsyncResult
deprecation warnings) by adding a "legacy" GAsyncResult method
to do it in those classes/methods where it had been traditionally
done.

(This applies only to wrapper methods; in cases where an _async
vmethod explicitly uses GSimpleAsyncResult, its corresponding _finish
vmethod still uses g_simple_async_result_propagate_error.)

https://bugzilla.gnome.org/show_bug.cgi?id=667375
https://bugzilla.gnome.org/show_bug.cgi?id=661767
2012-07-10 10:49:14 -04:00
Dan Winship
538b2f106d gio: handle GSimpleAsyncResult errors in _finish vmethods
Originally, the standard idiom with GSimpleAsyncResult was to handle
all errors in the _finish wrapper function, so that vmethods only had
to deal with successful results. But this means that chaining up to a
parent _finish vmethod won't work correctly. Fix this by also checking
for errors in all the relevant vmethods. (We have to redundantly check
in both the vmethod and the wrapper to preserve compatibility.)

https://bugzilla.gnome.org/show_bug.cgi?id=667375
https://bugzilla.gnome.org/show_bug.cgi?id=661767
2012-07-10 10:47:55 -04:00
Dan Winship
a98d26c9bb GFile: remove some unnecessary code
The "mainloop_barrier" in copy_async_thread() is unnecessary, since
the g_simple_async_result_complete_in_idle() will be queued after all
of the g_io_scheduler_job_send_to_mainloop_async()s, and sources with
the same priority will run in the order in which they were queued.

https://bugzilla.gnome.org/show_bug.cgi?id=661767
2012-07-10 10:47:49 -04:00
Antoine Jacoutot
4749878f91 goptions: use G_N_ELEMENTS instead of nitems 2012-07-10 15:14:52 +02:00
Ryan Lortie
5a85fe0e37 GVariant: fix string validation
String validation was done by checking if the string was valid utf8 and
ensuring that the first non-utf8 character was the last character (ie:
the nul terminator).

No check was actually done to make sure that this byte actually
contained a nul, however, so it was possible that you could have a
string like "hello\xff" with length 6 that would correctly validate.

Fix that, and test it.
2012-07-09 12:47:31 -04:00
Stef Walter
3b0f1cc432 Fix up GObject interface documentation
* Document how to override interfaces already implemented
   in a base class, and also call those base class implementations
   from a derived reimplementation.
 * Don't recomend people use base_init() style functions to
   initialize interface signals and properties, use default_init()
   aka class_init() instead (as G_DEFINE_INTERFACE() uses).
 * The above solves the interface init called multiple times
   problem, so remove some needless naysaying about that.
 * Document default_init() in the interface initialization discussion
 * Linkify more stuff.
 * Remove some crud and typos

https://bugzilla.gnome.org/show_bug.cgi?id=675504
2012-07-09 17:47:39 +02:00
Fran Diéguez
2cf9608d48 Updated Galician translations 2012-07-09 15:05:04 +02:00
Antoine Jacoutot
f9a6a97470 OpenBSD: explicitely define nitems
nitems is never guaranteed to be defined in sys/params.h as it is meant
to be defined within a protected ifdef __KERNEL condition.
2012-07-08 19:23:18 +02:00
Torsten Schönfeld
a511a706de gio: Add type macros for GFileAttributeInfoList and GFileAttributeMatcher
https://bugzilla.gnome.org/show_bug.cgi?id=616892
2012-07-08 00:47:01 +02:00
David Zeuthen
c09bf3e6b9 gdbus-codegen: improve casting a tiny wee bit
The in commit b79fbc5c3f for fixing
-Wstrict-aliasing warnings was a little too brutal, make it a bit
better.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
2012-07-07 17:10:46 -04:00
Christian Persch
53b3175cfa regex: Add new GRegexError code from PCRE 8.31 2012-07-07 22:08:08 +02:00
Christian Persch
2188a5e59c regex: Enable fixed test
This problem was fixed in PCRE 8.31, so uncomment the test.
2012-07-07 22:08:08 +02:00
Christian Persch
9457833010 regex: Import PCRE 8.31
https://bugzilla.gnome.org/show_bug.cgi?id=679193
2012-07-07 22:08:02 +02:00