Commit Graph

12739 Commits

Author SHA1 Message Date
Dan Winship
ee9aae5dcf Clarify the GLIB_VERSION_MIN_REQUIRED/MAX_ALLOWED docs
https://bugzilla.gnome.org/show_bug.cgi?id=674898
2012-07-06 12:10:42 -04:00
Dan Winship
40f0f66151 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
2012-07-06 12:10:42 -04:00
Colin Walters
4ac0d78d5d 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
2012-07-06 10:19:12 -04:00
David Zeuthen
d72116d8b7 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>
2012-07-06 09:26:41 -04:00
Emmanuele Bassi
2a87010831 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
2012-07-05 23:27:35 -04:00
Matthias Clasen
ab4cc22ba5 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
2012-07-05 22:25:49 -04:00
Piotr Drąg
f416ece103 Updated POTFILES.in 2012-07-04 04:25:41 +02:00
Matthias Clasen
04af05fd1f Drop unneeded includes 2012-07-03 21:14:41 -04:00
Matthias Clasen
32192ee9e4 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.
2012-07-03 21:13:32 -04:00
Marc-André Lureau
af3b1674cd win32: fix build after bug 674452 2012-07-03 21:01:31 -04:00
Ryan Lortie
5d7fa1c783 GObject docs fixup 2012-07-03 15:40:44 -04:00
Rico Tzschichholz
72660997bc glib/deprecated: Fix some version typos 2012-07-03 21:22:16 +02:00
Nilamdyuti Goswami
be249ac6ae Assamese translation updated 2012-07-03 21:01:59 +05:30
Alexander Shopov
45c48bffdd Updated Bulgarian translation 2012-07-03 16:55:12 +03:00
Neil Roberts
489b947c3b 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
2012-07-02 18:44:49 +01:00
Christian Persch
938c28b36b regex: Require PCRE 8.13
Bump the required version for external PCRE to 8.13, to fix the build
with external PCRE.
2012-07-02 18:02:15 +02:00
Daniel Mustieles
b5b1179d3f Updated Spanish translation 2012-07-02 17:34:59 +02:00
Daniel Mustieles
4b787aa31d Updated Spanish translation 2012-07-02 17:29:02 +02:00
Daniel Mustieles
1519d6b894 Fixed a a «big bug» in a string ;-) 2012-07-02 17:24:45 +02:00
Christian Persch
7483315f83 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
2012-07-02 15:59:39 +02:00
Christian Persch
a2f54a3408 regex: Add FIRSTLINE compile flag
This option exists since PCRE 6.0.
2012-07-02 15:59:39 +02:00
Christian Persch
e99e34f65f 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.
2012-07-02 15:59:39 +02:00
Christian Persch
1171215014 regex: Add PARTIAL_HARD match option
Since PCRE 8.00 it supports a new partial matching method PCRE_PARTIAL_HARD.
2012-07-02 15:59:39 +02:00
Christian Persch
0a2967030a 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.
2012-07-02 15:59:39 +02:00
Christian Persch
e5550a24db 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.
2012-07-02 15:59:39 +02:00
Christian Persch
26d91ddc08 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.
2012-07-02 15:59:39 +02:00
Christian Persch
88ac3839f5 regex: Add BSR_ANYCRLF compile option
When this flag is set, \R only matches CR, LF and CRLF.
2012-07-02 15:59:39 +02:00
Christian Persch
86a04a05e6 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.
2012-07-02 15:59:39 +02:00
Christian Persch
91ba8ae156 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().
2012-07-02 15:59:38 +02:00
Christian Persch
69a12e3275 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.
2012-07-02 15:59:34 +02:00
Christian Persch
7ada976516 regex: Remove message for unused error code
Since PCRE 7.3 the PCRE_ERROR_NULLWSLIMIT error is not returned anymore.
2012-07-02 14:17:34 +02:00
Christian Persch
592531019e regex: Add NEWLINE_ANYCRLF match option
This PCRE option is new in PCRE 7.1.
2012-07-02 14:17:34 +02:00
Christian Persch
c8c049b177 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.
2012-07-02 14:17:34 +02:00
Christian Persch
7e8b5ea442 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.
2012-07-02 14:17:34 +02:00
Simon Feltman
03611f7c06 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
2012-07-01 11:14:54 -04:00
Christian Persch
6d5484b296 regex: Handle PCRE_ERROR_RECURSIONLOOP
Was missing from the error conversion routine.
2012-07-01 14:00:11 +02:00
Christian Persch
7e5615138a 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
2012-07-01 14:00:11 +02:00
Christian Persch
3be1d864d8 regex: Simplify regex compile tests
Use a macro instead of repeating the same code over and over again.
2012-07-01 14:00:11 +02:00
Christian Persch
20ab7e2aea regex: Deprecate an obsolete error code
G_REGEX_ERROR_DEFINE_REPETION is dead and never raised by PCRE.
2012-07-01 14:00:11 +02:00
Christian Persch
d9e8d3e0f0 regex: Fix PCRE error code conversion
Use the shifted error codes for comparisions.

https://bugzilla.gnome.org/show_bug.cgi?id=677578
2012-07-01 14:00:11 +02:00
Nguyễn Thái Ngọc Duy
3173fca9cc Updated Vietnamese translation 2012-06-30 09:55:26 +07:00
Nguyễn Thái Ngọc Duy
7ddefe3f4b po/vi: import from Damned Lies 2012-06-30 09:42:53 +07:00
Matthias Clasen
64bfbc2cf0 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".
2012-06-29 14:16:55 -04:00
Johan Dahlin
08cfcdc81a 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.
2012-06-29 11:59:33 -03:00
Tom Tryfonidis
df319ca49c Updated Greek translation 2012-06-28 17:44:14 +03:00
Martin Pitt
d023b81a7a 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
2012-06-28 15:57:22 +02:00
Alexander Larsson
c35106fcc4 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).
2012-06-28 15:38:06 +02:00
Alexander Larsson
f14c0112d0 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
2012-06-28 15:05:03 +02:00
Stef Walter
1ae3080640 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
2012-06-28 14:43:12 +02:00
Martin Pitt
139c1ce988 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
2012-06-27 16:00:27 +02:00