summaryrefslogtreecommitdiff
path: root/gio
Commit message (Collapse)AuthorAgeFilesLines
* 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
* 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.
* gdbus: Fix memory leak in gdbusmethodinvocation.cAlexandros Frantzis2017-04-051-0/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=780924
* 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
* 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>
* gobject: Fix Since/Deprecated versions for GParameter replacement APIPhilip Withnall2017-03-314-4/+4
| | | | | | This slipped through the review cracks. https://bugzilla.gnome.org/show_bug.cgi?id=709865
* gio: Fix deprecation warnings for g_object_newv() APIPhilip Withnall2017-03-313-1/+6
|
* gio: Deprecate GParameter-related functionsFabian Orccon2017-03-314-2/+7
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=709865
* gosxappinfo: fix typo in url_escape_hostnameChristoph Reiter2017-03-301-1/+1
| | | | | | This duplicated everything after the hostname. https://bugzilla.gnome.org/show_bug.cgi?id=734946
* gosxappinfo: Fix launching default applicationsPatrick Griffis2017-03-301-1/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=734946
* ginitable: Relax idempotency requirements on init() and init_async()Philip Withnall2017-03-302-10/+29
| | | | | | | | | | | | | The previously documented requirements for implementing init() and init_async() as completely idempotent were really quite hard to achieve, and brought a lot of pain for very little gain. Many implementations of GInitable and GAsyncInitable did not actually follow the requirements, or did not correctly handle concurrent init_async() calls. Relax those requirements so that classes can decide whether their init() or init_async() implementations need to be idempotent. https://bugzilla.gnome.org/show_bug.cgi?id=766660
* Make GUnixMountEntry and GUnixMountPoint boxed typesChristoph Reiter2017-03-282-6/+80
| | | | | | And unskip some functions using them. https://bugzilla.gnome.org/show_bug.cgi?id=668962
* gdbus-tool: Add a command to wait for a well-known name on the busPhilip Withnall2017-03-281-1/+248
| | | | | | | | | | | | | | | | | This is effectively the mc-wait-for-name tool from telepathy-mission-control; moving it in to gdbus-tool will make it more widely useful without making people depend on telepathy-mission-control for no other reason. The code here is reimplemented from scratch to use GDBus. It blocks until the specified well-known name is owned by some process on the bus (which can be the session, system, or any other bus). By passing --activate, the same (or a different) name can be auto-started on the bus first. A timeout can be specified to ensure the process doesn’t block forever. https://bugzilla.gnome.org/show_bug.cgi?id=745971
* gdbusprivate: Include a few headers to fix win32 buildColin Walters2017-03-271-0/+2
| | | | | | Followup to previous commit. See: https://bugzilla.gnome.org/show_bug.cgi?id=674885
* gdbus: Initialize types earlier to break proxy <-> connection deadlockColin Walters2017-03-271-4/+7
| | | | | | | | | | | | | This will help us break generic GType deadlocks between people using GDBus in different threads (which is supported), not just by GType usage in the GDBus thread. This should fix the common cases we're seeing in the wild, although I have some lingering concerns that if someone e.g. referenced e.g. `G_TYPE_DBUS_AUTH_MECHANISM_SHA1` etc. we'd need to add those too. https://bugzilla.gnome.org/show_bug.cgi?id=674885
* gdbus: Initialize types at async entrypointsINSUN PYO2017-03-272-0/+19
| | | | | | | This isn't a comprehensive fix, but should cover a lot of cases for GDBus. https://bugzilla.gnome.org/show_bug.cgi?id=674885
* gosxcontenttype: Fix various testsPatrick Griffis2017-03-262-9/+49
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=780384
* build: Skip gdesktopappinfo tests on OSXPatrick Griffis2017-03-261-0/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=780384
* appinfo: Only use portal as fallbackFlorian Müllner2017-03-251-5/+8
| | | | | | | | | | | | | | We currently assume that the OpenURI portal should be used unconditionally when running inside a flatpak sandbox. While the portal is what we usually want, there are exceptions: Yelp is now included in the GNOME runtime to allow displaying help without exporting the user documentation, and the sandboxed app itself may register a scheme handler. To account for those cases transparently, always try the normal code path first and only fall back to calling the portal when that fails. https://bugzilla.gnome.org/show_bug.cgi?id=780471
* gio-querymodules: fix memory leakMarc-André Lureau2017-03-241-0/+1
| | | | | | | | Spotted thanks to ASAN. https://bugzilla.gnome.org/show_bug.cgi?id=778207 Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
* gio: Drop redundant g_source_is_destroyed() callsPhilip Withnall2017-03-232-4/+2
| | | | | | | | | | | | | | | | | These calls cause race warnings from tsan, but are not a thread safety problem, because we can only ever observe single bit changes: all modifications to the GSource.flags field are done with a lock held; all reads are of independent fields, so no intermediate state can ever be observed. This assumes that a non-atomic read will consistently give us an old value or a new value. In any case, these g_source_is_destroyed() calls can happen from any thread, and the state could be changed from another thread immediately after the call returns; so the checks are pointless. In addition, calling g_source_set_ready_time() or g_source_destroy() on a destroyed source is not a problem. https://bugzilla.gnome.org/show_bug.cgi?id=778049
* appinfo: Don't hardcode strings for the OpenURI portal's D-Bus methodMario Sanchez Prada2017-03-231-4/+4
| | | | We added several #define in the previous commit, so use those instead.
* appinfo: Launch the OpenURI portal using a synchronous D-Bus callMario Sanchez Prada2017-03-231-21/+103
| | | | | | | | | | | | | | Calling the D-Bus method for the OpenURI portal "protects" the logic from not ever having the remote method running in case the xdg-desktop-portal process is not yet running and the caller quits quickly after the call. This should not be a problem as the method returns immediately (regardless of the user making a selection), but making it synchronous would prevent situations where the OpenURI method would never be called because of D-Bus dropping the message after the caller dies, without explicitly waiting for a reply. https://bugzilla.gnome.org/show_bug.cgi?id=780441
* appinfo: Don't leak the session bus in launch_default_with_portal_asyncMario Sanchez Prada2017-03-231-0/+1
| | | | The session bus object needs to be unreferenced before early returning.
* gio/fam: Remove leftover debug printColin Walters2017-03-161-2/+0
| | | | | | | | | | This leftover debug print was introduced by d682df186e9cca2b8db0e921450a4db31cf0c467 and is obviously bad for applications that are expecting something else on stdout, etc. See: https://bugzilla.redhat.com/show_bug.cgi?id=1396386 https://bugzilla.gnome.org/show_bug.cgi?id=780144
* docs: Fix some DocBook usage in a few gtk-doc commentsPhilip Withnall2017-03-163-4/+3
| | | | | | <emphasis> and <ulink> tags. Replace them with Markdown. Signed-off-by: Philip Withnall <withnall@endlessm.com>
* Use single non-Unicode quotation marks in a new translatable messagePiotr Drąg2017-03-141-1/+1
| | | | | | | Actually, Unicode changes to this file got reverted in 2d56c49b1085ae3ad769e6b59329cf493eb0f8a1. Also, there is "No such interface '%s'" string already, so we avoid breaking the string freeze.
* Use consistent quotation marks in a new translatable messagePiotr Drąg2017-03-141-1/+1
| | | | | Double quotation marks are used everywhere else in glib, as per <https://developer.gnome.org/hig/stable/typography.html>.
* gsubprocess: Add missing G_GNUC_NULL_TERMINATED attributePhilip Withnall2017-03-141-1/+1
| | | | | | | | | g_subprocess_launcher_spawn() is NULL-terminated, and must have a non-NULL argv0 specified, so G_GNUC_NULL_TERMINATED is appropriate here. Signed-off-by: Philip Withnall <withnall@endlessm.com> https://bugzilla.gnome.org/show_bug.cgi?id=780032
* gdbusmessage: Add missing G_GNUC_PRINTF attributePhilip Withnall2017-03-142-2/+2
| | | | | | | | | This highlighted a bug in GDBusConnection, where an interface name was not included in a message referring to it. Signed-off-by: Philip Withnall <withnall@endlessm.com> https://bugzilla.gnome.org/show_bug.cgi?id=780032
* Visual Studio builds: Fix gio project generationChun-wei Fan2017-03-141-0/+1
| | | | We need to include gcontenttype-win32.c in our Visual Studio projects...
* Fix distcheck2.51.5Matthias Clasen2017-03-131-1/+1
| | | | Typo in the win32 source list...
* Implement GAppInfo on OSXTingPing2017-03-135-9/+786
| | | | | | | | | | | This is an implementation of most of GAppInfo using the OS X NSBundle APIs. Missing at this point are things that don't have equivalents in OS X, such as hidden desktop files, last-used, manual type associations, and g_app_info_get_all(). https://bugzilla.gnome.org/show_bug.cgi?id=734946
* Implement GContentType on OSXTingPing2017-03-134-5/+449
| | | | | | | | | | This is an implementation of most of GContentType using the OS X UTType APIs. Missing at this point is an implementation of g_content_types_get_registered() and g_content_type_guess_for_tree(). https://bugzilla.gnome.org/show_bug.cgi?id=734946
* gio: Always purge kqueue subs from missing listSteven McDonald2017-03-091-10/+5
| | | | | | | | | | | | | | Previously, _kh_cancel_sub assumed that it only needed to call _km_remove if sub did not exist in subs_hash_table. This is erroneous because the complementary operation, _km_add_missing, can be called from process_kqueue_notifications, in which context sub can *only* have come from subs_hash_table. Since _km_remove is implemented using g_slist_remove, which is documented to be a noop if the list does not contain the element to be removed, it is safe to call _km_remove unconditionally here. https://bugzilla.gnome.org/show_bug.cgi?id=778515
* Create g_content_type_is_mime_type()TingPing2017-03-083-0/+40
| | | | | | Convenience wrapper around g_content_type_is_a(). https://bugzilla.gnome.org/show_bug.cgi?id=734946
* Fix a typoMatthias Clasen2017-03-081-1/+1
|
* Add a forgotten g_type_ensure callMatthias Clasen2017-03-081-1/+1
| | | | | One of the types in this function was not wrapped in a g_type_ensure_call, an obvious oversight.
* Enable building gcocoanotification only if OS X min version >= 10.9John Ralls2017-03-082-2/+8
| | | | | | | This changes the configure checks to check for what is actually required to build this code. https://bugzilla.gnome.org/show_bug.cgi?id=747146
* Add some more cases to the app-id unit testsMatthias Clasen2017-03-051-0/+3
| | | | These came up on irc today.
* tests: Fix some memory leaks in the GSettings unit testsPhilip Withnall2017-02-281-0/+3
| | | | | | Signed-off-by: Philip Withnall <withnall@endlessm.com> https://bugzilla.gnome.org/show_bug.cgi?id=779265