platform/upstream/glib.git
11 years agoMore updates 2.33.4
Matthias Clasen [Mon, 16 Jul 2012 00:36:10 +0000 (20:36 -0400)]
More updates

11 years agoUpdated Belarusian translation.
Ihar Hrachyshka [Sun, 15 Jul 2012 09:27:03 +0000 (12:27 +0300)]
Updated Belarusian translation.

11 years agoUpdated Polish translation
Piotr Drąg [Sat, 14 Jul 2012 23:23:25 +0000 (01:23 +0200)]
Updated Polish translation

11 years agoUpdated Traditional Chinese translation(Hong Kong and Taiwan)
Chao-Hsiung Liao [Sat, 14 Jul 2012 05:51:12 +0000 (13:51 +0800)]
Updated Traditional Chinese translation(Hong Kong and Taiwan)

11 years agoFix GModule documentation a bit
Matthias Clasen [Fri, 13 Jul 2012 21:37:37 +0000 (17:37 -0400)]
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

11 years agoFix doc build
Matthias Clasen [Fri, 13 Jul 2012 21:37:12 +0000 (17:37 -0400)]
Fix doc build

11 years agoAssamese translation updated
Nilamdyuti Goswami [Fri, 13 Jul 2012 12:23:45 +0000 (17:53 +0530)]
Assamese translation updated

11 years agoUpdate NEWS
Matthias Clasen [Fri, 13 Jul 2012 03:40:43 +0000 (23:40 -0400)]
Update NEWS

11 years agowin32: fix build g_spawn_check_exit_status() with mingw
Marc-André Lureau [Wed, 11 Jul 2012 17:41:58 +0000 (19:41 +0200)]
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

11 years agoGRegex, GConvert: Add some missing annotations.
Krzesimir Nowak [Thu, 12 Jul 2012 14:09:57 +0000 (16:09 +0200)]
GRegex, GConvert: Add some missing annotations.

Also, removed pointless (allow-none) return annotation.

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

11 years agomount-operation: add a Since tag to the show-unmount-progress signal
Cosimo Cecchi [Thu, 12 Jul 2012 00:25:59 +0000 (20:25 -0400)]
mount-operation: add a Since tag to the show-unmount-progress signal

11 years agomount-operation: add show-unmount-progress signal
Cosimo Cecchi [Fri, 6 Jul 2012 19:41:47 +0000 (15:41 -0400)]
mount-operation: add show-unmount-progress signal

The actual implementation will be in gvfs.

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

11 years agoUpdated Greek translation
Tom Tryfonidis [Wed, 11 Jul 2012 23:38:20 +0000 (02:38 +0300)]
Updated Greek translation

11 years agoGDBusNodeInfo: remove a spurious for loop
Rui Matos [Tue, 10 Jul 2012 09:38:34 +0000 (11:38 +0200)]
GDBusNodeInfo: remove a spurious for loop

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

11 years agoGDBusNodeInfo: the XML string must contain exactly one node element
Rui Matos [Tue, 10 Jul 2012 09:37:56 +0000 (11:37 +0200)]
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

11 years agoAdd g_spawn_check_exit_status()
Colin Walters [Tue, 10 Jul 2012 15:27:22 +0000 (11:27 -0400)]
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

11 years agogio: add g_async_result_is_tagged()
Dan Winship [Thu, 10 May 2012 15:09:52 +0000 (11:09 -0400)]
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

11 years agogio: Add g_async_result_legacy_propagate_error()
Dan Winship [Thu, 10 May 2012 13:00:45 +0000 (09:00 -0400)]
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

11 years agogio: handle GSimpleAsyncResult errors in _finish vmethods
Dan Winship [Mon, 11 Jun 2012 17:44:19 +0000 (13:44 -0400)]
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

11 years agoGFile: remove some unnecessary code
Dan Winship [Tue, 17 Apr 2012 13:55:33 +0000 (09:55 -0400)]
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

11 years agogoptions: use G_N_ELEMENTS instead of nitems
Antoine Jacoutot [Mon, 9 Jul 2012 16:17:01 +0000 (18:17 +0200)]
goptions: use G_N_ELEMENTS instead of nitems

