Commit Graph

15323 Commits

Author SHA1 Message Date
Sébastien Wilmet
cb2c6eef0a gslist: indentation fix 2014-09-27 00:04:55 +02:00
Sébastien Wilmet
66ef10eec9 docs: syntax highlighting for the code examples
In the sections Concepts, Tools and Tutorial.

https://bugzilla.gnome.org/show_bug.cgi?id=736914
2014-09-26 23:36:26 +02:00
Philip Withnall
1c6df7aaeb gmain: Unref child sources when finalising a GSource
If a GSource is created, *not* attached to a GMainContext, and then has
child sources added, dropping the last reference to the parent GSource
will leak its references to its child sources. Currently, child sources
are only unreffed when g_source_destroy() is called on the parent.

https://bugzilla.gnome.org/show_bug.cgi?id=737338
2014-09-25 13:59:25 +01:00
Philip Withnall
eaca86801e gmain: Fix some signed/unsigned integer comparisons
Just to shut gcc up.

https://bugzilla.gnome.org/show_bug.cgi?id=737338
2014-09-25 09:52:50 +01:00
Sweta Kothari
42d0dc363e Updated gujarati translations 2014-09-24 23:09:32 +05:30
Krishnababu Krothapalli
0ab9d66b05 Updated Telugu translation 2014-09-23 14:28:34 +00:00
Hib Eris
e1b84e3296 Include <stdint.h> in glib/valgrind.h
This ensures the uintptr_t type is defined on mingw-w64.

Fixes compile error:

