Commit Graph

9155 Commits

Author SHA1 Message Date
Ryan Lortie
7be2ba4d94 Bump to version 2.27.0 after branching glib-2-26 2010-09-17 13:27:38 -04:00
Ryan Lortie
b4ee303ed6 .gitignore some test cases 2010-09-17 13:26:50 -04:00
Ryan Lortie
5109778e93 .gitignore some sgml 2010-09-17 13:20:17 -04:00
Ryan Lortie
cf73ba47f1 Deal with gtk-doc's insane sensitivty to spaces
...by inserting a few of them.
2010-09-17 13:14:59 -04:00
Ryan Lortie
6b0e31ce48 Clean-up/tweaking of GDateTime and GTimeZone 2010-09-17 11:40:10 -04:00
Emmanuele Bassi
909289c763 datetime: Fix hashing
Convert to the epoch, just like we do when checking for equality, so
that timezones are correctly handled.

https://bugzilla.gnome.org/show_bug.cgi?id=50076
2010-09-17 11:40:10 -04:00
Emmanuele Bassi
3e9fb52214 datetime: Rename g_date_time_printf() to g_date_time_format()
The function does not use any printf() modifiers, so using printf() is a
misnomer.

Prior art: strftime, g_ascii_formatd

https://bugzilla.gnome.org/show_bug.cgi?id=50076
2010-09-17 11:40:10 -04:00
Emmanuele Bassi
4bac6613cf datetime: Update modifiers for DST changes
If a DateTime gets modified to cross the DST state from its previous
state then we want to update the DateTime to compensate for the new
offset.

In other words, if we have a DateTime defined as:

  DateTime({ y: 2009, m: 8, d: 15, hh: 3, mm: 0, tz: 'Europe/London' });

and we add six months to it, the hour must be changed to 60 minutes
behind, as the DST comes into effect.

https://bugzilla.gnome.org/show_bug.cgi?id=50076
2010-09-17 11:40:10 -04:00
Emmanuele Bassi
0746f74036 datetime: Allow setting fractionary seconds in new_full()
Otherwise we'll have to do:

  dt = g_date_time_new_full (Y, M, D, h, m, s, tz);
  tmp = g_date_time_add_usec (dt, usec);
  g_date_time_unref (dt);
  dt = tmp;

With its additional allocations.

https://bugzilla.gnome.org/show_bug.cgi?id=50076
2010-09-17 11:40:10 -04:00
Emmanuele Bassi
67f1e52ce2 datetime: Rework time zone support in constructors
Timezone handling is complicated. Really complicated.

In order to simplify it a little bit, we need to expose the GTimeZone
structure.

First of all, we allow creating time zone information directly from the
offset and the DST state, and then pass it to the g_date_time_new_full()
constructor. We also need to clean up the mess that is UTC-vs.-localtime
for the other constructors.

We also allow creating a GTimeZone from the Olson zoneinfo database
names; a time zone created like this will be "floating": it will just
reference the zoneinfo file - which are mmap()'ed, kept in a cache and
refcounted. Once the GTimeZone has been associated with a GDateTime, it
will be "anchored" to it: the offset will be resolved, as well as the
DST state.

