Commit Graph

11916 Commits

Author SHA1 Message Date
Alexander Larsson
feb120eb40 Fix typo
registred_resources -> registered_resources
2012-01-16 10:38:35 +01:00
Patrick Welche
decac50c15 Protect call to pthread_condattr_setclock with define.
While here update pthread_attr_setstacksize test to use AC_LINK_IFELSE
and avoid an unused variable in glib/tests/thread.c.

https://bugzilla.gnome.org/show_bug.cgi?id=667790
2012-01-15 23:41:27 -05:00
Simon McVittie
6d9f874330 g_error_new_valist, g_error_copy: warn if domain is 0 or message is NULL
Neither of those usages is valid, but there's a lot of use of 0 as a
domain "in the wild", so we can't g_return_if_fail yet.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=660371
2012-01-15 23:21:03 -05:00
Matthias Clasen
186c15fc87 GError: small documentation addition
Document that out variables are not guaranteed to be set to
defined values if an error is thrown. Inspired by bug 658315
2012-01-15 23:18:09 -05:00
Matthias Clasen
5377c0de01 Beef up Libs.private in glib-2.0.pc
This should help getting static builds working on mingw.
Based on a patch by Volker Grabsch, bug 619126.

At the same time, drop the unnecessary GLIB_RT_LIBS variable;
we are already adding -lrt to G_THREAD_LIBS.
2012-01-15 22:15:10 -05:00
Matthias Clasen
7e542e97a9 Trivial docs fix
I like GLib to be consistently capitalized in the docs.
2012-01-15 21:10:54 -05:00
Daniel Mustieles
4abe25dbbd Updated Spanish translation 2012-01-15 19:28:05 +01:00
Dan Winship
673396fb65 gmain: fix adding a child source to an already-attached source
Adding a child source to an already-attached parent source would
crash, because we were passing the parent's context when setting the
child's priority.
2012-01-15 09:39:14 -05:00
Christian Persch
87dc862408 Ensure to generate a flags GType for empty Flags enums
When the flags enum only has the default NONE = 0 entry, glib-mkenums
creates an enum type for it, not a flags type. Add an annotation to the
enum to ensure the correct GType is created.

Bug #667938.
2012-01-15 13:03:16 +01:00
Christian Persch
b717ef86ad resources: Use g_set_error_literal where appropriate 2012-01-15 13:03:09 +01:00
Christian Persch
870fc484d9 Add missing Since: docs 2012-01-15 13:02:59 +01:00
Fran Diéguez
91e3a67376 Updated Galician translations 2012-01-15 00:42:25 +01:00
Rico Tzschichholz
0fd61489e5 gio/tests: Fix out-of-source build and use uninstalled libraries 2012-01-14 11:18:07 +01:00
Benjamin Otte
a6e149e41f array: return_if_fail() if element size is 0
This is particular useful for:
  g_array_new (sizeof (MyStruct), FALSE, FALSE);
because the correct incantation is
  g_array_new (FALSE, FALSE, sizeof (MyStruct));
and these warnings will trigger in the first situation.
2012-01-14 01:15:16 +01:00
Benjamin Otte
9d52243790 values: Use v_pointer for g_value_set_gtype()
... and g_value_get_gtype(). G_TYPE_GTYPE is a pointer type, so it's
values should use the v_pointer member. This is especially true, because
the value collectors from varargs in gvaluecollector.h use that, too.

This should only cause issues when sizeof(glong) != sizeof(gpointer),
and I'm not aware of any such platform. Maybe win64?
2012-01-14 01:15:16 +01:00
Rico Tzschichholz
86cd3018e0 gio/tests: add some missing files to EXTRA_DIST 2012-01-13 23:48:12 +01:00
Rico Tzschichholz
e3fe256692 gio: Fix for -Wformat-security 2012-01-13 23:18:01 +01:00
Rico Tzschichholz
8735f53ae4 tests: Fix build failure of resources by linking against libgmodule-2.0.la 2012-01-13 22:35:44 +01:00
Piotr Drąg
0ed77c4fdd Updated POTFILES.in 2012-01-13 21:11:03 +01:00
Alexander Larsson
056cec779a Add GResource functions to gio.symbols 2012-01-13 17:12:57 +01:00
Alexander Larsson
186e2d2078 Add GLIB_COMPILE_RESOURCES to glib m4 macros 2012-01-13 17:12:57 +01:00
Alexander Larsson
ac51c338ed Add glib_compile_resources variable to the gio pc file 2012-01-13 17:12:57 +01:00
Alexander Larsson
c7dfea30b3 Add documentation for GResource 2012-01-13 17:12:57 +01:00
Alexander Larsson
e041843b3e Support resource:/// uris 2012-01-13 17:12:57 +01:00
Alexander Larsson
75439298f8 Add tests for GResource 2012-01-13 17:12:53 +01:00
Alexander Larsson
827657491d Initial version of glib-compile-resources
This is the basic utility to create resource files, either binary
versions or source files that can be compiled into your app.
2012-01-13 17:12:50 +01:00
Alexander Larsson
b87cf49163 Initial version of GResource
GResource is a bundle of files combined into a single binary blog.
The API lets you access the files the resource contains by
using resource paths. You can also register resources with a
global list and access these globally in a merged resource namespace.

