summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* meson: Fix glib, add gobject, gio, gthread, gmodule, etcTim-Philipp Müller2017-05-1320-304/+3405
| | | | | | Several small fixes to the build files. Lots of tests have also been added, and glib tests pass now.
* meson: initial glib buildJussi Pakkanen2017-05-134-0/+869
| | | | https://mail.gnome.org/archives/gtk-devel-list/2013-August/msg00001.html
* gdbus: fix use-after-freeLars Uebernickel2017-05-121-4/+2
| | | | | | | | | | | | g_dbus_connection_call_internal() accesses the user data it passes to g_dbus_connection_send_message_with_reply() after the call. That data might be freed already in the case that the callback is called immediately. Fix this by removing the 'serial' field from the user data altogether and fetch the serial from the message in the callback. https://bugzilla.gnome.org/show_bug.cgi?id=748263
* Update German translationMario Blättermann2017-05-121-150/+138
|
* array-test: Fix a commentDaniel Boles2017-05-121-1/+1
|
* gstrfuncs: Fix translation issuesKrzesimir Nowak2017-05-101-6/+14
| | | | | | The tool that extracts the translatable strings to .po files does not cope with the G_GUINTX_FORMAT macros, so we preformat the numbers to strings and use the strings in the translatable error messages.
* Update POTFILES.inPiotr Drąg2017-05-101-0/+1
|
* docs: Fix typosKrzesimir Nowak2017-05-102-2/+2
| | | | Something I spotted by accident with git log.
* docs: Add index for 2.54 apiKrzesimir Nowak2017-05-101-0/+4
|
* gstrfuncs: Add replacement for string-to-number functionsKrzesimir Nowak2017-05-104-0/+486
| | | | | | | | | | | | | | | Very often when we want to convert a string to number, we assume that the string contains only a number. We have g_ascii_strto* family of functions to do the conversion but they are awkward to use - one has to check if errno is zero, end_ptr is not NULL and *end_ptr points to the terminating nul and then do the bounds checking. Many projects need this kind of functionality, so it gets reimplemented all the time. This commit adds some replacement functions that convert a string to a signed or unsigned number that also follows the usual way of error reporting - returning FALSE on failure and filling an error output parameter.
* win32/replace.py: Fix replacing items in files with UTF-8 contentChun-wei Fan2017-05-091-2/+8
| | | | | | | | | Some files that this script will process might have UTF-8 items in there, which can cause problems on Python 3.x as it is more strict and careful on unicode issues. Fix this by: -Doing what we did before on Python 2.x -Open the file with encoding='utf-8' on Python 3.x
* gmodule – Don't use RTLD_DEFAULT on Android for g_module_self() on Android ↵Sebastian Dröge2017-05-091-3/+15
| | | | | | | | | | | | | | | | 64 bit On 64 bit Android this is #defined to 0, which is considered an invalid library handle in all other cases. RTLD_DEFAULT is only supposed to be used with dlsym() it seems, and the usage here was just an "optimization" before. By dlopen'ing NULL, we get the same on all 64 bit Android variants and it actually works instead of erroring out. On 32 bit Android, dlopen() of NULL unfortunately usually gives us something useless that finds no symbols whatsoever. https://bugzilla.gnome.org/show_bug.cgi?id=776876
* gmodule – Check for RTLD_LAZY and others in configureSebastian Dröge2017-05-092-3/+14
| | | | | | | They are no #defines on Android but enum values, and on 64 bit Android they have different values than what we would otherwise fall-back to. https://bugzilla.gnome.org/show_bug.cgi?id=776876
* gunixmounts: Prevent unwanted automount requestsOndrej Holy2017-05-091-3/+0
| | | | | | | | | | | | mnt_table_is_fs_mounted causes unwanted automount requests due to canonicalization of source and target. It might be replaced by mnt_table_find_source as per the documentation in order to prevent the automounts, but it is redundant. All mtab entries should be already mounted and thus mnt_table_is_fs_mounted result is always true (it basically checks that the fs from mtab is in mtab). Let's remove the check at all. https://bugzilla.gnome.org/show_bug.cgi?id=781867
* gunixmounts: Speed up mtab processing with libmountOndrej Holy2017-05-091-10/+6
| | | | | | | | libmnt_context is useless. It contains cache which is useful for searching, but it isn't used in our case. Let's use mnt_context_parse_mtab instead directly and the mtab processing will be faster. https://bugzilla.gnome.org/show_bug.cgi?id=781867
* tests: Improve error handling for fileutils testPhilip Withnall2017-05-081-1/+2
| | | | | | | | | | | | The test_stdio_wrappers() test will spuriously fail if the mkdir-test directory already exists and is non-empty, which can happen if a previous test run has failed and left a coredump file in the directory. Tighten up the error checking around the pre-test rmdir() call to catch this failure. Signed-off-by: Philip Withnall <withnall@endlessm.com> https://bugzilla.gnome.org/show_bug.cgi?id=782237
* tests: Update g_assert()s in fileutils test to be more descriptivePhilip Withnall2017-05-071-67/+67
| | | | | | | | | Use the new g_assert_{non,}null(), g_assert_cmpint(), g_assert_true(), etc., to get more descriptive output when the tests fail. Signed-off-by: Philip Withnall <withnall@endlessm.com> https://bugzilla.gnome.org/show_bug.cgi?id=782237
* gtimer: Handle gmtime() failure in g_time_val_to_iso8601()Philip Withnall2017-05-051-1/+12
| | | | | | | | | | | g_time_val_to_iso8601() has a limit to the future dates it can convert, imposed by what gmtime() can fit in its year field. If gmtime() fails, gracefully return NULL from g_time_val_to_iso8601() rather than trying to dereference the NULL structure and crashing. Signed-off-by: Philip Withnall <withnall@endlessm.com> https://bugzilla.gnome.org/show_bug.cgi?id=782075
* gdatetime: Fix overflow checks when constructing from timestampsPhilip Withnall2017-05-052-0/+93
| | | | | | | | | | | | | | | GDateTime does overflow checks to see if the timestamp being passed in is too big to be represented. However, it only does those after converting from a timestamp to an interval, which involves some multiplications and additions — and hence can overflow, and cause the later bounds check to erroneously succeed. This results in a non-NULL GDateTime being returned which represents completely the wrong date. Fix the overflow checks (do them earlier) and add some unit tests. Signed-off-by: Philip Withnall <withnall@endlessm.com> https://bugzilla.gnome.org/show_bug.cgi?id=782089
* Revert "ginputstream: Add missing (out) annotations to read() functions"Rico Tzschichholz2017-05-041-8/+8
| | | | This reverts commit 8446ee8c2039f233c084f0321f52f664941e4186.
* build: Bump version to 2.53.2Jonh Wendell2017-05-041-1/+1
| | | | So that early adopters of new API have a version number to target.
* gdatetime: Remove an unnecessary NULL pointer checkPhilip Withnall2017-05-021-4/+1
| | | | | | | datetime->tz can never be NULL, so this pointer check is unnecessary and confusing, and messes up static analysis. https://bugzilla.gnome.org/show_bug.cgi?id=732000
* ghash: Document that GHashTable is not suitable for static hash tablesPhilip Withnall2017-05-021-0/+4
| | | | | | | | Instead, gperf should be used for that kind of thing. Inspired by http://stackoverflow.com/q/42372382/2931197. Signed-off-by: Philip Withnall <withnall@endlessm.com>
* garray: Add g_ptr_array_find[_with_equal_func]()Philip Withnall2017-05-024-0/+142
| | | | | | | | | Partially based on telepathy-glib’s tp_g_ptr_array_contains(), and a patch by Xavier Claessens <xavier.claessens@collabora.co.uk>. Test cases included. https://bugzilla.gnome.org/show_bug.cgi?id=698064
* gtimer: Whitespace fixesPhilip Withnall2017-05-021-3/+3
| | | | Signed-off-by: Philip Withnall <withnall@endlessm.com>
* gvariant: Fix the max unsigned 64-bit integer valueKrzesimir Nowak2017-05-021-2/+3
| | | | | | It should be 2^64-1, not just 2^64. Reviewed-by: Philip Withnall <philip@tecnocode.co.uk>
* Small documentation additionsMatthias Clasen2017-05-022-2/+9
| | | | | | The GNetworkMonitor docs were talking about one implementation, omitting the others. While fixing that, add a bit about implementations to the GProxyResolver docs too.
* portal support: Raise the priority for network monitorMatthias Clasen2017-05-021-1/+1
| | | | | | | | | When we are inside a sandbox, we want to use the portal implementation, since it is the only one that has a chance of working. This is safe to do, since the portal implementation will just fail initialization when loaded outside a sandbox.
* gportalsupport: Fix compilation failure from previous commitPhilip Withnall2017-05-011-1/+3
| | | | | | Igor says: Thith code did not path the compilation check. Signed-off-by: Philip Withnall <withnall@endlessm.com>
* portal support: Read /.flatpak-infoMatthias Clasen2017-05-011-6/+1
| | | | | | | | | The flatpak-info file was moved to a different location a while ago, we should read it from there instead of relying on the compat symlink. One advantage is that this is a fixed, short path, we don't have to construct one dynamically. https://bugzilla.gnome.org/show_bug.cgi?id=781826
* docs: Remove some extraneous words from g_settings_sync() documentationPhilip Withnall2017-04-301-2/+1
| | | | | | | Looks like the author started typing one thing, then changed their mind about how to phrase the sentence, and typed something else. Signed-off-by: Philip Withnall <philip@tecnocode.co.uk>
* docs: Add an example for using the g_spawn_*() APIsPhilip Withnall2017-04-301-4/+48
| | | | | | | | And clarify that you must add a child watch or *not* use the G_SPAWN_DO_NOT_REAP_CHILD flag, otherwise your child will become a zombie on exit, and will not be reaped until the parent process exits. Signed-off-by: Philip Withnall <philip@tecnocode.co.uk>
* gappinfo: Clear previously set error before calling portalTimm Bäder2017-04-291-1/+6
| | | | | | | | Otherwise, we might end up returning TRUE from g_app_info_launch_default_for_uri but with a set error parameter. This will lead to confusing results depending on how the caller checks for errors. Checking error != NULL indicats the call failed but checking the return value indicates that it succeeded.
* tests: Fix g_content_type_is_mime_type() test on OSXPatrick Griffis2017-04-291-1/+1
| | | | | | It should be passed a mime type not a content type. https://bugzilla.gnome.org/show_bug.cgi?id=734946
* genmarshal: Always generate the prototypes in the bodyEmmanuele Bassi2017-04-281-4/+12
| | | | | | | | This way code that does not manually include the generated marshallers header and wishes to build with `-Wmissing-prototypes` will not generate a compiler warning. https://bugzilla.gnome.org/show_bug.cgi?id=781755
* genmarshal: Use fewer magic numbersEmmanuele Bassi2017-04-281-2/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=781755
* genmarshal: Constify global variablesEmmanuele Bassi2017-04-281-2/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=781755
* genmarshal: Conform --help output to conventionsEmmanuele Bassi2017-04-281-2/+2
| | | | | | | | | | The convention for arguments taking a value is: --argument=VALUE with the `VALUE` in caps. https://bugzilla.gnome.org/show_bug.cgi?id=781755
* gdbusmessage: Don’t use major()/minor() if they’re unavailabledeclan2017-04-281-0/+6
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=777030
* docs: Fix (nullable) (optional) annotationsPhilip Withnall2017-04-286-14/+14
| | | | | | | | | | | | | | | | | There are a few places where commit 18a33f72 replaced valid (nullable) (optional) annotations with just (optional). That has a different meaning. (nullable) (optional) can only be applied to gpointer* parameters, and means that both the gpointer* and returned gpointer can be NULL. i.e. The caller can pass in NULL to ignore the return value; and the returned value can be NULL. (optional) can be applied to anything* parameters, and means that the anything* can be NULL. i.e. The caller can pass in NULL to ignore the return value. The return value cannot be NULL. Signed-off-by: Philip Withnall <withnall@endlessm.com>
* gdbusconnection: Add some comments about object ownershipPhilip Withnall2017-04-281-5/+6
| | | | | | | Some annotations I made while trying to debug bug #781847. They introduce no behavioural changes. Signed-off-by: Philip Withnall <withnall@endlessm.com>
* Implement g_content_type_is_mime_type() (clone of win32's)Daniel Macks2017-04-281-0/+17
| | | | | | | Add missing function, copying from gcontenttype-win32.c per Patrick Griffis (Comment #55 of bug report) https://bugzilla.gnome.org/show_bug.cgi?id=734946
* Add test-case for g_content_type_is_mime_type()Daniel Macks2017-04-281-0/+1
| | | | | | Verify presence of new interface. https://bugzilla.gnome.org/show_bug.cgi?id=734946
* gosxappinfo: fix typo in g_osx_app_info_launch_internalRafal Luzynski2017-04-281-1/+2
| | | | | | Correct error domain is G_IO_ERROR. https://bugzilla.gnome.org/show_bug.cgi?id=734946
* gosxappinfo: Special case x-scheme-handlerPatrick Griffis2017-04-281-8/+21
| | | | | | This is the only way they are exposed on Unix so we need to handle it https://bugzilla.gnome.org/show_bug.cgi?id=734946
* gosxappinfo: Fix get_default_for_type() on 10.10+Patrick Griffis2017-04-281-14/+31
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=734946
* build: Don't build dbus-appinfo on OSXPatrick Griffis2017-04-271-1/+5
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=780309
* gvariant: Fix some typos in documentationKrzesimir Nowak2017-04-273-11/+10
| | | | | | | | | | | | | | Reformatted the docs for G_VARIANT_TYPE_UINT64 to avoid having a number in the beginning of the line, because apparently gtk-doc treats that as a first element of the numbered list. The number being that big probably makes gtk-doc to treat it as 1. Fixed the g_variant_new_fixed_array documentation - it was partially copy-pasted from the g_variant_get_fixed_array documentation. The rest should be quite obvious. https://bugzilla.gnome.org/show_bug.cgi?id=781830
* gosxappinfo: Fix typo in ifdefPatrick Griffis2017-04-271-2/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=780300
* Update Spanish translationDaniel Mustieles2017-04-261-578/+634
|