https://bugzilla.gnome.org/show_bug.cgi?id=50076
2010-09-17 11:40:10 -04:00
Dan Winship
bff4ac15d0 g_output_stream_write: fix misleadingly ungrammatical documentation
pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=626866
2010-09-17 10:21:57 -04:00
Žygimantas Beručka
8a7365d892 Updated Lithuanian translation 2010-09-17 03:48:23 +03:00
Gintautas Miliauskas
d6af283f4e Updated Lithuanian translation by Aurimas Cernius. 2010-09-16 22:13:54 +03:00
Petr Kovar
1c658c9c69 Update Czech translation 2010-09-16 01:56:26 +02:00
Petr Kovar
0469782af5 Update Czech translation 2010-09-15 21:43:18 +02:00
Ryan Lortie
11f06115a4 Bug 629709 - Empty variants
Fix some GVariant bugs uncovered by calling g_variant_new_from_data with
invalid data (which it should be immune to).
2010-09-15 11:21:44 -04:00
Jorge González
1c5b96e92b Updated Spanish translation 2010-09-15 09:12:24 +02:00
Andika Triwidada
780b76bd3a Updated Indonesian translation 2010-09-15 07:44:48 +07:00
Christian Persch
1220501ec8 GDBusConnection leaks its GCredentials
==7269== 144 bytes in 6 blocks are definitely lost in loss record 1,282 of 1,325
==7269==    at 0x4005BDC: malloc (vg_replace_malloc.c:195)
==7269==    by 0x4056B74: g_malloc (gmem.c:164)
==7269==    by 0x406EDB6: g_slice_alloc (gslice.c:842)
==7269==    by 0x406EDFB: g_slice_alloc0 (gslice.c:854)
==7269==    by 0x413C627: g_type_create_instance (gtype.c:1867)
==7269==    by 0x412276A: g_object_constructor (gobject.c:1480)
==7269==    by 0x4121E5D: g_object_newv (gobject.c:1264)
==7269==    by 0x4121BD3: g_object_new (gobject.c:1176)
==7269==    by 0x417CFB9: g_credentials_new (gcredentials.c:156)
==7269==    by 0x41D9DBC: g_unix_credentials_message_deserialize (gunixcredentialsmessage.c:149)
==7269==    by 0x41C422C: g_socket_control_message_deserialize (gsocketcontrolmessage.c:198)
==7269==    by 0x41BFCE3: g_socket_receive_message (gsocket.c:3289)
==7269==    by 0x41D99CE: g_unix_connection_receive_credentials (gunixconnection.c:476)
==7269==    by 0x41FA829: _g_dbus_auth_run_server (gdbusauth.c:987)
==7269==    by 0x4205DDB: initable_init (gdbusconnection.c:2196)

Bug #629689.
2010-09-14 22:22:35 +02:00
Ryan Lortie
235820d0ef GVariant: Check for size == 0 in get_bytestring
And add a test from David that shows the problem.

Closes #629698
2010-09-14 14:56:38 -04:00
Piotr Drąg
2211ab1240 Updated Polish translation 2010-09-14 19:10:35 +02:00
Ryan Lortie
f497f3b7ae GSettings: reverse accidental addition to .h file
A couple of extra function prototypes snuck into commit
77e3badcf3.  Take those out.
2010-09-14 11:25:57 -04:00
Gabor Kelemen
7d143d420b Updated Hungarian translation 2010-09-14 14:10:17 +02:00
Christian.Kirbach
152f0dd3db [l10n] Updated German translation 2010-09-14 11:18:20 +02:00
Aron Xu
3d1c463b48 Update Simplified Chinese translation. 2010-09-14 16:36:12 +08:00
Timo Jyrinki
5ec302dece (slightly) updated Finnish translation. 2010-09-14 09:37:45 +03:00
Philip Withnall
8fbfcd90ad Update British English translation 2010-09-13 23:22:02 +01:00
Fran Diéguez
f5edeea0e5 Updated Galician translations 2010-09-13 23:46:03 +02:00
Matej Urbančič
f3770593f8 Updated Slovenian translation 2010-09-13 21:54:45 +02:00
Will Thompson
ba17efc396 g_strdup_value_contents(): dump GStrv more usefully
Previously, dumping a GValue holding a GStrv just yielded "((GStrv *)
0xDEADBEEF)". I think it'd be more useful to dump a Python list-style
representation of the GStrv's contents, if it's not NULL.

Fixes: <https://bugzilla.gnome.org/show_bug.cgi?id=629192>
2010-09-13 19:19:46 +01:00
A S Alam
cb2ddac7a2 update for Punjabi 2010-09-13 23:09:33 +05:30
Ryan Lortie
2e78d07f86 Add g_data_input_stream_read_upto{,async,finish}
These functions are meant to replace the read_until() flavour, with the
following improvements:

  - consistency between the synchronous and asynchronous versions as to
    if the separator character is read (it never is).

  - support for using a nul byte as a separator character by way of
    addition of a length parameter which allows stop_chars to be treated
    as a byte array rather than a nul-terminated string.