The normal way this is used is to link in the resources into your
application/library and have it be automatically registred.

Resources are compiled from an xml description using
glib-compile-resources.
2012-01-13 17:12:45 +01:00
Alexander Larsson
d85b722734 Merge remote-tracking branch 'gvdb/master' 2012-01-13 16:12:56 +01:00
Alexander Larsson
9ef4554a0b Add macros to handle constructor functions on the compilers that support it
This is only supported on some compilers, so we define G_HAS_CONSTRUCTORS
when it is supported. However, when it is supported we guarantee that
both constructors and destructors work, in executables as well as shared
libraries (including runtime unloading of shared libraries).

Usage is a bit unorthodox, as some compilers need to use #pragma to
implement constructors, and #pragma can't be used in macros.

The canonical way to use this:

  #ifdef G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA
  #pragma G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(my_constructor)
  #endif
  G_DEFINE_CONSTRUCTOR(my_constructor)

  static void my_constructor (void)
  {
    ...

  #ifdef G_DEFINE_DESTRUCTOR_NEEDS_PRAGMA
  #pragma G_DEFINE_DESTRUCTOR_PRAGMA_ARGS(my_destructor)
  #endif
  G_DEFINE_DESTRUCTOR(my_destructor)

  static void my_destructor (void)
  {
    ...
2012-01-13 16:02:47 +01:00
Alexander Larsson
73acf01618 Support creating a GvdbReader from data
This is needed for the glib resource work.
2012-01-13 15:59:56 +01:00
Murray Cumming
d1f6300363 Docs: Changed can not to cannot.
This is a backport from the glib commit 30fdc1a799
2012-01-13 09:23:06 +01:00
Yaron Shahrabani
3db6241b12 Updated Hebrew translation. 2012-01-13 09:38:35 +02:00
Javier Jardón
9e732ab0ea docs/gobject/tutorial: Use g_object_class_install_properties 2012-01-12 14:13:07 +00:00
Evan Nemerson
c3d6595f5a GIO: add lots of annotations for Vala bindings
https://bugzilla.gnome.org/show_bug.cgi?id=667447
2012-01-11 15:50:08 -05:00
Philip Withnall
e98f17e5cf Bug 666700 — Add some missing (allow-none) annotations
Add some missing (allow-none) annotations to GContentType, GIcon and
GHashTable methods.

Closes: bgo#666700
2012-01-11 20:48:29 +00:00
Matthias Clasen
f8843a0feb Back to odd 2012-01-10 00:40:14 -05:00
Matthias Clasen
4a016d82f1 2.31.8 2012-01-10 00:39:20 -05:00
Matthias Clasen
93849185ca Updates 2012-01-09 23:23:27 -05:00
Matthias Clasen
00c00e2f3f Add G_FILE_ATTRIBUTE_FILESYSTEM_USED to get exact used space
This is implemented by with statfs_buffer.f_bavail (free blocks
for unprivileged users) as a default way to retrieve real free space.
Based on a patch by Marcus Carlson, bug 625751.
2012-01-09 21:49:08 -05:00
Matthias Clasen
31960257a6 Make glocalfile.c more readable
The many nested ifdefs here really deserve some annotations.
Based on a patch by Marcus Carlson, bug 625751.
2012-01-09 21:35:13 -05:00
Ravi Sankar Guntur
fd7e443838 add g_queue_free_full to glib-sections.txt
Signed-off-by: Ravi Sankar Guntur <ravi.g@samsung.com>

https://bugzilla.gnome.org/show_bug.cgi?id=667331
2012-01-09 19:27:41 -05:00
Ravi Sankar Guntur
0ed2cdb0d9 Use g_queue_free_full() convenience function.
https://bugzilla.gnome.org/show_bug.cgi?id=667331

Signed-off-by: Ravi Sankar Guntur <ravi.g@samsung.com>
2012-01-09 19:27:39 -05:00
Ihar Hrachyshka
a76d85de50 Updated Belarusian translation. 2012-01-10 01:00:29 +03:00
Matthias Clasen
ddf9633d95 fix a compiler warning 2012-01-09 15:27:07 -05:00
Matthias Clasen
39dc681fc7 Realign the hash set example with added api
Change the name of set_insert to set_add, to better match the
newly added g_hash_table_add.
2012-01-09 15:23:25 -05:00
Ryan Lortie
875ffc41b7 drop debian/ directory 2012-01-09 14:28:25 +01:00
Dan Vrátil
7678b10703 Fix GHashTable GDB pretty printing (bug #667420) 2012-01-09 09:29:20 +01:00
Alexander Shopov
82740adc61 Updated Bulgarian translation 2012-01-08 16:48:13 +02:00
Jasper St. Pierre
d141940bc6 gthread-posix: Remove misleading documentation comments
g_thread_init() has done nothing since 2.32, so while the function
still can be used if "g_thread_init() has not yet been called",
it won't do nothing in that case, it will just perform normally.
2012-01-06 14:41:08 -05:00
Jasper St. Pierre
021e116f05 gbacktrace: g_get_prgname () isn't called for a NULL argument
https://bugzilla.gnome.org/show_bug.cgi?id=658871
2012-01-06 14:41:08 -05:00