11 years agoGVariant: fix string validation
Ryan Lortie [Mon, 9 Jul 2012 16:43:50 +0000 (12:43 -0400)]
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.

11 years agoFix up GObject interface documentation
Stef Walter [Sat, 5 May 2012 10:51:16 +0000 (12:51 +0200)]
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

11 years agoUpdated Galician translations
Fran Diéguez [Mon, 9 Jul 2012 13:05:04 +0000 (15:05 +0200)]
Updated Galician translations

11 years agoOpenBSD: explicitely define nitems
Antoine Jacoutot [Sun, 8 Jul 2012 17:23:18 +0000 (19:23 +0200)]
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.

11 years agogio: Add type macros for GFileAttributeInfoList and GFileAttributeMatcher
Torsten Schönfeld [Mon, 3 May 2010 18:33:50 +0000 (20:33 +0200)]
gio: Add type macros for GFileAttributeInfoList and GFileAttributeMatcher

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

11 years agogdbus-codegen: improve casting a tiny wee bit
David Zeuthen [Sat, 7 Jul 2012 21:10:46 +0000 (17:10 -0400)]
gdbus-codegen: improve casting a tiny wee bit

The in commit b79fbc5c3fc8d7093919dde2dc244d26a97596c3 for fixing
-Wstrict-aliasing warnings was a little too brutal, make it a bit
better.

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoregex: Add new GRegexError code from PCRE 8.31
Christian Persch [Thu, 28 Jun 2012 21:20:39 +0000 (23:20 +0200)]
regex: Add new GRegexError code from PCRE 8.31

11 years agoregex: Enable fixed test
Christian Persch [Thu, 28 Jun 2012 21:21:16 +0000 (23:21 +0200)]
regex: Enable fixed test

This problem was fixed in PCRE 8.31, so uncomment the test.

11 years agoregex: Import PCRE 8.31
Christian Persch [Thu, 14 Jun 2012 20:15:27 +0000 (22:15 +0200)]
regex: Import PCRE 8.31

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

11 years agoGVariant: support comparing booleans
Ryan Lortie [Fri, 6 Jul 2012 21:27:54 +0000 (17:27 -0400)]
GVariant: support comparing booleans

g_variant_compare() is documented as working on booleans but somehow
this case was missed.  Add it and test it.

Problem discovered by Charles Kerr.

11 years agogdbus-codegen: neuter warnings when using -Wstrict-aliasing
David Zeuthen [Fri, 6 Jul 2012 17:45:09 +0000 (13:45 -0400)]
gdbus-codegen: neuter warnings when using -Wstrict-aliasing

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agogdbus-codegen: don't shadow variable
David Zeuthen [Fri, 6 Jul 2012 17:43:05 +0000 (13:43 -0400)]
gdbus-codegen: don't shadow variable

This avoids a warning when building with -Wshadow

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoGSettings: be more careful about keys names with /
Ryan Lortie [Fri, 6 Jul 2012 17:43:17 +0000 (13:43 -0400)]
GSettings: be more careful about keys names with /

Prevent attempts to access keys ending with slashes that exist in the
schema file as references to child schemas.

Also: don't emit change signals for these same keys.

11 years agoUpdated Norwegian bokmål translation
Kjartan Maraas [Fri, 6 Jul 2012 17:11:26 +0000 (19:11 +0200)]
Updated Norwegian bokmål translation

11 years agoClarify the GLIB_VERSION_MIN_REQUIRED/MAX_ALLOWED docs
Dan Winship [Thu, 26 Apr 2012 18:08:22 +0000 (14:08 -0400)]
Clarify the GLIB_VERSION_MIN_REQUIRED/MAX_ALLOWED docs

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

11 years agoDeal with GLIB_VERSION_MIN_REQUIRED/MAX_ALLOWED being a "future" value
Dan Winship [Thu, 26 Apr 2012 15:08:23 +0000 (11:08 -0400)]
Deal with GLIB_VERSION_MIN_REQUIRED/MAX_ALLOWED being a "future" value

