9719 Commits

Author SHA1 Message Date
Giovanni Campagna
56c4e19f35 GVariant: fix introspection annotations
Add transfer annotations for most functions, as well as some (array)
and (skip) for functions that use varargs.

https://bugzilla.gnome.org/show_bug.cgi?id=646635
2011-06-05 13:12:47 -04:00
Antoine Jacoutot
9653d9c92a Don't hardcode path to true(1).
true(1) is not always installed under /bin so leave system() find
it in the PATH.

https://bugzilla.gnome.org/show_bug.cgi?id=651219
2011-06-05 13:12:23 -04:00
David Schleef
6f64843d5e main: Use public function in documentation
https://bugzilla.gnome.org/show_bug.cgi?id=651009
2011-06-05 13:11:58 -04:00
Richard Hughes
b8d26cc4cb Correct the annotation for g_file_enumerator_get_container()
We don't ref the returned object, and alex has verified the gvfs implementation.
2011-06-05 13:11:27 -04:00
Matthias Clasen
46e31d1b7a Fix HAVE_FUTEX definition
The previous implementation was buggy and wrote junk into config.h.
While we're at it, close bug #631231 by including syscall.h from the
correct location and using __NR_futex instead of SYS_futex.
2011-06-05 13:05:33 -04:00
Chun-wei Fan
be4f4563c7 Fix unconditional unistd.h inclusion
Cherry-pick from commit 3c94299b0ff1c8e1b0b06bedd73b1b725e631d8a
in master.

This will close Bug 644905.
2011-06-01 08:12:45 +08:00
Carles Ferrando
6add04d0c6 [l10n]Updated Catalan (Valencian) translation 2011-05-29 14:04:02 +02:00
Carles Ferrando
f8202d1f38 [l10n]Updated Catalan (Valencian) translation 2011-05-29 14:03:42 +02:00
Chun-wei Fan
33922ffbf5 Update Visual C++ projects for glib-compile-schemas
Update include path so that gmodule.h can be found.
2011-05-25 12:50:20 +08:00
Seán de Búrca
e09abba419 Updated Irish translation. 2011-05-23 00:37:08 -06:00
Matthias Clasen
09df90df29 bump version 2011-05-21 01:16:24 -04:00
Matthias Clasen
46b83a838c Updates 2.28.7 2011-05-21 00:14:42 -04:00
Ryan Lortie
89908908d5 GApplication: fix remote action states
Fix up remote_action_info_new_from_iter() to do its job better and use
it from all places that it's appropriate.

Closes #650236.
2011-05-20 23:50:55 -04:00
Jasper Lievisse Adriaanse
bb488d4c4f gatomic: #include gthread.h to fix compilation on nonoptimized architectures
The fallback case of implementing atomic integers with mutexes needs
gthread.h.

Commit message written by Colin Walters <walters@verbum.org>

https://bugzilla.gnome.org/show_bug.cgi?id=631153
2011-05-20 23:42:58 -04:00
Colin Walters
dee6ef109e gtype: Remove unused variable 2011-05-20 23:42:44 -04:00
Ryan Lortie
2ab5d96fa6 Fix gsettings tool string handling
There are some bugs caused by the way that gsettings-tool currently
attempts to help the user when they leave the quotes off of a string
value that they are setting.

Simplify the code to make it more robust and add some comments about why
it should be done this way.

https://bugzilla.gnome.org/show_bug.cgi?id=649915
2011-05-20 23:42:22 -04:00
Benjamin Otte
e46332dc49 gobject: Speed up g_type_from_name()
The hash table used exclusively for looking up types by name used to map
quarks => types. But we can easily make it map strings => types, which
avoids the quark lookup. And that in trun avoids taking a lock and
consulting another hash table. So this change should make
g_type_from_name() roughly twice as fast.
2011-05-20 23:41:46 -04:00
John Lindgren
317a249d82 keyfile: fill parse buffer in line sized chunks
When loading a keyfile the incoming bytes are fed
to a line buffer to get parsed each time a new line
is encountered.

The code that fills the line buffer does it inefficiently,
one byte at a time.

This commit changes that code to look ahead at the incoming
bytes for the next '\n' character and then fill the line buffer
all at once.

