Commit Graph

3062 Commits

Author SHA1 Message Date
Dan Winship
784619bc3a Fix two leaks seen when using TLS connections
g_tls_certificate_list_new_from_file() was leaking the file contents,
and GSource was leaking the GSourcePrivate structure that got
created when using child sources.
2011-04-07 08:32:06 -04:00
Murray Cumming
3ac7e0a7fe Docs: Change DBus to D-Bus 2011-04-04 09:22:06 +02:00
Colin Walters
98365dff73 gqsort: Quiet a compiler warning for qsort_r 2011-03-31 17:07:07 -04:00
Colin Walters
14bb138d58 goption: [linux] Look in /proc/self/cmdline for argv0 if not specified
We really shouldn't use <unknown> when we can perfectly easily
get argv0 out of /proc.  This avoids people having to pass argv
down into gtk_init/g_option_context_parse etc., which is important
because GTK+ uses it to initialize the WM_CLASS, which in turn
GNOME Shell consumes for application tracking.

https://bugzilla.gnome.org/show_bug.cgi?id=644309
2011-03-31 15:29:42 -04:00
Ryan Lortie
7a752e0817 Improve .gitignore 2011-03-31 15:51:01 +05:30
Ryan Lortie
0cadce7e93 glib.symbols: add some missing symbols 2011-03-31 15:47:54 +05:30
Ryan Lortie
cd35e2e643 GVariant test: test parsing of "inf" and "nan" 2011-03-31 15:09:55 +05:30
Ryan Lortie
85633f1182 GVariant parser: parse "inf", "-inf" and "nan" 2011-03-31 15:09:26 +05:30
Ryan Lortie
24ed841d6a GVariant parser: match strings without consuming
Add a new function that allows the parser to check that the current
token is equal to a given string without consuming the token.
Reimplement the 'consume' function in terms of the new function.
2011-03-31 14:45:50 +05:30
Ryan Lortie
f6dff49136 GVariant parser: fix memory error
In some cases it was possible for the GVariant parser to access past the
'limit' parameter.  This should fix that.
2011-03-31 14:14:59 +05:30
Ryan Lortie
e9ce8f2374 Add GTimeZoneMonitor
Monitors /etc/localtime for changes and instructs GTimeZone to drop its
cache.  Also has a signal for interested 3rd parties.
2011-03-31 12:47:03 +05:30
Ryan Lortie
de3a3b181a g_time_zone_new_local: cache the result
Add a function to drop the cache.
2011-03-31 12:47:02 +05:30
Ryan Lortie
29a074b87e GTimeZone: don't add /etc/localtime to the cache
It may change.
2011-03-31 12:47:02 +05:30
Murray Cumming
30fdc1a799 Docs: Changed can not to cannot. 2011-03-24 09:33:55 +01:00
Emmanuele Bassi
08f0a31289 Revert "Remove all uses of G_CONST_RETURN"
This reverts commit 36741245cc.

The removal has not been discussed, except on Bugzilla:

https://bugzilla.gnome.org/show_bug.cgi?id=644611
2011-03-15 09:03:28 +00:00
Emmanuele Bassi
0c1acc7e74 Revert "Deprecate G_CONST_RETURN"
This reverts commit a7fc7909da.

The deprecations was not discussed except on Bugzilla:

https://bugzilla.gnome.org/show_bug.cgi?id=644611
2011-03-15 09:02:08 +00:00
Ryan Lortie
d679a7659f GVariant parser: fix tuple type checking
Robert Ancell discovered that the GVariant parser messes up pretty badly
when the type of a tuple is specified and the tuple in the text being
parsed has a different number of elements (but otherwise matching child
types).

Check that we have the expected number of elements.

Closes #644786.
2011-03-15 01:32:22 -04:00
Ryan Lortie
a7fc7909da Deprecate G_CONST_RETURN 2011-03-15 01:32:22 -04:00
Ryan Lortie
36741245cc Remove all uses of G_CONST_RETURN
Just use 'const'.
2011-03-15 01:32:22 -04:00
Owen W. Taylor
789b341eff Correct internal definition of C_()
* Since the GLib translations are lazily initialized, we need an
  internal wrapper for g_dpgettext() that does the initialization
  in the same way as glib_gettext()
* We need to use the glib domain defined by GETTEXT_PACKAGE
  rather than than the application's domain.

https://bugzilla.gnome.org/show_bug.cgi?id=644607
2011-03-12 21:10:06 -05:00
Emilio Pozuelo Monfort
89ca0f7296 Document g_timeout_add_seconds first call latency
And fix /timeout/rounding to not fail if the first call
happens after 2 seconds.