If GLIB_VERSION_MIN_REQUIRED or GLIB_VERSION_MAX_ALLOWED was defined
to a future value, we were essentially treating it as
GLIB_VERSION_0_0. Fix to treat it as being in the future instead.

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

11 years agoGString: Tweak documentation, add g_string_free_to_bytes()
Colin Walters [Tue, 29 May 2012 21:58:41 +0000 (17:58 -0400)]
GString: Tweak documentation, add g_string_free_to_bytes()

The docs for GString should really mention GByteArray, and what makes
it different.  Drop the comparison to Java which is dated and actually
inaccurate (because StringBuffer operates on Unicode).

While we're here, add g_string_free_to_bytes(), which further
complements the spread of GBytes-based API.  For example, one can
create a buffer using GString, then send it off via
g_output_stream_write_bytes().

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

11 years agogdbus-codegen: Don't generate invalid GObject property names
David Zeuthen [Fri, 6 Jul 2012 13:19:48 +0000 (09:19 -0400)]
gdbus-codegen: Don't generate invalid GObject property names

For a D-Bus property with name "Type" (fairly common), we used to
generate a GObject property with name "type-" and C accessors
get_type_() (to avoid clashing with the GType getter), set_type_()
(for symmetri).

However, the rules for GObject property names are fairly rigid and
specifically prohibit names ending in a dash.

Therefore change things so the chosen GObject property name is "type"
but preserve the naming rules for the C getter and setter (for the
same reasons: avoiding name clashing and symmetri).

This change does break the API of generated code (but only on the
GObject property level, the C symbols are not changed) but strictly
speaking the behavior was undefined since "type-" was an invalid
GObject property name.

Also add a test case for this.

Bug 679473.

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

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoConstify collect and lcopy strings in GTypeValueTable
Emmanuele Bassi [Wed, 7 Mar 2012 12:54:04 +0000 (12:54 +0000)]
Constify collect and lcopy strings in GTypeValueTable

This avoids warnings when creating idiomatic value tables, like:

  static const GTypeValueTable _clutter_shader_float_value_table = {
    clutter_value_init_shader_float,
    clutter_value_free_shader_float,
    clutter_value_copy_shader_float,
    clutter_value_peek_pointer,
    "ip",
    clutter_value_collect_shader_float,
    "pp",
    clutter_value_lcopy_shader_float
  };

Because the strings are literals. And, really: nobody should be using
allocated values for the collection and lcopy strings.

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

11 years agoImprove the g_dir_read_name documentation
Matthias Clasen [Fri, 6 Jul 2012 02:25:49 +0000 (22:25 -0400)]
Improve the g_dir_read_name documentation

This function can return NULL in error cases as well. Document
this, and explain how to discriminate the cases.
https://bugzilla.gnome.org/show_bug.cgi?id=639771

11 years agoUpdated POTFILES.in
Piotr Drąg [Wed, 4 Jul 2012 02:25:41 +0000 (04:25 +0200)]
Updated POTFILES.in

11 years agoDrop unneeded includes
Matthias Clasen [Wed, 4 Jul 2012 01:14:41 +0000 (21:14 -0400)]
Drop unneeded includes

11 years agoSplit gcontenttype.c
Matthias Clasen [Wed, 4 Jul 2012 01:13:32 +0000 (21:13 -0400)]
Split gcontenttype.c

Instead of a giant #if G_OS_WIN32 #else #endif around the entire
file, just split it into gcontenttype.c and gcontenttype-win32.c.

11 years agowin32: fix build after bug 674452
Marc-André Lureau [Tue, 3 Jul 2012 18:04:05 +0000 (20:04 +0200)]
win32: fix build after bug 674452

11 years agoGObject docs fixup
Ryan Lortie [Tue, 3 Jul 2012 19:40:35 +0000 (15:40 -0400)]
GObject docs fixup

11 years agoglib/deprecated: Fix some version typos
Rico Tzschichholz [Tue, 3 Jul 2012 19:22:16 +0000 (21:22 +0200)]
glib/deprecated: Fix some version typos

11 years agoAssamese translation updated
Nilamdyuti Goswami [Tue, 3 Jul 2012 15:31:17 +0000 (21:01 +0530)]
Assamese translation updated