https://bugzilla.gnome.org/show_bug.cgi?id=650211
2011-05-20 23:41:02 -04:00
John Lindgren
7cb768f890 keyfile: avoid needless allocations on file load
When loading a key file, the keys and values of individual lines
are allocated once when copied and trimmed from the parse buffer
and allocated/copied again when added to the lookup map.

This commit avoids the second pair of allocations by introducing
a new function g_key_file_add_key_value_pair that gives the
lookup map direct ownership of the key and value copied from the
parse buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=650211
2011-05-20 23:39:37 -04:00
Matthias Clasen
8e5f5d40b7 Rename a problematic test binary
Having a binary called printf is apparently asking for trouble,
so lets not do that.

http://bugzilla.gnome.org/show_bug.cgi?id=650078
2011-05-20 23:39:05 -04:00
Ryan Lortie
5367f90c67 GVariant: Better handling of invalid UTF-8
g_variant_new_string() hits a g_return_if_fail() when given invalid
UTF-8.  That's certainly the right thing to do, but
g_variant_builder_add() uses this function internally and crashes when
it returns NULL due to the user passing a non-utf8 string.

We can protect the internal code by returning "[Invalid UTF-8]" in this
case while also making the problem easier to debug (and less fatal).

Closes #632631.
2011-05-20 23:37:25 -04:00
Behdad Esfahbod
76c8e94637 Bug 648966 - Update g_unichar_iswide and g_unichar_iswide_cjk
Add tests.
2011-05-20 23:36:09 -04:00
Behdad Esfahbod
029b1fc036 Bug 648966 - Update g_unichar_iswide and g_unichar_iswide_cjk
Update to Unicode 6.0.  Also attach Python script that generates
the tables.
2011-05-20 23:35:00 -04:00
Alexander Larsson
c7271d2184 GFilterInputStream: close-base-stream should not be construct-only
This is a runtime changable property (by the methods for it), must
be a cut and paste error.
2011-05-20 23:34:13 -04:00
David Schleef
ca5d9d7a22 Fix %z in g_date_time_format()
https://bugzilla.gnome.org/show_bug.cgi?id=642935
2011-05-20 23:33:36 -04:00
Matthias Clasen
a50f18cdf0 Fix mailing list link in README
Patch by Thomas Andersen, bug 647594
2011-05-20 23:32:38 -04:00
Matthias Clasen
486e6d3eb4 Fix up some harmless FALSE <> NULL confusions
Reported in bug 643134.
2011-05-20 23:31:12 -04:00
Matthias Clasen
0278acbc69 GSequence: Make g_sequence_iter_move behave as documented
As pointed out in bug 658313, moving before the begin iter is
supposed to return the begin iter, not the end iter. Also add
a test for this behaviour.
2011-05-20 23:31:01 -04:00
Michael Terry
859c8f7ed7 Don't ignore SUPPORTS_STARTUP_NOTIFICATION for commandline GAppInfos
https://bugzilla.gnome.org/show_bug.cgi?id=648416
2011-05-20 23:30:15 -04:00
Gabor Kelemen
1209c92336 Fix short day names in Hungarian translation 2011-05-18 12:39:31 +02:00
Chun-wei Fan
3500474619 Update Visual C++ README.txt
Correct the unpacking path of GLib sources...
2011-05-18 11:15:56 +08:00
Martin Pitt
5deeb94970 [gi] Add missing allow-none annotations to GDBusConnection
Cherrypicked from master commit 21c2291.
2011-05-08 23:10:37 +02:00
Chun-wei Fan
09f7c3307e Update VS 2010 "install" project
The dependencies on gsettings and glib-compile-schemas were missed.
Made up for them here.
2011-05-05 15:11:18 +08:00
Abduxukur Abdurixit
5d406412e9 Added UG translation 2011-05-01 20:08:04 +02:00
Chun-wei Fan
cb8143163d Update VS2008/2010 README.txt
Tell people about the usage of ZLib to avoid the problem
such as the one mentioned in Bug 633977
2011-05-01 09:50:29 +08:00
Şenol Korkmaz
4c09b4783e Updated Turkish translation 2011-04-26 02:50:30 +03:00
Abduxukur Abdurixit
9b2cfd5f59 Added UG translation 2011-04-25 10:37:58 +02:00
Chun-wei Fan
a0b9585b50 Add VS 2010 compilation support for some utilities
-Added projects to compile the glib-compile-schemas and gsettings utilities
-Update .vsprops to install these in "install" phase
-Distribute these projects also
2011-04-25 13:16:28 +08:00
Chun-wei Fan
53298de608 Add VS 2008 compilation support for some utilities
-Added projects to compile the glib-compile-schemas and gsettings utilities
-Update .vsprops to install these in "install" phase
-Distribute these projects also
2011-04-25 12:33:43 +08:00
Chun-wei Fan
2a1514a29f Bug 643161: VS 2010 Project files (autotools)
Added rules in GLib, GIO and GObject to
expand the respective project files and templates
during "make dist" so that the source file listing
is up-to-date in releases, so to simplify their maintenance.
2011-04-22 19:09:38 +08:00
Chun-wei Fan
2aa3098933 Bug 643161: VS2010 Projects (autotools part)
These files are changed to enable distribution of VS2010
project files..
2011-04-22 19:06:09 +08:00
Chun-wei Fan
57278be01c Bug 643161: Visual C++ 2010 Project Files
These are the VS 2010 project files to compile GLib.