https://bugzilla.gnome.org/show_bug.cgi?id=644552
2011-03-12 15:51:44 +00:00
Tor Lillqvist
9505ad05ee Use g_usleep() for portability, bug #644465 2011-03-11 10:19:42 +02:00
Matthias Clasen
a6615ba859 Fix cleanup in g_markup_collect
Patch by Matt Barnes,
https://bugzilla.gnome.org/show_bug.cgi?id=644428
2011-03-10 23:27:49 -05:00
Matthias Clasen
949b7c3428 Add a testcase for g_markup_collect cleanup
Taken from https://bugzilla.gnome.org/show_bug.cgi?id=644428.
The test is currently failing.
2011-03-10 23:25:22 -05:00
Martin Nordholts
37858f7f5e Check availability of linux/magic.h
Check availability of linux/magic.h. It isn't available in Linux
versions before 2.6.19.
2011-03-08 19:13:57 +01:00
Matthias Clasen
121ce56fe1 Go back to the old logic in set_expiration
It was more complicated, but also more correct...
Also add a test to ensure that our rounding works as expected.
https://bugzilla.gnome.org/show_bug.cgi?id=643795
2011-03-06 22:38:17 -05:00
Ryan Lortie
d2a2fe96a3 GVariant docs cleanups
Fix some gtk-doc warnings
2011-03-04 00:57:51 -05:00
Ryan Lortie
be04e514c0 GVariant: add G_VARIANT_TYPE_VARDICT for a{sv} 2011-03-04 00:45:14 -05:00
Matthias Clasen
c430ad0b1b Add some tests for g_hash_table_lookup_extended 2011-02-25 10:41:29 -05:00
Matthias Clasen
d2d756439f GHashTable: Clarify g_hash_table_lookup_extended docs
Passing NULL as a key is only ok if your hash and equal functions
can deal with it.
https://bugzilla.gnome.org/show_bug.cgi?id=642944
2011-02-25 10:40:39 -05:00
Matthias Clasen
52ef73ac8c GOptionContext: Warn about invalid arg/flag combinations
This was proposed by Kjell Ahlstedt in bug 642825.
Also adding a few tests for this new behaviour.
2011-02-25 10:10:37 -05:00
Matthias Clasen
ee9e38ef68 Treat optional arguments the same for long and short options
This was noticed in bug 642825 and the change was proposed
by Kjell Ahlstedt.
2011-02-25 08:45:28 -05:00
Chun-wei Fan
701ac3cb3d Fix the VS2010 project generation for GLib
The scripts accently pick up gcc-only source files... this fixes that.
2011-02-24 12:38:51 +08:00
Andreas Rottmann
fdfb09a793 Bug 638185 - GIOCondition should be annotated as "flags"
Add a gtk-doc annotation to GIOCondition marking it as a flags type.
2011-02-22 15:12:30 +01:00
Chun-wei Fan
7b118b0c41 Visual C++ 2010 Project Files: autotools files
These are the updates to the autotools files to
ensure the expansion of the GIO, GLib and GObject
project files (*.vcxproj, *.vcxproj.filters) and to
enable the distribution of the VS2010 project files

The actual VS2010 project files will follow shortly
2011-02-22 19:58:18 +08:00
Tor Lillqvist
1158f9c171 Export _glib_get_locale_dir() as it is now used in gio, too 2011-02-20 01:30:51 +02:00
Matthias Clasen
4cda703d8e Use glibc qsort_r() for g_qsort_with_data()
No point in using an outdated copy that claims to
'work best on a Sun 4/260' when we can just wrap qsort_r...
2011-02-16 01:28:27 -05:00
Damien Lespiau
59cbb3a8a3 gtimezone: Rename shadowing variable 'time' to 'time_' 2011-02-15 21:55:38 -05:00
Matthias Clasen
b21b3a01c7 Fix bug base in array-test 2011-02-15 00:03:19 -05:00
Matthias Clasen
a46885242b Add a testcase for bug 640489 2011-02-15 00:03:19 -05:00
Ryan Lortie
c2fbef4125 Bug 642052 - g_timeout_add(_seconds) overflow
Fix integer overflow error.
2011-02-14 23:23:33 -05:00
Ryan Lortie
10154d21f0 Bug 642052: add currently-broken test case
The test case fails for now.  It will be fixed by the next commit.
2011-02-14 23:23:33 -05:00
Matthias Clasen
309f5f978b Improve test coverage
Various test additions, mainly in GObject
2011-02-13 23:49:19 -05:00
Matthias Clasen
147139d968 Use g_assert_no_error
The option-context test had its own version.
2011-02-13 23:49:18 -05:00
Benjamin Otte
562f29afdc doc: Fix typo in previous commit
Yuck. I blame it on the weekend.
2011-02-12 18:05:54 +01:00
Benjamin Otte
17eea8fa60 docs: Fix return value for g_datetime_compare()
Previous code confused dt1 and dt2. The new formulation is stolen from
man strcmp() and g_strcmp0().
2011-02-12 17:56:34 +01:00
Ryan Lortie
ea4e3ea1cb GVariant: doc the format of g_variant_parse/print 2011-02-11 13:53:10 -05:00
Ryan Lortie
b1d02f9323 GVariant: support NULL for empty arrays in varargs
g_variant_new("as", NULL); now gives an empty array of strings, for
example.

This was documented as working already, but was never actually
implemented (due to the fact that it muddies the water when considering
maybe types).  It's being implemented now because its convenience to
programmers exceeds any damage done to the conceptual purity of the API.
2011-02-11 10:14:29 -05:00
Matthias Clasen
78dcafc5cb Fix some parameter mismatches in GVariant docs 2011-02-08 10:04:36 -05:00
Matthias Clasen
4368a07e02 Avoid more compiler warnings 2011-02-08 07:41:49 -05:00