11 years agoUpdated Bulgarian translation
Alexander Shopov [Tue, 3 Jul 2012 13:55:12 +0000 (16:55 +0300)]
Updated Bulgarian translation

11 years agoFix the 'Since' tag for G_SOURCE_{REMOVE,CONTINUE}
Neil Roberts [Mon, 2 Jul 2012 12:41:32 +0000 (13:41 +0100)]
Fix the 'Since' tag for G_SOURCE_{REMOVE,CONTINUE}

The Since tag for these was saying 2.28 but it was actually added in
2.31. It looks like all of the Since tags list stable version numbers
so this patch bumps that up to 2.32.

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

11 years agoregex: Require PCRE 8.13
Christian Persch [Mon, 2 Jul 2012 15:56:54 +0000 (17:56 +0200)]
regex: Require PCRE 8.13

Bump the required version for external PCRE to 8.13, to fix the build
with external PCRE.

11 years agoUpdated Spanish translation
Daniel Mustieles [Mon, 2 Jul 2012 15:34:59 +0000 (17:34 +0200)]
Updated Spanish translation

11 years agoUpdated Spanish translation
Daniel Mustieles [Mon, 2 Jul 2012 15:29:02 +0000 (17:29 +0200)]
Updated Spanish translation

11 years agoFixed a a «big bug» in a string ;-)
Daniel Mustieles [Mon, 2 Jul 2012 15:24:45 +0000 (17:24 +0200)]
Fixed a a «big bug» in a string ;-)

11 years agoregex: Fix unicode othercasing
Christian Persch [Sun, 17 Jun 2012 20:51:44 +0000 (22:51 +0200)]
regex: Fix unicode othercasing

Reorder the toupper/tolower calls when othercaseing, so this
function is bug-for-bug compatible with the pcre internal tables.

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

11 years agoregex: Add FIRSTLINE compile flag
Christian Persch [Thu, 14 Jun 2012 20:04:05 +0000 (22:04 +0200)]
regex: Add FIRSTLINE compile flag

This option exists since PCRE 6.0.

11 years agoregex: Add NOTEMPTY_ATSTART match option
Christian Persch [Thu, 7 Jun 2012 21:24:07 +0000 (23:24 +0200)]
regex: Add NOTEMPTY_ATSTART match option

Since PCRE 8.00 it supports a variant of PCRE_NOTEMPTY that works
similarly except that it only applies to the start of the matched string
but permits empty matches further in.

11 years agoregex: Add PARTIAL_HARD match option
Christian Persch [Thu, 7 Jun 2012 20:50:52 +0000 (22:50 +0200)]
regex: Add PARTIAL_HARD match option

Since PCRE 8.00 it supports a new partial matching method PCRE_PARTIAL_HARD.

11 years agoregex: Add JavaScript compat mode
Christian Persch [Thu, 7 Jun 2012 18:12:11 +0000 (20:12 +0200)]
regex: Add JavaScript compat mode

Since PCRE 7.7, there's a flag that changes the behaviour to be more
JavaScript compatible. Since it's no effort to expose it, just do so.

11 years agoregex: Don't leak internal PCRE options
Christian Persch [Thu, 7 Jun 2012 16:11:49 +0000 (18:11 +0200)]
regex: Don't leak internal PCRE options

g_regex_get_compile_get_compile_flags() and g_regex_get_match_flags()
were leaking PCRE flags that don't exist in the corresponding
public GRegexCompileFlags and GRegexMatchFlags; this change masks
these internal flags.

11 years agoregex: Add BSR_ANYCRLF and BSR_ANY match options
Christian Persch [Thu, 7 Jun 2012 14:44:52 +0000 (16:44 +0200)]
regex: Add BSR_ANYCRLF and BSR_ANY match options

These flags override the compile option at match time. They use PCRE_BSR_ANYCRLF
and PCRE_BSR_UNICODE, resp., which make \R match only CR, LF and CRLF, or any
Unicode newline character or character sequences, resp.

11 years agoregex: Add BSR_ANYCRLF compile option
Christian Persch [Thu, 7 Jun 2012 14:44:10 +0000 (16:44 +0200)]
regex: Add BSR_ANYCRLF compile option