Like the VS2008 files, the GLib, GIO and GObject
projects and filters are expanded from templates
during "make dist"
2011-04-22 19:04:16 +08:00
Chun-wei Fan
41de9eff2c Update config.h.win32(.in) for VS 2010
VS 2010 ships with stdint.h, so update the file.
2011-04-22 18:57:49 +08:00
Ryan Lortie
e781c26b25 GTimeZone: fix non-threadsafe refcounting
In the previous code, if the timezone was pulled out of the cache again
just as the last reference was being dropped, the cache code will
increase its refcount and return it while the unref code was freeing it.

Protect against that.

Note that this patch is not a straight cherry-pick of the one from
master.  It follows closer to the solution that was originally
recommended in the bug and holds the mutex during every unref operation.
Because we don't have the GTimeZoneMonitor changes involved here, it's a
little bit more elegant (due to no early exit condition).  Also, it's
the stable release, and I have more confidence in it (even if it's
probably slower).

Closes #646435.
2011-04-16 10:52:12 -04:00
Ryan Lortie
8c24ea5f49 builder: do not include <unistd.h> on win32
Spotted by Kean Johnston <kean.johnston@gmail.com>.

https://mail.gnome.org/archives/gtk-devel-list/2011-April/msg00010.html
2011-04-15 09:33:12 -04:00
Michael Kuhn
c06be20515 Bug 637561 - Crash when using G_DBUS_SERVER_FLAGS_RUN_IN_THREAD
https://bugzilla.gnome.org/show_bug.cgi?id=637561

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-15 06:26:55 -04:00
Simon McVittie
eb70e54370 /gdbus/message-serialize-invalid test: be compatible with D-Bus 1.4.8
Older versions of libdbus would let you construct an invalid
DBusMessage, but that's a bug, which will be fixed in 1.4.8/1.5.0.
Instead, construct a valid message of the same length, then replace
substrings in the serialized blob with their invalid counterparts.

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

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-15 06:26:36 -04:00
David Zeuthen
fc80ec9d0c GDBus: If an authentication method fail, don't give up, just try the next one
This problem was reported in bug 647602.

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

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-14 10:14:02 -04:00
David Zeuthen
69c4e81d0a GDBus: Nuke debug spew from the ANONYMOUS authentication method
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-14 10:13:43 -04:00
Colin Walters
3ea204ccf7 gdbusconnection: Avoid tripping assertion if we fail to authenticate twice
If g_bus_get_sync() fails in authentication (because e.g. the process
uid, doesn't match the expected in EXTERNAL), a secondary call to
g_bus_get_sync() would notice we aren't initialized, and try
to initialize.

The assertion here is just wrong; we now explicitly and clearly handle
both cases where we already have an error, or we already succeeded.

https://bugzilla.gnome.org/show_bug.cgi?id=635694
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-04-14 10:13:18 -04:00