make[4]: Entering directory
`/home/abuild/rpmbuild/BUILD/glib-2.42.0/gobject'
  CC       libgobject_2_0_la-gtype.lo
In file included from gtype.c:24:0:
../glib/valgrind.h: In function 'VALGRIND_PRINTF':
../glib/valgrind.h:5601:4: error: unknown type name 'uintptr_t'
    uintptr_t _qzz_res;
    ^

https://bugzilla.gnome.org/show_bug.cgi?id=737143
2014-09-23 09:08:16 -04:00
Saibal Ray
f5ed7d2d3e Updated Bengali (India) translation 2014-09-23 11:27:44 +00:00
Philip Withnall
f41ebebd34 gtask: Ignore errors from g_thread_pool_push()
g_thread_pool_push() only returns an error if it fails to spawn a new
thread. However, it unconditionally adds the task to its worker queue,
so:
 • if _any_ threads exist in the pool, the task will eventually be
   handled; and
 • if _no_ threads exist in the pool, the task will be handled if one
   is eventually successfully spawned.
If no more threads are ever spawned, the process probably has bigger
problems than a single GTask which is taking forever to complete.

https://bugzilla.gnome.org/show_bug.cgi?id=736806
2014-09-23 08:08:45 +01:00
Philip Withnall
925913d8dd gtask: Document signal handler reference counting
Explain why the signal handler holds a reference to the GTask, even
though that causes a reference loop at first glance.

https://bugzilla.gnome.org/show_bug.cgi?id=736806
2014-09-23 08:08:25 +01:00
Philip Withnall
c6838ffaa1 gtask: Fix a signed/unsigned integer comparison
The GSource times assigned to creation_time are always signed.

https://bugzilla.gnome.org/show_bug.cgi?id=736806
2014-09-23 08:08:25 +01:00
Ryan Lortie
26a240fd10 GLib 2.42.0 2014-09-22 13:15:17 -04:00
A S Alam
c8d884da43 update Punjabi Translation for 3.14 release 2014-09-21 08:52:43 -05:00
Rajesh Ranjan
db41a84239 Updated Hindi translation 2014-09-21 04:14:06 +00:00
YunQiang Su
d3c65dcbba Revert "update zh_CN translation"
Add wrong po file
This reverts commit ee3d55573f.
2014-09-21 10:58:01 +08:00
YunQiang Su
ee3d55573f update zh_CN translation 2014-09-21 10:30:53 +08:00
Tong Hui
f550be0c6a update zh_CN translation 2014-09-21 10:24:22 +08:00
Ask H. Larsen
a2d4a612c6 Updated Danish translation 2014-09-20 17:19:18 +02:00
Ryan Lortie
dceff8fc2c gmain: improve g_source_set_name thread safety
Step up thread safety on g_source_set_name() to the same standard as all
other GSource functions: after we are attached to a main context, this
function should be threadsafe.

https://bugzilla.gnome.org/show_bug.cgi?id=736683
2014-09-19 13:39:00 -04:00
Ryan Lortie
1cbdbef772 gsource: clarify restrictions on non-existant IDs
Document that one must not use the "by id" source APIs with non-existent
IDs.  The real justification behind this restriction is that the reuse
of source ids makes it unsafe to call these functions unless you're
absolutely sure that the source exists and it belongs to you.  If you
call one of these functions on a source that may already have been
removed then you run the risk of finding someone else's source (with
your reused id).

This also bails us out of a slightly tricky situation with respect to
the threadsafety of g_main_context_find_source_by_id().  The fact that
this function doesn't return a reference implies that its return value
cannot be safely accessed unless we already know for sure that a
reference is being held elsewhere (by example, by the main context
itself if we know that the source has not been removed).  The function
itself, however, performs an access to the value, which could result in
a crash.

If we mandate that it is only valid to call this function on
known-to-exist source IDs then we dodge this problem.

https://bugzilla.gnome.org/show_bug.cgi?id=736683
2014-09-19 13:39:00 -04:00
Simon McVittie
7db1baf590 GVariant: say that serialized form needs an out-of-band length
This confused me for a while, because it isn't the same as D-Bus.
Like GVariant, the D-Bus serialization needs an out-of-band
endianness and type indicator, but unlike GVariant, serialized
D-Bus objects encapsulate their own length (often by starting with
a byte-count). This does come at some redundancy cost, so I can see
why the more efficient GVariant format does this the way it does;
but it's a difference between D-Bus and GVariant that seems worth
calling out.

It's also relevant for the designers of file or message-framing
formats: with D-Bus serialization it would be feasible to say "the file
starts with a little-endian D-Bus variant, followed by...",
but in GVariant you wouldn't be able to deserialize the variant
unless you either assume that it extends to end-of-file, or have
an explicit length.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=736975
Reviewed-by: Ryan Lortie
2014-09-19 16:58:23 +01:00
Matthias Clasen
174ebaefcc gresource: Make extract work better
When no section is specified, look for the resource to extract
in all sections - previously, we would stop after the first
section.
2014-09-18 15:26:36 -04:00
Matthias Clasen
5c951e5b04 gresource: Use GError in more places
The API gives us an error message, lets use it.
2014-09-18 14:52:03 -04:00
Sébastien Wilmet
dfaaf37338 Update URLs library.gnome.org -> developer.gnome.org 2014-09-18 20:32:43 +02:00
Мирослав Николић
4fb9421528 Updated Serbian translation 2014-09-17 21:11:50 +02:00
Sandeep Sheshrao Shedmake
5486481fab Updated Marathi Translations 2014-09-17 10:30:43 +05:30
Jasper St. Pierre
38a0614225 GApplication:handle-local-options: document return value
The return value for this signal was documented in the prose, but not
properly in a Returns: stanza.  Fix that.
2014-09-16 17:49:49 -04:00
Jasper St. Pierre
8061694c49 goption: Add G_OPTION_FLAG_NONE
This is helpful to better document code, as G_OPTION_FLAG_NONE is more
readable than 0.
2014-09-16 17:49:40 -04:00
Jasper St. Pierre
84ec6b4d78 g_application_add_main_option: fix type signature
The flags argument is a GOptionFlags so use that type instead of 'int'.
2014-09-16 17:48:49 -04:00
Jasper St. Pierre
4482977238 Fix some introspection warnings 2014-09-16 14:52:21 -06:00
Matthias Clasen
0177cece40 2.41.5 2014-09-15 15:52:48 -04:00
Sebastian Dröge
bb6a77afa3 grand: Only use rand_s() when targetting Visual Studio >= 2005
It did not exist before. Fall back to the current time plus
process id on older targets. This makes GLib work again on
Windows XP.

https://bugzilla.gnome.org/show_bug.cgi?id=736458
2014-09-15 22:25:08 +03:00
Shantha kumar
f2b5edb652 Updated Tamil translation 2014-09-15 13:39:11 +00:00
Matej Urbančič
27405ae878 Updated Slovenian translation 2014-09-14 22:18:09 +02:00
Sébastien Wilmet
25990eb2b6 docs: various small fixes
For the GPtrArray example, several variables declared on the same line
is harder to read and to work with (to move, remove or comment a single
variable declaration).
2014-09-13 16:59:31 +02:00
Shankar Prasad
fdc5b8f744 Updated Kannada translation 2014-09-12 12:58:11 +00:00
Chun-wei Fan
d2f3e11907 MSVC Builds: Update "Installation"
This updates the glib-install.[props|vsprops] so that the headers to
"install" for the build are kept up-to-date.  Note that this has been
generated by a script, so that this hopefully means that the header
"installation" can be maintained along with the autotools files for most
uses, to simplify maintenance.
2014-09-12 15:51:49 +08:00
Balázs Úr
0c5ed58342 Updated Hungarian translation 2014-09-11 16:40:14 +00:00
Sebastian Dröge
bebfd422af gutils: Don't use issetugid() on Android
Android had it in older versions but the new 64 bit ABI does not
have it anymore, and some versions of the 32 bit ABI neither.

https://code.google.com/p/android-developer-preview/issues/detail?id=168

https://bugzilla.gnome.org/show_bug.cgi?id=736351
2014-09-11 11:07:48 +03:00
Ryan Lortie
3b8bc8bacf GDesktopAppInfo: avoid inotify on missing dirs
Some desktop file directories, like /usr/local/share/applications may be
missing on some systems.

When we try to inotify on these directories, this will result in a
every-4-seconds poll being setup which is quite bad.

This is an issue that should be fixed in inotify itself but the problem
is much larger there.  For now, we can work around it in GDesktopAppInfo
by refusing to monitor missing directories.

We may get some spurious notifications of changes in the case that
/usr/local/share or /usr/local/share/applications is created without
actually adding desktop files, but spurious changes can already be
reported in other cases, so that's OK.  We won't get (user-visible)
notification for a simple case of a completely unrelated file being
created (however we cannot avoid the wakeup in this case due to how
inotify works).  That's probably pretty theoretical, though, since files
in /usr don't change much and for the home directory we're likely to
have at least ~/.config and ~/.local existing.

https://bugzilla.gnome.org/show_bug.cgi?id=736350
2014-09-09 14:11:38 -04:00
Ryan Lortie
2f55c66c64 apps test: add new "monitor" subcommand
Waits until something modifies a desktop directory, then exits.

https://bugzilla.gnome.org/show_bug.cgi?id=736350
2014-09-09 14:11:38 -04:00
Yuri Myasoedov
9ac7d51a80 Updated Russian translation 2014-09-09 17:04:40 +04:00
Paolo Borelli
8df2cca08a Fix minor mem leak in test case 2014-09-08 08:19:25 +02:00
Paolo Borelli
5bb62d077b GThreadPool: expand g_thread_pool_new docs 2014-09-08 08:19:25 +02:00
Matthias Clasen
aef0e4b7f3 Fix docs to talk about --enable-coverage
The configure options to turn on coverage testing got renamed
at some point, but the docs were not updated. Fix that.

https://bugzilla.gnome.org//show_bug.cgi?id=735915
2014-09-07 22:50:36 -04:00
Rūdolfs Mazurs
281fdd372e Updated Latvian translation 2014-09-07 12:55:20 +03:00
Fran Diéguez
09979125d8 Updated Galician translations 2014-09-04 21:35:07 +02:00
Ryan Lortie
08efbda733 GDesktopAppInfo: fix default app logic
We use "tweaks" structures to track how a particular directory impacts
the list of added, removed and default applications.  We maintain this
set of tweaks for each directory, in a hash table, keyed by unaliased
mime type name, in order to facilitate fast lookups.

A typo in the logic for creating and maintaining the uniqueness of these
structures was causing the default app to be selected incorrectly from
time to time.  Fix that.
2014-09-04 14:48:05 -04:00
Patrick Welche
e763d93456 GCredentials: credentials messages are not correctly supported on NetBSD
https://bugzilla.gnome.org/show_bug.cgi?id=735819
2014-09-04 08:26:27 -04:00
Andika Triwidada
7dd3397820 Updated Indonesian translation 2014-09-03 13:49:48 +00:00