When this flag is set, \R only matches CR, LF and CRLF.

11 years agoregex: Fix newline definition for system PCRE
Christian Persch [Thu, 7 Jun 2012 14:42:50 +0000 (16:42 +0200)]
regex: Fix newline definition for system PCRE

While we PCRE_BSR_UNICODE is the default in the internal PCRE, that may
not be true for the system one. Force the PCRE_BSR_UNICODE flag on it.

11 years agoregex: Don't return from inside a g_once_init_enter/leave block
Christian Persch [Thu, 7 Jun 2012 14:07:04 +0000 (16:07 +0200)]
regex: Don't return from inside a g_once_init_enter/leave block

When using the system PCRE, and it was compiled with incompatible options,
the code was returning from inside a g_once_init_enter/leave block without
calling g_once_init_leave().

11 years agoregex: Add accessor for PCRE_INFO_HASCRORLF
Christian Persch [Thu, 7 Jun 2012 13:57:15 +0000 (15:57 +0200)]
regex: Add accessor for PCRE_INFO_HASCRORLF

This flag is new in PCRE 7.3, and checks whether there is an explicit
CR or LF reference in the pattern.

11 years agoregex: Remove message for unused error code
Christian Persch [Thu, 7 Jun 2012 13:36:11 +0000 (15:36 +0200)]
regex: Remove message for unused error code

Since PCRE 7.3 the PCRE_ERROR_NULLWSLIMIT error is not returned anymore.

11 years agoregex: Add NEWLINE_ANYCRLF match option
Christian Persch [Thu, 7 Jun 2012 13:26:02 +0000 (15:26 +0200)]
regex: Add NEWLINE_ANYCRLF match option

This PCRE option is new in PCRE 7.1.

11 years agoregex: Add NEWLINE_ANYCRLF compile option
Christian Persch [Thu, 7 Jun 2012 13:23:37 +0000 (15:23 +0200)]
regex: Add NEWLINE_ANYCRLF compile option

The PCRE_NEWLINE_ANYCRLF option is new in PCRE 7.1. With it set, the only
only newline sequences recognised are CR, LF and CRLF.

11 years agoregex: Assert that our flags values are the same as PCRE's
Christian Persch [Thu, 7 Jun 2012 12:48:51 +0000 (14:48 +0200)]
regex: Assert that our flags values are the same as PCRE's

We rely on those flags having the same values as PCRE's (so we can pass
them right through), so assert this at compile time.

11 years agoUpdated codegen to work with python3.
Simon Feltman [Thu, 14 Jun 2012 06:20:17 +0000 (23:20 -0700)]
Updated codegen to work with python3.

