summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* 2.53.12.53.1Matthias Clasen2017-04-252-1/+61
|
* gmain: Allow GSource methods to be called from a finalize() callbackPhilip Withnall2017-04-252-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Temporarily increase the ref count of a GSource to 1 while calling its finalize() callback, so that the finalize() implementation can call GSource methods (like g_source_set_ready_time()) without causing critical warnings. It’s safe to call those methods at this point, as the source has been destroyed, but nothing has been freed. This is an indirect way of fixing a race between GCancellable and GCancellableSource, whereby the GCancellable::cancelled callback for the GCancellableSource is not disconnected until the GCancellableSource’s finalize() function is called. Previously, this meant there was a window in which the GCancellableSource’s ref count was 0, but the ::cancelled callback was still connected, and could legitimately be called as a result of another thread calling g_cancellable_cancel() on the GCancellable. The callback calls g_source_set_ready_time() on the GSource, and there’s no thread-safe way of checking whether the GSource has been destroyed. Instead, we have to change GSource so its ref count is only decremented to 0 inside the locked section in g_source_unref_internal() *after* the finalize() function has been called, and hence after the GCancellable::cancelled callback has been disconnected. The use of g_cancellable_disconnect() ensures that the callback disconnection is thread safe. Signed-off-by: Philip Withnall <withnall@endlessm.com> https://bugzilla.gnome.org/show_bug.cgi?id=781601
* Updated Lithuanian translationAurimas Černius2017-04-241-296/+349
|
* Update German translationFlorian Heiser2017-04-221-292/+325
|
* Update Catalan translationJordi Mas2017-04-191-82/+62
|
* Update Indonesian translationAndika Triwidada2017-04-181-309/+337
|
* gmessages: Fix documentation formattingPhilip Withnall2017-04-181-2/+2
|
* Do not mix declarations with code.John Lindgren2017-04-141-2/+6
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=781298
* ginputstream: Add missing (transfer full) annotation to read_bytes()Philip Withnall2017-04-131-2/+2
|
* ginputstream: Add missing (out) annotations to read() functionsPhilip Withnall2017-04-131-8/+8
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=781234
* gio: Fix some typos of ‘asynchronous’ in documentation commentsPhilip Withnall2017-04-132-3/+3
|
* gmain: only signal GWakeup right before or during a blocking pollPaolo Bonzini2017-04-111-11/+19
| | | | | | | | | | | | | | | | | | | Since commit e4ee307 ("Do not wake up main loop if change is from same thread", bug 761102), GMainContext uses context->owner to decide if the event loop is being run in the current thread. However, what really matters is the phase in the prepare/query/poll/check/dispatch sequence. Wakeups are only needed between the end of prepare and the end of poll, and then only if prepare found that no sources were ready. There is no need to take threads into account, because prepare, check and all callers of conditional_wakeup all look at the new need_wakeup flag inside LOCK_CONTEXT/UNLOCK_CONTEXT. With this change, g_main_context_is_owner and g_main_context_wait are the only functions for which acquire/release matters, just like before commit e4ee307. Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
* gmain: Signal wakeups if context has never been acquired as wellPaolo Bonzini2017-04-111-1/+11
| | | | | | | | | Should address backwards compatibility with how qemu is using `GMainContext`. See https://bugzilla.gnome.org/show_bug.cgi?id=761102#c14 Input-into-keyboard-by: Colin Walters <walters@verbum.org>
* gio-tool: Fix errors format stringVíctor Manuel Jáquez Leal2017-04-105-18/+9
| | | | | | | | | | | | | | | | | | | | | | Compiling with clang 3.8.1-18 (debian, x86_64) I ran across this error: gio-tool.c:40:31: error: format string is not a string literal [-Werror,-Wformat-nonliteral] message = g_strdup_vprintf (format, args); ^~~~~~ gio-tool.c:55:31: error: format string is not a string literal [-Werror,-Wformat-nonliteral] message = g_strdup_vprintf (format, args); ^~~~~~ 2 errors generated. To fix the first one, related with the function print_error(), this patch adds to the function prototype a compiler's attribute. For the second one, since the usage of that function is to print one string and the format is already provided, the patch simplifies the function by no receiving variadic arguments. https://bugzilla.gnome.org/show_bug.cgi?id=781125
* gio-tool: Fix closing Unicode quotation markPiotr Drąg2017-04-101-1/+1
| | | | | | See https://developer.gnome.org/hig/stable/typography.html https://bugzilla.gnome.org/show_bug.cgi?id=772221
* Drop trailing semi-colon from G_DEFINE_ macroEmmanuele Bassi2017-04-1061-122/+112
| | | | | | | | It's unnecessary, and only adds visual noise; we have been fairly inconsistent in the past, but the semi-colon-less version clearly dominates in the code base. https://bugzilla.gnome.org/show_bug.cgi?id=669355
* gio-tool: Do not leak GOptionContextOndrej Holy2017-04-1016-0/+52
| | | | | | | GOptionContext is freed only in case of success. Free the context also in case of failure. https://bugzilla.gnome.org/show_bug.cgi?id=776169
* gio-tool: Add g_drive_is_removable() supportOndrej Holy2017-04-101-0/+1
| | | | | | | | The g_drive_is_removable() support was added recently in gio/gvfs (see Bug 765900 and Bug 765457). It was also added in gvfs-mount, but we forgot to add it also in gio-tool-mount. https://bugzilla.gnome.org/show_bug.cgi?id=776169
* gio-tool: Return error if there are not any volumes to mountOndrej Holy2017-04-101-2/+2
| | | | | | | Print error and return error code if device doesn't contain any volumes to mount. https://bugzilla.gnome.org/show_bug.cgi?id=776169
* gio-tool: Do not print settable arguments unless they are anyOndrej Holy2017-04-101-8/+11
| | | | | | | | "Settable arguments:" is printed even if they are not any arguments to print. Do not print it similarly as it is done for "Writable namespaces:". https://bugzilla.gnome.org/show_bug.cgi?id=776169
* gio-tool: Various memory leak fixesOndrej Holy2017-04-103-2/+8
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=776169
* gio-tool: Various fixes related to error messagesOndrej Holy2017-04-1012-52/+83
| | | | | | | | | | | | | This patch contains the following changes: - Print all errors with "gio: " prefix - Print file uri in error for each tool allowing multiple locations - Mark all error messages translatable - Do not leak strings used in error messages - Always start error messages with capital letter - Unify some error messages across various tools - Fix addional/missing new line characters https://bugzilla.gnome.org/show_bug.cgi?id=776169
* gobject: remove duplicate GType sanity checkTim-Philipp Müller2017-04-081-2/+0
| | | | | | | | | | | This is going to be checked again by g_object_new_with_properties() and g_object_new_valist() anyway, so might just as well leave it to those functions to do the check and only do it once. It doesn't matter which function emits the critical warning in the end either, as one has to look at a stack trace to find out what code triggered it in any case. https://bugzilla.gnome.org/show_bug.cgi?id=780908
* gfileutils: Add precondition checks to g_file_test()Philip Withnall2017-04-081-0/+2
| | | | | | | Otherwise g_file_test(NULL, …) causes a call to access(NULL, …) on Linux, which is disallowed and valgrind complains about it. https://bugzilla.gnome.org/show_bug.cgi?id=755046
* gdbus: fix false positive g_warning() in remove_filter()Ole André Vadla Ravnås2017-04-081-1/+4
| | | | | | | The GDBus thread might be holding a ref while requesting to remove the filter. https://bugzilla.gnome.org/show_bug.cgi?id=779409
* Better documentation for g_app_info_equal()Adrian Perez de Castro2017-04-081-0/+4
| | | | | | | Explicitly state that the function may not compare the contents of the passed GAppInfo instances. This fixes bug #777961.
* g_unix_signal_source_new: Add SIGWINCHJan Alexander Steffens (heftig)2017-04-081-2/+3
| | | | | | Assume this won't go into 2.52 anymore, so say it was added in 2.54. https://bugzilla.gnome.org/show_bug.cgi?id=769534
* gmodule: Remove old win32 codepage ABI compat codeChristoph Reiter2017-04-062-99/+61
| | | | | | | Makes new code link against the normal symbol names again. Variants with utf8 suffix are there for existing binaries/ABI compat. https://bugzilla.gnome.org/show_bug.cgi?id=780634
* gwin32: Remove old win32 codepage ABI compat codeChristoph Reiter2017-04-062-80/+41
| | | | | | | Makes new code link against the normal symbol names again. Variants with utf8 suffix are there for existing binaries/ABI compat. https://bugzilla.gnome.org/show_bug.cgi?id=780634
* gspawn: Remove old win32 codepage ABI compat codeChristoph Reiter2017-04-062-362/+174
| | | | | | | Makes new code link against the normal symbol names again. Variants with utf8 suffix are there for existing binaries/ABI compat. https://bugzilla.gnome.org/show_bug.cgi?id=780634
* giochannel: Remove old win32 codepage ABI compat codeChristoph Reiter2017-04-062-37/+18
| | | | | | | Makes new code link against the normal symbol names again. Variants with utf8 suffix are there for existing binaries/ABI compat. https://bugzilla.gnome.org/show_bug.cgi?id=780634
* gfileutils: Remove old win32 codepage ABI compat codeChristoph Reiter2017-04-062-113/+29
| | | | | | | Makes new code link against the normal symbol names again. Variants with utf8 suffix are there for existing binaries/ABI compat. https://bugzilla.gnome.org/show_bug.cgi?id=780634
* genviron: Remove old win32 codepage ABI compat codeChristoph Reiter2017-04-062-57/+19
| | | | | | | Makes new code link against the normal symbol names again. Variants with utf8 suffix are there for existing binaries/ABI compat. https://bugzilla.gnome.org/show_bug.cgi?id=780634
* gdir: Remove old win32 codepage ABI compat codeChristoph Reiter2017-04-062-77/+25
| | | | | | | Makes new code link against the normal symbol names again. Variants with utf8 suffix are there for existing binaries/ABI compat. https://bugzilla.gnome.org/show_bug.cgi?id=780634
* gconvert: Remove old win32 codepage ABI compat codeChristoph Reiter2017-04-062-131/+59
| | | | | | | Makes new code link against the normal symbol names again. Variants with utf8 suffix are there for existing binaries/ABI compat. https://bugzilla.gnome.org/show_bug.cgi?id=780634
* gdbus: Fix memory leak in gdbusmethodinvocation.cAlexandros Frantzis2017-04-051-0/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=780924
* Visual Studio 201x builds: Fix GIO x64 Debug buildsChun-wei Fan2017-04-051-6/+3
| | | | | | | | The custom build rules did not have rules for x64 Debug builds during the refactoring. Fix this by removing all Platform and Configuration conditions for it, since this is done on are configs in the same manner. Noted by Ignacio Casal Quinteiro.
* gvariant: Minor documentation tweak for g_variant_get_fixed_array()Philip Withnall2017-04-041-2/+2
| | | | | | Add a missing clausal comma, and add some backtick formatting. Signed-off-by: Philip Withnall <withnall@endlessm.com>
* Update Russian translationStas Solovey2017-04-031-886/+1638
| | | | (cherry picked from commit 8c9d02acb7a35b5deedd63b53c03a5b168d91ff5)
* main: Create a helper function for "owner wakeup" optimizationColin Walters2017-04-031-9/+19
| | | | | | | | | The original patch really should have introduced a helper - among other things it deserves a code comment. We're likely to make further changes too, so it's obviously better to only do it in one place. See: https://bugzilla.gnome.org/show_bug.cgi?id=761102
* docs: Clarify the use of the GError in g_tls_database_verify_chain*Debarshi Ray2017-04-031-6/+25
| | | | | | | | | | Being able to determine that a certificate chain is invalid is not considered an error, but success. This might not be obvious at first due to the way the method is named and described currently. Since we cannot change the name, let's improve the description and clarify this aspect of its behaviour. https://bugzilla.gnome.org/show_bug.cgi?id=780310
* datetime: add fallback logic for AM/PM specifierCosimo Cecchi2017-04-031-0/+3
| | | | | | | When the locale does not provide any string for AM/PM, fallback to the default. https://bugzilla.gnome.org/show_bug.cgi?id=761889
* datetime: don't conflate heap/non-heap allocations in same variableCosimo Cecchi2017-04-031-12/+13
| | | | | | Use an extra variable instead of casting out the const specifier. https://bugzilla.gnome.org/show_bug.cgi?id=761889
* datetime: factor out fallback AM/PM functionCosimo Cecchi2017-04-031-5/+13
| | | | | | We will reuse this. https://bugzilla.gnome.org/show_bug.cgi?id=761889
* datetime: factor out a common functionCosimo Cecchi2017-04-031-52/+47
| | | | | | | The 'p' and 'P' cases are exactly the same, except for one line. Factor out a common function for both. https://bugzilla.gnome.org/show_bug.cgi?id=761889
* gio: Handle NULL cached properties in NetworkManager monitorPhilip Withnall2017-04-031-0/+3
| | | | | | | | | | | | g_dbus_proxy_get_cached_property() and g_dbus_proxy_get_cached_property_names() can both return NULL if the property cache is empty. Avoid a crash if this situation arises (which it looks like it could, from reading the code) by gracefully bailing out on NULL return values. Coverity issues: #1257044, #1257045 https://bugzilla.gnome.org/show_bug.cgi?id=741229
* gsocket: Fix potential multiplication overflow calculating timeoutPhilip Withnall2017-04-031-1/+1
| | | | | | | | | | | socket->priv->timeout is only a guint, and the multiplication is performed before it’s widened to gint64 to be stored in start_time (thanks, C). This means any timeout of 50 days or more would overflow. Fixing this bug makes me feel a real sense of self-worth. Coverity ID: 1159478 Signed-off-by: Philip Withnall <withnall@endlessm.com>
* gdbus-tool: Improve --help output for `gdbus wait`Philip Withnall2017-04-031-1/+1
| | | | | | Include a parameter placeholder for the bus name, which is required. Signed-off-by: Philip Withnall <withnall@endlessm.com>
* gdbus-tool: Drop a few lines of dead codePhilip Withnall2017-04-031-4/+0
| | | | | | | | | request_completion is checked several blocks higher in the function. Spotted by Coverity. Coverity ID: 1373215 Signed-off-by: Philip Withnall <withnall@endlessm.com>
* build: Include gettext libraries for static compilation on Mac OS XPhilip Withnall2017-04-031-1/+48
| | | | | | | | | | When compiling statically against the system-provided gettext on Mac OS X, GLib needs to be linked against CoreFramework, which provides some functions used by gettext. Fix this by including the necessary macro magic from upstream gettext. https://bugzilla.gnome.org/show_bug.cgi?id=725894