Commit Graph

12563 Commits

Author SHA1 Message Date
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
Ryan Lortie
f66052fc87 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.
2012-07-06 17:29:30 -04:00
David Zeuthen
b79fbc5c3f gdbus-codegen: neuter warnings when using -Wstrict-aliasing
Signed-off-by: David Zeuthen <zeuthen@gmail.com>
2012-07-06 13:49:28 -04:00
David Zeuthen
d728eae85f gdbus-codegen: don't shadow variable
This avoids a warning when building with -Wshadow

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
2012-07-06 13:49:28 -04:00
Ryan Lortie
ed492a5de2 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.
2012-07-06 13:44:17 -04:00
Kjartan Maraas
52a6d7022a Updated Norwegian bokmål translation 2012-07-06 19:11:26 +02:00
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