Most changes were just replacing usage of "has_key" with "in".
Also updated the sorting function which was simplified and
changed to a "key" function instead of "cmp" (which is no longer
supported in python3. Verified everything builds with
python 2.7 and 3.

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

11 years agoregex: Handle PCRE_ERROR_RECURSIONLOOP
Christian Persch [Thu, 7 Jun 2012 23:08:10 +0000 (01:08 +0200)]
regex: Handle PCRE_ERROR_RECURSIONLOOP

Was missing from the error conversion routine.

11 years agoregex: Update GRegexError with newer PCRE error codes
Christian Persch [Wed, 6 Jun 2012 19:55:01 +0000 (21:55 +0200)]
regex: Update GRegexError with newer PCRE error codes

Update the GRegexError enum with new PCRE errors up to PCRE 8.30.

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

11 years agoregex: Simplify regex compile tests
Christian Persch [Thu, 7 Jun 2012 16:22:44 +0000 (18:22 +0200)]
regex: Simplify regex compile tests

Use a macro instead of repeating the same code over and over again.

11 years agoregex: Deprecate an obsolete error code
Christian Persch [Thu, 7 Jun 2012 17:53:17 +0000 (19:53 +0200)]
regex: Deprecate an obsolete error code

G_REGEX_ERROR_DEFINE_REPETION is dead and never raised by PCRE.

11 years agoregex: Fix PCRE error code conversion
Christian Persch [Wed, 6 Jun 2012 19:54:08 +0000 (21:54 +0200)]
regex: Fix PCRE error code conversion

Use the shifted error codes for comparisions.

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

11 years agoUpdated Vietnamese translation
Nguyễn Thái Ngọc Duy [Sat, 30 Jun 2012 02:55:26 +0000 (09:55 +0700)]
Updated Vietnamese translation

11 years agopo/vi: import from Damned Lies
Nguyễn Thái Ngọc Duy [Sat, 30 Jun 2012 02:42:53 +0000 (09:42 +0700)]
po/vi: import from Damned Lies

11 years agoGOptionContext: Don't show headings without options
Matthias Clasen [Fri, 29 Jun 2012 17:47:15 +0000 (13:47 -0400)]
GOptionContext: Don't show headings without options

If the only entry in the main group is for the rest args,
don't bother printing "Application Options".

11 years agoUse the same Python as we found in configure
Johan Dahlin [Fri, 29 Jun 2012 14:59:23 +0000 (11:59 -0300)]
Use the same Python as we found in configure

Don't assume /usr/bin/python is python 2.x, on newer Ubuntu versions
it's actually python 3.x.

11 years agoUpdated Greek translation
Tom Tryfonidis [Thu, 28 Jun 2012 14:44:14 +0000 (17:44 +0300)]
Updated Greek translation

11 years agoFix /contenttype/guess test
Martin Pitt [Wed, 27 Jun 2012 14:30:38 +0000 (16:30 +0200)]
Fix /contenttype/guess test

After fixing bug 674452 this test case now reliably fails, as "ABC abc" is text
and definitively not PowerPoint. It previously worked as g_content_type_guess()
was reading beyond the boundary of the data due to specifying -1 as data
length.

Update that test case to expect a PO template instead, and add two more with a
definitive PO template syntax and some binary data. We do not currently have a
MIME magic for PowerPoint, so we cannot actually detect it with certainty, but
at least make sure that the returned MIME type is correct.

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

11 years agoFix the mimetype default fix
Alexander Larsson [Thu, 28 Jun 2012 13:38:06 +0000 (15:38 +0200)]
Fix the mimetype default fix

We need to ignore the defaults.list item only when there
was a mimetype handler found in a previous mimetype, not
if one was found for the same mimetype as the one that
is listed in defaults.list (same for the new-style defaults).

11 years agoFix default app lookup wrt parent types and defaults.list
Alexander Larsson [Thu, 28 Jun 2012 12:50:37 +0000 (14:50 +0200)]
Fix default app lookup wrt parent types and defaults.list

There was an issue when looking up the default handler
for a type where a supertype was listed in defaults.list.
We would pick the default for the parent type even if
there was a handler for the more specific type.

In the case of the new-style defaults marking (
"Default Applications" in mimeapps.list) we were already
checking for a more specific handler befor using a default,
but we also need to do a similar check for the defaults.list
case.

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

11 years agoGTlsInteraction: Fix incorrect locking of mutex
Stef Walter [Thu, 28 Jun 2012 12:41:39 +0000 (14:41 +0200)]
GTlsInteraction: Fix incorrect locking of mutex

 * Fix incorrect locking of mutex in g_tls_interaction_invoke_ask_password()

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

11 years agogio/tests/contenttype: Call g_content_type_guess() with valid data len
Martin Pitt [Wed, 27 Jun 2012 07:25:37 +0000 (09:25 +0200)]
gio/tests/contenttype: Call g_content_type_guess() with valid data len

g_content_type_guess() requires specifying a valid data length. Fixes a
segfault when running the test.

Also add an explicit check for this and return XDG_MIME_TYPE_UNKNOWN when
data_size is specified as -1, to avoid crashing.

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

11 years ago/mainloop/timeouts test: Reduce race condition
Martin Pitt [Wed, 27 Jun 2012 09:46:28 +0000 (11:46 +0200)]
/mainloop/timeouts test: Reduce race condition

Due to load, particular traits of the architecture, or other circumstances, the
/mainloop/timeouts sometimes manages to call the "every
100 ms" timer loop only 9 times in 1050 ms.

This is an inherent race-condition in the test; allow it some slack and accept
9 times as well.

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

11 years agovaluetransform: Fix definition of ulong_bool
Philipp Kern [Wed, 27 Jun 2012 08:57:50 +0000 (10:57 +0200)]
valuetransform: Fix definition of ulong_bool

On big endian 64 bit machines such as s390x, an uint is too small to hold a
ulong_bool; it needs to be an actual ulong.

https://bugzilla.gnome.org/show_bug.cgi?id=678949
http://bugs.debian.org/662057

11 years agoUpdated Bulgarian translation
Alexander Shopov [Wed, 27 Jun 2012 04:17:40 +0000 (07:17 +0300)]
Updated Bulgarian translation

11 years agoAllow slightly too small poll duration in /socket/timed_wait test
Martin Pitt [Tue, 26 Jun 2012 16:32:29 +0000 (18:32 +0200)]
Allow slightly too small poll duration in /socket/timed_wait test

Sometimes the poll duration in the /socket/timed_wait test is slightly lower
than the requested 100000, causing failures like

ERROR:/build/buildd/glib2.0-2.33.2/./gio/tests/socket.c:619:test_timed_wait:
  assertion failed (poll_duration > = 100000): (99240 >= 100000)
FAIL

Adjust the test to also allow some jitter in the "too small" direction, similar
to the already existing span for "slightly too large".

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

11 years agoGTestDBus: Don't call into gvfs
Colin Walters [Tue, 26 Jun 2012 00:46:28 +0000 (20:46 -0400)]
GTestDBus: Don't call into gvfs

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

11 years agoGMainContext: reorganize source list to avoid O(n) behavior
Dan Winship [Wed, 11 Apr 2012 17:08:13 +0000 (13:08 -0400)]
GMainContext: reorganize source list to avoid O(n) behavior

Rather than having a single priority-ordered list of GSources, store a
list of queues of each priority level. This means that adding a source
is now O(n) in the number of unique priority levels currently being
used, rather than O(n) in the total number of sources.

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

11 years agogmain: add GSourceIter
Dan Winship [Sat, 23 Jun 2012 02:21:05 +0000 (22:21 -0400)]
gmain: add GSourceIter

add an explicit iterator for GMainContext sources

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

11 years agogmain: rename some variables for clarity
Dan Winship [Sat, 23 Jun 2012 16:01:40 +0000 (12:01 -0400)]
gmain: rename some variables for clarity

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

11 years agogmain: child sources must always have same priority as parent
Dan Winship [Wed, 11 Apr 2012 14:22:45 +0000 (10:22 -0400)]
gmain: child sources must always have same priority as parent

A child source does not have a priority of its own; it must have the
same priority as its parent. Enforce this in
g_source_set_priority_unlocked().

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

11 years agoGSource: initialise ->priv on construct
Ryan Lortie [Tue, 30 Aug 2011 16:15:04 +0000 (12:15 -0400)]
GSource: initialise ->priv on construct

For efficiency, we waited until setting up child sources to allocate
->priv.  Simplify things a bit by allocating it from the start.

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

11 years agotests: add a timing test for adding lots of GSources
Dan Winship [Sun, 24 Jun 2012 13:48:10 +0000 (09:48 -0400)]
tests: add a timing test for adding lots of GSources

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

11 years agoglib/: gtk-doc cleanup
Ryan Lortie [Tue, 26 Jun 2012 03:23:36 +0000 (23:23 -0400)]
glib/: gtk-doc cleanup

11 years agoFix previous commit
Colin Walters [Mon, 25 Jun 2012 23:37:05 +0000 (19:37 -0400)]
Fix previous commit

11 years agogio/tests/actions: Plug a memory leak
Colin Walters [Mon, 25 Jun 2012 22:14:10 +0000 (18:14 -0400)]
gio/tests/actions: Plug a memory leak

11 years agoGIOScheduler: Disconnect from cancellable after job completes
Colin Walters [Mon, 25 Jun 2012 21:05:45 +0000 (17:05 -0400)]
GIOScheduler: Disconnect from cancellable after job completes

This was causing crashes when a cancellable was canceled after the job
had completed.

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