The read_until() functions are not yet formally deprecated, but a note
has been added to the documentation warning not to use them as they will
be in the future.

This is bug #584284.
2010-09-13 13:14:25 -04:00
Matthias Clasen
0ecfc6e1f9 Better msgctxt for month and weekday names
The current msgctxt string 'GDateTime" lead to the unability to
differentiate between the full and abbreviated name for May.
Therefore, the msgctxt strings have been changed to
  'full month name'
  'abbreviated month name'
  'full weekday name'
  'abbreviated weekday name'
This is a string change, but all translations have been updated
using an sed script.

Bug 629429
2010-09-13 12:27:04 -04:00
Matthias Clasen
bd569dc3c9 Adapt POTFILES.in to source file renaming 2010-09-13 12:27:04 -04:00
Ryan Lortie
445f708b8f Const 'parser' arg to g_markup_parse_context_push
This is a vtable structure and very likely the user has allocated it in
static storage and wants it to be const.  Since we never modify it, no
harm is done to us to have it const.

Closes bug #629328.
2010-09-13 12:14:08 -04:00
Tomeu Vizoso
124023b06d Make g_variant_builder_end's return to be (allow none) because callers
need to add a ref to it in addition to sinking it.
2010-09-13 17:55:18 +02:00
Kristian Rietveld
8466ba8dc1 Include giochannel.c for G_IO_IN, etc.
Fixes build on OS X.
2010-09-13 16:52:51 +02:00
Emmanuele Bassi
9cd43d7a4c gobject: Add install_properties()
Since we added g_object_notify_by_pspec(), an efficient way to install
and notify properties relies on storing the GParamSpec pointers inside
a static arrays, like we do for signal identifiers.

Instead of multiple calls to g_object_class_install_property(), we
should have a single function to take the static array of GParamSpecs
and iterate it.

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

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
2010-09-13 12:34:53 +01:00
Daniel Nylander
58a40904af Updated Swedish translation 2010-09-12 20:25:57 +02:00
Ryan Lortie
681a72ea99 GSettings: no writability->value change assumption
GSettings internally assumed that a change in key writability implied a
change in value.  That may be true for some backends.  Let those
backends deal with the situation for themselves.
2010-09-12 13:37:04 -04:00
Tor Lillqvist
8a8cdd1d32 Add some more individual own header includes where required 2010-09-12 14:05:49 +03:00
Mario Blättermann
fc3abfffcf [i18n] Updated German translation 2010-09-12 11:02:47 +02:00
Takayuki KUSANO
825576322a Updatede Japanese translation. 2010-09-12 03:02:24 +09:00
Tomeu Vizoso
38a3b1730d Add annotation for g_variant_get_string 2010-09-11 17:01:10 +02:00
Andika Triwidada
e7f04bf29a Updated Indonesian translation 2010-09-11 16:29:06 +07:00
Tor Lillqvist
dc8dc56ddd dos2unix glib/win_iconv.c 2010-09-11 12:08:32 +03:00
Benjamin Otte
1254104cea docs: Clarify string encoding for GFile constructors
The encoding was deduced from looking at the source code, feel free to
fix if it's wrong (the docs _and_ the source code).
2010-09-11 00:13:36 +02:00
David Zeuthen
0b74058fa3 Add work-around for Bug 627724
The root problem is with GObject - for now, just work around it in
GDBus. Also include a test-case. See

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

for more information.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-09-10 16:23:14 -04:00
David Zeuthen
12029eeb6a Remove g_dbus_message_filter_result_get_type() from gio.symbols
Pointed out by danw on IRC.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2010-09-10 13:27:48 -04:00
Dan Winship
bc29aa9b09 g_socket_client_connect_async: fix when g_socket_connect succeeds immediately
https://bugzilla.gnome.org/show_bug.cgi?id=629251
2010-09-10 13:07:00 -04:00