diff options
author | Hyunjee Kim <hj0426.kim@samsung.com> | 2019-12-03 11:00:55 +0900 |
---|---|---|
committer | Hyunjee Kim <hj0426.kim@samsung.com> | 2019-12-03 11:00:55 +0900 |
commit | 85ef543166f81464323d083c9a21096cc634cad0 (patch) | |
tree | a68d53ee7eb4ff2e4f116e5a9fd69fce3d3059f4 | |
parent | 68bf5c4184c2899c4b0594930c7112d88f15e199 (diff) | |
download | glib-85ef543166f81464323d083c9a21096cc634cad0.tar.gz glib-85ef543166f81464323d083c9a21096cc634cad0.tar.bz2 glib-85ef543166f81464323d083c9a21096cc634cad0.zip |
Imported Upstream version 2.61.2
245 files changed, 10541 insertions, 3049 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d78f8cdb8..b65d80020 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,7 @@ stages: - build - coverage + - analysis - deploy cache: @@ -13,7 +14,7 @@ variables: MESON_COMMON_OPTIONS: "--buildtype debug --fatal-meson-warnings" fedora-x86_64: - image: registry.gitlab.gnome.org/gnome/glib/fedora:v1 + image: registry.gitlab.gnome.org/gnome/glib/fedora:v2 stage: build except: - tags @@ -54,7 +55,7 @@ fedora-x86_64: - "_coverage" debian-stable-x86_64: - image: registry.gitlab.gnome.org/gnome/glib/debian-stable:v1 + image: registry.gitlab.gnome.org/gnome/glib/debian-stable:v3 stage: build except: - tags @@ -83,7 +84,7 @@ debian-stable-x86_64: - "_build/${CI_JOB_NAME}-report.xml" G_DISABLE_ASSERT: - image: registry.gitlab.gnome.org/gnome/glib/fedora:v1 + image: registry.gitlab.gnome.org/gnome/glib/fedora:v2 stage: build except: - tags @@ -226,8 +227,35 @@ freebsd-11-x86_64: - "_build/meson-logs" - "_build/${CI_JOB_NAME}-report.xml" +freebsd-12-x86_64: + stage: build + only: + - branches@GNOME/glib + tags: + - freebsd-12 + variables: + CPPFLAGS: -I/usr/local/include + LDFLAGS: -L/usr/local/lib -Wl,--disable-new-dtags + LANG: en_US.UTF-8 + script: + - meson ${MESON_COMMON_OPTIONS} -Db_lundef=false -Diconv=external -Dxattr=false _build + - ninja -C _build + - bash -x ./.gitlab-ci/run-tests.sh + except: + - tags + artifacts: + reports: + junit: "_build/${CI_JOB_NAME}-report.xml" + name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}" + when: always + paths: + - "_build/config.h" + - "_build/glib/glibconfig.h" + - "_build/meson-logs" + - "_build/${CI_JOB_NAME}-report.xml" + coverage: - image: registry.gitlab.gnome.org/gnome/glib/fedora:v1 + image: registry.gitlab.gnome.org/gnome/glib/fedora:v2 stage: coverage except: - tags @@ -239,6 +267,29 @@ coverage: - bash -x ./.gitlab-ci/coverage-docker.sh coverage: '/^\s+lines\.+:\s+([\d.]+\%)\s+/' +scan-build: + image: registry.gitlab.gnome.org/gnome/glib/fedora:v2 + stage: analysis + except: + - tags + script: + - meson ${MESON_COMMON_OPTIONS} + --werror + --default-library=both + --prefix=$HOME/glib-installed + --libdir=lib + -Dsystemtap=true + -Ddtrace=true + -Dfam=true + -Dinstalled_tests=true + _scan_build + - ninja -C _scan_build scan-build + artifacts: + name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}" + when: always + paths: + - "_scan_build/meson-logs/scanbuild" + pages: stage: deploy only: @@ -250,7 +301,7 @@ pages: - public dist-job: - image: registry.gitlab.gnome.org/gnome/glib/fedora:v1 + image: registry.gitlab.gnome.org/gnome/glib/fedora:v2 stage: build only: - tags diff --git a/.gitlab-ci/README.md b/.gitlab-ci/README.md index 41dfd7559..dc6c82131 100644 --- a/.gitlab-ci/README.md +++ b/.gitlab-ci/README.md @@ -6,18 +6,16 @@ GitLab CI jobs run in a Docker image, defined here. To update that image (perhaps to install some more packages): 1. Edit `.gitlab-ci/Dockerfile` with the changes you want -2. Edit `.gitlab-ci/run-docker.sh` and bump the version in `TAG` -3. Run `.gitlab-ci/run-docker.sh` to build the new image, and launch a shell - inside it - * When you're done, exit the shell in the usual way -4. Run `.gitlab-ci/run-docker.sh --push` to upload the new image to the GNOME - GitLab Docker registry +1. Run `.gitlab-ci/run-docker.sh build --base=debian --base-version=1` to build + the new image (bump the version as needed) +1. Run `.gitlab-ci/run-docker.sh push --base=debian --base-version=1` to upload + the new image to the GNOME GitLab Docker registry * If this is the first time you're doing this, you'll need to log into the registry * If you use 2-factor authentication on your GNOME GitLab account, you'll need to [create a personal access token][pat] and use that rather than your normal password -5. Edit `.gitlab-ci.yml` (in the root of this repository) to use your new +1. Edit `.gitlab-ci.yml` (in the root of this repository) to use your new image [pat]: https://gitlab.gnome.org/profile/personal_access_tokens diff --git a/.gitlab-ci/android-ndk.Dockerfile b/.gitlab-ci/android-ndk.Dockerfile index 0f8840168..9d85a9dfb 100644 --- a/.gitlab-ci/android-ndk.Dockerfile +++ b/.gitlab-ci/android-ndk.Dockerfile @@ -63,7 +63,7 @@ RUN ./android-setup-env.sh arm64 21 RUN ./android-setup-env.sh arm64 28 RUN rm -rf $ANDROID_NDK_PATH -RUN pip3 install meson==0.48.0 +RUN pip3 install meson==0.49.2 ARG HOST_USER_ID=5555 ENV HOST_USER_ID ${HOST_USER_ID} diff --git a/.gitlab-ci/debian-stable.Dockerfile b/.gitlab-ci/debian-stable.Dockerfile index f10ebc071..faaaae039 100644 --- a/.gitlab-ci/debian-stable.Dockerfile +++ b/.gitlab-ci/debian-stable.Dockerfile @@ -1,9 +1,9 @@ -FROM debian:stretch +FROM debian:buster RUN apt-get update -qq && apt-get install --no-install-recommends -qq -y \ bindfs \ clang \ - clang-tools-4.0 \ + clang-tools-7 \ dbus \ desktop-file-utils \ elfutils \ @@ -61,7 +61,7 @@ RUN locale-gen de_DE.UTF-8 \ ENV LANG=C.UTF-8 LANGUAGE=C.UTF-8 LC_ALL=C.UTF-8 -RUN pip3 install meson==0.48.0 +RUN pip3 install meson==0.49.2 ARG HOST_USER_ID=5555 ENV HOST_USER_ID ${HOST_USER_ID} diff --git a/.gitlab-ci/fedora.Dockerfile b/.gitlab-ci/fedora.Dockerfile index debec6812..1c0a39d8b 100644 --- a/.gitlab-ci/fedora.Dockerfile +++ b/.gitlab-ci/fedora.Dockerfile @@ -52,7 +52,7 @@ RUN dnf -y install \ zlib-devel \ && dnf clean all -RUN pip3 install meson==0.48.0 +RUN pip3 install meson==0.49.2 ARG HOST_USER_ID=5555 ENV HOST_USER_ID ${HOST_USER_ID} diff --git a/.gitlab-ci/mingw.Dockerfile b/.gitlab-ci/mingw.Dockerfile index 6bc5c5dd0..19a061a1c 100644 --- a/.gitlab-ci/mingw.Dockerfile +++ b/.gitlab-ci/mingw.Dockerfile @@ -58,7 +58,7 @@ RUN dnf -y install \ WORKDIR /opt COPY cross_file_mingw64.txt /opt -RUN pip3 install meson==0.48.0 +RUN pip3 install meson==0.49.2 ARG HOST_USER_ID=5555 ENV HOST_USER_ID ${HOST_USER_ID} diff --git a/.gitlab-ci/test-msvc.bat b/.gitlab-ci/test-msvc.bat index b2de2baf4..ea1870eab 100644 --- a/.gitlab-ci/test-msvc.bat +++ b/.gitlab-ci/test-msvc.bat @@ -5,7 +5,7 @@ call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary @echo on :: FIXME: make warnings fatal -pip3 install --upgrade --user meson==0.48.0 || goto :error +pip3 install --upgrade --user meson==0.49.2 || goto :error meson _build || goto :error ninja -C _build || goto :error diff --git a/.gitlab-ci/test-msys2.sh b/.gitlab-ci/test-msys2.sh index e426f5d5f..34953d545 100755 --- a/.gitlab-ci/test-msys2.sh +++ b/.gitlab-ci/test-msys2.sh @@ -24,16 +24,16 @@ pacman --noconfirm -S --needed \ mingw-w64-$MSYS2_ARCH-zlib \ mingw-w64-$MSYS2_ARCH-libelf -curl -O -J -L "https://github.com/linux-test-project/lcov/releases/download/v1.13/lcov-1.13.tar.gz" -echo "44972c878482cc06a05fe78eaa3645cbfcbad6634615c3309858b207965d8a23 lcov-1.13.tar.gz" | sha256sum -c -tar -xzf lcov-1.13.tar.gz -LCOV="$(pwd)/lcov-1.13/bin/lcov" +curl -O -J -L "https://github.com/linux-test-project/lcov/releases/download/v1.14/lcov-1.14.tar.gz" +echo "14995699187440e0ae4da57fe3a64adc0a3c5cf14feab971f8db38fb7d8f071a lcov-1.14.tar.gz" | sha256sum -c +tar -xzf lcov-1.14.tar.gz +LCOV="$(pwd)/lcov-1.14/bin/lcov" mkdir -p _coverage mkdir -p _ccache export CCACHE_BASEDIR="$(pwd)" export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache" -pip3 install --upgrade --user meson==0.48.0 +pip3 install --upgrade --user meson==0.49.2 export PATH="$HOME/.local/bin:$PATH" export CFLAGS="-coverage -ftest-coverage -fprofile-arcs" DIR="$(pwd)" @@ -42,13 +42,15 @@ meson --werror --buildtype debug _build cd _build ninja -"${LCOV}" \ - --quiet \ - --config-file "${DIR}"/.gitlab-ci/lcovrc \ - --directory "${DIR}/_build" \ - --capture \ - --initial \ - --output-file "${DIR}/_coverage/${CI_JOB_NAME}-baseline.lcov" +# FIXME: lcov doesn't support gcc9 yet: +# https://github.com/linux-test-project/lcov/issues/58 +#"${LCOV}" \ +# --quiet \ +# --config-file "${DIR}"/.gitlab-ci/lcovrc \ +# --directory "${DIR}/_build" \ +# --capture \ +# --initial \ +# --output-file "${DIR}/_coverage/${CI_JOB_NAME}-baseline.lcov" # FIXME: fix the test suite meson test --timeout-multiplier ${MESON_TEST_TIMEOUT_MULTIPLIER} --no-suite flaky || true @@ -59,9 +61,10 @@ python3 "${DIR}"/.gitlab-ci/meson-junit-report.py \ --output "${DIR}/_build/${CI_JOB_NAME}-report.xml" \ "${DIR}/_build/meson-logs/testlog.json" -"${LCOV}" \ - --quiet \ - --config-file "${DIR}"/.gitlab-ci/lcovrc \ - --directory "${DIR}/_build" \ - --capture \ - --output-file "${DIR}/_coverage/${CI_JOB_NAME}.lcov" +# FIXME: see above +#"${LCOV}" \ +# --quiet \ +# --config-file "${DIR}"/.gitlab-ci/lcovrc \ +# --directory "${DIR}/_build" \ +# --capture \ +# --output-file "${DIR}/_coverage/${CI_JOB_NAME}.lcov" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1b501f144..660a1452b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -22,7 +22,7 @@ many things that we value: Please, do not use the issue tracker for support questions. If you have questions on how to use GLib effectively, you can use: - - the `#gtk+` IRC channel on irc.gnome.org + - the `#gtk` IRC channel on irc.gnome.org - the [gtk](https://mail.gnome.org/mailman/listinfo/gtk-list) mailing list, for general questions on GLib - the [gtk-devel](https://mail.gnome.org/mailman/listinfo/gtk-devel-list) @@ -101,7 +101,7 @@ full branch coverage of the new code. GLib’s CI system generates code coverage reports which are viewable for each merge request. If proposing a large feature or change, it’s better to discuss it (on the -`#gtk+` IRC channel or on the +`#gtk` IRC channel or on the [gtk-devel](https://mail.gnome.org/mailman/listinfo/gtk-devel-list) mailing list) before putting time into writing an actionable issue — and certainly before putting time into writing a merge request. @@ -1,3 +1,180 @@ +Overview of changes in GLib 2.61.2 +================================== + +* Add various new array functions (#236, #269, #373) + - `g_array_copy()` + - `g_ptr_array_copy()` + - `g_ptr_array_extend()` + - `g_ptr_array_extend_and_steal()` + - `g_array_binary_search()` + +* Add `g_assert_finalize_object()` helper function for writing tests (#488) + +* Rework how D-Bus connections are closed/unreffed when `g_test_dbus_down()` is + called. Tests which leak a `GDBusConnection` may now time out and abort, + rather than silently leaking. (#787) + +* Add a deprecation macro for GLib macros, and use it; third-party uses of + long-deprecated GLib macros may now start causing warnings. (#1060) + +* Deprecate `GTime` and `GTimeVal`, and various functions which use them. + Use `GDateTime` and `guint64` UNIX timestamps instead. (#1438) + +* Stop using `G_DISABLE_DEPRECATED` to allow disabling deprecation warnings; + third-party code should now be using + `GLIB_VERSION_{MIN_REQUIRED, MAX_ALLOWED}` to control symbol usage (!871) + +* Improve support for running `ninja test` when GLib is built statically (#1648) + +* Improve `GNetworkMonitor` detection of offline states (#1788) + +* Fix build failure on macOS related to missing `_g_content_type_get_mime_dirs` + function (#1791) + +* Add various installed utilities’ paths to `gio-2.0.pc` (#1796) + +* Fix keyfile `GSettings` backend and portal (especially relevant to any version + of GLib included in a flatpak runtime) (#1822, !985) + +* More IPv6 ‘Happy Eyeballs’ fixes in `GNetworkAddress` (!865) + +* Fix CVE-2019-12450, wide permissions of files when copying using GIO (!876) + +* Bump the Meson dependency from 0.48.0 to 0.49.2; we won’t depend on anything + higher than this for a while, as Debian 10 ships 0.49 (!924) + +* Various test fixes for Windows (!930, !931) + +* Initial support for Universal Windows Platform (UWP): certification, and use + of packaged libraries (!951) + +* Add experimental clang-cl support on Windows, allowing `g_autoptr()` support + on Windows (!979) + +* Bugs fixed: + - #77 G_STDIO_NO_WRAP_ON_UNIX wraps + - #236 Add a function to copy an array + - #269 Additional convenience functions for g_ptr_array + - #373 GArray could use a binary search function + - #436 running tests leaves lots of coredumps + - #453 find-enclosing-mount docs confusing + - #488 Add g_object_assert_last_unref() helper macro to detect object leaks in tests + - #590 A reader lock can be obtained even if a writer is already waiting for a lock + - #638 g_atexit is defined when not declared + - #737 Initialize GValue in g_object_get_property() + - #787 gtestdbus: Properly close server connections + - #804 gdbusproxy prefixes unstripped error + - #870 Fix and enhance GDatetime for Windows + - #872 ucs4 functions have wrong return transfer + - #887 gdusmessage.c mishandles bounds of GDBusMessageType and related enums + - #894 gvalue: Avoid expensive checks where possible + - #940 Docs for g_socket_listener_set_backlog are not very helpful + - #943 G_DEFINE_TYPE_WITH_PRIVATE docs not helpful + - #1018 Allow guid key in dbus addresses + - #1060 Add deprecation macro for macros + - #1169 Tools can display gibberish messages from translations + - #1270 g_get_charset always returns 8-bit codepage on Windows, crippling UTF-8 output + - #1438 Deprecate GTimeVal- and GTime-based APIs + - #1635 g_socket_join_multicast_group iface parameter fails on win32/64 + - #1648 2.58.2: Assorted asserts fail in Arch Linux when built statically + - #1729 g_content_type_guess segfaults when passed an empty data buffer on Mac OS + - #1788 GNetworkMonitor claims I am offline + - #1790 documentation on g_file_info_get_attribute_as_string + - #1791 _g_content_type_get_mime_dirs missing from libgio-2.0.0.dylib on MacOS + - #1792 glib-genmarshal generated valist marshal does not respect static scope for some types + - #1793 glib-genmarshal generates wrong code for va marshaler for VARIANT type + - #1794 API Proposal: g_timer_is_active + - #1796 Add gio-querymodules variable to pkg-config file + - #1797 glib/tests/win32 test failing on 64-bit Visual Studio builds + - #1798 /contenttype/tree reliably fails on FreeBSD since !863 + - #1807 g_dbus_server_new_sync() documentation references nonexistent function + - #1808 Stopping a GDBusServer should clean up Unix socket paths (if not abstract) and nonce-tcp nonce files + - #1811 Introspection info for g_unichar_compose's 3rd arg should be OUT + - #1822 keyfile gsettings backend not loading + - #1823 Documentation for disabling selinux is incorrect + - #1825 GKeyFileSettingsBackend created without filename construct property and unchecked assertion + - #1828 Small typo in gio manpage + - #1837 Specify for each (optional) parameter, whether it is OUT or INOUT + - #1838 Reword documentation for G_DECLARE_FINAL_TYPE + - #1847 Setting GLIB_VERSION_{MIN_REQUIRED, MAX_ALLOWED} to before 2.56 triggers warnings + - !533 docs: Document pitfall of deprecation pragmas + - !563 ci: Add scan-build job in a new ‘analysis’ pipeline stage + - !678 glib-compile-schemas: Improve translatable strings + - !817 gdate: Officially mark GTime as deprecated + - !851 gsettings: Document that lists are returned in no defined order + - !853 gobject: Fix apostrophe usage in a few small bits of documentation + - !859 gobject: Add a g_assert_finalize_object() macro + - !863 gunicollate/cygwin: Don't use __STDC_ISO_10646__ for wchar_t related checks + - !865 gnetworkaddress: fix "happy eyeballs" logic + - !867 Post-release version bump + - !871 Drop G_DISABLE_DEPRECATED + - !873 Use atomic reference counting for GSource + - !874 Clamp number of vectors to IOV_MAX / UIO_MAXIOV for GOutputStream writev()... + - !875 CI/msys2: disable coverage reporting, lcov doesn't support gcc9 yet + - !876 CVE-2019-12450: gfile: Limit access to files when copying + - !877 gio: specify proper c_marshaller and va_marshallers + - !883 tests: Fix small race in GSubprocess tests + - !884 garcbox.c: Fix typo atomit => atomic + - !885 goption: Clarify G_OPTION_ARG_FILENAME documentation + - !889 Include <sys/filio.h> for FIONREAD + - !901 gmain: Clarify that g_source_destroy() doesn’t drop a reference + - !904 Add glib-genmarshal tests and fix some valist marshaller bugs + - !906 property action: Add state hints + - !908 Improve testfilemonitor test repeatability and debuggability + - !909 D-Bus auth mechanism improvements + - !914 ci: Run scan-build in a different build directory + - !915 docs: fix typo on arrays examples in gvariant-text + - !917 docs: Fix name of IRC channel in CONTRIBUTING.md + - !919 glib/tests/refcount.c: Fix tests on non-GCC-isque compilers + - !920 gmacros: Only use deprecated attributes on enumerators with GCC ≥ 6.5 + - !923 Check if compiler symbols are defined before using them + - !924 Bump the required version of Meson + - !930 glib/tests/convert.c: Skip tests that aren't meaningful for Windows + - !931 glib/tests/fileutils.c: Fix stdio Wrapper Test on Windows + - !934 build: Increase the slow test timeout to 180s + - !935 Ignore */__pycache__/* directories + - !937 Fix module tests on Visual Studio builds + - !939 gstdio: minor cleanups + - !941 list model: Expand items-changed docs + - !944 gutils: Don't limit the length of the host name to 99 + - !945 Avoid overrunning stack at the end of the varargs. + - !947 gobject/tests/signals.c: Fix tests on Windows + - !948 GObject: Fix mkenums.py and genmarshal.py tests on Windows + - !950 ci: Enable CI on FreeBSD 12 + - !951 Preliminary patches for Universal Windows Platform support + - !952 gio: Make minor docs improvements + - !953 g_utf8_normalize: Doc comment return missing nullable annotation + - !954 Fix the ISO 15924 code for Manichaean + - !955 gmacros: Use _Static_assert when C11 is available + - !958 gthread: fix minor errno problem in GCond + - !961 gmain: Fix g_main_context_prepare priority annotation + - !962 gmacros: Use _Static_assert only for non-expr static assert + - !964 gmacros.h: Use static_assert on MSVC if possible + - !968 Fix typo in request handle + - !970 gdatetime: Unset LC_ALL for the test as well + - !971 docs.c: Forward link from g_auto* → G_DEFINE_AUTO* + - !973 doc: fix typo in gio/gresource.c + - !979 Experimental clang-cl support + - !980 gmacros.h: Add better support for clang-cl + - !981 gio: fix typo in g_settings_reset documentation + - !982 Various doc fixes + - !985 Keyfile portal fixes + - !987 gio/tests: Remove code and comments referring to libtool + - !991 fix atomic detection on older gcc versions + - !992 docs: Add example to g_test_summary() documentation + - !994 gio: Fix minor docs mistakes + - !996 Small array test fixes + - !997 gdbusaddress: Add missing transfer annotation + - !1007 Resubmission of !832 “Try to create the complete path right away and fall back” + - !1009 gapplication: remove inactivity_timeout source on finalize + +* Translation updates: + - Hungarian + - Indonesian + - Portuguese (Brazil) + - Spanish + + Overview of changes in GLib 2.61.1 ================================== diff --git a/docs/reference/gio/concat-files-helper.py b/docs/reference/gio/concat-files-helper.py new file mode 100644 index 000000000..94d64c345 --- /dev/null +++ b/docs/reference/gio/concat-files-helper.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +# Copyright (C) 2018 Collabora Inc. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General +# Public License along with this library; if not, see <http://www.gnu.org/licenses/>. +# +# Author: Xavier Claessens <xavier.claessens@collabora.com> + +import sys + +if len(sys.argv) < 3: + print('Usage: {} <output file> <input file 1> ...'.format(os.path.basename(sys.argv[0]))) + sys.exit(1) + +with open(sys.argv[1], 'w') as outfile: + for fname in sys.argv[2:]: + with open(fname) as infile: + for line in infile: + outfile.write(line) diff --git a/docs/reference/gio/gio-docs-unix.xml b/docs/reference/gio/gio-docs-unix.xml new file mode 100644 index 000000000..b78eddaa8 --- /dev/null +++ b/docs/reference/gio/gio-docs-unix.xml @@ -0,0 +1,3 @@ +<chapter id='unix-support'> +<!--FIXME: fill this with unix APIs that cannot build on Windows --> +</chapter> diff --git a/docs/reference/gio/gio-docs-win32.xml b/docs/reference/gio/gio-docs-win32.xml new file mode 100644 index 000000000..f34a6e65e --- /dev/null +++ b/docs/reference/gio/gio-docs-win32.xml @@ -0,0 +1,6 @@ +<chapter id='win32-support'> + <title>Win32 support</title> + <xi:include href="xml/gwin32registrykey.xml"/> + <xi:include href="xml/gwin32inputstream.xml"/> + <xi:include href="xml/gwin32outputstream.xml"/> +</chapter> diff --git a/docs/reference/gio/gio-docs.xml b/docs/reference/gio/gio-docs.xml index 98889ef60..0ce0e2d42 100644 --- a/docs/reference/gio/gio-docs.xml +++ b/docs/reference/gio/gio-docs.xml @@ -72,8 +72,6 @@ <xi:include href="xml/gdataoutputstream.xml"/> <xi:include href="xml/gunixinputstream.xml"/> <xi:include href="xml/gunixoutputstream.xml"/> - <xi:include href="xml/gwin32inputstream.xml"/> - <xi:include href="xml/gwin32outputstream.xml"/> <xi:include href="xml/gconverterinputstream.xml"/> <xi:include href="xml/gconverteroutputstream.xml"/> <xi:include href="xml/gpollableinputstream.xml"/> @@ -124,6 +122,7 @@ <xi:include href="xml/gsocketaddress.xml"/> <xi:include href="xml/ginetsocketaddress.xml"/> <xi:include href="xml/gunixsocketaddress.xml"/> + <xi:include href="xml/gnativesocketaddress.xml"/> <xi:include href="xml/gsocketcontrolmessage.xml"/> <xi:include href="xml/gunixfdlist.xml"/> <xi:include href="xml/gunixfdmessage.xml"/> @@ -219,10 +218,7 @@ <xi:include href="xml/glistmodel.xml"/> <xi:include href="xml/gliststore.xml"/> </chapter> - <chapter id='registry'> - <title>Win32 registry support</title> - <xi:include href="xml/gwin32registrykey.xml"/> - </chapter> + <chapter id="application"> <title>Application support</title> <xi:include href="xml/gapplication.xml"/> @@ -264,6 +260,7 @@ <title>GIO Testing</title> <xi:include href="xml/gtestdbus.xml"/> </chapter> + <xi:include href="gio-docs-platform.xml"/> </part> <part id="migrating"> diff --git a/docs/reference/gio/gio-sections.txt b/docs/reference/gio/gio-sections-common.txt index 6aa07b462..bb483b0ce 100644 --- a/docs/reference/gio/gio-sections.txt +++ b/docs/reference/gio/gio-sections-common.txt @@ -395,6 +395,7 @@ g_file_info_get_symbolic_icon g_file_info_get_content_type g_file_info_get_size g_file_info_get_modification_time +g_file_info_get_modification_date_time g_file_info_get_symlink_target g_file_info_get_etag g_file_info_get_sort_order @@ -412,6 +413,7 @@ g_file_info_set_symbolic_icon g_file_info_set_content_type g_file_info_set_size g_file_info_set_modification_time +g_file_info_set_modification_date_time g_file_info_set_symlink_target g_file_info_set_sort_order g_file_attribute_matcher_new @@ -720,27 +722,6 @@ GUnixInputStreamPrivate </SECTION> <SECTION> -<FILE>gwin32inputstream</FILE> -<TITLE>GWin32InputStream</TITLE> -GWin32InputStream -g_win32_input_stream_new -g_win32_input_stream_set_close_handle -g_win32_input_stream_get_close_handle -g_win32_input_stream_get_handle -<SUBSECTION Standard> -GWin32InputStreamClass -G_WIN32_INPUT_STREAM -G_IS_WIN32_INPUT_STREAM -G_TYPE_WIN32_INPUT_STREAM -G_WIN32_INPUT_STREAM_CLASS -G_IS_WIN32_INPUT_STREAM_CLASS -G_WIN32_INPUT_STREAM_GET_CLASS -<SUBSECTION Private> -g_win32_input_stream_get_type -GWin32InputStreamPrivate -</SECTION> - -<SECTION> <FILE>gmemoryinputstream</FILE> <TITLE>GMemoryInputStream</TITLE> GMemoryInputStream @@ -1025,27 +1006,6 @@ GUnixOutputStreamPrivate </SECTION> <SECTION> -<FILE>gwin32outputstream</FILE> -<TITLE>GWin32OutputStream</TITLE> -GWin32OutputStream -g_win32_output_stream_new -g_win32_output_stream_set_close_handle -g_win32_output_stream_get_close_handle -g_win32_output_stream_get_handle -<SUBSECTION Standard> -GWin32OutputStreamClass -G_WIN32_OUTPUT_STREAM -G_IS_WIN32_OUTPUT_STREAM -G_TYPE_WIN32_OUTPUT_STREAM -G_WIN32_OUTPUT_STREAM_CLASS -G_IS_WIN32_OUTPUT_STREAM_CLASS -G_WIN32_OUTPUT_STREAM_GET_CLASS -<SUBSECTION Private> -g_win32_output_stream_get_type -GWin32OutputStreamPrivate -</SECTION> - -<SECTION> <FILE>giostream</FILE> <TITLE>GIOStream</TITLE> GIOStreamSpliceFlags @@ -1959,6 +1919,7 @@ G_RESOLVER_GET_CLASS G_TYPE_RESOLVER G_TYPE_RESOLVER_ERROR G_TYPE_RESOLVER_RECORD_TYPE +G_TYPE_RESOLVER_NAME_LOOKUP_FLAGS <SUBSECTION Private> GResolverPrivate @@ -1966,6 +1927,7 @@ g_resolver_get_type g_resolver_error_quark g_resolver_record_type_get_type g_resolver_error_get_type +g_resolver_name_lookup_flags_get_type </SECTION> <SECTION> @@ -3679,6 +3641,10 @@ g_pollable_source_new_full g_pollable_stream_read g_pollable_stream_write g_pollable_stream_write_all +<SUBSECTION Standard> +G_TYPE_POLLABLE_RETURN +<SUBSECTION Private> +g_pollable_return_get_type </SECTION> <SECTION> @@ -4693,74 +4659,3 @@ G_TYPE_LIST_STORE <SUBSECTION Private> g_list_store_get_type </SECTION> - -<SECTION> -<FILE>gwin32registrykey</FILE> - -<SUBSECTION> -GWin32RegistrySubkeyIter -g_win32_registry_subkey_iter_copy -g_win32_registry_subkey_iter_free -g_win32_registry_subkey_iter_assign - -<SUBSECTION> -GWin32RegistryValueIter -g_win32_registry_value_iter_copy -g_win32_registry_value_iter_free -g_win32_registry_value_iter_assign - -<SUBSECTION> -GWin32RegistryKey -g_win32_registry_key_new -g_win32_registry_key_new_w -g_win32_registry_key_get_child -g_win32_registry_key_get_child_w - -<SUBSECTION> -g_win32_registry_subkey_iter_init -g_win32_registry_subkey_iter_clear -g_win32_registry_subkey_iter_n_subkeys -g_win32_registry_subkey_iter_next -g_win32_registry_subkey_iter_get_name -g_win32_registry_subkey_iter_get_name_w - -<SUBSECTION> -g_win32_registry_value_iter_init -g_win32_registry_value_iter_clear -g_win32_registry_value_iter_n_values -g_win32_registry_value_iter_next -GWin32RegistryValueType -g_win32_registry_value_iter_get_value_type -g_win32_registry_value_iter_get_name -g_win32_registry_value_iter_get_name_w -g_win32_registry_value_iter_get_data -g_win32_registry_value_iter_get_data_w - -<SUBSECTION> -g_win32_registry_key_get_value -g_win32_registry_key_get_value_w -g_win32_registry_key_get_path -g_win32_registry_key_get_path_w -GWin32RegistryKeyWatchCallbackFunc -GWin32RegistryKeyWatcherFlags -g_win32_registry_key_watch -g_win32_registry_key_has_changed -g_win32_registry_key_erase_change_indicator - -<SUBSECTION Standard> -GWin32RegistryKeyClass - -<SUBSECTION Private> -GWin32RegistryKeyPrivate -g_win32_registry_key_get_type -g_win32_registry_subkey_iter_get_type -g_win32_registry_value_iter_get_type -G_TYPE_WIN32_REGISTRY_KEY -G_WIN32_REGISTRY_KEY -G_WIN32_REGISTRY_KEY_CLASS -G_IS_WIN32_REGISTRY_KEY -G_IS_WIN32_REGISTRY_KEY_CLASS -G_WIN32_REGISTRY_KEY_GET_CLASS -G_TYPE_WIN32_REGISTRY_SUBKEY_ITER -G_TYPE_WIN32_REGISTRY_VALUE_ITER -</SECTION> diff --git a/docs/reference/gio/gio-sections-win32.txt b/docs/reference/gio/gio-sections-win32.txt new file mode 100644 index 000000000..52d137e93 --- /dev/null +++ b/docs/reference/gio/gio-sections-win32.txt @@ -0,0 +1,112 @@ +<SECTION> +<FILE>gwin32inputstream</FILE> +<TITLE>GWin32InputStream</TITLE> +GWin32InputStream +g_win32_input_stream_new +g_win32_input_stream_set_close_handle +g_win32_input_stream_get_close_handle +g_win32_input_stream_get_handle +<SUBSECTION Standard> +GWin32InputStreamClass +G_WIN32_INPUT_STREAM +G_IS_WIN32_INPUT_STREAM +G_TYPE_WIN32_INPUT_STREAM +G_WIN32_INPUT_STREAM_CLASS +G_IS_WIN32_INPUT_STREAM_CLASS +G_WIN32_INPUT_STREAM_GET_CLASS +<SUBSECTION Private> +g_win32_input_stream_get_type +GWin32InputStreamPrivate +</SECTION> + +<SECTION> +<FILE>gwin32outputstream</FILE> +<TITLE>GWin32OutputStream</TITLE> +GWin32OutputStream +g_win32_output_stream_new +g_win32_output_stream_set_close_handle +g_win32_output_stream_get_close_handle +g_win32_output_stream_get_handle +<SUBSECTION Standard> +GWin32OutputStreamClass +G_WIN32_OUTPUT_STREAM +G_IS_WIN32_OUTPUT_STREAM +G_TYPE_WIN32_OUTPUT_STREAM +G_WIN32_OUTPUT_STREAM_CLASS +G_IS_WIN32_OUTPUT_STREAM_CLASS +G_WIN32_OUTPUT_STREAM_GET_CLASS +<SUBSECTION Private> +g_win32_output_stream_get_type +GWin32OutputStreamPrivate +</SECTION> + +<SECTION> +<FILE>gwin32registrykey</FILE> + +<SUBSECTION> +GWin32RegistrySubkeyIter +g_win32_registry_subkey_iter_copy +g_win32_registry_subkey_iter_free +g_win32_registry_subkey_iter_assign + +<SUBSECTION> +GWin32RegistryValueIter +g_win32_registry_value_iter_copy +g_win32_registry_value_iter_free +g_win32_registry_value_iter_assign + +<SUBSECTION> +GWin32RegistryKey +g_win32_registry_key_new +g_win32_registry_key_new_w +g_win32_registry_key_get_child +g_win32_registry_key_get_child_w + +<SUBSECTION> +g_win32_registry_subkey_iter_init +g_win32_registry_subkey_iter_clear +g_win32_registry_subkey_iter_n_subkeys +g_win32_registry_subkey_iter_next +g_win32_registry_subkey_iter_get_name +g_win32_registry_subkey_iter_get_name_w + +<SUBSECTION> +g_win32_registry_value_iter_init +g_win32_registry_value_iter_clear +g_win32_registry_value_iter_n_values +g_win32_registry_value_iter_next +GWin32RegistryValueType +g_win32_registry_value_iter_get_value_type +g_win32_registry_value_iter_get_name +g_win32_registry_value_iter_get_name_w +g_win32_registry_value_iter_get_data +g_win32_registry_value_iter_get_data_w + +<SUBSECTION> +g_win32_registry_key_get_value +g_win32_registry_key_get_value_w +g_win32_registry_key_get_path +g_win32_registry_key_get_path_w +GWin32RegistryKeyWatchCallbackFunc +GWin32RegistryKeyWatcherFlags +g_win32_registry_key_watch +g_win32_registry_key_has_changed +g_win32_registry_key_erase_change_indicator + +<SUBSECTION Standard> +GWin32RegistryKeyClass + +<SUBSECTION Private> +GWin32RegistryKeyPrivate +g_win32_registry_key_get_type +g_win32_registry_subkey_iter_get_type +g_win32_registry_value_iter_get_type +G_TYPE_WIN32_REGISTRY_KEY +G_WIN32_REGISTRY_KEY +G_WIN32_REGISTRY_KEY_CLASS +G_IS_WIN32_REGISTRY_KEY +G_IS_WIN32_REGISTRY_KEY_CLASS +G_WIN32_REGISTRY_KEY_GET_CLASS +G_TYPE_WIN32_REGISTRY_SUBKEY_ITER +G_TYPE_WIN32_REGISTRY_VALUE_ITER +</SECTION> diff --git a/docs/reference/gio/gio.xml b/docs/reference/gio/gio.xml index 35c14da34..3de69642a 100644 --- a/docs/reference/gio/gio.xml +++ b/docs/reference/gio/gio.xml @@ -407,7 +407,7 @@ functionality.</para> <para>Mounting refers to the traditional concept of arranging multiple file systems and devices in a single tree, rooted at <filename>/</filename>. Classical - mounting happens in the kernel and is controlle by the mount utility. + mounting happens in the kernel and is controlled by the mount utility. GIO expands this concept by introducing mount daemons that can make file systems available to GIO applications without kernel involvement.</para> diff --git a/docs/reference/gio/meson.build b/docs/reference/gio/meson.build index 930a3b75c..860ab4d08 100644 --- a/docs/reference/gio/meson.build +++ b/docs/reference/gio/meson.build @@ -81,15 +81,17 @@ if get_option('gtk_doc') 'gunixresolver.h', 'gunixvolume.h', 'gunixvolumemonitor.h', + 'gwin32networkmonitor.h', 'gwin32appinfo.h', 'gwin32mount.h', - 'gwin32registrykey.h', 'gwin32resolver.h', 'gwin32volumemonitor.h', 'thumbnail-verify.h', 'xdp-dbus.h', ] + sections_files = files('gio-sections-common.txt') + if host_system == 'windows' ignore_headers += [ 'gfiledescriptorbased.h', @@ -104,6 +106,8 @@ if get_option('gtk_doc') 'gdesktopappinfo.h', 'gosxappinfo.h', ] + sections_files += files('gio-sections-win32.txt') + platform_file = files('gio-docs-win32.xml') else if glib_have_cocoa ignore_headers += ['gdesktopappinfo.h'] @@ -112,10 +116,11 @@ if get_option('gtk_doc') endif ignore_headers += [ - 'gwin32networkmonitor.h', 'gwin32inputstream.h', 'gwin32outputstream.h', + 'gwin32registrykey.h', ] + platform_file = files('gio-docs-unix.xml') endif ignore_sources = [ @@ -125,8 +130,6 @@ if get_option('gtk_doc') 'xdp-dbus.c', ] - # FIXME: More win32 headers were added to fix building gio-scan - # FIXME: ExampleAnimal docs aren't built docpath = join_paths(glib_datadir, 'gtk-doc', 'html') @@ -138,6 +141,19 @@ if get_option('gtk_doc') configuration: version_conf ) + concat_files_helper = find_program('concat-files-helper.py') + configure_file( + output : 'gio-sections.txt', + input : sections_files, + command : [concat_files_helper, '@OUTPUT@', '@INPUT@'], + ) + + configure_file( + output : 'gio-docs-platform.xml', + input : platform_file, + copy : true, + ) + gnome.gtkdoc('gio', main_xml : 'gio-docs.xml', namespace : 'g', diff --git a/docs/reference/glib/building.xml b/docs/reference/glib/building.xml index 61027ff17..79567f6f7 100644 --- a/docs/reference/glib/building.xml +++ b/docs/reference/glib/building.xml @@ -158,7 +158,7 @@ <para> The optional SELinux support in GIO requires libselinux. To build GLib without SELinux support, use the - <option>-Dselinux=false</option> option. + <option>-Dselinux=disabled</option> option. </para> </listitem> <listitem> @@ -317,8 +317,9 @@ </formalpara> <formalpara> - <title><option>-Dselinux=false</option> and - <option>-Dselinux=true</option></title> + <title><option>-Dselinux=auto</option>, + <option>-Dselinux=enabled</option> or + <option>-Dselinux=disabled</option></title> <para> By default, GLib will detect if libselinux is available and diff --git a/docs/reference/glib/compiling.xml b/docs/reference/glib/compiling.xml index 6a8626488..02971a60f 100644 --- a/docs/reference/glib/compiling.xml +++ b/docs/reference/glib/compiling.xml @@ -93,11 +93,10 @@ this range will trigger compiler warnings. </para> <para> -The older deprecation mechanism of hiding deprecated interfaces +Since GLib 2.62, the older deprecation mechanism of hiding deprecated interfaces entirely from the compiler by using the preprocessor symbol -G_DISABLE_DEPRECATED is still used for deprecated macros, -enumeration values, etc. To detect uses of these in your code, -use the commandline option <literal>-DG_DISABLE_DEPRECATED</literal>. +<literal>G_DISABLE_DEPRECATED</literal> has been removed. All deprecations +are now handled using the above mechanism. </para> <para> diff --git a/docs/reference/glib/glib-sections.txt b/docs/reference/glib/glib-sections.txt index 0f5d88142..a5e64a1c1 100644 --- a/docs/reference/glib/glib-sections.txt +++ b/docs/reference/glib/glib-sections.txt @@ -141,6 +141,25 @@ GLIB_DISABLE_DEPRECATION_WARNINGS <SUBSECTION Private> G_ENCODE_VERSION +GLIB_AVAILABLE_ENUMERATOR_IN_2_26 +GLIB_AVAILABLE_ENUMERATOR_IN_2_28 +GLIB_AVAILABLE_ENUMERATOR_IN_2_30 +GLIB_AVAILABLE_ENUMERATOR_IN_2_32 +GLIB_AVAILABLE_ENUMERATOR_IN_2_34 +GLIB_AVAILABLE_ENUMERATOR_IN_2_36 +GLIB_AVAILABLE_ENUMERATOR_IN_2_38 +GLIB_AVAILABLE_ENUMERATOR_IN_2_40 +GLIB_AVAILABLE_ENUMERATOR_IN_2_42 +GLIB_AVAILABLE_ENUMERATOR_IN_2_44 +GLIB_AVAILABLE_ENUMERATOR_IN_2_46 +GLIB_AVAILABLE_ENUMERATOR_IN_2_48 +GLIB_AVAILABLE_ENUMERATOR_IN_2_50 +GLIB_AVAILABLE_ENUMERATOR_IN_2_52 +GLIB_AVAILABLE_ENUMERATOR_IN_2_54 +GLIB_AVAILABLE_ENUMERATOR_IN_2_56 +GLIB_AVAILABLE_ENUMERATOR_IN_2_58 +GLIB_AVAILABLE_ENUMERATOR_IN_2_60 +GLIB_AVAILABLE_ENUMERATOR_IN_2_62 GLIB_AVAILABLE_IN_ALL GLIB_AVAILABLE_IN_2_26 GLIB_AVAILABLE_IN_2_28 @@ -161,6 +180,84 @@ GLIB_AVAILABLE_IN_2_56 GLIB_AVAILABLE_IN_2_58 GLIB_AVAILABLE_IN_2_60 GLIB_AVAILABLE_IN_2_62 +GLIB_AVAILABLE_MACRO_IN_2_26 +GLIB_AVAILABLE_MACRO_IN_2_28 +GLIB_AVAILABLE_MACRO_IN_2_30 +GLIB_AVAILABLE_MACRO_IN_2_32 +GLIB_AVAILABLE_MACRO_IN_2_34 +GLIB_AVAILABLE_MACRO_IN_2_36 +GLIB_AVAILABLE_MACRO_IN_2_38 +GLIB_AVAILABLE_MACRO_IN_2_40 +GLIB_AVAILABLE_MACRO_IN_2_42 +GLIB_AVAILABLE_MACRO_IN_2_44 +GLIB_AVAILABLE_MACRO_IN_2_46 +GLIB_AVAILABLE_MACRO_IN_2_48 +GLIB_AVAILABLE_MACRO_IN_2_50 +GLIB_AVAILABLE_MACRO_IN_2_52 +GLIB_AVAILABLE_MACRO_IN_2_54 +GLIB_AVAILABLE_MACRO_IN_2_56 +GLIB_AVAILABLE_MACRO_IN_2_58 +GLIB_AVAILABLE_MACRO_IN_2_60 +GLIB_AVAILABLE_MACRO_IN_2_62 +GLIB_AVAILABLE_TYPE_IN_2_26 +GLIB_AVAILABLE_TYPE_IN_2_28 +GLIB_AVAILABLE_TYPE_IN_2_30 +GLIB_AVAILABLE_TYPE_IN_2_32 +GLIB_AVAILABLE_TYPE_IN_2_34 +GLIB_AVAILABLE_TYPE_IN_2_36 +GLIB_AVAILABLE_TYPE_IN_2_38 +GLIB_AVAILABLE_TYPE_IN_2_40 +GLIB_AVAILABLE_TYPE_IN_2_42 +GLIB_AVAILABLE_TYPE_IN_2_44 +GLIB_AVAILABLE_TYPE_IN_2_46 +GLIB_AVAILABLE_TYPE_IN_2_48 +GLIB_AVAILABLE_TYPE_IN_2_50 +GLIB_AVAILABLE_TYPE_IN_2_52 +GLIB_AVAILABLE_TYPE_IN_2_54 +GLIB_AVAILABLE_TYPE_IN_2_56 +GLIB_AVAILABLE_TYPE_IN_2_58 +GLIB_AVAILABLE_TYPE_IN_2_60 +GLIB_AVAILABLE_TYPE_IN_2_62 +GLIB_DEPRECATED_ENUMERATOR +GLIB_DEPRECATED_ENUMERATOR_FOR +GLIB_DEPRECATED_ENUMERATOR_IN_2_26 +GLIB_DEPRECATED_ENUMERATOR_IN_2_26_FOR +GLIB_DEPRECATED_ENUMERATOR_IN_2_28 +GLIB_DEPRECATED_ENUMERATOR_IN_2_28_FOR +GLIB_DEPRECATED_ENUMERATOR_IN_2_30 +GLIB_DEPRECATED_ENUMERATOR_IN_2_30_FOR +GLIB_DEPRECATED_ENUMERATOR_IN_2_32 +GLIB_DEPRECATED_ENUMERATOR_IN_2_32_FOR +GLIB_DEPRECATED_ENUMERATOR_IN_2_34 +GLIB_DEPRECATED_ENUMERATOR_IN_2_34_FOR +GLIB_DEPRECATED_ENUMERATOR_IN_2_36 +GLIB_DEPRECATED_ENUMERATOR_IN_2_36_FOR +GLIB_DEPRECATED_ENUMERATOR_IN_2_38 +GLIB_DEPRECATED_ENUMERATOR_IN_2_38_FOR +GLIB_DEPRECATED_ENUMERATOR_IN_2_40 +GLIB_DEPRECATED_ENUMERATOR_IN_2_40_FOR +GLIB_DEPRECATED_ENUMERATOR_IN_2_42 +GLIB_DEPRECATED_ENUMERATOR_IN_2_42_FOR +GLIB_DEPRECATED_ENUMERATOR_IN_2_44 +GLIB_DEPRECATED_ENUMERATOR_IN_2_44_FOR +GLIB_DEPRECATED_ENUMERATOR_IN_2_46 +GLIB_DEPRECATED_ENUMERATOR_IN_2_46_FOR +GLIB_DEPRECATED_ENUMERATOR_IN_2_48 +GLIB_DEPRECATED_ENUMERATOR_IN_2_48_FOR +GLIB_DEPRECATED_ENUMERATOR_IN_2_50 +GLIB_DEPRECATED_ENUMERATOR_IN_2_50_FOR +GLIB_DEPRECATED_ENUMERATOR_IN_2_52 +GLIB_DEPRECATED_ENUMERATOR_IN_2_52_FOR +GLIB_DEPRECATED_ENUMERATOR_IN_2_54 +GLIB_DEPRECATED_ENUMERATOR_IN_2_54_FOR +GLIB_DEPRECATED_ENUMERATOR_IN_2_56 +GLIB_DEPRECATED_ENUMERATOR_IN_2_56_FOR +GLIB_DEPRECATED_ENUMERATOR_IN_2_58 +GLIB_DEPRECATED_ENUMERATOR_IN_2_58_FOR +GLIB_DEPRECATED_ENUMERATOR_IN_2_60 +GLIB_DEPRECATED_ENUMERATOR_IN_2_60_FOR +GLIB_DEPRECATED_ENUMERATOR_IN_2_62 +GLIB_DEPRECATED_ENUMERATOR_IN_2_62_FOR GLIB_DEPRECATED_IN_2_26 GLIB_DEPRECATED_IN_2_26_FOR GLIB_DEPRECATED_IN_2_28 @@ -199,6 +296,86 @@ GLIB_DEPRECATED_IN_2_60 GLIB_DEPRECATED_IN_2_60_FOR GLIB_DEPRECATED_IN_2_62 GLIB_DEPRECATED_IN_2_62_FOR +GLIB_DEPRECATED_MACRO +GLIB_DEPRECATED_MACRO_FOR +GLIB_DEPRECATED_MACRO_IN_2_26 +GLIB_DEPRECATED_MACRO_IN_2_26_FOR +GLIB_DEPRECATED_MACRO_IN_2_28 +GLIB_DEPRECATED_MACRO_IN_2_28_FOR +GLIB_DEPRECATED_MACRO_IN_2_30 +GLIB_DEPRECATED_MACRO_IN_2_30_FOR +GLIB_DEPRECATED_MACRO_IN_2_32 +GLIB_DEPRECATED_MACRO_IN_2_32_FOR +GLIB_DEPRECATED_MACRO_IN_2_34 +GLIB_DEPRECATED_MACRO_IN_2_34_FOR +GLIB_DEPRECATED_MACRO_IN_2_36 +GLIB_DEPRECATED_MACRO_IN_2_36_FOR +GLIB_DEPRECATED_MACRO_IN_2_38 +GLIB_DEPRECATED_MACRO_IN_2_38_FOR +GLIB_DEPRECATED_MACRO_IN_2_40 +GLIB_DEPRECATED_MACRO_IN_2_40_FOR +GLIB_DEPRECATED_MACRO_IN_2_42 +GLIB_DEPRECATED_MACRO_IN_2_42_FOR +GLIB_DEPRECATED_MACRO_IN_2_44 +GLIB_DEPRECATED_MACRO_IN_2_44_FOR +GLIB_DEPRECATED_MACRO_IN_2_46 +GLIB_DEPRECATED_MACRO_IN_2_46_FOR +GLIB_DEPRECATED_MACRO_IN_2_48 +GLIB_DEPRECATED_MACRO_IN_2_48_FOR +GLIB_DEPRECATED_MACRO_IN_2_50 +GLIB_DEPRECATED_MACRO_IN_2_50_FOR +GLIB_DEPRECATED_MACRO_IN_2_52 +GLIB_DEPRECATED_MACRO_IN_2_52_FOR +GLIB_DEPRECATED_MACRO_IN_2_54 +GLIB_DEPRECATED_MACRO_IN_2_54_FOR +GLIB_DEPRECATED_MACRO_IN_2_56 +GLIB_DEPRECATED_MACRO_IN_2_56_FOR +GLIB_DEPRECATED_MACRO_IN_2_58 +GLIB_DEPRECATED_MACRO_IN_2_58_FOR +GLIB_DEPRECATED_MACRO_IN_2_60 +GLIB_DEPRECATED_MACRO_IN_2_60_FOR +GLIB_DEPRECATED_MACRO_IN_2_62 +GLIB_DEPRECATED_MACRO_IN_2_62_FOR +GLIB_DEPRECATED_TYPE +GLIB_DEPRECATED_TYPE_FOR +GLIB_DEPRECATED_TYPE_IN_2_26 +GLIB_DEPRECATED_TYPE_IN_2_26_FOR +GLIB_DEPRECATED_TYPE_IN_2_28 +GLIB_DEPRECATED_TYPE_IN_2_28_FOR +GLIB_DEPRECATED_TYPE_IN_2_30 +GLIB_DEPRECATED_TYPE_IN_2_30_FOR +GLIB_DEPRECATED_TYPE_IN_2_32 +GLIB_DEPRECATED_TYPE_IN_2_32_FOR +GLIB_DEPRECATED_TYPE_IN_2_34 +GLIB_DEPRECATED_TYPE_IN_2_34_FOR +GLIB_DEPRECATED_TYPE_IN_2_36 +GLIB_DEPRECATED_TYPE_IN_2_36_FOR +GLIB_DEPRECATED_TYPE_IN_2_38 +GLIB_DEPRECATED_TYPE_IN_2_38_FOR +GLIB_DEPRECATED_TYPE_IN_2_40 +GLIB_DEPRECATED_TYPE_IN_2_40_FOR +GLIB_DEPRECATED_TYPE_IN_2_42 +GLIB_DEPRECATED_TYPE_IN_2_42_FOR +GLIB_DEPRECATED_TYPE_IN_2_44 +GLIB_DEPRECATED_TYPE_IN_2_44_FOR +GLIB_DEPRECATED_TYPE_IN_2_46 +GLIB_DEPRECATED_TYPE_IN_2_46_FOR +GLIB_DEPRECATED_TYPE_IN_2_48 +GLIB_DEPRECATED_TYPE_IN_2_48_FOR +GLIB_DEPRECATED_TYPE_IN_2_50 +GLIB_DEPRECATED_TYPE_IN_2_50_FOR +GLIB_DEPRECATED_TYPE_IN_2_52 +GLIB_DEPRECATED_TYPE_IN_2_52_FOR +GLIB_DEPRECATED_TYPE_IN_2_54 +GLIB_DEPRECATED_TYPE_IN_2_54_FOR +GLIB_DEPRECATED_TYPE_IN_2_56 +GLIB_DEPRECATED_TYPE_IN_2_56_FOR +GLIB_DEPRECATED_TYPE_IN_2_58 +GLIB_DEPRECATED_TYPE_IN_2_58_FOR +GLIB_DEPRECATED_TYPE_IN_2_60 +GLIB_DEPRECATED_TYPE_IN_2_60_FOR +GLIB_DEPRECATED_TYPE_IN_2_62 +GLIB_DEPRECATED_TYPE_IN_2_62_FOR GLIB_VERSION_CUR_STABLE GLIB_VERSION_PREV_STABLE </SECTION> @@ -500,6 +677,9 @@ G_VA_COPY_AS_ARRAY GLIB_DEPRECATED GLIB_DEPRECATED_FOR GLIB_UNAVAILABLE +GLIB_UNAVAILABLE_ENUMERATOR +GLIB_UNAVAILABLE_MACRO +GLIB_UNAVAILABLE_TYPE G_ANALYZER_ANALYZING G_ANALYZER_NORETURN g_autoptr_cleanup_generic_gfree @@ -1265,6 +1445,7 @@ g_timer_continue g_timer_elapsed g_timer_reset g_timer_destroy +g_timer_is_active </SECTION> <SECTION> @@ -1802,6 +1983,7 @@ g_date_time_to_utc <SUBSECTION> g_date_time_format +g_date_time_format_iso8601 </SECTION> <SECTION> @@ -2610,6 +2792,7 @@ g_string_chunk_free GArray g_array_new g_array_sized_new +g_array_copy g_array_ref g_array_unref g_array_get_element_size @@ -2624,6 +2807,7 @@ g_array_remove_index_fast g_array_remove_range g_array_sort g_array_sort_with_data +g_array_binary_search g_array_index g_array_set_size g_array_set_clear_func @@ -2637,11 +2821,14 @@ GPtrArray g_ptr_array_new g_ptr_array_sized_new g_ptr_array_new_with_free_func +g_ptr_array_copy g_ptr_array_new_full g_ptr_array_set_free_func g_ptr_array_ref g_ptr_array_unref g_ptr_array_add +g_ptr_array_extend +g_ptr_array_extend_and_steal g_ptr_array_insert g_ptr_array_remove g_ptr_array_remove_index @@ -2946,6 +3133,7 @@ GConvertError <SUBSECTION> g_get_charset g_get_codeset +g_get_console_charset <SUBSECTION Private> g_convert_error_quark diff --git a/docs/reference/glib/gvariant-text.xml b/docs/reference/glib/gvariant-text.xml index 71d07dfb1..90da39c55 100644 --- a/docs/reference/glib/gvariant-text.xml +++ b/docs/reference/glib/gvariant-text.xml @@ -380,7 +380,7 @@ inferencing in action. </para> <para> - <literal>[(1, 2), (3, 4.0)]</literal> causes the 2 to also be parsed as a double (but the 1 and 4 are still + <literal>[(1, 2), (3, 4.0)]</literal> causes the 2 to also be parsed as a double (but the 1 and 3 are still integers). </para> <para> diff --git a/docs/reference/glib/meson.build b/docs/reference/glib/meson.build index 1d4009f8d..bba7649f0 100644 --- a/docs/reference/glib/meson.build +++ b/docs/reference/glib/meson.build @@ -38,6 +38,7 @@ if get_option('gtk_doc') 'valgrind.h', 'gutilsprivate.h', 'gvalgrind.h', + 'dirent.h', ] docpath = join_paths(glib_datadir, 'gtk-doc', 'html') diff --git a/docs/reference/gobject/gobject-docs.xml b/docs/reference/gobject/gobject-docs.xml index f045df5b3..14c8eb4e1 100644 --- a/docs/reference/gobject/gobject-docs.xml +++ b/docs/reference/gobject/gobject-docs.xml @@ -196,6 +196,10 @@ <title>Index of new symbols in 2.56</title> <xi:include href="xml/api-index-2.56.xml"><xi:fallback /></xi:include> </index> + <index id="api-index-2-62" role="2.62"> + <title>Index of new symbols in 2.62</title> + <xi:include href="xml/api-index-2.62.xml"><xi:fallback /></xi:include> + </index> <xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include> diff --git a/docs/reference/gobject/gobject-sections.txt b/docs/reference/gobject/gobject-sections.txt index 2247888d1..bed38e4c5 100644 --- a/docs/reference/gobject/gobject-sections.txt +++ b/docs/reference/gobject/gobject-sections.txt @@ -322,6 +322,9 @@ g_weak_ref_clear g_weak_ref_get g_weak_ref_set +<SUBSECTION Testing> +g_assert_finalize_object + <SUBSECTION Standard> G_INITIALLY_UNOWNED G_INITIALLY_UNOWNED_CLASS diff --git a/docs/reference/meson.build b/docs/reference/meson.build index e4dbf3f12..8da9665f4 100644 --- a/docs/reference/meson.build +++ b/docs/reference/meson.build @@ -26,7 +26,6 @@ foreach version : stable_2_series_versions endforeach gtkdoc_common_scan_args = [ - '--deprecated-guards=G_DISABLE_DEPRECATED', '--ignore-decorators=' + '|'.join(ignore_decorators), ] diff --git a/gio/fam/meson.build b/gio/fam/meson.build index d24670a63..8019fe5c4 100644 --- a/gio/fam/meson.build +++ b/gio/fam/meson.build @@ -3,7 +3,7 @@ if not get_option('fam') endif fam_dep = cc.find_library('fam') -fam_c_args = ['-DG_DISABLE_DEPRECATED'] + gio_c_args +fam_c_args = gio_c_args if cc.has_function('FAMNoExists', dependencies : fam_dep) fam_c_args += '-DHAVE_FAM_NO_EXISTS=1' endif diff --git a/gio/gactiongroup.c b/gio/gactiongroup.c index 6d361f228..2345ce3b9 100644 --- a/gio/gactiongroup.c +++ b/gio/gactiongroup.c @@ -21,6 +21,7 @@ #include "gactiongroup.h" #include "gaction.h" #include "glibintl.h" +#include "gmarshal-internal.h" /** * SECTION:gactiongroup @@ -260,7 +261,7 @@ g_action_group_default_init (GActionGroupInterface *iface) G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED, G_STRUCT_OFFSET (GActionGroupInterface, action_added), NULL, NULL, - g_cclosure_marshal_VOID__STRING, + NULL, G_TYPE_NONE, 1, G_TYPE_STRING); @@ -281,7 +282,7 @@ g_action_group_default_init (GActionGroupInterface *iface) G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED, G_STRUCT_OFFSET (GActionGroupInterface, action_removed), NULL, NULL, - g_cclosure_marshal_VOID__STRING, + NULL, G_TYPE_NONE, 1, G_TYPE_STRING); @@ -303,10 +304,13 @@ g_action_group_default_init (GActionGroupInterface *iface) G_STRUCT_OFFSET (GActionGroupInterface, action_enabled_changed), NULL, NULL, - NULL, + _g_cclosure_marshal_VOID__STRING_BOOLEAN, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_BOOLEAN); + g_signal_set_va_marshaller (g_action_group_signals[SIGNAL_ACTION_ENABLED_CHANGED], + G_TYPE_FROM_INTERFACE (iface), + _g_cclosure_marshal_VOID__STRING_BOOLEANv); /** * GActionGroup::action-state-changed: @@ -327,10 +331,13 @@ g_action_group_default_init (GActionGroupInterface *iface) G_STRUCT_OFFSET (GActionGroupInterface, action_state_changed), NULL, NULL, - NULL, + _g_cclosure_marshal_VOID__STRING_VARIANT, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_VARIANT); + g_signal_set_va_marshaller (g_action_group_signals[SIGNAL_ACTION_STATE_CHANGED], + G_TYPE_FROM_INTERFACE (iface), + _g_cclosure_marshal_VOID__STRING_VARIANTv); } /** diff --git a/gio/gappinfo.c b/gio/gappinfo.c index b2135e644..6f2b72c4e 100644 --- a/gio/gappinfo.c +++ b/gio/gappinfo.c @@ -27,6 +27,7 @@ #include "gcancellable.h" #include "glibintl.h" +#include "gmarshal-internal.h" #include <gioerror.h> #include <gfile.h> @@ -1177,9 +1178,13 @@ g_app_launch_context_class_init (GAppLaunchContextClass *klass) G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GAppLaunchContextClass, launched), - NULL, NULL, NULL, + NULL, NULL, + _g_cclosure_marshal_VOID__OBJECT_VARIANT, G_TYPE_NONE, 2, G_TYPE_APP_INFO, G_TYPE_VARIANT); + g_signal_set_va_marshaller (signals[LAUNCHED], + G_TYPE_FROM_CLASS (klass), + _g_cclosure_marshal_VOID__OBJECT_VARIANTv); } static void diff --git a/gio/gapplication.c b/gio/gapplication.c index b154cbe6a..f702b6b9d 100644 --- a/gio/gapplication.c +++ b/gio/gapplication.c @@ -38,6 +38,7 @@ #include "gfile.h" #include "glibintl.h" +#include "gmarshal-internal.h" #include <string.h> @@ -1372,6 +1373,9 @@ g_application_finalize (GObject *object) { GApplication *application = G_APPLICATION (object); + if (application->priv->inactivity_timeout_id) + g_source_remove (application->priv->inactivity_timeout_id); + g_slist_free_full (application->priv->option_groups, (GDestroyNotify) g_option_group_unref); if (application->priv->main_options) g_option_group_unref (application->priv->main_options); @@ -1532,7 +1536,7 @@ g_application_class_init (GApplicationClass *class) g_application_signals[SIGNAL_STARTUP] = g_signal_new (I_("startup"), G_TYPE_APPLICATION, G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GApplicationClass, startup), - NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); + NULL, NULL, NULL, G_TYPE_NONE, 0); /** * GApplication::shutdown: @@ -1544,7 +1548,7 @@ g_application_class_init (GApplicationClass *class) g_application_signals[SIGNAL_SHUTDOWN] = g_signal_new (I_("shutdown"), G_TYPE_APPLICATION, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GApplicationClass, shutdown), - NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); + NULL, NULL, NULL, G_TYPE_NONE, 0); /** * GApplication::activate: @@ -1556,7 +1560,7 @@ g_application_class_init (GApplicationClass *class) g_application_signals[SIGNAL_ACTIVATE] = g_signal_new (I_("activate"), G_TYPE_APPLICATION, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GApplicationClass, activate), - NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); + NULL, NULL, NULL, G_TYPE_NONE, 0); /** @@ -1572,8 +1576,12 @@ g_application_class_init (GApplicationClass *class) g_application_signals[SIGNAL_OPEN] = g_signal_new (I_("open"), G_TYPE_APPLICATION, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GApplicationClass, open), - NULL, NULL, NULL, + NULL, NULL, + _g_cclosure_marshal_VOID__POINTER_INT_STRING, G_TYPE_NONE, 3, G_TYPE_POINTER, G_TYPE_INT, G_TYPE_STRING); + g_signal_set_va_marshaller (g_application_signals[SIGNAL_OPEN], + G_TYPE_FROM_CLASS (class), + _g_cclosure_marshal_VOID__POINTER_INT_STRINGv); /** * GApplication::command-line: @@ -1592,8 +1600,11 @@ g_application_class_init (GApplicationClass *class) g_signal_new (I_("command-line"), G_TYPE_APPLICATION, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GApplicationClass, command_line), g_signal_accumulator_first_wins, NULL, - NULL, + _g_cclosure_marshal_INT__OBJECT, G_TYPE_INT, 1, G_TYPE_APPLICATION_COMMAND_LINE); + g_signal_set_va_marshaller (g_application_signals[SIGNAL_COMMAND_LINE], + G_TYPE_FROM_CLASS (class), + _g_cclosure_marshal_INT__OBJECTv); /** * GApplication::handle-local-options: @@ -1652,8 +1663,12 @@ g_application_class_init (GApplicationClass *class) g_application_signals[SIGNAL_HANDLE_LOCAL_OPTIONS] = g_signal_new (I_("handle-local-options"), G_TYPE_APPLICATION, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GApplicationClass, handle_local_options), - g_application_handle_local_options_accumulator, NULL, NULL, + g_application_handle_local_options_accumulator, NULL, + _g_cclosure_marshal_INT__BOXED, G_TYPE_INT, 1, G_TYPE_VARIANT_DICT); + g_signal_set_va_marshaller (g_application_signals[SIGNAL_HANDLE_LOCAL_OPTIONS], + G_TYPE_FROM_CLASS (class), + _g_cclosure_marshal_INT__BOXEDv); /** * GApplication::name-lost: @@ -1672,8 +1687,12 @@ g_application_class_init (GApplicationClass *class) g_application_signals[SIGNAL_NAME_LOST] = g_signal_new (I_("name-lost"), G_TYPE_APPLICATION, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GApplicationClass, name_lost), - g_signal_accumulator_true_handled, NULL, NULL, + g_signal_accumulator_true_handled, NULL, + _g_cclosure_marshal_BOOLEAN__VOID, G_TYPE_BOOLEAN, 0); + g_signal_set_va_marshaller (g_application_signals[SIGNAL_NAME_LOST], + G_TYPE_FROM_CLASS (class), + _g_cclosure_marshal_BOOLEAN__VOIDv); } /* Application ID validity {{{1 */ diff --git a/gio/gasyncinitable.c b/gio/gasyncinitable.c index bc5e40e7b..8936f98b2 100644 --- a/gio/gasyncinitable.c +++ b/gio/gasyncinitable.c @@ -369,6 +369,7 @@ g_async_initable_new_async (GType object_type, * Deprecated: 2.54: Use g_object_new_with_properties() and * g_async_initable_init_async() instead. See #GParameter for more information. */ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS void g_async_initable_newv_async (GType object_type, guint n_parameters, @@ -382,15 +383,14 @@ g_async_initable_newv_async (GType object_type, g_return_if_fail (G_TYPE_IS_ASYNC_INITABLE (object_type)); -G_GNUC_BEGIN_IGNORE_DEPRECATIONS obj = g_object_newv (object_type, n_parameters, parameters); -G_GNUC_END_IGNORE_DEPRECATIONS g_async_initable_init_async (G_ASYNC_INITABLE (obj), io_priority, cancellable, callback, user_data); g_object_unref (obj); /* Passed ownership to async call */ } +G_GNUC_END_IGNORE_DEPRECATIONS /** * g_async_initable_new_valist_async: diff --git a/gio/gasyncinitable.h b/gio/gasyncinitable.h index 8b05a22e7..f30d2cec7 100644 --- a/gio/gasyncinitable.h +++ b/gio/gasyncinitable.h @@ -95,6 +95,9 @@ void g_async_initable_new_async (GType object_type, gpointer user_data, const gchar *first_property_name, ...); + +G_GNUC_BEGIN_IGNORE_DEPRECATIONS + GLIB_DEPRECATED_IN_2_54_FOR(g_object_new_with_properties and g_async_initable_init_async) void g_async_initable_newv_async (GType object_type, guint n_parameters, @@ -103,6 +106,9 @@ void g_async_initable_newv_async (GType object_type, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); + +G_GNUC_END_IGNORE_DEPRECATIONS + GLIB_AVAILABLE_IN_ALL void g_async_initable_new_valist_async (GType object_type, const gchar *first_property_name, diff --git a/gio/gasyncresult.h b/gio/gasyncresult.h index 7ea9e3978..956cbc473 100644 --- a/gio/gasyncresult.h +++ b/gio/gasyncresult.h @@ -38,7 +38,7 @@ G_BEGIN_DECLS * GAsyncResult: * * Holds results information for an asynchronous operation, - * usually passed directly to a asynchronous _finish() operation. + * usually passed directly to an asynchronous _finish() operation. **/ typedef struct _GAsyncResultIface GAsyncResultIface; diff --git a/gio/gcancellable.c b/gio/gcancellable.c index 31e990f3c..0cfa91c0b 100644 --- a/gio/gcancellable.c +++ b/gio/gcancellable.c @@ -141,7 +141,7 @@ g_cancellable_class_init (GCancellableClass *klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GCancellableClass, cancelled), NULL, NULL, - g_cclosure_marshal_VOID__VOID, + NULL, G_TYPE_NONE, 0); } diff --git a/gio/gcontenttype-win32.c b/gio/gcontenttype-win32.c index 74d1b704c..2f07fa36e 100644 --- a/gio/gcontenttype-win32.c +++ b/gio/gcontenttype-win32.c @@ -83,6 +83,21 @@ get_registry_classes_key (const char *subdir, return value_utf8; } +/*< private >*/ +void +g_content_type_set_mime_dirs (const gchar * const *dirs) +{ + /* noop on Windows */ +} + +/*< private >*/ +const gchar * const * +g_content_type_get_mime_dirs (void) +{ + const gchar * const *mime_dirs = { NULL }; + return mime_dirs; +} + gboolean g_content_type_equals (const gchar *type1, const gchar *type2) diff --git a/gio/gcontenttype.h b/gio/gcontenttype.h index d970acbe1..db2c974f3 100644 --- a/gio/gcontenttype.h +++ b/gio/gcontenttype.h @@ -70,10 +70,12 @@ GLIB_AVAILABLE_IN_ALL GList * g_content_types_get_registered (void); /*< private >*/ +#ifndef __GTK_DOC_IGNORE__ GLIB_AVAILABLE_IN_2_60 const gchar * const *g_content_type_get_mime_dirs (void); GLIB_AVAILABLE_IN_2_60 void g_content_type_set_mime_dirs (const gchar * const *dirs); +#endif /* __GTK_DOC_IGNORE__ */ G_END_DECLS diff --git a/gio/gdbus-2.0/codegen/meson.build b/gio/gdbus-2.0/codegen/meson.build index 24d2527bc..121e9e6bb 100644 --- a/gio/gdbus-2.0/codegen/meson.build +++ b/gio/gdbus-2.0/codegen/meson.build @@ -16,7 +16,6 @@ gdbus_codegen_conf.set('DATADIR', glib_datadir) # Install gdbus-codegen executable gdbus_codegen = configure_file(input : 'gdbus-codegen.in', output : 'gdbus-codegen', - install : true, install_dir : get_option('bindir'), configuration : gdbus_codegen_conf ) @@ -28,7 +27,6 @@ codegen_dir = join_paths(get_option('datadir'), 'glib-2.0/codegen') gdbus_codegen_built_files = [] gdbus_codegen_built_files += configure_file(input : 'config.py.in', output : 'config.py', - install : true, install_dir : codegen_dir, configuration : gdbus_codegen_conf) @@ -36,7 +34,6 @@ foreach f : gdbus_codegen_files # Copy these into the builddir so that gdbus-codegen can be used uninstalled # and then install it too so that it can be used after installation gdbus_codegen_built_files += configure_file(input : f, output : f, - install : true, install_dir : codegen_dir, copy : true) endforeach diff --git a/gio/gdbusaddress.c b/gio/gdbusaddress.c index 1f7d19396..3015457a5 100644 --- a/gio/gdbusaddress.c +++ b/gio/gdbusaddress.c @@ -127,12 +127,14 @@ is_valid_unix (const gchar *address_entry, GList *keys; GList *l; const gchar *path; + const gchar *dir; const gchar *tmpdir; const gchar *abstract; ret = FALSE; keys = NULL; path = NULL; + dir = NULL; tmpdir = NULL; abstract = NULL; @@ -142,11 +144,13 @@ is_valid_unix (const gchar *address_entry, const gchar *key = l->data; if (g_strcmp0 (key, "path") == 0) path = g_hash_table_lookup (key_value_pairs, key); + else if (g_strcmp0 (key, "dir") == 0) + dir = g_hash_table_lookup (key_value_pairs, key); else if (g_strcmp0 (key, "tmpdir") == 0) tmpdir = g_hash_table_lookup (key_value_pairs, key); else if (g_strcmp0 (key, "abstract") == 0) abstract = g_hash_table_lookup (key_value_pairs, key); - else + else if (g_strcmp0 (key, "guid") != 0) { g_set_error (error, G_IO_ERROR, @@ -158,9 +162,8 @@ is_valid_unix (const gchar *address_entry, } } - if ((path != NULL && tmpdir != NULL) || - (tmpdir != NULL && abstract != NULL) || - (abstract != NULL && path != NULL)) + /* Exactly one key must be set */ + if ((path != NULL) + (dir != NULL) + (tmpdir != NULL) + (abstract != NULL) > 1) { g_set_error (error, G_IO_ERROR, @@ -169,12 +172,12 @@ is_valid_unix (const gchar *address_entry, address_entry); goto out; } - else if (path == NULL && tmpdir == NULL && abstract == NULL) + else if (path == NULL && dir == NULL && tmpdir == NULL && abstract == NULL) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT, - _("Address “%s” is invalid (need exactly one of path, tmpdir or abstract keys)"), + _("Address “%s” is invalid (need exactly one of path, dir, tmpdir, or abstract keys)"), address_entry); goto out; } @@ -221,7 +224,7 @@ is_valid_nonce_tcp (const gchar *address_entry, family = g_hash_table_lookup (key_value_pairs, key); else if (g_strcmp0 (key, "noncefile") == 0) nonce_file = g_hash_table_lookup (key_value_pairs, key); - else + else if (g_strcmp0 (key, "guid") != 0) { g_set_error (error, G_IO_ERROR, @@ -302,7 +305,7 @@ is_valid_tcp (const gchar *address_entry, port = g_hash_table_lookup (key_value_pairs, key); else if (g_strcmp0 (key, "family") == 0) family = g_hash_table_lookup (key_value_pairs, key); - else + else if (g_strcmp0 (key, "guid") != 0) { g_set_error (error, G_IO_ERROR, @@ -1258,8 +1261,8 @@ get_session_address_platform_specific (GError **error) * The returned address will be in the * [D-Bus address format](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses). * - * Returns: a valid D-Bus address string for @bus_type or %NULL if - * @error is set + * Returns: (transfer full): a valid D-Bus address string for @bus_type or + * %NULL if @error is set * * Since: 2.26 */ diff --git a/gio/gdbusauthobserver.c b/gio/gdbusauthobserver.c index 34758aa20..be36c9dac 100644 --- a/gio/gdbusauthobserver.c +++ b/gio/gdbusauthobserver.c @@ -27,6 +27,7 @@ #include "gdbusprivate.h" #include "glibintl.h" +#include "gmarshal-internal.h" /** * SECTION:gdbusauthobserver @@ -39,11 +40,37 @@ * signals you are interested in. Note that new signals may be added * in the future * - * ## Controlling Authentication # {#auth-observer} + * ## Controlling Authentication Mechanisms * - * For example, if you only want to allow D-Bus connections from - * processes owned by the same uid as the server, you would use a - * signal handler like the following: + * By default, a #GDBusServer or server-side #GDBusConnection will allow + * any authentication mechanism to be used. If you only + * want to allow D-Bus connections with the `EXTERNAL` mechanism, + * which makes use of credentials passing and is the recommended + * mechanism for modern Unix platforms such as Linux and the BSD family, + * you would use a signal handler like this: + * + * |[<!-- language="C" --> + * static gboolean + * on_allow_mechanism (GDBusAuthObserver *observer, + * const gchar *mechanism, + * gpointer user_data) + * { + * if (g_strcmp0 (mechanism, "EXTERNAL") == 0) + * { + * return TRUE; + * } + * + * return FALSE; + * } + * ]| + * + * ## Controlling Authorization # {#auth-observer} + * + * By default, a #GDBusServer or server-side #GDBusConnection will accept + * connections from any successfully authenticated user (but not from + * anonymous connections using the `ANONYMOUS` mechanism). If you only + * want to allow D-Bus connections from processes owned by the same uid + * as the server, you would use a signal handler like the following: * * |[<!-- language="C" --> * static gboolean @@ -172,11 +199,14 @@ g_dbus_auth_observer_class_init (GDBusAuthObserverClass *klass) G_STRUCT_OFFSET (GDBusAuthObserverClass, authorize_authenticated_peer), _g_signal_accumulator_false_handled, NULL, /* accu_data */ - NULL, + _g_cclosure_marshal_BOOLEAN__OBJECT_OBJECT, G_TYPE_BOOLEAN, 2, G_TYPE_IO_STREAM, G_TYPE_CREDENTIALS); + g_signal_set_va_marshaller (signals[AUTHORIZE_AUTHENTICATED_PEER_SIGNAL], + G_TYPE_FROM_CLASS (klass), + _g_cclosure_marshal_BOOLEAN__OBJECT_OBJECTv); /** * GDBusAuthObserver::allow-mechanism: @@ -196,10 +226,13 @@ g_dbus_auth_observer_class_init (GDBusAuthObserverClass *klass) G_STRUCT_OFFSET (GDBusAuthObserverClass, allow_mechanism), _g_signal_accumulator_false_handled, NULL, /* accu_data */ - NULL, + _g_cclosure_marshal_BOOLEAN__STRING, G_TYPE_BOOLEAN, 1, G_TYPE_STRING); + g_signal_set_va_marshaller (signals[ALLOW_MECHANISM_SIGNAL], + G_TYPE_FROM_CLASS (klass), + _g_cclosure_marshal_BOOLEAN__STRINGv); } static void diff --git a/gio/gdbusconnection.c b/gio/gdbusconnection.c index 677fa76f9..6ae1e21ce 100644 --- a/gio/gdbusconnection.c +++ b/gio/gdbusconnection.c @@ -111,6 +111,7 @@ #include "giostream.h" #include "gasyncresult.h" #include "gtask.h" +#include "gmarshal-internal.h" #ifdef G_OS_UNIX #include "gunixconnection.h" @@ -127,7 +128,7 @@ * The #GDBusConnection type is used for D-Bus connections to remote * peers such as a message buses. It is a low-level API that offers a * lot of flexibility. For instance, it lets you establish a connection - * over any transport that can by represented as an #GIOStream. + * over any transport that can by represented as a #GIOStream. * * This class is rarely used directly in D-Bus clients. If you are writing * a D-Bus client, it is often easier to use the g_bus_own_name(), @@ -1049,11 +1050,14 @@ g_dbus_connection_class_init (GDBusConnectionClass *klass) G_STRUCT_OFFSET (GDBusConnectionClass, closed), NULL, NULL, - NULL, + _g_cclosure_marshal_VOID__BOOLEAN_BOXED, G_TYPE_NONE, 2, G_TYPE_BOOLEAN, G_TYPE_ERROR); + g_signal_set_va_marshaller (signals[CLOSED_SIGNAL], + G_TYPE_FROM_CLASS (klass), + _g_cclosure_marshal_VOID__BOOLEAN_BOXEDv); } static void @@ -2692,7 +2696,7 @@ async_initable_iface_init (GAsyncInitableIface *async_initable_iface) * then call g_dbus_connection_new_finish() to get the result of the * operation. * - * This is a asynchronous failable constructor. See + * This is an asynchronous failable constructor. See * g_dbus_connection_new_sync() for the synchronous * version. * @@ -2831,13 +2835,13 @@ g_dbus_connection_new_sync (GIOStream *stream, * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS flags. * * When the operation is finished, @callback will be invoked. You can - * then call g_dbus_connection_new_finish() to get the result of the - * operation. + * then call g_dbus_connection_new_for_address_finish() to get the result of + * the operation. * * If @observer is not %NULL it may be used to control the * authentication process. * - * This is a asynchronous failable constructor. See + * This is an asynchronous failable constructor. See * g_dbus_connection_new_for_address_sync() for the synchronous * version. * @@ -2964,8 +2968,8 @@ g_dbus_connection_new_for_address_sync (const gchar *address, * more details. * * Note that this function should be used with care. Most modern UNIX - * desktops tie the notion of a user session the session bus, and expect - * all of a users applications to quit when their bus connection goes away. + * desktops tie the notion of a user session with the session bus, and expect + * all of a user's applications to quit when their bus connection goes away. * If you are setting @exit_on_close to %FALSE for the shared session * bus connection, you should make sure that your application exits * when the user session ends. @@ -7360,7 +7364,7 @@ bus_get_async_initable_cb (GObject *source_object, * When the operation is finished, @callback will be invoked. You can * then call g_bus_get_finish() to get the result of the operation. * - * This is a asynchronous failable function. See g_bus_get_sync() for + * This is an asynchronous failable function. See g_bus_get_sync() for * the synchronous version. * * Since: 2.26 diff --git a/gio/gdbusdaemon.c b/gio/gdbusdaemon.c index a9b626215..0d5058f70 100644 --- a/gio/gdbusdaemon.c +++ b/gio/gdbusdaemon.c @@ -1539,7 +1539,7 @@ on_authorize_authenticated_peer (GDBusAuthObserver *observer, GCredentials *credentials, gpointer user_data) { - gboolean authorized = TRUE; + gboolean authorized = FALSE; if (credentials != NULL) { @@ -1549,6 +1549,14 @@ on_authorize_authenticated_peer (GDBusAuthObserver *observer, authorized = g_credentials_is_same_user (credentials, own_credentials, NULL); g_object_unref (own_credentials); } +#ifdef G_OS_WIN32 + else + { + /* We allow ANONYMOUS authentication on Windows for now, in + * combination with the nonce-tcp transport. */ + authorized = TRUE; + } +#endif return authorized; } @@ -1706,7 +1714,7 @@ g_dbus_daemon_class_init (GDBusDaemonClass *klass) G_SIGNAL_RUN_LAST, 0, NULL, NULL, - g_cclosure_marshal_VOID__VOID, + NULL, G_TYPE_NONE, 0); g_object_class_install_property (gobject_class, diff --git a/gio/gdbusinterfaceskeleton.c b/gio/gdbusinterfaceskeleton.c index 96bd520aa..4a06516c1 100644 --- a/gio/gdbusinterfaceskeleton.c +++ b/gio/gdbusinterfaceskeleton.c @@ -27,6 +27,7 @@ #include "gdbusprivate.h" #include "gdbusmethodinvocation.h" #include "gdbusconnection.h" +#include "gmarshal-internal.h" #include "gtask.h" #include "gioerror.h" @@ -248,10 +249,13 @@ g_dbus_interface_skeleton_class_init (GDBusInterfaceSkeletonClass *klass) G_STRUCT_OFFSET (GDBusInterfaceSkeletonClass, g_authorize_method), _g_signal_accumulator_false_handled, NULL, - NULL, + _g_cclosure_marshal_BOOLEAN__OBJECT, G_TYPE_BOOLEAN, 1, G_TYPE_DBUS_METHOD_INVOCATION); + g_signal_set_va_marshaller (signals[G_AUTHORIZE_METHOD_SIGNAL], + G_TYPE_FROM_CLASS (klass), + _g_cclosure_marshal_BOOLEAN__OBJECTv); } static void diff --git a/gio/gdbusmessage.c b/gio/gdbusmessage.c index 9b89dc5b6..852a70430 100644 --- a/gio/gdbusmessage.c +++ b/gio/gdbusmessage.c @@ -873,7 +873,7 @@ g_dbus_message_set_message_type (GDBusMessage *message, GDBusMessageType type) { g_return_if_fail (G_IS_DBUS_MESSAGE (message)); - g_return_if_fail (type >=0 && type < 256); + g_return_if_fail ((guint) type >= 0 && (guint) type < 256); if (message->locked) { @@ -920,7 +920,7 @@ g_dbus_message_set_flags (GDBusMessage *message, GDBusMessageFlags flags) { g_return_if_fail (G_IS_DBUS_MESSAGE (message)); - g_return_if_fail (flags >=0 && flags < 256); + g_return_if_fail ((guint) flags >= 0 && (guint) flags < 256); if (message->locked) { @@ -998,7 +998,7 @@ g_dbus_message_get_header (GDBusMessage *message, GDBusMessageHeaderField header_field) { g_return_val_if_fail (G_IS_DBUS_MESSAGE (message), NULL); - g_return_val_if_fail (header_field >=0 && header_field < 256, NULL); + g_return_val_if_fail ((guint) header_field >= 0 && (guint) header_field < 256, NULL); return g_hash_table_lookup (message->headers, GUINT_TO_POINTER (header_field)); } @@ -1020,7 +1020,7 @@ g_dbus_message_set_header (GDBusMessage *message, GVariant *value) { g_return_if_fail (G_IS_DBUS_MESSAGE (message)); - g_return_if_fail (header_field >=0 && header_field < 256); + g_return_if_fail ((guint) header_field >= 0 && (guint) header_field < 256); if (message->locked) { diff --git a/gio/gdbusobject.c b/gio/gdbusobject.c index 3c52a6a84..32393edf6 100644 --- a/gio/gdbusobject.c +++ b/gio/gdbusobject.c @@ -65,7 +65,7 @@ g_dbus_object_default_init (GDBusObjectIface *iface) G_STRUCT_OFFSET (GDBusObjectIface, interface_added), NULL, NULL, - g_cclosure_marshal_VOID__OBJECT, + NULL, G_TYPE_NONE, 1, G_TYPE_DBUS_INTERFACE); @@ -85,7 +85,7 @@ g_dbus_object_default_init (GDBusObjectIface *iface) G_STRUCT_OFFSET (GDBusObjectIface, interface_removed), NULL, NULL, - g_cclosure_marshal_VOID__OBJECT, + NULL, G_TYPE_NONE, 1, G_TYPE_DBUS_INTERFACE); diff --git a/gio/gdbusobjectmanager.c b/gio/gdbusobjectmanager.c index 3ef622a33..87634cd83 100644 --- a/gio/gdbusobjectmanager.c +++ b/gio/gdbusobjectmanager.c @@ -26,6 +26,7 @@ #include "gdbusutils.h" #include "glibintl.h" +#include "gmarshal-internal.h" /** * SECTION:gdbusobjectmanager @@ -51,6 +52,16 @@ typedef GDBusObjectManagerIface GDBusObjectManagerInterface; G_DEFINE_INTERFACE (GDBusObjectManager, g_dbus_object_manager, G_TYPE_OBJECT) +enum { + OBJECT_ADDED, + OBJECT_REMOVED, + INTERFACE_ADDED, + INTERFACE_REMOVED, + N_SIGNALS +}; + +static guint signals[N_SIGNALS]; + static void g_dbus_object_manager_default_init (GDBusObjectManagerIface *iface) { @@ -63,16 +74,17 @@ g_dbus_object_manager_default_init (GDBusObjectManagerIface *iface) * * Since: 2.30 */ - g_signal_new (I_("object-added"), - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (GDBusObjectManagerIface, object_added), - NULL, - NULL, - g_cclosure_marshal_VOID__OBJECT, - G_TYPE_NONE, - 1, - G_TYPE_DBUS_OBJECT); + signals[OBJECT_ADDED] = + g_signal_new (I_("object-added"), + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (GDBusObjectManagerIface, object_added), + NULL, + NULL, + NULL, + G_TYPE_NONE, + 1, + G_TYPE_DBUS_OBJECT); /** * GDBusObjectManager::object-removed: @@ -83,16 +95,17 @@ g_dbus_object_manager_default_init (GDBusObjectManagerIface *iface) * * Since: 2.30 */ - g_signal_new (I_("object-removed"), - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (GDBusObjectManagerIface, object_removed), - NULL, - NULL, - g_cclosure_marshal_VOID__OBJECT, - G_TYPE_NONE, - 1, - G_TYPE_DBUS_OBJECT); + signals[OBJECT_REMOVED] = + g_signal_new (I_("object-removed"), + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (GDBusObjectManagerIface, object_removed), + NULL, + NULL, + NULL, + G_TYPE_NONE, + 1, + G_TYPE_DBUS_OBJECT); /** * GDBusObjectManager::interface-added: @@ -107,17 +120,21 @@ g_dbus_object_manager_default_init (GDBusObjectManagerIface *iface) * * Since: 2.30 */ - g_signal_new (I_("interface-added"), - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (GDBusObjectManagerIface, interface_added), - NULL, - NULL, - NULL, - G_TYPE_NONE, - 2, - G_TYPE_DBUS_OBJECT, - G_TYPE_DBUS_INTERFACE); + signals[INTERFACE_ADDED] = + g_signal_new (I_("interface-added"), + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (GDBusObjectManagerIface, interface_added), + NULL, + NULL, + _g_cclosure_marshal_VOID__OBJECT_OBJECT, + G_TYPE_NONE, + 2, + G_TYPE_DBUS_OBJECT, + G_TYPE_DBUS_INTERFACE); + g_signal_set_va_marshaller (signals[INTERFACE_ADDED], + G_TYPE_FROM_INTERFACE (iface), + _g_cclosure_marshal_VOID__OBJECT_OBJECTv); /** * GDBusObjectManager::interface-removed: @@ -132,17 +149,21 @@ g_dbus_object_manager_default_init (GDBusObjectManagerIface *iface) * * Since: 2.30 */ - g_signal_new (I_("interface-removed"), - G_TYPE_FROM_INTERFACE (iface), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (GDBusObjectManagerIface, interface_removed), - NULL, - NULL, - NULL, - G_TYPE_NONE, - 2, - G_TYPE_DBUS_OBJECT, - G_TYPE_DBUS_INTERFACE); + signals[INTERFACE_REMOVED] = + g_signal_new (I_("interface-removed"), + G_TYPE_FROM_INTERFACE (iface), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (GDBusObjectManagerIface, interface_removed), + NULL, + NULL, + _g_cclosure_marshal_VOID__OBJECT_OBJECT, + G_TYPE_NONE, + 2, + G_TYPE_DBUS_OBJECT, + G_TYPE_DBUS_INTERFACE); + g_signal_set_va_marshaller (signals[INTERFACE_REMOVED], + G_TYPE_FROM_INTERFACE (iface), + _g_cclosure_marshal_VOID__OBJECT_OBJECTv); } diff --git a/gio/gdbusobjectmanagerclient.c b/gio/gdbusobjectmanagerclient.c index 6a59c28b4..38e6f539f 100644 --- a/gio/gdbusobjectmanagerclient.c +++ b/gio/gdbusobjectmanagerclient.c @@ -36,6 +36,7 @@ #include "gdbusinterface.h" #include "glibintl.h" +#include "gmarshal-internal.h" /** * SECTION:gdbusobjectmanagerclient @@ -517,7 +518,7 @@ g_dbus_object_manager_client_class_init (GDBusObjectManagerClientClass *klass) G_STRUCT_OFFSET (GDBusObjectManagerClientClass, interface_proxy_signal), NULL, NULL, - NULL, + _g_cclosure_marshal_VOID__OBJECT_OBJECT_STRING_STRING_VARIANT, G_TYPE_NONE, 5, G_TYPE_DBUS_OBJECT_PROXY, @@ -525,6 +526,9 @@ g_dbus_object_manager_client_class_init (GDBusObjectManagerClientClass *klass) G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT); + g_signal_set_va_marshaller (signals[INTERFACE_PROXY_SIGNAL_SIGNAL], + G_TYPE_FROM_CLASS (klass), + _g_cclosure_marshal_VOID__OBJECT_OBJECT_STRING_STRING_VARIANTv); /** * GDBusObjectManagerClient::interface-proxy-properties-changed: @@ -556,13 +560,16 @@ g_dbus_object_manager_client_class_init (GDBusObjectManagerClientClass *klass) G_STRUCT_OFFSET (GDBusObjectManagerClientClass, interface_proxy_properties_changed), NULL, NULL, - NULL, + _g_cclosure_marshal_VOID__OBJECT_OBJECT_VARIANT_BOXED, G_TYPE_NONE, 4, G_TYPE_DBUS_OBJECT_PROXY, G_TYPE_DBUS_PROXY, G_TYPE_VARIANT, G_TYPE_STRV); + g_signal_set_va_marshaller (signals[INTERFACE_PROXY_PROPERTIES_CHANGED_SIGNAL], + G_TYPE_FROM_CLASS (klass), + _g_cclosure_marshal_VOID__OBJECT_OBJECT_VARIANT_BOXEDv); } static void diff --git a/gio/gdbusprivate.c b/gio/gdbusprivate.c index 488fe50c4..0421ca56c 100644 --- a/gio/gdbusprivate.c +++ b/gio/gdbusprivate.c @@ -701,7 +701,7 @@ _g_dbus_worker_do_read_cb (GInputStream *input_stream, worker); #endif - /* TODO: hmm, hmm... */ + /* The read failed, which could mean the dbus-daemon was sent SIGTERM. */ if (bytes_read == 0) { g_set_error (&error, diff --git a/gio/gdbusproxy.c b/gio/gdbusproxy.c index 0ab117854..39eed1688 100644 --- a/gio/gdbusproxy.c +++ b/gio/gdbusproxy.c @@ -42,6 +42,7 @@ #endif #include "glibintl.h" +#include "gmarshal-internal.h" /** * SECTION:gdbusproxy @@ -595,11 +596,14 @@ g_dbus_proxy_class_init (GDBusProxyClass *klass) G_STRUCT_OFFSET (GDBusProxyClass, g_properties_changed), NULL, NULL, - NULL, + _g_cclosure_marshal_VOID__VARIANT_BOXED, G_TYPE_NONE, 2, G_TYPE_VARIANT, G_TYPE_STRV | G_SIGNAL_TYPE_STATIC_SCOPE); + g_signal_set_va_marshaller (signals[PROPERTIES_CHANGED_SIGNAL], + G_TYPE_FROM_CLASS (klass), + _g_cclosure_marshal_VOID__VARIANT_BOXEDv); /** * GDBusProxy::g-signal: @@ -618,12 +622,15 @@ g_dbus_proxy_class_init (GDBusProxyClass *klass) G_STRUCT_OFFSET (GDBusProxyClass, g_signal), NULL, NULL, - NULL, + _g_cclosure_marshal_VOID__STRING_STRING_VARIANT, G_TYPE_NONE, 3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT); + g_signal_set_va_marshaller (signals[SIGNAL_SIGNAL], + G_TYPE_FROM_CLASS (klass), + _g_cclosure_marshal_VOID__STRING_STRING_VARIANTv); } @@ -1613,6 +1620,7 @@ async_init_start_service_by_name_cb (GDBusConnection *connection, } else { + g_dbus_error_strip_remote_error (error); g_prefix_error (&error, _("Error calling StartServiceByName for %s: "), proxy->priv->name); diff --git a/gio/gdbusserver.c b/gio/gdbusserver.c index 026d4ee6b..26f8dadd0 100644 --- a/gio/gdbusserver.c +++ b/gio/gdbusserver.c @@ -42,6 +42,7 @@ #include "ginetsocketaddress.h" #include "ginputstream.h" #include "giostream.h" +#include "gmarshal-internal.h" #ifdef G_OS_UNIX #include <unistd.h> @@ -72,6 +73,11 @@ * * An example of peer-to-peer communication with G-DBus can be found * in [gdbus-example-peer.c](https://git.gnome.org/browse/glib/tree/gio/tests/gdbus-example-peer.c). + * + * Note that a minimal #GDBusServer will accept connections from any + * peer. In many use-cases it will be necessary to add a #GDBusAuthObserver + * that only accepts connections that have successfully authenticated + * as the same user that is running the #GDBusServer. */ /** @@ -96,6 +102,7 @@ struct _GDBusServer gchar *client_address; + gchar *unix_socket_path; GSocketListener *listener; gboolean is_using_listener; gulong run_signal_handler_id; @@ -157,6 +164,17 @@ G_DEFINE_TYPE_WITH_CODE (GDBusServer, g_dbus_server, G_TYPE_OBJECT, G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE, initable_iface_init)) static void +g_dbus_server_dispose (GObject *object) +{ + GDBusServer *server = G_DBUS_SERVER (object); + + if (server->active) + g_dbus_server_stop (server); + + G_OBJECT_CLASS (g_dbus_server_parent_class)->dispose (object); +} + +static void g_dbus_server_finalize (GObject *object) { GDBusServer *server = G_DBUS_SERVER (object); @@ -178,10 +196,20 @@ g_dbus_server_finalize (GObject *object) memset (server->nonce, '\0', 16); g_free (server->nonce); } - /* we could unlink the nonce file but I don't - * think it's really worth the effort/risk - */ - g_free (server->nonce_file); + + if (server->unix_socket_path) + { + if (g_unlink (server->unix_socket_path) != 0) + g_warning ("Failed to delete %s: %s", server->unix_socket_path, g_strerror (errno)); + g_free (server->unix_socket_path); + } + + if (server->nonce_file) + { + if (g_unlink (server->nonce_file) != 0) + g_warning ("Failed to delete %s: %s", server->nonce_file, g_strerror (errno)); + g_free (server->nonce_file); + } g_main_context_unref (server->main_context_at_construction); @@ -265,6 +293,7 @@ g_dbus_server_class_init (GDBusServerClass *klass) { GObjectClass *gobject_class = G_OBJECT_CLASS (klass); + gobject_class->dispose = g_dbus_server_dispose; gobject_class->finalize = g_dbus_server_finalize; gobject_class->set_property = g_dbus_server_set_property; gobject_class->get_property = g_dbus_server_get_property; @@ -424,10 +453,13 @@ g_dbus_server_class_init (GDBusServerClass *klass) G_STRUCT_OFFSET (GDBusServerClass, new_connection), g_signal_accumulator_true_handled, NULL, /* accu_data */ - NULL, + _g_cclosure_marshal_BOOLEAN__OBJECT, G_TYPE_BOOLEAN, 1, G_TYPE_DBUS_CONNECTION); + g_signal_set_va_marshaller (_signals[NEW_CONNECTION_SIGNAL], + G_TYPE_FROM_CLASS (klass), + _g_cclosure_marshal_BOOLEAN__OBJECTv); } static void @@ -457,6 +489,10 @@ on_run (GSocketService *service, * Once constructed, you can use g_dbus_server_get_client_address() to * get a D-Bus address string that clients can use to connect. * + * To have control over the available authentication mechanisms and + * the users that are authorized to connect, it is strongly recommended + * to provide a non-%NULL #GDBusAuthObserver. + * * Connect to the #GDBusServer::new-connection signal to handle * incoming connections. * @@ -465,8 +501,8 @@ on_run (GSocketService *service, * * #GDBusServer is used in this [example][gdbus-peer-to-peer]. * - * This is a synchronous failable constructor. See - * g_dbus_server_new() for the asynchronous version. + * This is a synchronous failable constructor. There is currently no + * asynchronous version. * * Returns: A #GDBusServer or %NULL if @error is set. Free with * g_object_unref(). @@ -632,7 +668,7 @@ random_ascii (void) return ret; } -/* note that address_entry has already been validated => exactly one of path, tmpdir or abstract keys are set */ +/* note that address_entry has already been validated => exactly one of path, dir, tmpdir, or abstract keys are set */ static gboolean try_unix (GDBusServer *server, const gchar *address_entry, @@ -641,6 +677,7 @@ try_unix (GDBusServer *server, { gboolean ret; const gchar *path; + const gchar *dir; const gchar *tmpdir; const gchar *abstract; GSocketAddress *address; @@ -649,6 +686,7 @@ try_unix (GDBusServer *server, address = NULL; path = g_hash_table_lookup (key_value_pairs, "path"); + dir = g_hash_table_lookup (key_value_pairs, "dir"); tmpdir = g_hash_table_lookup (key_value_pairs, "tmpdir"); abstract = g_hash_table_lookup (key_value_pairs, "abstract"); @@ -656,20 +694,21 @@ try_unix (GDBusServer *server, { address = g_unix_socket_address_new (path); } - else if (tmpdir != NULL) + else if (dir != NULL || tmpdir != NULL) { gint n; GString *s; GError *local_error; retry: - s = g_string_new (tmpdir); + s = g_string_new (tmpdir != NULL ? tmpdir : dir); g_string_append (s, "/dbus-"); for (n = 0; n < 8; n++) g_string_append_c (s, random_ascii ()); - /* prefer abstract namespace if available */ - if (g_unix_socket_address_abstract_names_supported ()) + /* prefer abstract namespace if available for tmpdir: addresses + * abstract namespace is disallowed for dir: addresses */ + if (tmpdir != NULL && g_unix_socket_address_abstract_names_supported ()) address = g_unix_socket_address_new_with_type (s->str, -1, G_UNIX_SOCKET_ADDRESS_ABSTRACT); @@ -704,7 +743,7 @@ try_unix (GDBusServer *server, g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, - _("Abstract name space not supported")); + _("Abstract namespace not supported")); goto out; } address = g_unix_socket_address_new_with_type (abstract, @@ -734,24 +773,30 @@ try_unix (GDBusServer *server, /* Fill out client_address if the connection attempt worked */ if (ret) { + const char *address_path; + char *escaped_path; + server->is_using_listener = TRUE; + address_path = g_unix_socket_address_get_path (G_UNIX_SOCKET_ADDRESS (address)); + escaped_path = g_dbus_address_escape_value (address_path); switch (g_unix_socket_address_get_address_type (G_UNIX_SOCKET_ADDRESS (address))) { case G_UNIX_SOCKET_ADDRESS_ABSTRACT: - server->client_address = g_strdup_printf ("unix:abstract=%s", - g_unix_socket_address_get_path (G_UNIX_SOCKET_ADDRESS (address))); + server->client_address = g_strdup_printf ("unix:abstract=%s", escaped_path); break; case G_UNIX_SOCKET_ADDRESS_PATH: - server->client_address = g_strdup_printf ("unix:path=%s", - g_unix_socket_address_get_path (G_UNIX_SOCKET_ADDRESS (address))); + server->client_address = g_strdup_printf ("unix:path=%s", escaped_path); + server->unix_socket_path = g_strdup (address_path); break; default: g_assert_not_reached (); break; } + + g_free (escaped_path); } g_object_unref (address); } @@ -843,6 +888,7 @@ try_tcp (GDBusServer *server, gsize bytes_written; gsize bytes_remaining; char *file_escaped; + char *host_escaped; server->nonce = g_new0 (guchar, 16); for (n = 0; n < 16; n++) @@ -882,11 +928,13 @@ try_tcp (GDBusServer *server, } if (!g_close (fd, error)) goto out; - file_escaped = g_uri_escape_string (server->nonce_file, "/\\", FALSE); + host_escaped = g_dbus_address_escape_value (host); + file_escaped = g_dbus_address_escape_value (server->nonce_file); server->client_address = g_strdup_printf ("nonce-tcp:host=%s,port=%d,noncefile=%s", - host, + host_escaped, port_num, file_escaped); + g_free (host_escaped); g_free (file_escaped); } else diff --git a/gio/gdbusutils.c b/gio/gdbusutils.c index bfca02d6f..ff9b44117 100644 --- a/gio/gdbusutils.c +++ b/gio/gdbusutils.c @@ -291,22 +291,22 @@ gchar * g_dbus_generate_guid (void) { GString *s; - GTimeVal now; guint32 r1; guint32 r2; guint32 r3; + gint64 now_us; s = g_string_new (NULL); r1 = g_random_int (); r2 = g_random_int (); r3 = g_random_int (); - g_get_current_time (&now); + now_us = g_get_real_time (); g_string_append_printf (s, "%08x", r1); g_string_append_printf (s, "%08x", r2); g_string_append_printf (s, "%08x", r3); - g_string_append_printf (s, "%08x", (guint32) now.tv_sec); + g_string_append_printf (s, "%08x", (guint32) (now_us / G_USEC_PER_SEC)); return g_string_free (s, FALSE); } diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c index 77e385aa5..a484c63d4 100644 --- a/gio/gdesktopappinfo.c +++ b/gio/gdesktopappinfo.c @@ -24,6 +24,10 @@ #include "config.h" +/* For the #GDesktopAppInfoLookup macros; since macro deprecation is implemented + * in the preprocessor, we need to define this before including glib.h*/ +#define GLIB_DISABLE_DEPRECATION_WARNINGS + #include <errno.h> #include <string.h> #include <unistd.h> @@ -2514,34 +2518,43 @@ prepend_terminal_to_vector (int *argc, term_argv = g_new0 (char *, 3); check = g_find_program_in_path ("gnome-terminal"); - if (check == NULL) - check = g_find_program_in_path ("mate-terminal"); - if (check == NULL) - check = g_find_program_in_path ("xfce4-terminal"); if (check != NULL) { term_argv[0] = check; - /* Note that gnome-terminal takes -x and - * as -e in gnome-terminal is broken we use that. */ - term_argv[1] = g_strdup ("-x"); + /* Since 2017, gnome-terminal has preferred `--` over `-x` or `-e`. */ + term_argv[1] = g_strdup ("--"); } else { if (check == NULL) - check = g_find_program_in_path ("nxterm"); - if (check == NULL) - check = g_find_program_in_path ("color-xterm"); - if (check == NULL) - check = g_find_program_in_path ("rxvt"); - if (check == NULL) - check = g_find_program_in_path ("dtterm"); + check = g_find_program_in_path ("mate-terminal"); if (check == NULL) + check = g_find_program_in_path ("xfce4-terminal"); + if (check != NULL) { - check = g_strdup ("xterm"); - g_debug ("Couldn’t find a terminal: falling back to xterm"); + term_argv[0] = check; + /* Note that gnome-terminal takes -x and + * as -e in gnome-terminal is broken we use that. */ + term_argv[1] = g_strdup ("-x"); + } + else + { + if (check == NULL) + check = g_find_program_in_path ("nxterm"); + if (check == NULL) + check = g_find_program_in_path ("color-xterm"); + if (check == NULL) + check = g_find_program_in_path ("rxvt"); + if (check == NULL) + check = g_find_program_in_path ("dtterm"); + if (check == NULL) + { + check = g_strdup ("xterm"); + g_debug ("Couldn’t find a terminal: falling back to xterm"); + } + term_argv[0] = check; + term_argv[1] = g_strdup ("-e"); } - term_argv[0] = check; - term_argv[1] = g_strdup ("-e"); } real_argc = term_argc + *argc; @@ -4555,6 +4568,9 @@ g_app_info_get_all (void) * * #GDesktopAppInfoLookup is an opaque data structure and can only be accessed * using the following functions. + * + * Deprecated: 2.28: The #GDesktopAppInfoLookup interface is deprecated and + * unused by GIO. **/ G_GNUC_BEGIN_IGNORE_DEPRECATIONS @@ -4575,17 +4591,18 @@ g_desktop_app_info_lookup_default_init (GDesktopAppInfoLookupInterface *iface) * @uri_scheme: a string containing a URI scheme. * * Gets the default application for launching applications - * using this URI scheme for a particular GDesktopAppInfoLookup + * using this URI scheme for a particular #GDesktopAppInfoLookup * implementation. * - * The GDesktopAppInfoLookup interface and this function is used + * The #GDesktopAppInfoLookup interface and this function is used * to implement g_app_info_get_default_for_uri_scheme() backends * in a GIO module. There is no reason for applications to use it * directly. Applications should use g_app_info_get_default_for_uri_scheme(). * * Returns: (transfer full): #GAppInfo for given @uri_scheme or %NULL on error. * - * Deprecated: The #GDesktopAppInfoLookup interface is deprecated and unused by gio. + * Deprecated: 2.28: The #GDesktopAppInfoLookup interface is deprecated and + * unused by GIO. */ GAppInfo * g_desktop_app_info_lookup_get_default_for_uri_scheme (GDesktopAppInfoLookup *lookup, diff --git a/gio/gdesktopappinfo.h b/gio/gdesktopappinfo.h index 1254038a4..591bdd2ef 100644 --- a/gio/gdesktopappinfo.h +++ b/gio/gdesktopappinfo.h @@ -106,22 +106,21 @@ GLIB_AVAILABLE_IN_2_38 gchar * g_desktop_app_info_get_action_name (GDesktopAppInfo *info, const gchar *action_name); -#ifndef G_DISABLE_DEPRECATED - -#define G_TYPE_DESKTOP_APP_INFO_LOOKUP (g_desktop_app_info_lookup_get_type ()) -#define G_DESKTOP_APP_INFO_LOOKUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_DESKTOP_APP_INFO_LOOKUP, GDesktopAppInfoLookup)) -#define G_IS_DESKTOP_APP_INFO_LOOKUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_DESKTOP_APP_INFO_LOOKUP)) -#define G_DESKTOP_APP_INFO_LOOKUP_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_DESKTOP_APP_INFO_LOOKUP, GDesktopAppInfoLookupIface)) +#define G_TYPE_DESKTOP_APP_INFO_LOOKUP (g_desktop_app_info_lookup_get_type ()) GLIB_DEPRECATED_MACRO_IN_2_28 +#define G_DESKTOP_APP_INFO_LOOKUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_DESKTOP_APP_INFO_LOOKUP, GDesktopAppInfoLookup)) GLIB_DEPRECATED_MACRO_IN_2_28 +#define G_IS_DESKTOP_APP_INFO_LOOKUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), G_TYPE_DESKTOP_APP_INFO_LOOKUP)) GLIB_DEPRECATED_MACRO_IN_2_28 +#define G_DESKTOP_APP_INFO_LOOKUP_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), G_TYPE_DESKTOP_APP_INFO_LOOKUP, GDesktopAppInfoLookupIface)) GLIB_DEPRECATED_MACRO_IN_2_28 /** * G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME: * * Extension point for default handler to URI association. See * [Extending GIO][extending-gio]. + * + * Deprecated: 2.28: The #GDesktopAppInfoLookup interface is deprecated and + * unused by GIO. */ -#define G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME "gio-desktop-app-info-lookup" - -#endif /* G_DISABLE_DEPRECATED */ +#define G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME "gio-desktop-app-info-lookup" GLIB_DEPRECATED_MACRO_IN_2_28 /** * GDesktopAppInfoLookupIface: diff --git a/gio/gdrive.c b/gio/gdrive.c index 24784f3df..08f72b23b 100644 --- a/gio/gdrive.c +++ b/gio/gdrive.c @@ -78,7 +78,7 @@ g_drive_default_init (GDriveInterface *iface) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GDriveIface, changed), NULL, NULL, - g_cclosure_marshal_VOID__VOID, + NULL, G_TYPE_NONE, 0); /** @@ -95,7 +95,7 @@ g_drive_default_init (GDriveInterface *iface) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GDriveIface, disconnected), NULL, NULL, - g_cclosure_marshal_VOID__VOID, + NULL, G_TYPE_NONE, 0); /** @@ -110,7 +110,7 @@ g_drive_default_init (GDriveInterface *iface) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GDriveIface, eject_button), NULL, NULL, - g_cclosure_marshal_VOID__VOID, + NULL, G_TYPE_NONE, 0); /** @@ -127,7 +127,7 @@ g_drive_default_init (GDriveInterface *iface) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GDriveIface, stop_button), NULL, NULL, - g_cclosure_marshal_VOID__VOID, + NULL, G_TYPE_NONE, 0); } diff --git a/gio/gdtlsconnection.c b/gio/gdtlsconnection.c index cbc25d4f2..1a74e3cc4 100644 --- a/gio/gdtlsconnection.c +++ b/gio/gdtlsconnection.c @@ -30,6 +30,7 @@ #include "gtlsdatabase.h" #include "gtlsinteraction.h" #include "glibintl.h" +#include "gmarshal-internal.h" /** * SECTION:gdtlsconnection @@ -317,10 +318,13 @@ g_dtls_connection_default_init (GDtlsConnectionInterface *iface) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GDtlsConnectionInterface, accept_certificate), g_signal_accumulator_true_handled, NULL, - NULL, + _g_cclosure_marshal_BOOLEAN__OBJECT_FLAGS, G_TYPE_BOOLEAN, 2, G_TYPE_TLS_CERTIFICATE, G_TYPE_TLS_CERTIFICATE_FLAGS); + g_signal_set_va_marshaller (signals[ACCEPT_CERTIFICATE], + G_TYPE_FROM_INTERFACE (iface), + _g_cclosure_marshal_BOOLEAN__OBJECT_FLAGSv); } /** @@ -638,6 +642,7 @@ g_dtls_connection_get_require_close_notify (GDtlsConnection *conn) * required for compatibility. Also, rehandshaking has been removed * from the TLS protocol in TLS 1.3. */ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS void g_dtls_connection_set_rehandshake_mode (GDtlsConnection *conn, GTlsRehandshakeMode mode) @@ -648,6 +653,7 @@ g_dtls_connection_set_rehandshake_mode (GDtlsConnection *conn, "rehandshake-mode", mode, NULL); } +G_GNUC_END_IGNORE_DEPRECATIONS /** * g_dtls_connection_get_rehandshake_mode: @@ -660,6 +666,7 @@ g_dtls_connection_set_rehandshake_mode (GDtlsConnection *conn, * * Since: 2.48 */ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS GTlsRehandshakeMode g_dtls_connection_get_rehandshake_mode (GDtlsConnection *conn) { @@ -672,6 +679,7 @@ g_dtls_connection_get_rehandshake_mode (GDtlsConnection *conn) NULL); return mode; } +G_GNUC_END_IGNORE_DEPRECATIONS /** * g_dtls_connection_handshake: diff --git a/gio/gdtlsconnection.h b/gio/gdtlsconnection.h index 364be935e..3901cdc9e 100644 --- a/gio/gdtlsconnection.h +++ b/gio/gdtlsconnection.h @@ -129,11 +129,13 @@ void g_dtls_connection_set_require_close_notify (GDtlsConnec GLIB_AVAILABLE_IN_2_48 gboolean g_dtls_connection_get_require_close_notify (GDtlsConnection *conn); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS GLIB_DEPRECATED_IN_2_60 void g_dtls_connection_set_rehandshake_mode (GDtlsConnection *conn, GTlsRehandshakeMode mode); GLIB_DEPRECATED_IN_2_60 GTlsRehandshakeMode g_dtls_connection_get_rehandshake_mode (GDtlsConnection *conn); +G_GNUC_END_IGNORE_DEPRECATIONS GLIB_AVAILABLE_IN_2_48 gboolean g_dtls_connection_handshake (GDtlsConnection *conn, diff --git a/gio/gfile.c b/gio/gfile.c index 24b136d80..45777a61d 100644 --- a/gio/gfile.c +++ b/gio/gfile.c @@ -1539,9 +1539,9 @@ g_file_query_filesystem_info_finish (GFile *file, * * Gets a #GMount for the #GFile. * - * If the #GFileIface for @file does not have a mount (e.g. - * possibly a remote share), @error will be set to %G_IO_ERROR_NOT_FOUND - * and %NULL will be returned. + * #GMount is returned only for user interesting locations, see + * #GVolumeMonitor. If the #GFileIface for @file does not have a #mount, + * @error will be set to %G_IO_ERROR_NOT_FOUND and %NULL #will be returned. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation @@ -3284,12 +3284,12 @@ file_copy_fallback (GFile *source, out = (GOutputStream*)_g_local_file_output_stream_replace (_g_local_file_get_filename (G_LOCAL_FILE (destination)), FALSE, NULL, flags & G_FILE_COPY_BACKUP, - G_FILE_CREATE_REPLACE_DESTINATION, - info, + G_FILE_CREATE_REPLACE_DESTINATION | + G_FILE_CREATE_PRIVATE, info, cancellable, error); else out = (GOutputStream*)_g_local_file_output_stream_create (_g_local_file_get_filename (G_LOCAL_FILE (destination)), - FALSE, 0, info, + FALSE, G_FILE_CREATE_PRIVATE, info, cancellable, error); } else if (flags & G_FILE_COPY_OVERWRITE) @@ -3297,12 +3297,13 @@ file_copy_fallback (GFile *source, out = (GOutputStream *)g_file_replace (destination, NULL, flags & G_FILE_COPY_BACKUP, - G_FILE_CREATE_REPLACE_DESTINATION, + G_FILE_CREATE_REPLACE_DESTINATION | + G_FILE_CREATE_PRIVATE, cancellable, error); } else { - out = (GOutputStream *)g_file_create (destination, 0, cancellable, error); + out = (GOutputStream *)g_file_create (destination, G_FILE_CREATE_PRIVATE, cancellable, error); } if (!out) diff --git a/gio/gfileinfo.c b/gio/gfileinfo.c index d1c9140df..8c1d6c67f 100644 --- a/gio/gfileinfo.c +++ b/gio/gfileinfo.c @@ -832,9 +832,10 @@ _g_file_info_get_attribute_value (GFileInfo *info, * * Gets the value of a attribute, formated as a string. * This escapes things as needed to make the string valid - * utf8. + * UTF-8. * - * Returns: a UTF-8 string associated with the given @attribute. + * Returns: (nullable): a UTF-8 string associated with the given @attribute, or + * %NULL if the attribute wasn’t set. * When you're done with the string it must be freed with g_free(). **/ char * @@ -1463,7 +1464,8 @@ g_file_info_get_deletion_date (GFileInfo *info) static guint32 attr = 0; GFileAttributeValue *value; const char *date_str; - GTimeVal tv; + GTimeZone *local_tz = NULL; + GDateTime *dt = NULL; g_return_val_if_fail (G_IS_FILE_INFO (info), FALSE); @@ -1475,10 +1477,11 @@ g_file_info_get_deletion_date (GFileInfo *info) if (!date_str) return NULL; - if (g_time_val_from_iso8601 (date_str, &tv) == FALSE) - return NULL; + local_tz = g_time_zone_new_local (); + dt = g_date_time_new_from_iso8601 (date_str, local_tz); + g_time_zone_unref (local_tz); - return g_date_time_new_from_timeval_local (&tv); + return g_steal_pointer (&dt); } /** @@ -1752,7 +1755,11 @@ g_file_info_get_size (GFileInfo *info) * * Gets the modification time of the current @info and sets it * in @result. + * + * Deprecated: 2.62: Use g_file_info_get_modification_date_time() instead, as + * #GTimeVal is deprecated due to the year 2038 problem. **/ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS void g_file_info_get_modification_time (GFileInfo *info, GTimeVal *result) @@ -1774,6 +1781,47 @@ g_file_info_get_modification_time (GFileInfo *info, value = g_file_info_find_value (info, attr_mtime_usec); result->tv_usec = _g_file_attribute_value_get_uint32 (value); } +G_GNUC_END_IGNORE_DEPRECATIONS + +/** + * g_file_info_get_modification_date_time: + * @info: a #GFileInfo. + * + * Gets the modification time of the current @info and returns it as a + * #GDateTime. + * + * Returns: (transfer full) (nullable): modification time, or %NULL if unknown + * Since: 2.62 + */ +GDateTime * +g_file_info_get_modification_date_time (GFileInfo *info) +{ + static guint32 attr_mtime = 0, attr_mtime_usec; + GFileAttributeValue *value, *value_usec; + GDateTime *dt = NULL, *dt2 = NULL; + + g_return_val_if_fail (G_IS_FILE_INFO (info), NULL); + + if (attr_mtime == 0) + { + attr_mtime = lookup_attribute (G_FILE_ATTRIBUTE_TIME_MODIFIED); + attr_mtime_usec = lookup_attribute (G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC); + } + + value = g_file_info_find_value (info, attr_mtime); + if (value == NULL) + return NULL; + + value_usec = g_file_info_find_value (info, attr_mtime_usec); + if (value_usec == NULL) + return NULL; + + dt = g_date_time_new_from_unix_utc (_g_file_attribute_value_get_uint64 (value)); + dt2 = g_date_time_add_seconds (dt, _g_file_attribute_value_get_uint32 (value_usec) / (gdouble) G_USEC_PER_SEC); + g_date_time_unref (dt); + + return g_steal_pointer (&dt2); +} /** * g_file_info_get_symlink_target: @@ -2112,7 +2160,11 @@ g_file_info_set_size (GFileInfo *info, * * Sets the %G_FILE_ATTRIBUTE_TIME_MODIFIED attribute in the file * info to the given time value. + * + * Deprecated: 2.62: Use g_file_info_set_modification_date_time() instead, as + * #GTimeVal is deprecated due to the year 2038 problem. **/ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS void g_file_info_set_modification_time (GFileInfo *info, GTimeVal *mtime) @@ -2136,6 +2188,41 @@ g_file_info_set_modification_time (GFileInfo *info, if (value) _g_file_attribute_value_set_uint32 (value, mtime->tv_usec); } +G_GNUC_END_IGNORE_DEPRECATIONS + +/** + * g_file_info_set_modification_date_time: + * @info: a #GFileInfo. + * @mtime: (not nullable): a #GDateTime. + * + * Sets the %G_FILE_ATTRIBUTE_TIME_MODIFIED attribute in the file + * info to the given date/time value. + * + * Since: 2.62 + */ +void +g_file_info_set_modification_date_time (GFileInfo *info, + GDateTime *mtime) +{ + static guint32 attr_mtime = 0, attr_mtime_usec; + GFileAttributeValue *value; + + g_return_if_fail (G_IS_FILE_INFO (info)); + g_return_if_fail (mtime != NULL); + + if (attr_mtime == 0) + { + attr_mtime = lookup_attribute (G_FILE_ATTRIBUTE_TIME_MODIFIED); + attr_mtime_usec = lookup_attribute (G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC); + } + + value = g_file_info_create_value (info, attr_mtime); + if (value) + _g_file_attribute_value_set_uint64 (value, g_date_time_to_unix (mtime)); + value = g_file_info_create_value (info, attr_mtime_usec); + if (value) + _g_file_attribute_value_set_uint32 (value, g_date_time_get_microsecond (mtime)); +} /** * g_file_info_set_symlink_target: diff --git a/gio/gfileinfo.h b/gio/gfileinfo.h index 622c2b611..1629a2edb 100644 --- a/gio/gfileinfo.h +++ b/gio/gfileinfo.h @@ -1046,9 +1046,13 @@ GLIB_AVAILABLE_IN_ALL const char * g_file_info_get_content_type (GFileInfo *info); GLIB_AVAILABLE_IN_ALL goffset g_file_info_get_size (GFileInfo *info); -GLIB_AVAILABLE_IN_ALL +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +GLIB_DEPRECATED_IN_2_62_FOR(g_file_info_get_modification_date_time) void g_file_info_get_modification_time (GFileInfo *info, - GTimeVal *result); + GTimeVal *result); +G_GNUC_END_IGNORE_DEPRECATIONS +GLIB_AVAILABLE_IN_2_62 +GDateTime * g_file_info_get_modification_date_time (GFileInfo *info); GLIB_AVAILABLE_IN_ALL const char * g_file_info_get_symlink_target (GFileInfo *info); GLIB_AVAILABLE_IN_ALL @@ -1093,9 +1097,14 @@ void g_file_info_set_content_type (GFileInfo *info, GLIB_AVAILABLE_IN_ALL void g_file_info_set_size (GFileInfo *info, goffset size); -GLIB_AVAILABLE_IN_ALL +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +GLIB_DEPRECATED_IN_2_62_FOR(g_file_info_set_modification_date_time) void g_file_info_set_modification_time (GFileInfo *info, - GTimeVal *mtime); + GTimeVal *mtime); +G_GNUC_END_IGNORE_DEPRECATIONS +GLIB_AVAILABLE_IN_2_62 +void g_file_info_set_modification_date_time (GFileInfo *info, + GDateTime *mtime); GLIB_AVAILABLE_IN_ALL void g_file_info_set_symlink_target (GFileInfo *info, const char *symlink_target); diff --git a/gio/gfilemonitor.c b/gio/gfilemonitor.c index 36d35a88e..9b9c0ea2d 100644 --- a/gio/gfilemonitor.c +++ b/gio/gfilemonitor.c @@ -23,6 +23,7 @@ #include "gfilemonitor.h" #include "gioenumtypes.h" +#include "gmarshal-internal.h" #include "gfile.h" #include "gvfs.h" #include "glibintl.h" @@ -181,9 +182,12 @@ g_file_monitor_class_init (GFileMonitorClass *klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GFileMonitorClass, changed), NULL, NULL, - NULL, + _g_cclosure_marshal_VOID__OBJECT_OBJECT_ENUM, G_TYPE_NONE, 3, G_TYPE_FILE, G_TYPE_FILE, G_TYPE_FILE_MONITOR_EVENT); + g_signal_set_va_marshaller (g_file_monitor_changed_signal, + G_TYPE_FROM_CLASS (klass), + _g_cclosure_marshal_VOID__OBJECT_OBJECT_ENUMv); g_object_class_install_property (object_class, PROP_RATE_LIMIT, g_param_spec_int ("rate-limit", diff --git a/gio/gfilenamecompleter.c b/gio/gfilenamecompleter.c index 2550fecec..5883b8004 100644 --- a/gio/gfilenamecompleter.c +++ b/gio/gfilenamecompleter.c @@ -105,7 +105,7 @@ g_filename_completer_class_init (GFilenameCompleterClass *klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GFilenameCompleterClass, got_completion_data), NULL, NULL, - g_cclosure_marshal_VOID__VOID, + NULL, G_TYPE_NONE, 0); } diff --git a/gio/ginitable.c b/gio/ginitable.c index b5b500618..f3fd76ffc 100644 --- a/gio/ginitable.c +++ b/gio/ginitable.c @@ -187,6 +187,7 @@ g_initable_new (GType object_type, * Deprecated: 2.54: Use g_object_new_with_properties() and * g_initable_init() instead. See #GParameter for more information. */ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS gpointer g_initable_newv (GType object_type, guint n_parameters, @@ -198,9 +199,7 @@ g_initable_newv (GType object_type, g_return_val_if_fail (G_TYPE_IS_INITABLE (object_type), NULL); -G_GNUC_BEGIN_IGNORE_DEPRECATIONS obj = g_object_newv (object_type, n_parameters, parameters); -G_GNUC_END_IGNORE_DEPRECATIONS if (!g_initable_init (G_INITABLE (obj), cancellable, error)) { @@ -210,6 +209,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS return (gpointer)obj; } +G_GNUC_END_IGNORE_DEPRECATIONS /** * g_initable_new_valist: diff --git a/gio/ginitable.h b/gio/ginitable.h index c29098d53..463bfcc5a 100644 --- a/gio/ginitable.h +++ b/gio/ginitable.h @@ -81,12 +81,17 @@ gpointer g_initable_new (GType object_type, const gchar *first_property_name, ...); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS + GLIB_DEPRECATED_IN_2_54_FOR(g_object_new_with_properties and g_initable_init) gpointer g_initable_newv (GType object_type, guint n_parameters, GParameter *parameters, GCancellable *cancellable, GError **error); + +G_GNUC_END_IGNORE_DEPRECATIONS + GLIB_AVAILABLE_IN_ALL GObject* g_initable_new_valist (GType object_type, const gchar *first_property_name, diff --git a/gio/gio-querymodules.c b/gio/gio-querymodules.c index 74c659462..eb5094f4d 100644 --- a/gio/gio-querymodules.c +++ b/gio/gio-querymodules.c @@ -26,6 +26,8 @@ #include <errno.h> #include <locale.h> +#include "glib/glib-private.h" + static gboolean is_valid_module_name (const gchar *basename) { @@ -160,7 +162,7 @@ main (gint argc, return 1; } - setlocale (LC_ALL, ""); + setlocale (LC_ALL, GLIB_DEFAULT_LOCALE); /* Be defensive and ensure we're linked to GObject */ g_type_ensure (G_TYPE_OBJECT); diff --git a/gio/gio-tool.c b/gio/gio-tool.c index 847a2188b..c0aec7492 100644 --- a/gio/gio-tool.c +++ b/gio/gio-tool.c @@ -28,7 +28,7 @@ #include <errno.h> #include "gio-tool.h" - +#include "glib/glib-private.h" void print_error (const gchar *format, ...) @@ -253,9 +253,20 @@ main (int argc, char **argv) const char *command; gboolean do_help; - setlocale (LC_ALL, ""); +#ifdef G_OS_WIN32 + gchar *localedir; +#endif + + setlocale (LC_ALL, GLIB_DEFAULT_LOCALE); textdomain (GETTEXT_PACKAGE); + +#ifdef G_OS_WIN32 + localedir = _glib_get_locale_dir (); + bindtextdomain (GETTEXT_PACKAGE, localedir); + g_free (localedir); +#else bindtextdomain (GETTEXT_PACKAGE, GLIB_LOCALE_DIR); +#endif #ifdef HAVE_BIND_TEXTDOMAIN_CODESET bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); diff --git a/gio/gioenums.h b/gio/gioenums.h index d3ada454a..22fe7005c 100644 --- a/gio/gioenums.h +++ b/gio/gioenums.h @@ -1628,7 +1628,7 @@ typedef enum { G_TLS_REHANDSHAKE_NEVER, G_TLS_REHANDSHAKE_SAFELY, G_TLS_REHANDSHAKE_UNSAFELY -} GTlsRehandshakeMode; +} GTlsRehandshakeMode GLIB_DEPRECATED_TYPE_IN_2_60; /** * GTlsPasswordFlags: diff --git a/gio/giomodule.c b/gio/giomodule.c index ee1b0b6f4..1007abdbf 100644 --- a/gio/giomodule.c +++ b/gio/giomodule.c @@ -20,6 +20,10 @@ #include "config.h" +/* For the #GDesktopAppInfoLookup macros; since macro deprecation is implemented + * in the preprocessor, we need to define this before including glib.h*/ +#define GLIB_DISABLE_DEPRECATION_WARNINGS + #include <string.h> #include "giomodule.h" @@ -1087,9 +1091,7 @@ _g_io_modules_ensure_extension_points_registered (void) #if defined(G_OS_UNIX) && !defined(HAVE_COCOA) #if !GLIB_CHECK_VERSION (3, 0, 0) ep = g_io_extension_point_register (G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME); - G_GNUC_BEGIN_IGNORE_DEPRECATIONS g_io_extension_point_set_required_type (ep, G_TYPE_DESKTOP_APP_INFO_LOOKUP); - G_GNUC_END_IGNORE_DEPRECATIONS #endif #endif @@ -1209,6 +1211,7 @@ _g_io_modules_ensure_loaded (void) /* Initialize types from built-in "modules" */ g_type_ensure (g_null_settings_backend_get_type ()); g_type_ensure (g_memory_settings_backend_get_type ()); + g_type_ensure (g_keyfile_settings_backend_get_type ()); #if defined(HAVE_INOTIFY_INIT1) g_type_ensure (g_inotify_file_monitor_get_type ()); #endif diff --git a/gio/gioprivate.h b/gio/gioprivate.h index a917510b9..2bc54e49b 100644 --- a/gio/gioprivate.h +++ b/gio/gioprivate.h @@ -35,6 +35,23 @@ gboolean g_output_stream_async_close_is_via_threads (GOutputStream *stream); void g_socket_connection_set_cached_remote_address (GSocketConnection *connection, GSocketAddress *address); +/* POSIX defines IOV_MAX/UIO_MAXIOV as the maximum number of iovecs that can + * be sent in one go. We define our own version of it here as there are two + * possible names, and also define a fall-back value if none of the constants + * are defined */ +#if defined(IOV_MAX) +#define G_IOV_MAX IOV_MAX +#elif defined(UIO_MAXIOV) +#define G_IOV_MAX UIO_MAXIOV +#else +/* 16 is the minimum value required by POSIX */ +#define G_IOV_MAX 16 +#endif + +/* The various functions taking iovecs as parameter use a plain int + * for the number of vectors. Limit it to G_MAXINT for this reason. + */ +G_STATIC_ASSERT (G_IOV_MAX <= G_MAXINT); G_END_DECLS diff --git a/gio/gkeyfilesettingsbackend.c b/gio/gkeyfilesettingsbackend.c index 3bc392351..cd5765afd 100644 --- a/gio/gkeyfilesettingsbackend.c +++ b/gio/gkeyfilesettingsbackend.c @@ -80,7 +80,7 @@ typedef struct #ifdef G_OS_WIN32 #define EXTENSION_PRIORITY 10 #else -#define EXTENSION_PRIORITY (glib_should_use_portal () ? 110 : 10) +#define EXTENSION_PRIORITY (glib_should_use_portal () && !glib_has_dconf_access_in_sandbox () ? 110 : 10) #endif G_DEFINE_TYPE_WITH_CODE (GKeyfileSettingsBackend, @@ -740,7 +740,8 @@ g_keyfile_settings_backend_set_property (GObject *object, case PROP_FILENAME: /* Construct only. */ g_assert (kfsb->file == NULL); - kfsb->file = g_file_new_for_path (g_value_get_string (value)); + if (g_value_get_string (value)) + kfsb->file = g_file_new_for_path (g_value_get_string (value)); break; case PROP_ROOT_PATH: diff --git a/gio/glib-compile-resources.c b/gio/glib-compile-resources.c index 399c567d2..ccffbce2c 100644 --- a/gio/glib-compile-resources.c +++ b/gio/glib-compile-resources.c @@ -43,10 +43,7 @@ #include "gvdb/gvdb-builder.h" #include "gconstructor_as_data.h" - -#ifdef G_OS_WIN32 #include "glib/glib-private.h" -#endif typedef struct { @@ -754,7 +751,7 @@ main (int argc, char **argv) gchar *tmp; #endif - setlocale (LC_ALL, ""); + setlocale (LC_ALL, GLIB_DEFAULT_LOCALE); textdomain (GETTEXT_PACKAGE); #ifdef G_OS_WIN32 diff --git a/gio/glib-compile-schemas.c b/gio/glib-compile-schemas.c index 8ad3c6be1..f22265b82 100644 --- a/gio/glib-compile-schemas.c +++ b/gio/glib-compile-schemas.c @@ -29,10 +29,7 @@ #include "gvdb/gvdb-builder.h" #include "strinfo.c" - -#ifdef G_OS_WIN32 #include "glib/glib-private.h" -#endif static void strip_string (GString *string) @@ -1833,7 +1830,8 @@ parse_gschema_files (gchar **files, if (strict) { /* Translators: Do not translate "--strict". */ - fprintf (stderr, _("--strict was specified; exiting.\n")); + fprintf (stderr, "%s\n", _("--strict was specified; exiting.")); + g_hash_table_unref (state.schema_table); g_hash_table_unref (state.flags_table); g_hash_table_unref (state.enum_table); @@ -1843,7 +1841,9 @@ parse_gschema_files (gchar **files, return NULL; } else - fprintf (stderr, _("This entire file has been ignored.\n")); + { + fprintf (stderr, "%s\n", _("This entire file has been ignored.")); + } } /* cleanup */ @@ -1905,11 +1905,11 @@ set_overrides (GHashTable *schema_table, if (!strict) { - fprintf (stderr, _("Ignoring this file.\n")); + fprintf (stderr, "%s\n", _("Ignoring this file.")); continue; } - fprintf (stderr, _("--strict was specified; exiting.\n")); + fprintf (stderr, "%s\n", _("--strict was specified; exiting.")); return FALSE; } @@ -1958,17 +1958,22 @@ set_overrides (GHashTable *schema_table, if (state == NULL) { - fprintf (stderr, _("No such key “%s” in schema “%s” as " - "specified in override file “%s”"), - key, group, filename); - if (!strict) { - fprintf (stderr, _("; ignoring override for this key.\n")); + fprintf (stderr, _("No such key “%s” in schema “%s” as " + "specified in override file “%s”; " + "ignoring override for this key."), + key, group, filename); + fprintf (stderr, "\n"); continue; } - fprintf (stderr, _(" and --strict was specified; exiting.\n")); + fprintf (stderr, _("No such key “%s” in schema “%s” as " + "specified in override file “%s” and " + "--strict was specified; exiting."), + key, group, filename); + fprintf (stderr, "\n"); + g_key_file_free (key_file); g_strfreev (pieces); g_strfreev (groups); @@ -1982,18 +1987,24 @@ set_overrides (GHashTable *schema_table, /* Let's avoid the n*m case of per-desktop localised * default values, and just forbid it. */ - fprintf (stderr, - _("cannot provide per-desktop overrides for localised " - "key “%s” in schema “%s” (override file “%s”)"), - key, group, filename); - if (!strict) { - fprintf (stderr, _("; ignoring override for this key.\n")); + fprintf (stderr, + _("Cannot provide per-desktop overrides for " + "localised key “%s” in schema “%s” (override " + "file “%s”); ignoring override for this key."), + key, group, filename); + fprintf (stderr, "\n"); continue; } - fprintf (stderr, _(" and --strict was specified; exiting.\n")); + fprintf (stderr, + _("Cannot provide per-desktop overrides for " + "localised key “%s” in schema “%s” (override " + "file “%s”) and --strict was specified; exiting."), + key, group, filename); + fprintf (stderr, "\n"); + g_key_file_free (key_file); g_strfreev (pieces); g_strfreev (groups); @@ -2010,21 +2021,28 @@ set_overrides (GHashTable *schema_table, if (value == NULL) { - fprintf (stderr, _("error parsing key “%s” in schema “%s” " - "as specified in override file “%s”: " - "%s."), - key, group, filename, error->message); - - g_clear_error (&error); - g_free (string); - if (!strict) { - fprintf (stderr, _("Ignoring override for this key.\n")); + fprintf (stderr, _("Error parsing key “%s” in schema “%s” " + "as specified in override file “%s”: " + "%s. Ignoring override for this key."), + key, group, filename, error->message); + fprintf (stderr, "\n"); + + g_clear_error (&error); + g_free (string); + continue; } - fprintf (stderr, _("--strict was specified; exiting.\n")); + fprintf (stderr, _("Error parsing key “%s” in schema “%s” " + "as specified in override file “%s”: " + "%s. --strict was specified; exiting."), + key, group, filename, error->message); + fprintf (stderr, "\n"); + + g_clear_error (&error); + g_free (string); g_key_file_free (key_file); g_strfreev (pieces); g_strfreev (groups); @@ -2038,22 +2056,29 @@ set_overrides (GHashTable *schema_table, if (g_variant_compare (value, state->minimum) < 0 || g_variant_compare (value, state->maximum) > 0) { - fprintf (stderr, - _("override for key “%s” in schema “%s” in " - "override file “%s” is outside the range " - "given in the schema"), - key, group, filename); - g_variant_unref (value); g_free (string); if (!strict) { - fprintf (stderr, _("; ignoring override for this key.\n")); + fprintf (stderr, + _("Override for key “%s” in schema “%s” in " + "override file “%s” is outside the range " + "given in the schema; ignoring override " + "for this key."), + key, group, filename); + fprintf (stderr, "\n"); continue; } - fprintf (stderr, _(" and --strict was specified; exiting.\n")); + fprintf (stderr, + _("Override for key “%s” in schema “%s” in " + "override file “%s” is outside the range " + "given in the schema and --strict was " + "specified; exiting."), + key, group, filename); + fprintf (stderr, "\n"); + g_key_file_free (key_file); g_strfreev (pieces); g_strfreev (groups); @@ -2067,22 +2092,28 @@ set_overrides (GHashTable *schema_table, { if (!is_valid_choices (value, state->strinfo)) { - fprintf (stderr, - _("override for key “%s” in schema “%s” in " - "override file “%s” is not in the list " - "of valid choices"), - key, group, filename); - g_variant_unref (value); g_free (string); if (!strict) { - fprintf (stderr, _("; ignoring override for this key.\n")); + fprintf (stderr, + _("Override for key “%s” in schema “%s” in " + "override file “%s” is not in the list " + "of valid choices; ignoring override for " + "this key."), + key, group, filename); + fprintf (stderr, "\n"); continue; } - fprintf (stderr, _(" and --strict was specified; exiting.\n")); + fprintf (stderr, + _("Override for key “%s” in schema “%s” in " + "override file “%s” is not in the list " + "of valid choices and --strict was specified; " + "exiting."), + key, group, filename); + fprintf (stderr, "\n"); g_key_file_free (key_file); g_strfreev (pieces); g_strfreev (groups); @@ -2139,7 +2170,7 @@ main (int argc, char **argv) gint retval; GOptionEntry entries[] = { { "version", 0, 0, G_OPTION_ARG_NONE, &show_version_and_exit, N_("Show program version and exit"), NULL }, - { "targetdir", 0, 0, G_OPTION_ARG_FILENAME, &targetdir, N_("where to store the gschemas.compiled file"), N_("DIRECTORY") }, + { "targetdir", 0, 0, G_OPTION_ARG_FILENAME, &targetdir, N_("Where to store the gschemas.compiled file"), N_("DIRECTORY") }, { "strict", 0, 0, G_OPTION_ARG_NONE, &strict, N_("Abort on any errors in schemas"), NULL }, { "dry-run", 0, 0, G_OPTION_ARG_NONE, &dry_run, N_("Do not write the gschema.compiled file"), NULL }, { "allow-any-name", 0, 0, G_OPTION_ARG_NONE, &allow_any_name, N_("Do not enforce key name restrictions") }, @@ -2154,7 +2185,7 @@ main (int argc, char **argv) gchar *tmp = NULL; #endif - setlocale (LC_ALL, ""); + setlocale (LC_ALL, GLIB_DEFAULT_LOCALE); textdomain (GETTEXT_PACKAGE); #ifdef G_OS_WIN32 @@ -2192,7 +2223,7 @@ main (int argc, char **argv) if (!schema_files && argc != 2) { - fprintf (stderr, _("You should give exactly one directory name\n")); + fprintf (stderr, "%s\n", _("You should give exactly one directory name")); retval = 1; goto done; } @@ -2234,13 +2265,10 @@ main (int argc, char **argv) if (files->len == 0) { - fprintf (stdout, _("No schema files found: ")); - if (g_unlink (target)) - fprintf (stdout, _("doing nothing.\n")); - + fprintf (stdout, "%s\n", _("No schema files found: doing nothing.")); else - fprintf (stdout, _("removed existing output file.\n")); + fprintf (stdout, "%s\n", _("No schema files found: removed existing output file.")); g_ptr_array_unref (files); g_ptr_array_unref (overrides); diff --git a/gio/glistmodel.c b/gio/glistmodel.c index 2b943a87c..0dde9ad1f 100644 --- a/gio/glistmodel.c +++ b/gio/glistmodel.c @@ -24,6 +24,7 @@ #include "glistmodel.h" #include "glibintl.h" +#include "gmarshal-internal.h" G_DEFINE_INTERFACE (GListModel, g_list_model, G_TYPE_OBJECT) @@ -130,9 +131,12 @@ g_list_model_default_init (GListModelInterface *iface) * @removed: the number of items removed * @added: the number of items added * - * This signal is emitted whenever items were added or removed to - * @list. At @position, @removed items were removed and @added items - * were added in their place. + * This signal is emitted whenever items were added to or removed + * from @list. At @position, @removed items were removed and @added + * items were added in their place. + * + * Note: If @removed != @added, the positions of all later items + * in the model change. * * Since: 2.44 */ @@ -141,9 +145,12 @@ g_list_model_default_init (GListModelInterface *iface) G_SIGNAL_RUN_LAST, 0, NULL, NULL, - g_cclosure_marshal_generic, + _g_cclosure_marshal_VOID__UINT_UINT_UINT, G_TYPE_NONE, 3, G_TYPE_UINT, G_TYPE_UINT, G_TYPE_UINT); + g_signal_set_va_marshaller (g_list_model_changed_signal, + G_TYPE_FROM_INTERFACE (iface), + _g_cclosure_marshal_VOID__UINT_UINT_UINTv); } /** diff --git a/gio/glocalfileoutputstream.c b/gio/glocalfileoutputstream.c index 6d44989bf..a3dd62172 100644 --- a/gio/glocalfileoutputstream.c +++ b/gio/glocalfileoutputstream.c @@ -42,6 +42,7 @@ #endif #include "glib-private.h" +#include "gioprivate.h" #ifdef G_OS_WIN32 #include <io.h> @@ -243,11 +244,11 @@ g_local_file_output_stream_writev (GOutputStream *stream, if (bytes_written) *bytes_written = 0; - /* Clamp to G_MAXINT as writev() takes an integer for the number of vectors. - * We handle this like a short write in this case + /* Clamp the number of vectors if more given than we can write in one go. + * The caller has to handle short writes anyway. */ - if (n_vectors > G_MAXINT) - n_vectors = G_MAXINT; + if (n_vectors > G_IOV_MAX) + n_vectors = G_IOV_MAX; file = G_LOCAL_FILE_OUTPUT_STREAM (stream); diff --git a/gio/gmarshal-internal.c b/gio/gmarshal-internal.c new file mode 100644 index 000000000..f9571c42e --- /dev/null +++ b/gio/gmarshal-internal.c @@ -0,0 +1,2632 @@ +/* GObject - GLib Type, Object, Parameter and Signal Library + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#include "config.h" + +#include <glib-object.h> +#include "gmarshal-internal.h" + +#ifdef G_ENABLE_DEBUG +#define g_marshal_value_peek_boolean(v) g_value_get_boolean (v) +#define g_marshal_value_peek_char(v) g_value_get_schar (v) +#define g_marshal_value_peek_uchar(v) g_value_get_uchar (v) +#define g_marshal_value_peek_int(v) g_value_get_int (v) +#define g_marshal_value_peek_uint(v) g_value_get_uint (v) +#define g_marshal_value_peek_long(v) g_value_get_long (v) +#define g_marshal_value_peek_ulong(v) g_value_get_ulong (v) +#define g_marshal_value_peek_int64(v) g_value_get_int64 (v) +#define g_marshal_value_peek_uint64(v) g_value_get_uint64 (v) +#define g_marshal_value_peek_enum(v) g_value_get_enum (v) +#define g_marshal_value_peek_flags(v) g_value_get_flags (v) +#define g_marshal_value_peek_float(v) g_value_get_float (v) +#define g_marshal_value_peek_double(v) g_value_get_double (v) +#define g_marshal_value_peek_string(v) (char*) g_value_get_string (v) +#define g_marshal_value_peek_param(v) g_value_get_param (v) +#define g_marshal_value_peek_boxed(v) g_value_get_boxed (v) +#define g_marshal_value_peek_pointer(v) g_value_get_pointer (v) +#define g_marshal_value_peek_object(v) g_value_get_object (v) +#define g_marshal_value_peek_variant(v) g_value_get_variant (v) +#else /* !G_ENABLE_DEBUG */ +/* WARNING: This code accesses GValues directly, which is UNSUPPORTED API. + * Do not access GValues directly in your code. Instead, use the + * g_value_get_*() functions + */ +#define g_marshal_value_peek_boolean(v) (v)->data[0].v_int +#define g_marshal_value_peek_char(v) (v)->data[0].v_int +#define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint +#define g_marshal_value_peek_int(v) (v)->data[0].v_int +#define g_marshal_value_peek_uint(v) (v)->data[0].v_uint +#define g_marshal_value_peek_long(v) (v)->data[0].v_long +#define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong +#define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 +#define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 +#define g_marshal_value_peek_enum(v) (v)->data[0].v_long +#define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong +#define g_marshal_value_peek_float(v) (v)->data[0].v_float +#define g_marshal_value_peek_double(v) (v)->data[0].v_double +#define g_marshal_value_peek_string(v) (v)->data[0].v_pointer +#define g_marshal_value_peek_param(v) (v)->data[0].v_pointer +#define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer +#define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer +#define g_marshal_value_peek_object(v) (v)->data[0].v_pointer +#define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer +#endif /* !G_ENABLE_DEBUG */ + +/* BOOLEAN:OBJECT */ +void +_g_cclosure_marshal_BOOLEAN__OBJECT (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint G_GNUC_UNUSED, + gpointer marshal_data) +{ + typedef gboolean (*GMarshalFunc_BOOLEAN__OBJECT) (gpointer data1, + gpointer arg1, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_BOOLEAN__OBJECT callback; + gboolean v_return; + + g_return_if_fail (return_value != NULL); + g_return_if_fail (n_param_values == 2); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = g_value_peek_pointer (param_values + 0); + } + else + { + data1 = g_value_peek_pointer (param_values + 0); + data2 = closure->data; + } + callback = (GMarshalFunc_BOOLEAN__OBJECT) (marshal_data ? marshal_data : cc->callback); + + v_return = callback (data1, + g_marshal_value_peek_object (param_values + 1), + data2); + + g_value_set_boolean (return_value, v_return); +} + +void +_g_cclosure_marshal_BOOLEAN__OBJECTv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types) +{ + typedef gboolean (*GMarshalFunc_BOOLEAN__OBJECT) (gpointer data1, + gpointer arg1, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_BOOLEAN__OBJECT callback; + gboolean v_return; + gpointer arg0; + va_list args_copy; + + G_VA_COPY (args_copy, args); + arg0 = (gpointer) va_arg (args_copy, gpointer); + if (arg0 != NULL) + arg0 = g_object_ref (arg0); + va_end (args_copy); + + g_return_if_fail (return_value != NULL); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = instance; + } + else + { + data1 = instance; + data2 = closure->data; + } + callback = (GMarshalFunc_BOOLEAN__OBJECT) (marshal_data ? marshal_data : cc->callback); + + v_return = callback (data1, + arg0, + data2); + if (arg0 != NULL) + g_object_unref (arg0); + + g_value_set_boolean (return_value, v_return); +} + +/* BOOLEAN:OBJECT,FLAGS */ +void +_g_cclosure_marshal_BOOLEAN__OBJECT_FLAGS (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint G_GNUC_UNUSED, + gpointer marshal_data) +{ + typedef gboolean (*GMarshalFunc_BOOLEAN__OBJECT_FLAGS) (gpointer data1, + gpointer arg1, + guint arg2, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_BOOLEAN__OBJECT_FLAGS callback; + gboolean v_return; + + g_return_if_fail (return_value != NULL); + g_return_if_fail (n_param_values == 3); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = g_value_peek_pointer (param_values + 0); + } + else + { + data1 = g_value_peek_pointer (param_values + 0); + data2 = closure->data; + } + callback = (GMarshalFunc_BOOLEAN__OBJECT_FLAGS) (marshal_data ? marshal_data : cc->callback); + + v_return = callback (data1, + g_marshal_value_peek_object (param_values + 1), + g_marshal_value_peek_flags (param_values + 2), + data2); + + g_value_set_boolean (return_value, v_return); +} + +void +_g_cclosure_marshal_BOOLEAN__OBJECT_FLAGSv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types) +{ + typedef gboolean (*GMarshalFunc_BOOLEAN__OBJECT_FLAGS) (gpointer data1, + gpointer arg1, + guint arg2, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_BOOLEAN__OBJECT_FLAGS callback; + gboolean v_return; + gpointer arg0; + guint arg1; + va_list args_copy; + + G_VA_COPY (args_copy, args); + arg0 = (gpointer) va_arg (args_copy, gpointer); + if (arg0 != NULL) + arg0 = g_object_ref (arg0); + arg1 = (guint) va_arg (args_copy, guint); + va_end (args_copy); + + g_return_if_fail (return_value != NULL); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = instance; + } + else + { + data1 = instance; + data2 = closure->data; + } + callback = (GMarshalFunc_BOOLEAN__OBJECT_FLAGS) (marshal_data ? marshal_data : cc->callback); + + v_return = callback (data1, + arg0, + arg1, + data2); + if (arg0 != NULL) + g_object_unref (arg0); + + g_value_set_boolean (return_value, v_return); +} + +/* BOOLEAN:OBJECT,OBJECT */ +void +_g_cclosure_marshal_BOOLEAN__OBJECT_OBJECT (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint G_GNUC_UNUSED, + gpointer marshal_data) +{ + typedef gboolean (*GMarshalFunc_BOOLEAN__OBJECT_OBJECT) (gpointer data1, + gpointer arg1, + gpointer arg2, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_BOOLEAN__OBJECT_OBJECT callback; + gboolean v_return; + + g_return_if_fail (return_value != NULL); + g_return_if_fail (n_param_values == 3); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = g_value_peek_pointer (param_values + 0); + } + else + { + data1 = g_value_peek_pointer (param_values + 0); + data2 = closure->data; + } + callback = (GMarshalFunc_BOOLEAN__OBJECT_OBJECT) (marshal_data ? marshal_data : cc->callback); + + v_return = callback (data1, + g_marshal_value_peek_object (param_values + 1), + g_marshal_value_peek_object (param_values + 2), + data2); + + g_value_set_boolean (return_value, v_return); +} + +void +_g_cclosure_marshal_BOOLEAN__OBJECT_OBJECTv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types) +{ + typedef gboolean (*GMarshalFunc_BOOLEAN__OBJECT_OBJECT) (gpointer data1, + gpointer arg1, + gpointer arg2, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_BOOLEAN__OBJECT_OBJECT callback; + gboolean v_return; + gpointer arg0; + gpointer arg1; + va_list args_copy; + + G_VA_COPY (args_copy, args); + arg0 = (gpointer) va_arg (args_copy, gpointer); + if (arg0 != NULL) + arg0 = g_object_ref (arg0); + arg1 = (gpointer) va_arg (args_copy, gpointer); + if (arg1 != NULL) + arg1 = g_object_ref (arg1); + va_end (args_copy); + + g_return_if_fail (return_value != NULL); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = instance; + } + else + { + data1 = instance; + data2 = closure->data; + } + callback = (GMarshalFunc_BOOLEAN__OBJECT_OBJECT) (marshal_data ? marshal_data : cc->callback); + + v_return = callback (data1, + arg0, + arg1, + data2); + if (arg0 != NULL) + g_object_unref (arg0); + if (arg1 != NULL) + g_object_unref (arg1); + + g_value_set_boolean (return_value, v_return); +} + +/* BOOLEAN:POINTER,INT */ +void +_g_cclosure_marshal_BOOLEAN__POINTER_INT (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint G_GNUC_UNUSED, + gpointer marshal_data) +{ + typedef gboolean (*GMarshalFunc_BOOLEAN__POINTER_INT) (gpointer data1, + gpointer arg1, + gint arg2, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_BOOLEAN__POINTER_INT callback; + gboolean v_return; + + g_return_if_fail (return_value != NULL); + g_return_if_fail (n_param_values == 3); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = g_value_peek_pointer (param_values + 0); + } + else + { + data1 = g_value_peek_pointer (param_values + 0); + data2 = closure->data; + } + callback = (GMarshalFunc_BOOLEAN__POINTER_INT) (marshal_data ? marshal_data : cc->callback); + + v_return = callback (data1, + g_marshal_value_peek_pointer (param_values + 1), + g_marshal_value_peek_int (param_values + 2), + data2); + + g_value_set_boolean (return_value, v_return); +} + +void +_g_cclosure_marshal_BOOLEAN__POINTER_INTv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types) +{ + typedef gboolean (*GMarshalFunc_BOOLEAN__POINTER_INT) (gpointer data1, + gpointer arg1, + gint arg2, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_BOOLEAN__POINTER_INT callback; + gboolean v_return; + gpointer arg0; + gint arg1; + va_list args_copy; + + G_VA_COPY (args_copy, args); + arg0 = (gpointer) va_arg (args_copy, gpointer); + arg1 = (gint) va_arg (args_copy, gint); + va_end (args_copy); + + g_return_if_fail (return_value != NULL); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = instance; + } + else + { + data1 = instance; + data2 = closure->data; + } + callback = (GMarshalFunc_BOOLEAN__POINTER_INT) (marshal_data ? marshal_data : cc->callback); + + v_return = callback (data1, + arg0, + arg1, + data2); + + + g_value_set_boolean (return_value, v_return); +} + +/* BOOLEAN:STRING */ +void +_g_cclosure_marshal_BOOLEAN__STRING (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint G_GNUC_UNUSED, + gpointer marshal_data) +{ + typedef gboolean (*GMarshalFunc_BOOLEAN__STRING) (gpointer data1, + gpointer arg1, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_BOOLEAN__STRING callback; + gboolean v_return; + + g_return_if_fail (return_value != NULL); + g_return_if_fail (n_param_values == 2); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = g_value_peek_pointer (param_values + 0); + } + else + { + data1 = g_value_peek_pointer (param_values + 0); + data2 = closure->data; + } + callback = (GMarshalFunc_BOOLEAN__STRING) (marshal_data ? marshal_data : cc->callback); + + v_return = callback (data1, + g_marshal_value_peek_string (param_values + 1), + data2); + + g_value_set_boolean (return_value, v_return); +} + +void +_g_cclosure_marshal_BOOLEAN__STRINGv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types) +{ + typedef gboolean (*GMarshalFunc_BOOLEAN__STRING) (gpointer data1, + gpointer arg1, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_BOOLEAN__STRING callback; + gboolean v_return; + gpointer arg0; + va_list args_copy; + + G_VA_COPY (args_copy, args); + arg0 = (gpointer) va_arg (args_copy, gpointer); + if ((param_types[0] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg0 != NULL) + arg0 = g_strdup (arg0); + va_end (args_copy); + + g_return_if_fail (return_value != NULL); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = instance; + } + else + { + data1 = instance; + data2 = closure->data; + } + callback = (GMarshalFunc_BOOLEAN__STRING) (marshal_data ? marshal_data : cc->callback); + + v_return = callback (data1, + arg0, + data2); + if ((param_types[0] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg0 != NULL) + g_free (arg0); + + g_value_set_boolean (return_value, v_return); +} + +/* BOOLEAN:UINT */ +void +_g_cclosure_marshal_BOOLEAN__UINT (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint G_GNUC_UNUSED, + gpointer marshal_data) +{ + typedef gboolean (*GMarshalFunc_BOOLEAN__UINT) (gpointer data1, + guint arg1, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_BOOLEAN__UINT callback; + gboolean v_return; + + g_return_if_fail (return_value != NULL); + g_return_if_fail (n_param_values == 2); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = g_value_peek_pointer (param_values + 0); + } + else + { + data1 = g_value_peek_pointer (param_values + 0); + data2 = closure->data; + } + callback = (GMarshalFunc_BOOLEAN__UINT) (marshal_data ? marshal_data : cc->callback); + + v_return = callback (data1, + g_marshal_value_peek_uint (param_values + 1), + data2); + + g_value_set_boolean (return_value, v_return); +} + +void +_g_cclosure_marshal_BOOLEAN__UINTv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types) +{ + typedef gboolean (*GMarshalFunc_BOOLEAN__UINT) (gpointer data1, + guint arg1, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_BOOLEAN__UINT callback; + gboolean v_return; + guint arg0; + va_list args_copy; + + G_VA_COPY (args_copy, args); + arg0 = (guint) va_arg (args_copy, guint); + va_end (args_copy); + + g_return_if_fail (return_value != NULL); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = instance; + } + else + { + data1 = instance; + data2 = closure->data; + } + callback = (GMarshalFunc_BOOLEAN__UINT) (marshal_data ? marshal_data : cc->callback); + + v_return = callback (data1, + arg0, + data2); + + + g_value_set_boolean (return_value, v_return); +} + +/* BOOLEAN:VOID */ +void +_g_cclosure_marshal_BOOLEAN__VOID (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint G_GNUC_UNUSED, + gpointer marshal_data) +{ + typedef gboolean (*GMarshalFunc_BOOLEAN__VOID) (gpointer data1, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_BOOLEAN__VOID callback; + gboolean v_return; + + g_return_if_fail (return_value != NULL); + g_return_if_fail (n_param_values == 1); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = g_value_peek_pointer (param_values + 0); + } + else + { + data1 = g_value_peek_pointer (param_values + 0); + data2 = closure->data; + } + callback = (GMarshalFunc_BOOLEAN__VOID) (marshal_data ? marshal_data : cc->callback); + + v_return = callback (data1, + data2); + + g_value_set_boolean (return_value, v_return); +} + +void +_g_cclosure_marshal_BOOLEAN__VOIDv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types) +{ + typedef gboolean (*GMarshalFunc_BOOLEAN__VOID) (gpointer data1, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_BOOLEAN__VOID callback; + gboolean v_return; + + g_return_if_fail (return_value != NULL); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = instance; + } + else + { + data1 = instance; + data2 = closure->data; + } + callback = (GMarshalFunc_BOOLEAN__VOID) (marshal_data ? marshal_data : cc->callback); + + v_return = callback (data1, + data2); + + + g_value_set_boolean (return_value, v_return); +} + +/* INT:BOXED */ +void +_g_cclosure_marshal_INT__BOXED (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint G_GNUC_UNUSED, + gpointer marshal_data) +{ + typedef gint (*GMarshalFunc_INT__BOXED) (gpointer data1, + gpointer arg1, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_INT__BOXED callback; + gint v_return; + + g_return_if_fail (return_value != NULL); + g_return_if_fail (n_param_values == 2); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = g_value_peek_pointer (param_values + 0); + } + else + { + data1 = g_value_peek_pointer (param_values + 0); + data2 = closure->data; + } + callback = (GMarshalFunc_INT__BOXED) (marshal_data ? marshal_data : cc->callback); + + v_return = callback (data1, + g_marshal_value_peek_boxed (param_values + 1), + data2); + + g_value_set_int (return_value, v_return); +} + +void +_g_cclosure_marshal_INT__BOXEDv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types) +{ + typedef gint (*GMarshalFunc_INT__BOXED) (gpointer data1, + gpointer arg1, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_INT__BOXED callback; + gint v_return; + gpointer arg0; + va_list args_copy; + + G_VA_COPY (args_copy, args); + arg0 = (gpointer) va_arg (args_copy, gpointer); + if ((param_types[0] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg0 != NULL) + arg0 = g_boxed_copy (param_types[0] & ~G_SIGNAL_TYPE_STATIC_SCOPE, arg0); + va_end (args_copy); + + g_return_if_fail (return_value != NULL); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = instance; + } + else + { + data1 = instance; + data2 = closure->data; + } + callback = (GMarshalFunc_INT__BOXED) (marshal_data ? marshal_data : cc->callback); + + v_return = callback (data1, + arg0, + data2); + if ((param_types[0] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg0 != NULL) + g_boxed_free (param_types[0] & ~G_SIGNAL_TYPE_STATIC_SCOPE, arg0); + + g_value_set_int (return_value, v_return); +} + +/* INT:OBJECT */ +void +_g_cclosure_marshal_INT__OBJECT (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint G_GNUC_UNUSED, + gpointer marshal_data) +{ + typedef gint (*GMarshalFunc_INT__OBJECT) (gpointer data1, + gpointer arg1, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_INT__OBJECT callback; + gint v_return; + + g_return_if_fail (return_value != NULL); + g_return_if_fail (n_param_values == 2); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = g_value_peek_pointer (param_values + 0); + } + else + { + data1 = g_value_peek_pointer (param_values + 0); + data2 = closure->data; + } + callback = (GMarshalFunc_INT__OBJECT) (marshal_data ? marshal_data : cc->callback); + + v_return = callback (data1, + g_marshal_value_peek_object (param_values + 1), + data2); + + g_value_set_int (return_value, v_return); +} + +void +_g_cclosure_marshal_INT__OBJECTv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types) +{ + typedef gint (*GMarshalFunc_INT__OBJECT) (gpointer data1, + gpointer arg1, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_INT__OBJECT callback; + gint v_return; + gpointer arg0; + va_list args_copy; + + G_VA_COPY (args_copy, args); + arg0 = (gpointer) va_arg (args_copy, gpointer); + if (arg0 != NULL) + arg0 = g_object_ref (arg0); + va_end (args_copy); + + g_return_if_fail (return_value != NULL); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = instance; + } + else + { + data1 = instance; + data2 = closure->data; + } + callback = (GMarshalFunc_INT__OBJECT) (marshal_data ? marshal_data : cc->callback); + + v_return = callback (data1, + arg0, + data2); + if (arg0 != NULL) + g_object_unref (arg0); + + g_value_set_int (return_value, v_return); +} + +/* VOID:BOOLEAN,BOXED */ +void +_g_cclosure_marshal_VOID__BOOLEAN_BOXED (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint G_GNUC_UNUSED, + gpointer marshal_data) +{ + typedef void (*GMarshalFunc_VOID__BOOLEAN_BOXED) (gpointer data1, + gboolean arg1, + gpointer arg2, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_VOID__BOOLEAN_BOXED callback; + + g_return_if_fail (n_param_values == 3); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = g_value_peek_pointer (param_values + 0); + } + else + { + data1 = g_value_peek_pointer (param_values + 0); + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__BOOLEAN_BOXED) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + g_marshal_value_peek_boolean (param_values + 1), + g_marshal_value_peek_boxed (param_values + 2), + data2); +} + +void +_g_cclosure_marshal_VOID__BOOLEAN_BOXEDv (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types) +{ + typedef void (*GMarshalFunc_VOID__BOOLEAN_BOXED) (gpointer data1, + gboolean arg1, + gpointer arg2, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_VOID__BOOLEAN_BOXED callback; + gboolean arg0; + gpointer arg1; + va_list args_copy; + + G_VA_COPY (args_copy, args); + arg0 = (gboolean) va_arg (args_copy, gboolean); + arg1 = (gpointer) va_arg (args_copy, gpointer); + if ((param_types[1] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg1 != NULL) + arg1 = g_boxed_copy (param_types[1] & ~G_SIGNAL_TYPE_STATIC_SCOPE, arg1); + va_end (args_copy); + + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = instance; + } + else + { + data1 = instance; + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__BOOLEAN_BOXED) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + arg0, + arg1, + data2); + if ((param_types[1] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg1 != NULL) + g_boxed_free (param_types[1] & ~G_SIGNAL_TYPE_STATIC_SCOPE, arg1); +} + +/* VOID:ENUM,OBJECT */ +void +_g_cclosure_marshal_VOID__ENUM_OBJECT (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint G_GNUC_UNUSED, + gpointer marshal_data) +{ + typedef void (*GMarshalFunc_VOID__ENUM_OBJECT) (gpointer data1, + gint arg1, + gpointer arg2, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_VOID__ENUM_OBJECT callback; + + g_return_if_fail (n_param_values == 3); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = g_value_peek_pointer (param_values + 0); + } + else + { + data1 = g_value_peek_pointer (param_values + 0); + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__ENUM_OBJECT) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + g_marshal_value_peek_enum (param_values + 1), + g_marshal_value_peek_object (param_values + 2), + data2); +} + +void +_g_cclosure_marshal_VOID__ENUM_OBJECTv (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types) +{ + typedef void (*GMarshalFunc_VOID__ENUM_OBJECT) (gpointer data1, + gint arg1, + gpointer arg2, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_VOID__ENUM_OBJECT callback; + gint arg0; + gpointer arg1; + va_list args_copy; + + G_VA_COPY (args_copy, args); + arg0 = (gint) va_arg (args_copy, gint); + arg1 = (gpointer) va_arg (args_copy, gpointer); + if (arg1 != NULL) + arg1 = g_object_ref (arg1); + va_end (args_copy); + + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = instance; + } + else + { + data1 = instance; + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__ENUM_OBJECT) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + arg0, + arg1, + data2); + if (arg1 != NULL) + g_object_unref (arg1); +} + +/* VOID:ENUM,OBJECT,OBJECT */ +void +_g_cclosure_marshal_VOID__ENUM_OBJECT_OBJECT (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint G_GNUC_UNUSED, + gpointer marshal_data) +{ + typedef void (*GMarshalFunc_VOID__ENUM_OBJECT_OBJECT) (gpointer data1, + gint arg1, + gpointer arg2, + gpointer arg3, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_VOID__ENUM_OBJECT_OBJECT callback; + + g_return_if_fail (n_param_values == 4); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = g_value_peek_pointer (param_values + 0); + } + else + { + data1 = g_value_peek_pointer (param_values + 0); + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__ENUM_OBJECT_OBJECT) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + g_marshal_value_peek_enum (param_values + 1), + g_marshal_value_peek_object (param_values + 2), + g_marshal_value_peek_object (param_values + 3), + data2); +} + +void +_g_cclosure_marshal_VOID__ENUM_OBJECT_OBJECTv (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types) +{ + typedef void (*GMarshalFunc_VOID__ENUM_OBJECT_OBJECT) (gpointer data1, + gint arg1, + gpointer arg2, + gpointer arg3, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_VOID__ENUM_OBJECT_OBJECT callback; + gint arg0; + gpointer arg1; + gpointer arg2; + va_list args_copy; + + G_VA_COPY (args_copy, args); + arg0 = (gint) va_arg (args_copy, gint); + arg1 = (gpointer) va_arg (args_copy, gpointer); + if (arg1 != NULL) + arg1 = g_object_ref (arg1); + arg2 = (gpointer) va_arg (args_copy, gpointer); + if (arg2 != NULL) + arg2 = g_object_ref (arg2); + va_end (args_copy); + + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = instance; + } + else + { + data1 = instance; + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__ENUM_OBJECT_OBJECT) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + arg0, + arg1, + arg2, + data2); + if (arg1 != NULL) + g_object_unref (arg1); + if (arg2 != NULL) + g_object_unref (arg2); +} + +/* VOID:INT,INT,INT */ +void +_g_cclosure_marshal_VOID__INT_INT_INT (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint G_GNUC_UNUSED, + gpointer marshal_data) +{ + typedef void (*GMarshalFunc_VOID__INT_INT_INT) (gpointer data1, + gint arg1, + gint arg2, + gint arg3, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_VOID__INT_INT_INT callback; + + g_return_if_fail (n_param_values == 4); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = g_value_peek_pointer (param_values + 0); + } + else + { + data1 = g_value_peek_pointer (param_values + 0); + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__INT_INT_INT) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + g_marshal_value_peek_int (param_values + 1), + g_marshal_value_peek_int (param_values + 2), + g_marshal_value_peek_int (param_values + 3), + data2); +} + +void +_g_cclosure_marshal_VOID__INT_INT_INTv (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types) +{ + typedef void (*GMarshalFunc_VOID__INT_INT_INT) (gpointer data1, + gint arg1, + gint arg2, + gint arg3, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_VOID__INT_INT_INT callback; + gint arg0; + gint arg1; + gint arg2; + va_list args_copy; + + G_VA_COPY (args_copy, args); + arg0 = (gint) va_arg (args_copy, gint); + arg1 = (gint) va_arg (args_copy, gint); + arg2 = (gint) va_arg (args_copy, gint); + va_end (args_copy); + + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = instance; + } + else + { + data1 = instance; + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__INT_INT_INT) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + arg0, + arg1, + arg2, + data2); + +} + +/* VOID:OBJECT,OBJECT */ +void +_g_cclosure_marshal_VOID__OBJECT_OBJECT (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint G_GNUC_UNUSED, + gpointer marshal_data) +{ + typedef void (*GMarshalFunc_VOID__OBJECT_OBJECT) (gpointer data1, + gpointer arg1, + gpointer arg2, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_VOID__OBJECT_OBJECT callback; + + g_return_if_fail (n_param_values == 3); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = g_value_peek_pointer (param_values + 0); + } + else + { + data1 = g_value_peek_pointer (param_values + 0); + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__OBJECT_OBJECT) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + g_marshal_value_peek_object (param_values + 1), + g_marshal_value_peek_object (param_values + 2), + data2); +} + +void +_g_cclosure_marshal_VOID__OBJECT_OBJECTv (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types) +{ + typedef void (*GMarshalFunc_VOID__OBJECT_OBJECT) (gpointer data1, + gpointer arg1, + gpointer arg2, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_VOID__OBJECT_OBJECT callback; + gpointer arg0; + gpointer arg1; + va_list args_copy; + + G_VA_COPY (args_copy, args); + arg0 = (gpointer) va_arg (args_copy, gpointer); + if (arg0 != NULL) + arg0 = g_object_ref (arg0); + arg1 = (gpointer) va_arg (args_copy, gpointer); + if (arg1 != NULL) + arg1 = g_object_ref (arg1); + va_end (args_copy); + + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = instance; + } + else + { + data1 = instance; + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__OBJECT_OBJECT) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + arg0, + arg1, + data2); + if (arg0 != NULL) + g_object_unref (arg0); + if (arg1 != NULL) + g_object_unref (arg1); +} + +/* VOID:OBJECT,OBJECT,ENUM */ +void +_g_cclosure_marshal_VOID__OBJECT_OBJECT_ENUM (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint G_GNUC_UNUSED, + gpointer marshal_data) +{ + typedef void (*GMarshalFunc_VOID__OBJECT_OBJECT_ENUM) (gpointer data1, + gpointer arg1, + gpointer arg2, + gint arg3, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_VOID__OBJECT_OBJECT_ENUM callback; + + g_return_if_fail (n_param_values == 4); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = g_value_peek_pointer (param_values + 0); + } + else + { + data1 = g_value_peek_pointer (param_values + 0); + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__OBJECT_OBJECT_ENUM) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + g_marshal_value_peek_object (param_values + 1), + g_marshal_value_peek_object (param_values + 2), + g_marshal_value_peek_enum (param_values + 3), + data2); +} + +void +_g_cclosure_marshal_VOID__OBJECT_OBJECT_ENUMv (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types) +{ + typedef void (*GMarshalFunc_VOID__OBJECT_OBJECT_ENUM) (gpointer data1, + gpointer arg1, + gpointer arg2, + gint arg3, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_VOID__OBJECT_OBJECT_ENUM callback; + gpointer arg0; + gpointer arg1; + gint arg2; + va_list args_copy; + + G_VA_COPY (args_copy, args); + arg0 = (gpointer) va_arg (args_copy, gpointer); + if (arg0 != NULL) + arg0 = g_object_ref (arg0); + arg1 = (gpointer) va_arg (args_copy, gpointer); + if (arg1 != NULL) + arg1 = g_object_ref (arg1); + arg2 = (gint) va_arg (args_copy, gint); + va_end (args_copy); + + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = instance; + } + else + { + data1 = instance; + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__OBJECT_OBJECT_ENUM) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + arg0, + arg1, + arg2, + data2); + if (arg0 != NULL) + g_object_unref (arg0); + if (arg1 != NULL) + g_object_unref (arg1); +} + +/* VOID:OBJECT,OBJECT,STRING,STRING,VARIANT */ +void +_g_cclosure_marshal_VOID__OBJECT_OBJECT_STRING_STRING_VARIANT (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint G_GNUC_UNUSED, + gpointer marshal_data) +{ + typedef void (*GMarshalFunc_VOID__OBJECT_OBJECT_STRING_STRING_VARIANT) (gpointer data1, + gpointer arg1, + gpointer arg2, + gpointer arg3, + gpointer arg4, + gpointer arg5, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_VOID__OBJECT_OBJECT_STRING_STRING_VARIANT callback; + + g_return_if_fail (n_param_values == 6); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = g_value_peek_pointer (param_values + 0); + } + else + { + data1 = g_value_peek_pointer (param_values + 0); + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__OBJECT_OBJECT_STRING_STRING_VARIANT) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + g_marshal_value_peek_object (param_values + 1), + g_marshal_value_peek_object (param_values + 2), + g_marshal_value_peek_string (param_values + 3), + g_marshal_value_peek_string (param_values + 4), + g_marshal_value_peek_variant (param_values + 5), + data2); +} + +void +_g_cclosure_marshal_VOID__OBJECT_OBJECT_STRING_STRING_VARIANTv (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types) +{ + typedef void (*GMarshalFunc_VOID__OBJECT_OBJECT_STRING_STRING_VARIANT) (gpointer data1, + gpointer arg1, + gpointer arg2, + gpointer arg3, + gpointer arg4, + gpointer arg5, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_VOID__OBJECT_OBJECT_STRING_STRING_VARIANT callback; + gpointer arg0; + gpointer arg1; + gpointer arg2; + gpointer arg3; + gpointer arg4; + va_list args_copy; + + G_VA_COPY (args_copy, args); + arg0 = (gpointer) va_arg (args_copy, gpointer); + if (arg0 != NULL) + arg0 = g_object_ref (arg0); + arg1 = (gpointer) va_arg (args_copy, gpointer); + if (arg1 != NULL) + arg1 = g_object_ref (arg1); + arg2 = (gpointer) va_arg (args_copy, gpointer); + if ((param_types[2] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg2 != NULL) + arg2 = g_strdup (arg2); + arg3 = (gpointer) va_arg (args_copy, gpointer); + if ((param_types[3] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg3 != NULL) + arg3 = g_strdup (arg3); + arg4 = (gpointer) va_arg (args_copy, gpointer); + if ((param_types[4] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg4 != NULL) + arg4 = g_variant_ref_sink (arg4); + va_end (args_copy); + + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = instance; + } + else + { + data1 = instance; + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__OBJECT_OBJECT_STRING_STRING_VARIANT) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + arg0, + arg1, + arg2, + arg3, + arg4, + data2); + if (arg0 != NULL) + g_object_unref (arg0); + if (arg1 != NULL) + g_object_unref (arg1); + if ((param_types[2] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg2 != NULL) + g_free (arg2); + if ((param_types[3] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg3 != NULL) + g_free (arg3); + if ((param_types[4] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg4 != NULL) + g_variant_unref (arg4); +} + +/* VOID:OBJECT,OBJECT,VARIANT,BOXED */ +void +_g_cclosure_marshal_VOID__OBJECT_OBJECT_VARIANT_BOXED (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint G_GNUC_UNUSED, + gpointer marshal_data) +{ + typedef void (*GMarshalFunc_VOID__OBJECT_OBJECT_VARIANT_BOXED) (gpointer data1, + gpointer arg1, + gpointer arg2, + gpointer arg3, + gpointer arg4, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_VOID__OBJECT_OBJECT_VARIANT_BOXED callback; + + g_return_if_fail (n_param_values == 5); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = g_value_peek_pointer (param_values + 0); + } + else + { + data1 = g_value_peek_pointer (param_values + 0); + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__OBJECT_OBJECT_VARIANT_BOXED) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + g_marshal_value_peek_object (param_values + 1), + g_marshal_value_peek_object (param_values + 2), + g_marshal_value_peek_variant (param_values + 3), + g_marshal_value_peek_boxed (param_values + 4), + data2); +} + +void +_g_cclosure_marshal_VOID__OBJECT_OBJECT_VARIANT_BOXEDv (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types) +{ + typedef void (*GMarshalFunc_VOID__OBJECT_OBJECT_VARIANT_BOXED) (gpointer data1, + gpointer arg1, + gpointer arg2, + gpointer arg3, + gpointer arg4, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_VOID__OBJECT_OBJECT_VARIANT_BOXED callback; + gpointer arg0; + gpointer arg1; + gpointer arg2; + gpointer arg3; + va_list args_copy; + + G_VA_COPY (args_copy, args); + arg0 = (gpointer) va_arg (args_copy, gpointer); + if (arg0 != NULL) + arg0 = g_object_ref (arg0); + arg1 = (gpointer) va_arg (args_copy, gpointer); + if (arg1 != NULL) + arg1 = g_object_ref (arg1); + arg2 = (gpointer) va_arg (args_copy, gpointer); + if ((param_types[2] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg2 != NULL) + arg2 = g_variant_ref_sink (arg2); + arg3 = (gpointer) va_arg (args_copy, gpointer); + if ((param_types[3] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg3 != NULL) + arg3 = g_boxed_copy (param_types[3] & ~G_SIGNAL_TYPE_STATIC_SCOPE, arg3); + va_end (args_copy); + + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = instance; + } + else + { + data1 = instance; + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__OBJECT_OBJECT_VARIANT_BOXED) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + arg0, + arg1, + arg2, + arg3, + data2); + if (arg0 != NULL) + g_object_unref (arg0); + if (arg1 != NULL) + g_object_unref (arg1); + if ((param_types[2] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg2 != NULL) + g_variant_unref (arg2); + if ((param_types[3] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg3 != NULL) + g_boxed_free (param_types[3] & ~G_SIGNAL_TYPE_STATIC_SCOPE, arg3); +} + +/* VOID:OBJECT,VARIANT */ +void +_g_cclosure_marshal_VOID__OBJECT_VARIANT (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint G_GNUC_UNUSED, + gpointer marshal_data) +{ + typedef void (*GMarshalFunc_VOID__OBJECT_VARIANT) (gpointer data1, + gpointer arg1, + gpointer arg2, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_VOID__OBJECT_VARIANT callback; + + g_return_if_fail (n_param_values == 3); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = g_value_peek_pointer (param_values + 0); + } + else + { + data1 = g_value_peek_pointer (param_values + 0); + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__OBJECT_VARIANT) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + g_marshal_value_peek_object (param_values + 1), + g_marshal_value_peek_variant (param_values + 2), + data2); +} + +void +_g_cclosure_marshal_VOID__OBJECT_VARIANTv (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types) +{ + typedef void (*GMarshalFunc_VOID__OBJECT_VARIANT) (gpointer data1, + gpointer arg1, + gpointer arg2, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_VOID__OBJECT_VARIANT callback; + gpointer arg0; + gpointer arg1; + va_list args_copy; + + G_VA_COPY (args_copy, args); + arg0 = (gpointer) va_arg (args_copy, gpointer); + if (arg0 != NULL) + arg0 = g_object_ref (arg0); + arg1 = (gpointer) va_arg (args_copy, gpointer); + if ((param_types[1] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg1 != NULL) + arg1 = g_variant_ref_sink (arg1); + va_end (args_copy); + + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = instance; + } + else + { + data1 = instance; + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__OBJECT_VARIANT) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + arg0, + arg1, + data2); + if (arg0 != NULL) + g_object_unref (arg0); + if ((param_types[1] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg1 != NULL) + g_variant_unref (arg1); +} + +/* VOID:POINTER,INT,STRING */ +void +_g_cclosure_marshal_VOID__POINTER_INT_STRING (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint G_GNUC_UNUSED, + gpointer marshal_data) +{ + typedef void (*GMarshalFunc_VOID__POINTER_INT_STRING) (gpointer data1, + gpointer arg1, + gint arg2, + gpointer arg3, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_VOID__POINTER_INT_STRING callback; + + g_return_if_fail (n_param_values == 4); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = g_value_peek_pointer (param_values + 0); + } + else + { + data1 = g_value_peek_pointer (param_values + 0); + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__POINTER_INT_STRING) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + g_marshal_value_peek_pointer (param_values + 1), + g_marshal_value_peek_int (param_values + 2), + g_marshal_value_peek_string (param_values + 3), + data2); +} + +void +_g_cclosure_marshal_VOID__POINTER_INT_STRINGv (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types) +{ + typedef void (*GMarshalFunc_VOID__POINTER_INT_STRING) (gpointer data1, + gpointer arg1, + gint arg2, + gpointer arg3, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_VOID__POINTER_INT_STRING callback; + gpointer arg0; + gint arg1; + gpointer arg2; + va_list args_copy; + + G_VA_COPY (args_copy, args); + arg0 = (gpointer) va_arg (args_copy, gpointer); + arg1 = (gint) va_arg (args_copy, gint); + arg2 = (gpointer) va_arg (args_copy, gpointer); + if ((param_types[2] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg2 != NULL) + arg2 = g_strdup (arg2); + va_end (args_copy); + + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = instance; + } + else + { + data1 = instance; + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__POINTER_INT_STRING) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + arg0, + arg1, + arg2, + data2); + if ((param_types[2] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg2 != NULL) + g_free (arg2); +} + +/* VOID:STRING,BOOLEAN */ +void +_g_cclosure_marshal_VOID__STRING_BOOLEAN (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint G_GNUC_UNUSED, + gpointer marshal_data) +{ + typedef void (*GMarshalFunc_VOID__STRING_BOOLEAN) (gpointer data1, + gpointer arg1, + gboolean arg2, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_VOID__STRING_BOOLEAN callback; + + g_return_if_fail (n_param_values == 3); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = g_value_peek_pointer (param_values + 0); + } + else + { + data1 = g_value_peek_pointer (param_values + 0); + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__STRING_BOOLEAN) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + g_marshal_value_peek_string (param_values + 1), + g_marshal_value_peek_boolean (param_values + 2), + data2); +} + +void +_g_cclosure_marshal_VOID__STRING_BOOLEANv (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types) +{ + typedef void (*GMarshalFunc_VOID__STRING_BOOLEAN) (gpointer data1, + gpointer arg1, + gboolean arg2, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_VOID__STRING_BOOLEAN callback; + gpointer arg0; + gboolean arg1; + va_list args_copy; + + G_VA_COPY (args_copy, args); + arg0 = (gpointer) va_arg (args_copy, gpointer); + if ((param_types[0] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg0 != NULL) + arg0 = g_strdup (arg0); + arg1 = (gboolean) va_arg (args_copy, gboolean); + va_end (args_copy); + + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = instance; + } + else + { + data1 = instance; + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__STRING_BOOLEAN) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + arg0, + arg1, + data2); + if ((param_types[0] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg0 != NULL) + g_free (arg0); +} + +/* VOID:STRING,BOXED */ +void +_g_cclosure_marshal_VOID__STRING_BOXED (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint G_GNUC_UNUSED, + gpointer marshal_data) +{ + typedef void (*GMarshalFunc_VOID__STRING_BOXED) (gpointer data1, + gpointer arg1, + gpointer arg2, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_VOID__STRING_BOXED callback; + + g_return_if_fail (n_param_values == 3); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = g_value_peek_pointer (param_values + 0); + } + else + { + data1 = g_value_peek_pointer (param_values + 0); + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__STRING_BOXED) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + g_marshal_value_peek_string (param_values + 1), + g_marshal_value_peek_boxed (param_values + 2), + data2); +} + +void +_g_cclosure_marshal_VOID__STRING_BOXEDv (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types) +{ + typedef void (*GMarshalFunc_VOID__STRING_BOXED) (gpointer data1, + gpointer arg1, + gpointer arg2, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_VOID__STRING_BOXED callback; + gpointer arg0; + gpointer arg1; + va_list args_copy; + + G_VA_COPY (args_copy, args); + arg0 = (gpointer) va_arg (args_copy, gpointer); + if ((param_types[0] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg0 != NULL) + arg0 = g_strdup (arg0); + arg1 = (gpointer) va_arg (args_copy, gpointer); + if ((param_types[1] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg1 != NULL) + arg1 = g_boxed_copy (param_types[1] & ~G_SIGNAL_TYPE_STATIC_SCOPE, arg1); + va_end (args_copy); + + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = instance; + } + else + { + data1 = instance; + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__STRING_BOXED) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + arg0, + arg1, + data2); + if ((param_types[0] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg0 != NULL) + g_free (arg0); + if ((param_types[1] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg1 != NULL) + g_boxed_free (param_types[1] & ~G_SIGNAL_TYPE_STATIC_SCOPE, arg1); +} + +/* VOID:STRING,BOXED,BOXED */ +void +_g_cclosure_marshal_VOID__STRING_BOXED_BOXED (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint G_GNUC_UNUSED, + gpointer marshal_data) +{ + typedef void (*GMarshalFunc_VOID__STRING_BOXED_BOXED) (gpointer data1, + gpointer arg1, + gpointer arg2, + gpointer arg3, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_VOID__STRING_BOXED_BOXED callback; + + g_return_if_fail (n_param_values == 4); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = g_value_peek_pointer (param_values + 0); + } + else + { + data1 = g_value_peek_pointer (param_values + 0); + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__STRING_BOXED_BOXED) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + g_marshal_value_peek_string (param_values + 1), + g_marshal_value_peek_boxed (param_values + 2), + g_marshal_value_peek_boxed (param_values + 3), + data2); +} + +void +_g_cclosure_marshal_VOID__STRING_BOXED_BOXEDv (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types) +{ + typedef void (*GMarshalFunc_VOID__STRING_BOXED_BOXED) (gpointer data1, + gpointer arg1, + gpointer arg2, + gpointer arg3, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_VOID__STRING_BOXED_BOXED callback; + gpointer arg0; + gpointer arg1; + gpointer arg2; + va_list args_copy; + + G_VA_COPY (args_copy, args); + arg0 = (gpointer) va_arg (args_copy, gpointer); + if ((param_types[0] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg0 != NULL) + arg0 = g_strdup (arg0); + arg1 = (gpointer) va_arg (args_copy, gpointer); + if ((param_types[1] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg1 != NULL) + arg1 = g_boxed_copy (param_types[1] & ~G_SIGNAL_TYPE_STATIC_SCOPE, arg1); + arg2 = (gpointer) va_arg (args_copy, gpointer); + if ((param_types[2] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg2 != NULL) + arg2 = g_boxed_copy (param_types[2] & ~G_SIGNAL_TYPE_STATIC_SCOPE, arg2); + va_end (args_copy); + + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = instance; + } + else + { + data1 = instance; + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__STRING_BOXED_BOXED) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + arg0, + arg1, + arg2, + data2); + if ((param_types[0] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg0 != NULL) + g_free (arg0); + if ((param_types[1] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg1 != NULL) + g_boxed_free (param_types[1] & ~G_SIGNAL_TYPE_STATIC_SCOPE, arg1); + if ((param_types[2] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg2 != NULL) + g_boxed_free (param_types[2] & ~G_SIGNAL_TYPE_STATIC_SCOPE, arg2); +} + +/* VOID:STRING,INT64,INT64 */ +void +_g_cclosure_marshal_VOID__STRING_INT64_INT64 (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint G_GNUC_UNUSED, + gpointer marshal_data) +{ + typedef void (*GMarshalFunc_VOID__STRING_INT64_INT64) (gpointer data1, + gpointer arg1, + gint64 arg2, + gint64 arg3, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_VOID__STRING_INT64_INT64 callback; + + g_return_if_fail (n_param_values == 4); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = g_value_peek_pointer (param_values + 0); + } + else + { + data1 = g_value_peek_pointer (param_values + 0); + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__STRING_INT64_INT64) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + g_marshal_value_peek_string (param_values + 1), + g_marshal_value_peek_int64 (param_values + 2), + g_marshal_value_peek_int64 (param_values + 3), + data2); +} + +void +_g_cclosure_marshal_VOID__STRING_INT64_INT64v (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types) +{ + typedef void (*GMarshalFunc_VOID__STRING_INT64_INT64) (gpointer data1, + gpointer arg1, + gint64 arg2, + gint64 arg3, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_VOID__STRING_INT64_INT64 callback; + gpointer arg0; + gint64 arg1; + gint64 arg2; + va_list args_copy; + + G_VA_COPY (args_copy, args); + arg0 = (gpointer) va_arg (args_copy, gpointer); + if ((param_types[0] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg0 != NULL) + arg0 = g_strdup (arg0); + arg1 = (gint64) va_arg (args_copy, gint64); + arg2 = (gint64) va_arg (args_copy, gint64); + va_end (args_copy); + + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = instance; + } + else + { + data1 = instance; + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__STRING_INT64_INT64) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + arg0, + arg1, + arg2, + data2); + if ((param_types[0] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg0 != NULL) + g_free (arg0); +} + +/* VOID:STRING,STRING,STRING,FLAGS */ +void +_g_cclosure_marshal_VOID__STRING_STRING_STRING_FLAGS (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint G_GNUC_UNUSED, + gpointer marshal_data) +{ + typedef void (*GMarshalFunc_VOID__STRING_STRING_STRING_FLAGS) (gpointer data1, + gpointer arg1, + gpointer arg2, + gpointer arg3, + guint arg4, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_VOID__STRING_STRING_STRING_FLAGS callback; + + g_return_if_fail (n_param_values == 5); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = g_value_peek_pointer (param_values + 0); + } + else + { + data1 = g_value_peek_pointer (param_values + 0); + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__STRING_STRING_STRING_FLAGS) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + g_marshal_value_peek_string (param_values + 1), + g_marshal_value_peek_string (param_values + 2), + g_marshal_value_peek_string (param_values + 3), + g_marshal_value_peek_flags (param_values + 4), + data2); +} + +void +_g_cclosure_marshal_VOID__STRING_STRING_STRING_FLAGSv (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types) +{ + typedef void (*GMarshalFunc_VOID__STRING_STRING_STRING_FLAGS) (gpointer data1, + gpointer arg1, + gpointer arg2, + gpointer arg3, + guint arg4, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_VOID__STRING_STRING_STRING_FLAGS callback; + gpointer arg0; + gpointer arg1; + gpointer arg2; + guint arg3; + va_list args_copy; + + G_VA_COPY (args_copy, args); + arg0 = (gpointer) va_arg (args_copy, gpointer); + if ((param_types[0] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg0 != NULL) + arg0 = g_strdup (arg0); + arg1 = (gpointer) va_arg (args_copy, gpointer); + if ((param_types[1] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg1 != NULL) + arg1 = g_strdup (arg1); + arg2 = (gpointer) va_arg (args_copy, gpointer); + if ((param_types[2] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg2 != NULL) + arg2 = g_strdup (arg2); + arg3 = (guint) va_arg (args_copy, guint); + va_end (args_copy); + + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = instance; + } + else + { + data1 = instance; + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__STRING_STRING_STRING_FLAGS) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + arg0, + arg1, + arg2, + arg3, + data2); + if ((param_types[0] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg0 != NULL) + g_free (arg0); + if ((param_types[1] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg1 != NULL) + g_free (arg1); + if ((param_types[2] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg2 != NULL) + g_free (arg2); +} + +/* VOID:STRING,STRING,VARIANT */ +void +_g_cclosure_marshal_VOID__STRING_STRING_VARIANT (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint G_GNUC_UNUSED, + gpointer marshal_data) +{ + typedef void (*GMarshalFunc_VOID__STRING_STRING_VARIANT) (gpointer data1, + gpointer arg1, + gpointer arg2, + gpointer arg3, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_VOID__STRING_STRING_VARIANT callback; + + g_return_if_fail (n_param_values == 4); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = g_value_peek_pointer (param_values + 0); + } + else + { + data1 = g_value_peek_pointer (param_values + 0); + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__STRING_STRING_VARIANT) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + g_marshal_value_peek_string (param_values + 1), + g_marshal_value_peek_string (param_values + 2), + g_marshal_value_peek_variant (param_values + 3), + data2); +} + +void +_g_cclosure_marshal_VOID__STRING_STRING_VARIANTv (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types) +{ + typedef void (*GMarshalFunc_VOID__STRING_STRING_VARIANT) (gpointer data1, + gpointer arg1, + gpointer arg2, + gpointer arg3, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_VOID__STRING_STRING_VARIANT callback; + gpointer arg0; + gpointer arg1; + gpointer arg2; + va_list args_copy; + + G_VA_COPY (args_copy, args); + arg0 = (gpointer) va_arg (args_copy, gpointer); + if ((param_types[0] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg0 != NULL) + arg0 = g_strdup (arg0); + arg1 = (gpointer) va_arg (args_copy, gpointer); + if ((param_types[1] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg1 != NULL) + arg1 = g_strdup (arg1); + arg2 = (gpointer) va_arg (args_copy, gpointer); + if ((param_types[2] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg2 != NULL) + arg2 = g_variant_ref_sink (arg2); + va_end (args_copy); + + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = instance; + } + else + { + data1 = instance; + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__STRING_STRING_VARIANT) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + arg0, + arg1, + arg2, + data2); + if ((param_types[0] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg0 != NULL) + g_free (arg0); + if ((param_types[1] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg1 != NULL) + g_free (arg1); + if ((param_types[2] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg2 != NULL) + g_variant_unref (arg2); +} + +/* VOID:STRING,VARIANT */ +void +_g_cclosure_marshal_VOID__STRING_VARIANT (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint G_GNUC_UNUSED, + gpointer marshal_data) +{ + typedef void (*GMarshalFunc_VOID__STRING_VARIANT) (gpointer data1, + gpointer arg1, + gpointer arg2, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_VOID__STRING_VARIANT callback; + + g_return_if_fail (n_param_values == 3); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = g_value_peek_pointer (param_values + 0); + } + else + { + data1 = g_value_peek_pointer (param_values + 0); + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__STRING_VARIANT) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + g_marshal_value_peek_string (param_values + 1), + g_marshal_value_peek_variant (param_values + 2), + data2); +} + +void +_g_cclosure_marshal_VOID__STRING_VARIANTv (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types) +{ + typedef void (*GMarshalFunc_VOID__STRING_VARIANT) (gpointer data1, + gpointer arg1, + gpointer arg2, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_VOID__STRING_VARIANT callback; + gpointer arg0; + gpointer arg1; + va_list args_copy; + + G_VA_COPY (args_copy, args); + arg0 = (gpointer) va_arg (args_copy, gpointer); + if ((param_types[0] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg0 != NULL) + arg0 = g_strdup (arg0); + arg1 = (gpointer) va_arg (args_copy, gpointer); + if ((param_types[1] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg1 != NULL) + arg1 = g_variant_ref_sink (arg1); + va_end (args_copy); + + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = instance; + } + else + { + data1 = instance; + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__STRING_VARIANT) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + arg0, + arg1, + data2); + if ((param_types[0] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg0 != NULL) + g_free (arg0); + if ((param_types[1] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg1 != NULL) + g_variant_unref (arg1); +} + +/* VOID:UINT,UINT,UINT */ +void +_g_cclosure_marshal_VOID__UINT_UINT_UINT (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint G_GNUC_UNUSED, + gpointer marshal_data) +{ + typedef void (*GMarshalFunc_VOID__UINT_UINT_UINT) (gpointer data1, + guint arg1, + guint arg2, + guint arg3, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_VOID__UINT_UINT_UINT callback; + + g_return_if_fail (n_param_values == 4); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = g_value_peek_pointer (param_values + 0); + } + else + { + data1 = g_value_peek_pointer (param_values + 0); + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__UINT_UINT_UINT) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + g_marshal_value_peek_uint (param_values + 1), + g_marshal_value_peek_uint (param_values + 2), + g_marshal_value_peek_uint (param_values + 3), + data2); +} + +void +_g_cclosure_marshal_VOID__UINT_UINT_UINTv (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types) +{ + typedef void (*GMarshalFunc_VOID__UINT_UINT_UINT) (gpointer data1, + guint arg1, + guint arg2, + guint arg3, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_VOID__UINT_UINT_UINT callback; + guint arg0; + guint arg1; + guint arg2; + va_list args_copy; + + G_VA_COPY (args_copy, args); + arg0 = (guint) va_arg (args_copy, guint); + arg1 = (guint) va_arg (args_copy, guint); + arg2 = (guint) va_arg (args_copy, guint); + va_end (args_copy); + + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = instance; + } + else + { + data1 = instance; + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__UINT_UINT_UINT) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + arg0, + arg1, + arg2, + data2); + +} + +/* VOID:VARIANT,BOXED */ +void +_g_cclosure_marshal_VOID__VARIANT_BOXED (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint G_GNUC_UNUSED, + gpointer marshal_data) +{ + typedef void (*GMarshalFunc_VOID__VARIANT_BOXED) (gpointer data1, + gpointer arg1, + gpointer arg2, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_VOID__VARIANT_BOXED callback; + + g_return_if_fail (n_param_values == 3); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = g_value_peek_pointer (param_values + 0); + } + else + { + data1 = g_value_peek_pointer (param_values + 0); + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__VARIANT_BOXED) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + g_marshal_value_peek_variant (param_values + 1), + g_marshal_value_peek_boxed (param_values + 2), + data2); +} + +void +_g_cclosure_marshal_VOID__VARIANT_BOXEDv (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types) +{ + typedef void (*GMarshalFunc_VOID__VARIANT_BOXED) (gpointer data1, + gpointer arg1, + gpointer arg2, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_VOID__VARIANT_BOXED callback; + gpointer arg0; + gpointer arg1; + va_list args_copy; + + G_VA_COPY (args_copy, args); + arg0 = (gpointer) va_arg (args_copy, gpointer); + if ((param_types[0] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg0 != NULL) + arg0 = g_variant_ref_sink (arg0); + arg1 = (gpointer) va_arg (args_copy, gpointer); + if ((param_types[1] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg1 != NULL) + arg1 = g_boxed_copy (param_types[1] & ~G_SIGNAL_TYPE_STATIC_SCOPE, arg1); + va_end (args_copy); + + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = instance; + } + else + { + data1 = instance; + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__VARIANT_BOXED) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + arg0, + arg1, + data2); + if ((param_types[0] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg0 != NULL) + g_variant_unref (arg0); + if ((param_types[1] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg1 != NULL) + g_boxed_free (param_types[1] & ~G_SIGNAL_TYPE_STATIC_SCOPE, arg1); +} + diff --git a/gio/gmarshal-internal.h b/gio/gmarshal-internal.h new file mode 100644 index 000000000..ec5c3e877 --- /dev/null +++ b/gio/gmarshal-internal.h @@ -0,0 +1,503 @@ +/* GObject - GLib Type, Object, Parameter and Signal Library + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef ___G_CCLOSURE_MARSHAL_MARSHAL_H__ +#define ___G_CCLOSURE_MARSHAL_MARSHAL_H__ + +#include <glib-object.h> + +G_BEGIN_DECLS + +/* BOOLEAN:OBJECT */ +G_GNUC_INTERNAL +void _g_cclosure_marshal_BOOLEAN__OBJECT (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +G_GNUC_INTERNAL +void _g_cclosure_marshal_BOOLEAN__OBJECTv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* BOOLEAN:OBJECT,FLAGS */ +G_GNUC_INTERNAL +void _g_cclosure_marshal_BOOLEAN__OBJECT_FLAGS (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +G_GNUC_INTERNAL +void _g_cclosure_marshal_BOOLEAN__OBJECT_FLAGSv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* BOOLEAN:OBJECT,OBJECT */ +G_GNUC_INTERNAL +void _g_cclosure_marshal_BOOLEAN__OBJECT_OBJECT (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +G_GNUC_INTERNAL +void _g_cclosure_marshal_BOOLEAN__OBJECT_OBJECTv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* BOOLEAN:POINTER,INT */ +G_GNUC_INTERNAL +void _g_cclosure_marshal_BOOLEAN__POINTER_INT (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +G_GNUC_INTERNAL +void _g_cclosure_marshal_BOOLEAN__POINTER_INTv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* BOOLEAN:STRING */ +G_GNUC_INTERNAL +void _g_cclosure_marshal_BOOLEAN__STRING (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +G_GNUC_INTERNAL +void _g_cclosure_marshal_BOOLEAN__STRINGv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* BOOLEAN:UINT */ +G_GNUC_INTERNAL +void _g_cclosure_marshal_BOOLEAN__UINT (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +G_GNUC_INTERNAL +void _g_cclosure_marshal_BOOLEAN__UINTv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* BOOLEAN:VOID */ +G_GNUC_INTERNAL +void _g_cclosure_marshal_BOOLEAN__VOID (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +G_GNUC_INTERNAL +void _g_cclosure_marshal_BOOLEAN__VOIDv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* INT:BOXED */ +G_GNUC_INTERNAL +void _g_cclosure_marshal_INT__BOXED (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +G_GNUC_INTERNAL +void _g_cclosure_marshal_INT__BOXEDv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* INT:OBJECT */ +G_GNUC_INTERNAL +void _g_cclosure_marshal_INT__OBJECT (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +G_GNUC_INTERNAL +void _g_cclosure_marshal_INT__OBJECTv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:BOOLEAN,BOXED */ +G_GNUC_INTERNAL +void _g_cclosure_marshal_VOID__BOOLEAN_BOXED (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +G_GNUC_INTERNAL +void _g_cclosure_marshal_VOID__BOOLEAN_BOXEDv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:ENUM,OBJECT */ +G_GNUC_INTERNAL +void _g_cclosure_marshal_VOID__ENUM_OBJECT (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +G_GNUC_INTERNAL +void _g_cclosure_marshal_VOID__ENUM_OBJECTv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:ENUM,OBJECT,OBJECT */ +G_GNUC_INTERNAL +void _g_cclosure_marshal_VOID__ENUM_OBJECT_OBJECT (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +G_GNUC_INTERNAL +void _g_cclosure_marshal_VOID__ENUM_OBJECT_OBJECTv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:INT,INT,INT */ +G_GNUC_INTERNAL +void _g_cclosure_marshal_VOID__INT_INT_INT (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +G_GNUC_INTERNAL +void _g_cclosure_marshal_VOID__INT_INT_INTv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:OBJECT,OBJECT */ +G_GNUC_INTERNAL +void _g_cclosure_marshal_VOID__OBJECT_OBJECT (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +G_GNUC_INTERNAL +void _g_cclosure_marshal_VOID__OBJECT_OBJECTv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:OBJECT,OBJECT,ENUM */ +G_GNUC_INTERNAL +void _g_cclosure_marshal_VOID__OBJECT_OBJECT_ENUM (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +G_GNUC_INTERNAL +void _g_cclosure_marshal_VOID__OBJECT_OBJECT_ENUMv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:OBJECT,OBJECT,STRING,STRING,VARIANT */ +G_GNUC_INTERNAL +void _g_cclosure_marshal_VOID__OBJECT_OBJECT_STRING_STRING_VARIANT (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +G_GNUC_INTERNAL +void _g_cclosure_marshal_VOID__OBJECT_OBJECT_STRING_STRING_VARIANTv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:OBJECT,OBJECT,VARIANT,BOXED */ +G_GNUC_INTERNAL +void _g_cclosure_marshal_VOID__OBJECT_OBJECT_VARIANT_BOXED (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +G_GNUC_INTERNAL +void _g_cclosure_marshal_VOID__OBJECT_OBJECT_VARIANT_BOXEDv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:OBJECT,VARIANT */ +G_GNUC_INTERNAL +void _g_cclosure_marshal_VOID__OBJECT_VARIANT (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +G_GNUC_INTERNAL +void _g_cclosure_marshal_VOID__OBJECT_VARIANTv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:POINTER,INT,STRING */ +G_GNUC_INTERNAL +void _g_cclosure_marshal_VOID__POINTER_INT_STRING (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +G_GNUC_INTERNAL +void _g_cclosure_marshal_VOID__POINTER_INT_STRINGv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:STRING,BOOLEAN */ +G_GNUC_INTERNAL +void _g_cclosure_marshal_VOID__STRING_BOOLEAN (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +G_GNUC_INTERNAL +void _g_cclosure_marshal_VOID__STRING_BOOLEANv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:STRING,BOXED */ +G_GNUC_INTERNAL +void _g_cclosure_marshal_VOID__STRING_BOXED (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +G_GNUC_INTERNAL +void _g_cclosure_marshal_VOID__STRING_BOXEDv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:STRING,BOXED,BOXED */ +G_GNUC_INTERNAL +void _g_cclosure_marshal_VOID__STRING_BOXED_BOXED (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +G_GNUC_INTERNAL +void _g_cclosure_marshal_VOID__STRING_BOXED_BOXEDv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:STRING,INT64,INT64 */ +G_GNUC_INTERNAL +void _g_cclosure_marshal_VOID__STRING_INT64_INT64 (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +G_GNUC_INTERNAL +void _g_cclosure_marshal_VOID__STRING_INT64_INT64v (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:STRING,STRING,STRING,FLAGS */ +G_GNUC_INTERNAL +void _g_cclosure_marshal_VOID__STRING_STRING_STRING_FLAGS (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +G_GNUC_INTERNAL +void _g_cclosure_marshal_VOID__STRING_STRING_STRING_FLAGSv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:STRING,STRING,VARIANT */ +G_GNUC_INTERNAL +void _g_cclosure_marshal_VOID__STRING_STRING_VARIANT (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +G_GNUC_INTERNAL +void _g_cclosure_marshal_VOID__STRING_STRING_VARIANTv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:STRING,VARIANT */ +G_GNUC_INTERNAL +void _g_cclosure_marshal_VOID__STRING_VARIANT (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +G_GNUC_INTERNAL +void _g_cclosure_marshal_VOID__STRING_VARIANTv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:UINT,UINT,UINT */ +G_GNUC_INTERNAL +void _g_cclosure_marshal_VOID__UINT_UINT_UINT (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +G_GNUC_INTERNAL +void _g_cclosure_marshal_VOID__UINT_UINT_UINTv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + +/* VOID:VARIANT,BOXED */ +G_GNUC_INTERNAL +void _g_cclosure_marshal_VOID__VARIANT_BOXED (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); +G_GNUC_INTERNAL +void _g_cclosure_marshal_VOID__VARIANT_BOXEDv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + + +G_END_DECLS + +#endif /* ___G_CCLOSURE_MARSHAL_MARSHAL_H__ */ diff --git a/gio/gmarshal-internal.list b/gio/gmarshal-internal.list new file mode 100644 index 000000000..925ae4265 --- /dev/null +++ b/gio/gmarshal-internal.list @@ -0,0 +1,28 @@ +BOOLEAN:OBJECT +BOOLEAN:OBJECT,FLAGS +BOOLEAN:OBJECT,OBJECT +BOOLEAN:POINTER,INT +BOOLEAN:STRING +BOOLEAN:UINT +BOOLEAN:VOID +INT:BOXED +INT:OBJECT +VOID:BOOLEAN,BOXED +VOID:ENUM,OBJECT +VOID:ENUM,OBJECT,OBJECT +VOID:INT,INT,INT +VOID:OBJECT,OBJECT +VOID:OBJECT,OBJECT,ENUM +VOID:OBJECT,OBJECT,STRING,STRING,VARIANT +VOID:OBJECT,OBJECT,VARIANT,BOXED +VOID:OBJECT,VARIANT +VOID:POINTER,INT,STRING +VOID:STRING,BOOLEAN +VOID:STRING,BOXED +VOID:STRING,BOXED,BOXED +VOID:STRING,INT64,INT64 +VOID:STRING,STRING,STRING,FLAGS +VOID:STRING,STRING,VARIANT +VOID:STRING,VARIANT +VOID:UINT,UINT,UINT +VOID:VARIANT,BOXED diff --git a/gio/gmenumodel.c b/gio/gmenumodel.c index f4d7fcae5..8ca45e098 100644 --- a/gio/gmenumodel.c +++ b/gio/gmenumodel.c @@ -22,6 +22,7 @@ #include "gmenumodel.h" #include "glibintl.h" +#include "gmarshal-internal.h" /** * SECTION:gmenumodel @@ -452,8 +453,12 @@ g_menu_model_class_init (GMenuModelClass *class) g_menu_model_items_changed_signal = g_signal_new (I_("items-changed"), G_TYPE_MENU_MODEL, G_SIGNAL_RUN_LAST, 0, NULL, NULL, - g_cclosure_marshal_generic, G_TYPE_NONE, + _g_cclosure_marshal_VOID__INT_INT_INT, + G_TYPE_NONE, 3, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT); + g_signal_set_va_marshaller (g_menu_model_items_changed_signal, + G_TYPE_FROM_CLASS (class), + _g_cclosure_marshal_VOID__INT_INT_INTv); } /** diff --git a/gio/gmount.c b/gio/gmount.c index dad4b8513..55caaa6bd 100644 --- a/gio/gmount.c +++ b/gio/gmount.c @@ -78,7 +78,7 @@ g_mount_default_init (GMountInterface *iface) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GMountIface, changed), NULL, NULL, - g_cclosure_marshal_VOID__VOID, + NULL, G_TYPE_NONE, 0); /** @@ -95,7 +95,7 @@ g_mount_default_init (GMountInterface *iface) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GMountIface, unmounted), NULL, NULL, - g_cclosure_marshal_VOID__VOID, + NULL, G_TYPE_NONE, 0); /** * GMount::pre-unmount: @@ -114,7 +114,7 @@ g_mount_default_init (GMountInterface *iface) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GMountIface, pre_unmount), NULL, NULL, - g_cclosure_marshal_VOID__VOID, + NULL, G_TYPE_NONE, 0); } diff --git a/gio/gmountoperation.c b/gio/gmountoperation.c index 76a5024ff..39762e51d 100644 --- a/gio/gmountoperation.c +++ b/gio/gmountoperation.c @@ -25,6 +25,7 @@ #include "gmountoperation.h" #include "gioenumtypes.h" #include "glibintl.h" +#include "gmarshal-internal.h" /** @@ -321,9 +322,12 @@ g_mount_operation_class_init (GMountOperationClass *klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GMountOperationClass, ask_password), NULL, NULL, - NULL, + _g_cclosure_marshal_VOID__STRING_STRING_STRING_FLAGS, G_TYPE_NONE, 4, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_ASK_PASSWORD_FLAGS); + g_signal_set_va_marshaller (signals[ASK_PASSWORD], + G_TYPE_FROM_CLASS (object_class), + _g_cclosure_marshal_VOID__STRING_STRING_STRING_FLAGSv); /** * GMountOperation::ask-question: @@ -344,9 +348,12 @@ g_mount_operation_class_init (GMountOperationClass *klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GMountOperationClass, ask_question), NULL, NULL, - NULL, + _g_cclosure_marshal_VOID__STRING_BOXED, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRV); + g_signal_set_va_marshaller (signals[ASK_QUESTION], + G_TYPE_FROM_CLASS (object_class), + _g_cclosure_marshal_VOID__STRING_BOXEDv); /** * GMountOperation::reply: @@ -361,7 +368,7 @@ g_mount_operation_class_init (GMountOperationClass *klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GMountOperationClass, reply), NULL, NULL, - g_cclosure_marshal_VOID__ENUM, + NULL, G_TYPE_NONE, 1, G_TYPE_MOUNT_OPERATION_RESULT); @@ -382,7 +389,7 @@ g_mount_operation_class_init (GMountOperationClass *klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GMountOperationClass, aborted), NULL, NULL, - g_cclosure_marshal_VOID__VOID, + NULL, G_TYPE_NONE, 0); /** @@ -414,9 +421,12 @@ g_mount_operation_class_init (GMountOperationClass *klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GMountOperationClass, show_processes), NULL, NULL, - NULL, + _g_cclosure_marshal_VOID__STRING_BOXED_BOXED, G_TYPE_NONE, 3, G_TYPE_STRING, G_TYPE_ARRAY, G_TYPE_STRV); + g_signal_set_va_marshaller (signals[SHOW_PROCESSES], + G_TYPE_FROM_CLASS (object_class), + _g_cclosure_marshal_VOID__STRING_BOXED_BOXEDv); /** * GMountOperation::show-unmount-progress: @@ -452,9 +462,13 @@ g_mount_operation_class_init (GMountOperationClass *klass) G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GMountOperationClass, show_unmount_progress), - NULL, NULL, NULL, + NULL, NULL, + _g_cclosure_marshal_VOID__STRING_INT64_INT64, G_TYPE_NONE, 3, G_TYPE_STRING, G_TYPE_INT64, G_TYPE_INT64); + g_signal_set_va_marshaller (signals[SHOW_UNMOUNT_PROGRESS], + G_TYPE_FROM_CLASS (object_class), + _g_cclosure_marshal_VOID__STRING_INT64_INT64v); /** * GMountOperation:username: diff --git a/gio/gnetworkaddress.c b/gio/gnetworkaddress.c index 4d8d74bd4..f12f93585 100644 --- a/gio/gnetworkaddress.c +++ b/gio/gnetworkaddress.c @@ -224,7 +224,7 @@ g_network_address_get_property (GObject *object, } -/** +/* * inet_addresses_to_inet_socket_addresses: * @addresses: (transfer full): #GList of #GInetAddress * @@ -1261,13 +1261,8 @@ got_ipv6_addresses (GObject *source_object, */ if (error != NULL && !addr_enum->last_error && (addr_enum->state & RESOLVE_STATE_WAITING_ON_IPV4)) { + /* ipv6 lookup failed, but ipv4 is still outstanding. wait. */ addr_enum->last_error = g_steal_pointer (&error); - - addr_enum->wait_source = g_timeout_source_new (HAPPY_EYEBALLS_RESOLUTION_DELAY_MS); - g_source_set_callback (addr_enum->wait_source, - on_address_timeout, - addr_enum, NULL); - g_source_attach (addr_enum->wait_source, addr_enum->context); } else if (addr_enum->waiting_task != NULL) { diff --git a/gio/gnetworkmonitor.c b/gio/gnetworkmonitor.c index 657c7047a..d65fc2bc4 100644 --- a/gio/gnetworkmonitor.c +++ b/gio/gnetworkmonitor.c @@ -321,7 +321,7 @@ g_network_monitor_default_init (GNetworkMonitorInterface *iface) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GNetworkMonitorInterface, network_changed), NULL, NULL, - g_cclosure_marshal_VOID__BOOLEAN, + NULL, G_TYPE_NONE, 1, G_TYPE_BOOLEAN); diff --git a/gio/gnetworkmonitornm.c b/gio/gnetworkmonitornm.c index 7bb480f54..9013fd49c 100644 --- a/gio/gnetworkmonitornm.c +++ b/gio/gnetworkmonitornm.c @@ -196,7 +196,7 @@ sync_properties (GNetworkMonitorNM *nm, } else if (nm_state <= NM_STATE_CONNECTED_SITE) { - new_network_available = FALSE; + new_network_available = TRUE; new_network_metered = FALSE; if (nm_connectivity == NM_CONNECTIVITY_PORTAL) { diff --git a/gio/gopenuriportal.c b/gio/gopenuriportal.c index b798d7cd1..be68569ed 100644 --- a/gio/gopenuriportal.c +++ b/gio/gopenuriportal.c @@ -279,7 +279,7 @@ g_openuri_portal_open_uri_async (const char *uri, if (sender[i] == '.') sender[i] = '_'; - handle = g_strdup_printf ("/org/fredesktop/portal/desktop/request/%s/%s", sender, token); + handle = g_strdup_printf ("/org/freedesktop/portal/desktop/request/%s/%s", sender, token); g_object_set_data_full (G_OBJECT (task), "handle", handle, g_free); g_free (sender); diff --git a/gio/gosxcontenttype.m b/gio/gosxcontenttype.m index 52ba5763a..6119bbcae 100644 --- a/gio/gosxcontenttype.m +++ b/gio/gosxcontenttype.m @@ -100,6 +100,21 @@ create_cstr_from_cfstring_with_fallback (CFStringRef str, return cstr; } +/*< private >*/ +void +g_content_type_set_mime_dirs (const gchar * const *dirs) +{ + /* noop on macOS */ +} + +/*< private >*/ +const gchar * const * +g_content_type_get_mime_dirs (void) +{ + const gchar * const *mime_dirs = { NULL }; + return mime_dirs; +} + gboolean g_content_type_equals (const gchar *type1, const gchar *type2) diff --git a/gio/gportalsupport.c b/gio/gportalsupport.c index 2f1e82517..b0a94b360 100644 --- a/gio/gportalsupport.c +++ b/gio/gportalsupport.c @@ -23,6 +23,7 @@ static gboolean flatpak_info_read; static gboolean use_portal; static gboolean network_available; +static gboolean dconf_access; static void read_flatpak_info (void) @@ -40,11 +41,13 @@ read_flatpak_info (void) use_portal = TRUE; network_available = FALSE; + dconf_access = FALSE; keyfile = g_key_file_new (); if (g_key_file_load_from_file (keyfile, path, G_KEY_FILE_NONE, NULL)) { char **shared = NULL; + char *dconf_policy = NULL; shared = g_key_file_get_string_list (keyfile, "Context", "shared", NULL, NULL); if (shared) @@ -52,6 +55,14 @@ read_flatpak_info (void) network_available = g_strv_contains ((const char * const *)shared, "network"); g_strfreev (shared); } + + dconf_policy = g_key_file_get_string (keyfile, "Session Bus Policy", "ca.desrt.dconf", NULL); + if (dconf_policy) + { + if (strcmp (dconf_policy, "talk") == 0) + dconf_access = TRUE; + g_free (dconf_policy); + } } g_key_file_unref (keyfile); @@ -64,6 +75,7 @@ read_flatpak_info (void) if (var && var[0] == '1') use_portal = TRUE; network_available = TRUE; + dconf_access = TRUE; } } @@ -81,3 +93,9 @@ glib_network_available_in_sandbox (void) return network_available; } +gboolean +glib_has_dconf_access_in_sandbox (void) +{ + read_flatpak_info (); + return dconf_access; +} diff --git a/gio/gportalsupport.h b/gio/gportalsupport.h index a331f45d3..746f1fd6b 100644 --- a/gio/gportalsupport.h +++ b/gio/gportalsupport.h @@ -24,6 +24,7 @@ G_BEGIN_DECLS gboolean glib_should_use_portal (void); gboolean glib_network_available_in_sandbox (void); +gboolean glib_has_dconf_access_in_sandbox (void); G_END_DECLS diff --git a/gio/gpropertyaction.c b/gio/gpropertyaction.c index c1ce813ae..9ce9ab52e 100644 --- a/gio/gpropertyaction.c +++ b/gio/gpropertyaction.c @@ -158,6 +158,29 @@ g_property_action_get_state_type (GAction *action) static GVariant * g_property_action_get_state_hint (GAction *action) { + GPropertyAction *paction = G_PROPERTY_ACTION (action); + + if (paction->pspec->value_type == G_TYPE_INT) + { + GParamSpecInt *pspec = (GParamSpecInt *)paction->pspec; + return g_variant_new ("(ii)", pspec->minimum, pspec->maximum); + } + else if (paction->pspec->value_type == G_TYPE_UINT) + { + GParamSpecUInt *pspec = (GParamSpecUInt *)paction->pspec; + return g_variant_new ("(uu)", pspec->minimum, pspec->maximum); + } + else if (paction->pspec->value_type == G_TYPE_FLOAT) + { + GParamSpecFloat *pspec = (GParamSpecFloat *)paction->pspec; + return g_variant_new ("(dd)", (double)pspec->minimum, (double)pspec->maximum); + } + else if (paction->pspec->value_type == G_TYPE_DOUBLE) + { + GParamSpecDouble *pspec = (GParamSpecDouble *)paction->pspec; + return g_variant_new ("(dd)", pspec->minimum, pspec->maximum); + } + return NULL; } diff --git a/gio/gregistrysettingsbackend.c b/gio/gregistrysettingsbackend.c index 70d391a32..26de2518c 100644 --- a/gio/gregistrysettingsbackend.c +++ b/gio/gregistrysettingsbackend.c @@ -408,7 +408,7 @@ registry_cache_add_item (GNode *parent, item->block_count = 0; item->readable = FALSE; - trace ("\treg cache: adding %s to %s\n", + trace ("\tregistry cache: adding %s to %s\n", name, ((RegistryCacheItem *)parent->data)->name); cache_node = g_node_new (item); diff --git a/gio/gresolver.c b/gio/gresolver.c index 3e61ccaff..732d21709 100644 --- a/gio/gresolver.c +++ b/gio/gresolver.c @@ -169,7 +169,7 @@ g_resolver_class_init (GResolverClass *resolver_class) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GResolverClass, reload), NULL, NULL, - g_cclosure_marshal_VOID__VOID, + NULL, G_TYPE_NONE, 0); } diff --git a/gio/gresource-tool.c b/gio/gresource-tool.c index d1de02631..1914c5228 100644 --- a/gio/gresource-tool.c +++ b/gio/gresource-tool.c @@ -41,9 +41,7 @@ #include <glib/gstdio.h> #include <gi18n.h> -#ifdef G_OS_WIN32 #include "glib/glib-private.h" -#endif #if defined(HAVE_LIBELF) && defined(HAVE_MMAP) #define USE_LIBELF @@ -610,7 +608,7 @@ main (int argc, char *argv[]) gchar *tmp; #endif - setlocale (LC_ALL, ""); + setlocale (LC_ALL, GLIB_DEFAULT_LOCALE); textdomain (GETTEXT_PACKAGE); #ifdef G_OS_WIN32 diff --git a/gio/gresource.c b/gio/gresource.c index 9aaae8b53..cdcb1ac3f 100644 --- a/gio/gresource.c +++ b/gio/gresource.c @@ -78,7 +78,7 @@ G_DEFINE_BOXED_TYPE (GResource, g_resource, g_resource_ref, g_resource_unref) * * `to-pixdata` which will use the gdk-pixbuf-pixdata command to convert * images to the GdkPixdata format, which allows you to create pixbufs directly using the data inside - * the resource file, rather than an (uncompressed) copy if it. For this, the gdk-pixbuf-pixdata + * the resource file, rather than an (uncompressed) copy of it. For this, the gdk-pixbuf-pixdata * program must be in the PATH, or the `GDK_PIXBUF_PIXDATA` environment variable must be * set to the full path to the gdk-pixbuf-pixdata executable; otherwise the resource compiler will * abort. diff --git a/gio/gsettings-tool.c b/gio/gsettings-tool.c index b7dd9d8fb..3096f9d9b 100644 --- a/gio/gsettings-tool.c +++ b/gio/gsettings-tool.c @@ -25,9 +25,7 @@ #include <string.h> #include <stdlib.h> -#ifdef G_OS_WIN32 #include "glib/glib-private.h" -#endif static GSettingsSchemaSource *global_schema_source; static GSettings *global_settings; @@ -743,7 +741,7 @@ main (int argc, char **argv) gchar *tmp; #endif - setlocale (LC_ALL, ""); + setlocale (LC_ALL, GLIB_DEFAULT_LOCALE); textdomain (GETTEXT_PACKAGE); #ifdef G_OS_WIN32 diff --git a/gio/gsettings.c b/gio/gsettings.c index dd8f94485..6272cce51 100644 --- a/gio/gsettings.c +++ b/gio/gsettings.c @@ -30,6 +30,7 @@ #include "gsettings-mapping.h" #include "gsettingsschema-internal.h" #include "gaction.h" +#include "gmarshal-internal.h" #include "strinfo.c" @@ -743,7 +744,7 @@ g_settings_class_init (GSettingsClass *class) g_signal_new (I_("changed"), G_TYPE_SETTINGS, G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED, G_STRUCT_OFFSET (GSettingsClass, changed), - NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, + NULL, NULL, NULL, G_TYPE_NONE, 1, G_TYPE_STRING | G_SIGNAL_TYPE_STATIC_SCOPE); /** @@ -777,8 +778,11 @@ g_settings_class_init (GSettingsClass *class) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GSettingsClass, change_event), g_signal_accumulator_true_handled, NULL, - NULL, + _g_cclosure_marshal_BOOLEAN__POINTER_INT, G_TYPE_BOOLEAN, 2, G_TYPE_POINTER, G_TYPE_INT); + g_signal_set_va_marshaller (g_settings_signals[SIGNAL_CHANGE_EVENT], + G_TYPE_FROM_CLASS (class), + _g_cclosure_marshal_BOOLEAN__POINTER_INTv); /** * GSettings::writable-changed: @@ -797,7 +801,7 @@ g_settings_class_init (GSettingsClass *class) g_signal_new (I_("writable-changed"), G_TYPE_SETTINGS, G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED, G_STRUCT_OFFSET (GSettingsClass, writable_changed), - NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, + NULL, NULL, NULL, G_TYPE_NONE, 1, G_TYPE_STRING | G_SIGNAL_TYPE_STATIC_SCOPE); /** @@ -832,7 +836,11 @@ g_settings_class_init (GSettingsClass *class) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GSettingsClass, writable_change_event), g_signal_accumulator_true_handled, NULL, - NULL, G_TYPE_BOOLEAN, 1, G_TYPE_UINT); + _g_cclosure_marshal_BOOLEAN__UINT, + G_TYPE_BOOLEAN, 1, G_TYPE_UINT); + g_signal_set_va_marshaller (g_settings_signals[SIGNAL_WRITABLE_CHANGE_EVENT], + G_TYPE_FROM_CLASS (class), + _g_cclosure_marshal_BOOLEAN__UINTv); /** * GSettings:backend: @@ -2336,7 +2344,7 @@ g_settings_get_has_unapplied (GSettings *settings) * Resets @key to its default value. * * This call resets the key, as much as possible, to its default value. - * That might the value specified in the schema or the one set by the + * That might be the value specified in the schema or the one set by the * administrator. **/ void @@ -2459,7 +2467,9 @@ g_settings_get_child (GSettings *settings, * You should free the return value with g_strfreev() when you are done * with it. * - * Returns: (transfer full) (element-type utf8): a list of the keys on @settings + * Returns: (transfer full) (element-type utf8): a list of the keys on + * @settings, in no defined order + * Deprecated: 2.46: Use g_settings_schema_list_keys instead(). */ gchar ** g_settings_list_keys (GSettings *settings) @@ -2483,7 +2493,8 @@ g_settings_list_keys (GSettings *settings) * You should free the return value with g_strfreev() when you are done * with it. * - * Returns: (transfer full) (element-type utf8): a list of the children on @settings + * Returns: (transfer full) (element-type utf8): a list of the children on + * @settings, in no defined order */ gchar ** g_settings_list_children (GSettings *settings) diff --git a/gio/gsettingsschema.c b/gio/gsettingsschema.c index f7c50c210..3a60b8c64 100644 --- a/gio/gsettingsschema.c +++ b/gio/gsettingsschema.c @@ -742,9 +742,9 @@ g_settings_schema_source_get_text_tables (GSettingsSchemaSource *source) * @source: a #GSettingsSchemaSource * @recursive: if we should recurse * @non_relocatable: (out) (transfer full) (array zero-terminated=1): the - * list of non-relocatable schemas + * list of non-relocatable schemas, in no defined order * @relocatable: (out) (transfer full) (array zero-terminated=1): the list - * of relocatable schemas + * of relocatable schemas, in no defined order * * Lists the schemas in a given source. * @@ -857,8 +857,8 @@ ensure_schema_lists (void) * Deprecated. * * Returns: (element-type utf8) (transfer none): a list of #GSettings - * schemas that are available. The list must not be modified or - * freed. + * schemas that are available, in no defined order. The list must not be + * modified or freed. * * Since: 2.26 * @@ -881,8 +881,8 @@ g_settings_list_schemas (void) * Deprecated. * * Returns: (element-type utf8) (transfer none): a list of relocatable - * #GSettings schemas that are available. The list must not be - * modified or freed. + * #GSettings schemas that are available, in no defined order. The list must + * not be modified or freed. * * Since: 2.28 * @@ -1035,7 +1035,8 @@ g_settings_schema_has_key (GSettingsSchema *schema, * You should free the return value with g_strfreev() when you are done * with it. * - * Returns: (transfer full) (element-type utf8): a list of the children on @settings + * Returns: (transfer full) (element-type utf8): a list of the children on + * @settings, in no defined order * * Since: 2.44 */ @@ -1080,7 +1081,7 @@ g_settings_schema_list_children (GSettingsSchema *schema) * function is intended for introspection reasons. * * Returns: (transfer full) (element-type utf8): a list of the keys on - * @schema + * @schema, in no defined order * * Since: 2.46 */ diff --git a/gio/gsimpleaction.c b/gio/gsimpleaction.c index c788252bb..499adb25a 100644 --- a/gio/gsimpleaction.c +++ b/gio/gsimpleaction.c @@ -395,7 +395,7 @@ g_simple_action_class_init (GSimpleActionClass *class) G_TYPE_SIMPLE_ACTION, G_SIGNAL_RUN_LAST | G_SIGNAL_MUST_COLLECT, 0, NULL, NULL, - g_cclosure_marshal_VOID__VARIANT, + NULL, G_TYPE_NONE, 1, G_TYPE_VARIANT); @@ -445,7 +445,7 @@ g_simple_action_class_init (GSimpleActionClass *class) G_TYPE_SIMPLE_ACTION, G_SIGNAL_RUN_LAST | G_SIGNAL_MUST_COLLECT, 0, NULL, NULL, - g_cclosure_marshal_VOID__VARIANT, + NULL, G_TYPE_NONE, 1, G_TYPE_VARIANT); diff --git a/gio/gsocket.c b/gio/gsocket.c index 06514d102..66073af83 100644 --- a/gio/gsocket.c +++ b/gio/gsocket.c @@ -74,6 +74,7 @@ #include "gcredentials.h" #include "gcredentialsprivate.h" #include "glibintl.h" +#include "gioprivate.h" #ifdef G_OS_WIN32 /* For Windows XP runtime compatibility, but use the system's if_nametoindex() if available */ @@ -2161,6 +2162,122 @@ g_socket_bind (GSocket *socket, return TRUE; } +#ifdef G_OS_WIN32 +static gulong +g_socket_w32_get_adapter_ipv4_addr (const gchar *name_or_ip) +{ + ULONG bufsize = 15000; /* MS-recommended initial bufsize */ + DWORD ret = ERROR_BUFFER_OVERFLOW; + unsigned int malloc_iterations = 0; + PIP_ADAPTER_ADDRESSES addr_buf = NULL, eth_adapter; + wchar_t *wchar_name_or_ip = NULL; + gulong ip_result; + NET_IFINDEX if_index; + + /* + * For Windows OS only - return adapter IPv4 address in network byte order. + * + * Input string can be either friendly name of adapter, IP address of adapter, + * indextoname, or fullname of adapter. + * Example: + * 192.168.1.109 ===> IP address given directly, + * convert directly with inet_addr() function + * Wi-Fi ===> Adapter friendly name "Wi-Fi", + * scan with GetAdapterAddresses and adapter->FriendlyName + * ethernet_32774 ===> Adapter name as returned by if_indextoname + * {33E8F5CD-BAEA-4214-BE13-B79AB8080CAB} ===> Adaptername, + * as returned in GetAdapterAddresses and adapter->AdapterName + */ + + /* Step 1: Check if string is an IP address: */ + ip_result = inet_addr (name_or_ip); + if (ip_result != INADDR_NONE) + return ip_result; /* Success, IP address string was given directly */ + + /* + * Step 2: Check if name represents a valid Interface index (e.g. ethernet_75521) + * function if_nametoindex will return >=1 if a valid index, or 0=no match + * valid index will be used later in GetAdaptersAddress loop for lookup of adapter IP address + */ + if_index = if_nametoindex (name_or_ip); + + /* Step 3: Prepare wchar string for friendly name comparision */ + if (if_index == 0) + { + size_t if_name_len = strlen (name_or_ip); + if (if_name_len >= MAX_ADAPTER_NAME_LENGTH + 4) + return INADDR_NONE; + /* Name-check only needed if index=0... */ + wchar_name_or_ip = (wchar_t *) g_try_malloc ((if_name_len + 1) * sizeof(wchar_t)); + if (wchar_name_or_ip) + mbstowcs (wchar_name_or_ip, name_or_ip, if_name_len + 1); + /* NOTE: Even if malloc fails here, some comparisions can still be done later... so no exit here! */ + } + + /* + * Step 4: Allocate memory and get adapter addresses. + * Buffer allocation loop recommended by MS, since size can be dynamic + * https://docs.microsoft.com/en-us/windows/desktop/api/iphlpapi/nf-iphlpapi-getadaptersaddresses + */ + #define MAX_ALLOC_ITERATIONS 3 + do + { + malloc_iterations++; + addr_buf = (PIP_ADAPTER_ADDRESSES) g_try_realloc (addr_buf, bufsize); + if (addr_buf) + ret = GetAdaptersAddresses (AF_UNSPEC, GAA_FLAG_INCLUDE_PREFIX, NULL, addr_buf, &bufsize); + } + while (addr_buf && + ret == ERROR_BUFFER_OVERFLOW && + malloc_iterations < MAX_ALLOC_ITERATIONS); + #undef MAX_ALLOC_ITERATIONS + + if (addr_buf == 0 || ret != NO_ERROR) + { + g_free (addr_buf); + g_free (wchar_name_or_ip); + return INADDR_NONE; + } + + /* Step 5: Loop through adapters and check match for index or name */ + for (eth_adapter = addr_buf; eth_adapter != NULL; eth_adapter = eth_adapter->Next) + { + /* Check if match for interface index/name: */ + gboolean any_match = (if_index > 0) && (eth_adapter->IfIndex == if_index); + + /* Check if match for friendly name - but only if NO if_index! */ + if (!any_match && if_index == 0 && eth_adapter->FriendlyName && + eth_adapter->FriendlyName[0] != 0 && wchar_name_or_ip != NULL) + any_match = (_wcsicmp (eth_adapter->FriendlyName, wchar_name_or_ip) == 0); + + /* Check if match for adapter low level name - but only if NO if_index: */ + if (!any_match && if_index == 0 && eth_adapter->AdapterName && + eth_adapter->AdapterName[0] != 0) + any_match = (stricmp (eth_adapter->AdapterName, name_or_ip) == 0); + + if (any_match) + { + /* We have match for this adapter, lets get its local unicast IP address! */ + PIP_ADAPTER_UNICAST_ADDRESS uni_addr; + for (uni_addr = eth_adapter->FirstUnicastAddress; + uni_addr != NULL; uni_addr = uni_addr->Next) + { + if (uni_addr->Address.lpSockaddr->sa_family == AF_INET) + { + ip_result = ((PSOCKADDR_IN) uni_addr->Address.lpSockaddr)->sin_addr.S_un.S_addr; + break; /* finished, exit unicast addr loop */ + } + } + } + } + + g_free (addr_buf); + g_free (wchar_name_or_ip); + + return ip_result; +} +#endif + static gboolean g_socket_multicast_group_operation (GSocket *socket, GInetAddress *group, @@ -2198,7 +2315,7 @@ g_socket_multicast_group_operation (GSocket *socket, mc_req.imr_ifindex = 0; /* Pick any. */ #elif defined(G_OS_WIN32) if (iface) - mc_req.imr_interface.s_addr = g_htonl (if_nametoindex (iface)); + mc_req.imr_interface.s_addr = g_socket_w32_get_adapter_ipv4_addr (iface); else mc_req.imr_interface.s_addr = g_htonl (INADDR_ANY); #else @@ -2397,18 +2514,8 @@ g_socket_multicast_group_operation_ssm (GSocket *socket, if (iface) { -#if defined(G_OS_WIN32) && defined (HAVE_IF_NAMETOINDEX) - guint iface_index = if_nametoindex (iface); - if (iface_index == 0) - { - int errsv = errno; - - g_set_error (error, G_IO_ERROR, g_io_error_from_errno (errsv), - _("Interface not found: %s"), g_strerror (errsv)); - return FALSE; - } - /* (0.0.0.iface_index) only works on Windows. */ - S_ADDR_FIELD(mc_req_src) = g_htonl (iface_index); +#if defined(G_OS_WIN32) + S_ADDR_FIELD(mc_req_src) = g_socket_w32_get_adapter_ipv4_addr (iface); #elif defined (HAVE_SIOCGIFADDR) int ret; struct ifreq ifr; @@ -4960,14 +5067,11 @@ g_socket_send_messages_with_timeout (GSocket *socket, struct mmsghdr *msgvec; gint i, num_sent; -#ifdef UIO_MAXIOV -#define MAX_NUM_MESSAGES UIO_MAXIOV -#else -#define MAX_NUM_MESSAGES 1024 -#endif - - if (num_messages > MAX_NUM_MESSAGES) - num_messages = MAX_NUM_MESSAGES; + /* Clamp the number of vectors if more given than we can write in one go. + * The caller has to handle short writes anyway. + */ + if (num_messages > G_IOV_MAX) + num_messages = G_IOV_MAX; msgvec = g_newa (struct mmsghdr, num_messages); @@ -5482,14 +5586,11 @@ g_socket_receive_messages_with_timeout (GSocket *socket, struct mmsghdr *msgvec; guint i, num_received; -#ifdef UIO_MAXIOV -#define MAX_NUM_MESSAGES UIO_MAXIOV -#else -#define MAX_NUM_MESSAGES 1024 -#endif - - if (num_messages > MAX_NUM_MESSAGES) - num_messages = MAX_NUM_MESSAGES; + /* Clamp the number of vectors if more given than we can write in one go. + * The caller has to handle short writes anyway. + */ + if (num_messages > G_IOV_MAX) + num_messages = G_IOV_MAX; msgvec = g_newa (struct mmsghdr, num_messages); @@ -5755,6 +5856,13 @@ g_socket_receive_message (GSocket *socket, * the %G_IO_ERROR_NOT_SUPPORTED error. On Linux this is implemented * by reading the %SO_PEERCRED option on the underlying socket. * + * This method can be expected to be available on the following platforms: + * + * - Linux since GLib 2.26 + * - OpenBSD since GLib 2.30 + * - Solaris, Illumos and OpenSolaris since GLib 2.40 + * - NetBSD since GLib 2.42 + * * Other ways to obtain credentials from a foreign peer includes the * #GUnixCredentialsMessage type and * g_unix_connection_send_credentials() / diff --git a/gio/gsocketclient.c b/gio/gsocketclient.c index 59af25abf..6adeee299 100644 --- a/gio/gsocketclient.c +++ b/gio/gsocketclient.c @@ -49,6 +49,7 @@ #include <gio/gtlsclientconnection.h> #include <gio/ginetaddress.h> #include "glibintl.h" +#include "gmarshal-internal.h" /* As recommended by RFC 8305 this is the time it waits * on a connection before starting another concurrent attempt. @@ -832,11 +833,14 @@ g_socket_client_class_init (GSocketClientClass *class) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GSocketClientClass, event), NULL, NULL, - NULL, + _g_cclosure_marshal_VOID__ENUM_OBJECT_OBJECT, G_TYPE_NONE, 3, G_TYPE_SOCKET_CLIENT_EVENT, G_TYPE_SOCKET_CONNECTABLE, G_TYPE_IO_STREAM); + g_signal_set_va_marshaller (signals[EVENT], + G_TYPE_FROM_CLASS (class), + _g_cclosure_marshal_VOID__ENUM_OBJECT_OBJECTv); g_object_class_install_property (gobject_class, PROP_FAMILY, g_param_spec_enum ("family", diff --git a/gio/gsocketlistener.c b/gio/gsocketlistener.c index a2c879d9c..d11f10ae4 100644 --- a/gio/gsocketlistener.c +++ b/gio/gsocketlistener.c @@ -36,6 +36,7 @@ #include <gio/gsocketconnection.h> #include <gio/ginetsocketaddress.h> #include "glibintl.h" +#include "gmarshal-internal.h" /** @@ -181,10 +182,14 @@ g_socket_listener_class_init (GSocketListenerClass *klass) G_TYPE_FROM_CLASS (gobject_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GSocketListenerClass, event), - NULL, NULL, NULL, + NULL, NULL, + _g_cclosure_marshal_VOID__ENUM_OBJECT, G_TYPE_NONE, 2, G_TYPE_SOCKET_LISTENER_EVENT, G_TYPE_SOCKET); + g_signal_set_va_marshaller (signals[EVENT], + G_TYPE_FROM_CLASS (gobject_class), + _g_cclosure_marshal_VOID__ENUM_OBJECTv); source_quark = g_quark_from_static_string ("g-socket-listener-source"); } @@ -965,7 +970,9 @@ g_socket_listener_accept_finish (GSocketListener *listener, * @listener: a #GSocketListener * @listen_backlog: an integer * - * Sets the listen backlog on the sockets in the listener. + * Sets the listen backlog on the sockets in the listener. This must be called + * before adding any sockets, addresses or ports to the #GSocketListener (for + * example, by calling g_socket_listener_add_inet_port()) to be effective. * * See g_socket_set_listen_backlog() for details * diff --git a/gio/gsocketoutputstream.c b/gio/gsocketoutputstream.c index fcca56efc..482ee39b9 100644 --- a/gio/gsocketoutputstream.c +++ b/gio/gsocketoutputstream.c @@ -33,6 +33,7 @@ #include "gioerror.h" #include "glibintl.h" #include "gfiledescriptorbased.h" +#include "gioprivate.h" struct _GSocketOutputStreamPrivate { @@ -146,8 +147,8 @@ g_socket_output_stream_writev (GOutputStream *stream, /* Clamp the number of vectors if more given than we can write in one go. * The caller has to handle short writes anyway. */ - if (n_vectors > G_MAXINT) - n_vectors = G_MAXINT; + if (n_vectors > G_IOV_MAX) + n_vectors = G_IOV_MAX; res = g_socket_send_message_with_timeout (output_stream->priv->socket, NULL, vectors, n_vectors, @@ -194,8 +195,8 @@ g_socket_output_stream_pollable_writev_nonblocking (GPollableOutputStream *poll /* Clamp the number of vectors if more given than we can write in one go. * The caller has to handle short writes anyway. */ - if (n_vectors > G_MAXINT) - n_vectors = G_MAXINT; + if (n_vectors > G_IOV_MAX) + n_vectors = G_IOV_MAX; return g_socket_send_message_with_timeout (output_stream->priv->socket, NULL, vectors, n_vectors, diff --git a/gio/gsocketservice.c b/gio/gsocketservice.c index 1ac31d505..176c122eb 100644 --- a/gio/gsocketservice.c +++ b/gio/gsocketservice.c @@ -64,6 +64,7 @@ #include "gsocketlistener.h" #include "gsocketconnection.h" #include "glibintl.h" +#include "gmarshal-internal.h" struct _GSocketServicePrivate { @@ -346,8 +347,12 @@ g_socket_service_class_init (GSocketServiceClass *class) g_signal_new (I_("incoming"), G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GSocketServiceClass, incoming), g_signal_accumulator_true_handled, NULL, - NULL, G_TYPE_BOOLEAN, + _g_cclosure_marshal_BOOLEAN__OBJECT_OBJECT, + G_TYPE_BOOLEAN, 2, G_TYPE_SOCKET_CONNECTION, G_TYPE_OBJECT); + g_signal_set_va_marshaller (g_socket_service_incoming_signal, + G_TYPE_FROM_CLASS (class), + _g_cclosure_marshal_BOOLEAN__OBJECT_OBJECTv); /** * GSocketService:active: diff --git a/gio/gsubprocess.c b/gio/gsubprocess.c index 7630c7b45..b5515c705 100644 --- a/gio/gsubprocess.c +++ b/gio/gsubprocess.c @@ -749,6 +749,11 @@ g_subprocess_newv (const gchar * const *argv, * * On UNIX, returns the process ID as a decimal string. * On Windows, returns the result of GetProcessId() also as a string. + * If the subprocess has terminated, this will return %NULL. + * + * Returns: (nullable): the subprocess identifier, or %NULL if the subprocess + * has terminated + * Since: 2.40 */ const gchar * g_subprocess_get_identifier (GSubprocess *subprocess) diff --git a/gio/gtestdbus.c b/gio/gtestdbus.c index 2fc2d51f5..11cf029d9 100644 --- a/gio/gtestdbus.c +++ b/gio/gtestdbus.c @@ -67,15 +67,14 @@ on_weak_notify_timeout (gpointer user_data) } static gboolean -dispose_on_idle (gpointer object) +unref_on_idle (gpointer object) { - g_object_run_dispose (object); g_object_unref (object); return FALSE; } static gboolean -_g_object_dispose_and_wait_weak_notify (gpointer object) +_g_object_unref_and_wait_weak_notify (gpointer object) { WeakNotifyData data; guint timeout_id; @@ -85,9 +84,10 @@ _g_object_dispose_and_wait_weak_notify (gpointer object) g_object_weak_ref (object, (GWeakNotify) g_main_loop_quit, data.loop); - /* Drop the ref in an idle callback, this is to make sure the mainloop - * is already running when weak notify happens */ - g_idle_add (dispose_on_idle, object); + /* Drop the strong ref held by the caller in an idle callback. This is to + * make sure the mainloop is already running when weak notify happens (when + * all other strong ref holders have dropped theirs). */ + g_idle_add (unref_on_idle, object); /* Make sure we don't block forever */ timeout_id = g_timeout_add (30 * 1000, on_weak_notify_timeout, &data); @@ -801,7 +801,7 @@ g_test_dbus_stop (GTestDBus *self) * Stop the session bus started by g_test_dbus_up(). * * This will wait for the singleton returned by g_bus_get() or g_bus_get_sync() - * is destroyed. This is done to ensure that the next unit test won't get a + * to be destroyed. This is done to ensure that the next unit test won't get a * leaked singleton from this test. */ void @@ -820,7 +820,7 @@ g_test_dbus_down (GTestDBus *self) stop_daemon (self); if (connection != NULL) - _g_object_dispose_and_wait_weak_notify (connection); + _g_object_unref_and_wait_weak_notify (connection); g_test_dbus_unset (); _g_bus_forget_singleton (G_BUS_TYPE_SESSION); diff --git a/gio/gthreadedsocketservice.c b/gio/gthreadedsocketservice.c index b330196e3..c48a93424 100644 --- a/gio/gthreadedsocketservice.c +++ b/gio/gthreadedsocketservice.c @@ -48,6 +48,7 @@ #include "gsocketconnection.h" #include "gthreadedsocketservice.h" #include "glibintl.h" +#include "gmarshal-internal.h" struct _GThreadedSocketServicePrivate { @@ -238,8 +239,12 @@ g_threaded_socket_service_class_init (GThreadedSocketServiceClass *class) g_signal_new (I_("run"), G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GThreadedSocketServiceClass, run), g_signal_accumulator_true_handled, NULL, - NULL, G_TYPE_BOOLEAN, + _g_cclosure_marshal_BOOLEAN__OBJECT_OBJECT, + G_TYPE_BOOLEAN, 2, G_TYPE_SOCKET_CONNECTION, G_TYPE_OBJECT); + g_signal_set_va_marshaller (g_threaded_socket_service_run_signal, + G_TYPE_FROM_CLASS (class), + _g_cclosure_marshal_BOOLEAN__OBJECT_OBJECTv); g_object_class_install_property (gobject_class, PROP_MAX_THREADS, g_param_spec_int ("max-threads", diff --git a/gio/gtlsconnection.c b/gio/gtlsconnection.c index 02a3098c1..2e431ae7e 100644 --- a/gio/gtlsconnection.c +++ b/gio/gtlsconnection.c @@ -29,6 +29,7 @@ #include "gtlsdatabase.h" #include "gtlsinteraction.h" #include "glibintl.h" +#include "gmarshal-internal.h" /** * SECTION:gtlsconnection @@ -345,10 +346,13 @@ g_tls_connection_class_init (GTlsConnectionClass *klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GTlsConnectionClass, accept_certificate), g_signal_accumulator_true_handled, NULL, - NULL, + _g_cclosure_marshal_BOOLEAN__OBJECT_FLAGS, G_TYPE_BOOLEAN, 2, G_TYPE_TLS_CERTIFICATE, G_TYPE_TLS_CERTIFICATE_FLAGS); + g_signal_set_va_marshaller (signals[ACCEPT_CERTIFICATE], + G_TYPE_FROM_CLASS (klass), + _g_cclosure_marshal_BOOLEAN__OBJECT_FLAGSv); } static void @@ -754,6 +758,7 @@ g_tls_connection_get_require_close_notify (GTlsConnection *conn) * required for compatibility. Also, rehandshaking has been removed * from the TLS protocol in TLS 1.3. */ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS void g_tls_connection_set_rehandshake_mode (GTlsConnection *conn, GTlsRehandshakeMode mode) @@ -764,6 +769,7 @@ g_tls_connection_set_rehandshake_mode (GTlsConnection *conn, "rehandshake-mode", mode, NULL); } +G_GNUC_END_IGNORE_DEPRECATIONS /** * g_tls_connection_get_rehandshake_mode: @@ -780,6 +786,7 @@ g_tls_connection_set_rehandshake_mode (GTlsConnection *conn, * required for compatibility. Also, rehandshaking has been removed * from the TLS protocol in TLS 1.3. */ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS GTlsRehandshakeMode g_tls_connection_get_rehandshake_mode (GTlsConnection *conn) { @@ -792,6 +799,7 @@ g_tls_connection_get_rehandshake_mode (GTlsConnection *conn) NULL); return mode; } +G_GNUC_END_IGNORE_DEPRECATIONS /** * g_tls_connection_set_advertised_protocols: diff --git a/gio/gtlsconnection.h b/gio/gtlsconnection.h index 39ec3fa02..be38dcf5c 100644 --- a/gio/gtlsconnection.h +++ b/gio/gtlsconnection.h @@ -109,11 +109,13 @@ void g_tls_connection_set_require_close_notify (GTlsConnecti GLIB_AVAILABLE_IN_ALL gboolean g_tls_connection_get_require_close_notify (GTlsConnection *conn); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS GLIB_DEPRECATED_IN_2_60 void g_tls_connection_set_rehandshake_mode (GTlsConnection *conn, GTlsRehandshakeMode mode); GLIB_DEPRECATED_IN_2_60 GTlsRehandshakeMode g_tls_connection_get_rehandshake_mode (GTlsConnection *conn); +G_GNUC_END_IGNORE_DEPRECATIONS GLIB_AVAILABLE_IN_2_60 void g_tls_connection_set_advertised_protocols (GTlsConnection *conn, diff --git a/gio/gunixconnection.c b/gio/gunixconnection.c index c85ac3650..e9e2f75f0 100644 --- a/gio/gunixconnection.c +++ b/gio/gunixconnection.c @@ -300,6 +300,14 @@ gboolean g_unix_connection_create_pair (GUnixCo * byte to the stream, as this is required for credentials passing to * work on some implementations. * + * This method can be expected to be available on the following platforms: + * + * - Linux since GLib 2.26 + * - FreeBSD since GLib 2.26 + * - GNU/kFreeBSD since GLib 2.36 + * - Solaris, Illumos and OpenSolaris since GLib 2.40 + * - GNU/Hurd since GLib 2.40 + * * Other ways to exchange credentials with a foreign peer includes the * #GUnixCredentialsMessage type and g_socket_get_credentials() function. * @@ -450,6 +458,14 @@ g_unix_connection_send_credentials_finish (GUnixConnection *connection, * single byte from the stream, as this is required for credentials * passing to work on some implementations. * + * This method can be expected to be available on the following platforms: + * + * - Linux since GLib 2.26 + * - FreeBSD since GLib 2.26 + * - GNU/kFreeBSD since GLib 2.36 + * - Solaris, Illumos and OpenSolaris since GLib 2.40 + * - GNU/Hurd since GLib 2.40 + * * Other ways to exchange credentials with a foreign peer includes the * #GUnixCredentialsMessage type and g_socket_get_credentials() function. * diff --git a/gio/gunixmounts.c b/gio/gunixmounts.c index 44a4b113d..cf73fe5e0 100644 --- a/gio/gunixmounts.c +++ b/gio/gunixmounts.c @@ -1929,7 +1929,7 @@ g_unix_mount_monitor_class_init (GUnixMountMonitorClass *klass) G_SIGNAL_RUN_LAST, 0, NULL, NULL, - g_cclosure_marshal_VOID__VOID, + NULL, G_TYPE_NONE, 0); /** @@ -1944,7 +1944,7 @@ g_unix_mount_monitor_class_init (GUnixMountMonitorClass *klass) G_SIGNAL_RUN_LAST, 0, NULL, NULL, - g_cclosure_marshal_VOID__VOID, + NULL, G_TYPE_NONE, 0); } diff --git a/gio/gunixoutputstream.c b/gio/gunixoutputstream.c index 5536e00b4..506e09a8c 100644 --- a/gio/gunixoutputstream.c +++ b/gio/gunixoutputstream.c @@ -37,6 +37,7 @@ #include "gasynchelper.h" #include "gfiledescriptorbased.h" #include "glibintl.h" +#include "gioprivate.h" /** @@ -425,11 +426,11 @@ g_unix_output_stream_writev (GOutputStream *stream, if (bytes_written) *bytes_written = 0; - /* Clamp to G_MAXINT as writev() takes an integer for the number of vectors. - * We handle this like a short write in this case + /* Clamp the number of vectors if more given than we can write in one go. + * The caller has to handle short writes anyway. */ - if (n_vectors > G_MAXINT) - n_vectors = G_MAXINT; + if (n_vectors > G_IOV_MAX) + n_vectors = G_IOV_MAX; unix_stream = G_UNIX_OUTPUT_STREAM (stream); @@ -635,11 +636,11 @@ g_unix_output_stream_pollable_writev_nonblocking (GPollableOutputStream *stream return G_POLLABLE_RETURN_WOULD_BLOCK; } - /* Clamp to G_MAXINT as writev() takes an integer for the number of vectors. - * We handle this like a short write in this case + /* Clamp the number of vectors if more given than we can write in one go. + * The caller has to handle short writes anyway. */ - if (n_vectors > G_MAXINT) - n_vectors = G_MAXINT; + if (n_vectors > G_IOV_MAX) + n_vectors = G_IOV_MAX; if (G_OUTPUT_VECTOR_IS_IOVEC) { diff --git a/gio/gvdb/gvdb-reader.c b/gio/gvdb/gvdb-reader.c index ccae40e64..83ad2ac19 100644 --- a/gio/gvdb/gvdb-reader.c +++ b/gio/gvdb/gvdb-reader.c @@ -332,7 +332,7 @@ gvdb_table_list_from_item (GvdbTable *table, /** * gvdb_table_get_names: * @table: a #GvdbTable - * @length: (optional): the number of items returned, or %NULL + * @length: (out) (optional): the number of items returned, or %NULL * * Gets a list of all names contained in @table. * diff --git a/gio/gvolume.c b/gio/gvolume.c index dd49df7d6..0e14ddaf6 100644 --- a/gio/gvolume.c +++ b/gio/gvolume.c @@ -93,7 +93,7 @@ g_volume_default_init (GVolumeInterface *iface) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GVolumeIface, changed), NULL, NULL, - g_cclosure_marshal_VOID__VOID, + NULL, G_TYPE_NONE, 0); /** @@ -108,7 +108,7 @@ g_volume_default_init (GVolumeInterface *iface) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GVolumeIface, removed), NULL, NULL, - g_cclosure_marshal_VOID__VOID, + NULL, G_TYPE_NONE, 0); } diff --git a/gio/gvolume.h b/gio/gvolume.h index 6d8a814dc..e153b7c38 100644 --- a/gio/gvolume.h +++ b/gio/gvolume.h @@ -30,7 +30,6 @@ G_BEGIN_DECLS -#ifndef G_DISABLE_DEPRECATED /** * G_VOLUME_IDENTIFIER_KIND_HAL_UDI: * @@ -38,8 +37,7 @@ G_BEGIN_DECLS * * Deprecated: 2.58: Do not use, HAL is deprecated. */ -#define G_VOLUME_IDENTIFIER_KIND_HAL_UDI "hal-udi" -#endif /* G_DISABLE_DEPRECATED */ +#define G_VOLUME_IDENTIFIER_KIND_HAL_UDI "hal-udi" GLIB_DEPRECATED_MACRO_IN_2_58 /** * G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE: diff --git a/gio/gvolumemonitor.c b/gio/gvolumemonitor.c index 1718bb6a5..65ec955a9 100644 --- a/gio/gvolumemonitor.c +++ b/gio/gvolumemonitor.c @@ -94,7 +94,7 @@ g_volume_monitor_class_init (GVolumeMonitorClass *klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GVolumeMonitorClass, volume_added), NULL, NULL, - g_cclosure_marshal_VOID__OBJECT, + NULL, G_TYPE_NONE, 1, G_TYPE_VOLUME); /** @@ -109,7 +109,7 @@ g_volume_monitor_class_init (GVolumeMonitorClass *klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GVolumeMonitorClass, volume_removed), NULL, NULL, - g_cclosure_marshal_VOID__OBJECT, + NULL, G_TYPE_NONE, 1, G_TYPE_VOLUME); /** @@ -124,7 +124,7 @@ g_volume_monitor_class_init (GVolumeMonitorClass *klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GVolumeMonitorClass, volume_changed), NULL, NULL, - g_cclosure_marshal_VOID__OBJECT, + NULL, G_TYPE_NONE, 1, G_TYPE_VOLUME); /** @@ -139,7 +139,7 @@ g_volume_monitor_class_init (GVolumeMonitorClass *klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GVolumeMonitorClass, mount_added), NULL, NULL, - g_cclosure_marshal_VOID__OBJECT, + NULL, G_TYPE_NONE, 1, G_TYPE_MOUNT); /** @@ -154,7 +154,7 @@ g_volume_monitor_class_init (GVolumeMonitorClass *klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GVolumeMonitorClass, mount_removed), NULL, NULL, - g_cclosure_marshal_VOID__OBJECT, + NULL, G_TYPE_NONE, 1, G_TYPE_MOUNT); /** @@ -172,7 +172,7 @@ g_volume_monitor_class_init (GVolumeMonitorClass *klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GVolumeMonitorClass, mount_pre_unmount), NULL, NULL, - g_cclosure_marshal_VOID__OBJECT, + NULL, G_TYPE_NONE, 1, G_TYPE_MOUNT); /** @@ -187,7 +187,7 @@ g_volume_monitor_class_init (GVolumeMonitorClass *klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GVolumeMonitorClass, mount_changed), NULL, NULL, - g_cclosure_marshal_VOID__OBJECT, + NULL, G_TYPE_NONE, 1, G_TYPE_MOUNT); /** @@ -202,7 +202,7 @@ g_volume_monitor_class_init (GVolumeMonitorClass *klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GVolumeMonitorClass, drive_connected), NULL, NULL, - g_cclosure_marshal_VOID__OBJECT, + NULL, G_TYPE_NONE, 1, G_TYPE_DRIVE); /** @@ -217,7 +217,7 @@ g_volume_monitor_class_init (GVolumeMonitorClass *klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GVolumeMonitorClass, drive_disconnected), NULL, NULL, - g_cclosure_marshal_VOID__OBJECT, + NULL, G_TYPE_NONE, 1, G_TYPE_DRIVE); /** @@ -232,7 +232,7 @@ g_volume_monitor_class_init (GVolumeMonitorClass *klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GVolumeMonitorClass, drive_changed), NULL, NULL, - g_cclosure_marshal_VOID__OBJECT, + NULL, G_TYPE_NONE, 1, G_TYPE_DRIVE); /** @@ -249,7 +249,7 @@ g_volume_monitor_class_init (GVolumeMonitorClass *klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GVolumeMonitorClass, drive_eject_button), NULL, NULL, - g_cclosure_marshal_VOID__OBJECT, + NULL, G_TYPE_NONE, 1, G_TYPE_DRIVE); /** @@ -266,7 +266,7 @@ g_volume_monitor_class_init (GVolumeMonitorClass *klass) G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GVolumeMonitorClass, drive_stop_button), NULL, NULL, - g_cclosure_marshal_VOID__OBJECT, + NULL, G_TYPE_NONE, 1, G_TYPE_DRIVE); } diff --git a/gio/inotify/inotify-kernel.c b/gio/inotify/inotify-kernel.c index 9a2e5008f..881cbfc5a 100644 --- a/gio/inotify/inotify-kernel.c +++ b/gio/inotify/inotify-kernel.c @@ -30,6 +30,9 @@ #include <glib.h> #include "inotify-kernel.h" #include <sys/inotify.h> +#ifdef HAVE_SYS_FILIO_H +#include <sys/filio.h> +#endif #include <glib/glib-unix.h> #include "glib-private.h" diff --git a/gio/inotify/meson.build b/gio/inotify/meson.build index 8183f141e..9b0c7ab30 100644 --- a/gio/inotify/meson.build +++ b/gio/inotify/meson.build @@ -12,4 +12,4 @@ inotify_lib = static_library('inotify', include_directories : [configinc, glibinc, gmoduleinc], dependencies : [gioenumtypes_dep, libglib_dep, libgobject_dep], pic : true, - c_args : [ '-DG_DISABLE_DEPRECATED' ] + gio_c_args) + c_args : gio_c_args) diff --git a/gio/kqueue/meson.build b/gio/kqueue/meson.build index e5057c83d..d389b06f7 100644 --- a/gio/kqueue/meson.build +++ b/gio/kqueue/meson.build @@ -10,4 +10,4 @@ kqueue_lib = static_library('kqueue', include_directories : [configinc, glibinc, gmoduleinc], dependencies : [gioenumtypes_dep], pic : true, - c_args : [ '-DG_DISABLE_DEPRECATED' ] + gio_c_args) + c_args : gio_c_args) diff --git a/gio/meson.build b/gio/meson.build index f0e08b40f..987d0f4c6 100644 --- a/gio/meson.build +++ b/gio/meson.build @@ -526,6 +526,7 @@ gio_sources = files( 'gioscheduler.c', 'giostream.c', 'gloadableicon.c', + 'gmarshal-internal.c', 'gmount.c', 'gmemoryinputstream.c', 'gmemoryoutputstream.c', @@ -829,9 +830,14 @@ pkg.generate(libgio, 'schemasdir=' + join_paths('${datadir}', schemas_subdir), 'bindir=' + join_paths('${prefix}', get_option('bindir')), 'giomoduledir=' + giomodulesdir, + 'gio=' + join_paths('${bindir}', 'gio'), + 'gio_querymodules=' + join_paths('${bindir}', 'gio-querymodules'), 'glib_compile_schemas=' + join_paths('${bindir}', 'glib-compile-schemas'), 'glib_compile_resources=' + join_paths('${bindir}', 'glib-compile-resources'), - 'gdbus_codegen=' + join_paths('${bindir}', 'gdbus-codegen')], + 'gdbus=' + join_paths('${bindir}', 'gdbus'), + 'gdbus_codegen=' + join_paths('${bindir}', 'gdbus-codegen'), + 'gresource=' + join_paths('${bindir}', 'gresource'), + 'gsettings=' + join_paths('${bindir}', 'gsettings')], version : glib_version, install_dir : glib_pkgconfigreldir, filebase : 'gio-2.0', @@ -990,7 +996,7 @@ if enable_systemtap output : '@0@.stp'.format(libgio.full_path().split('/').get(-1)), configuration : stp_cdata, install_dir : tapset_install_dir, - install : true) + ) endif subdir('fam') @@ -998,4 +1004,15 @@ subdir('fam') build_tests = not meson.is_cross_build() or (meson.is_cross_build() and meson.has_exe_wrapper()) if build_tests subdir('tests') -endif
\ No newline at end of file +endif + +# The following is an example for building internal marshallers that are used +# by GIO. We cannot guarantee glib-genmarshal availability while building GLib +# so they are pre-generated and placed into gmarshal-internal.[ch]. +# +# gmarshal_internal = gnome.genmarshal('gmarshal-internal', +# sources: 'gmarshal-internal.list', +# prefix: '_g_cclosure_marshal', +# valist_marshallers: true, +# internal: true, +# ) diff --git a/gio/tests/appinfo-test.desktop.in b/gio/tests/appinfo-test.desktop.in index bc292b135..1f6ff7144 100644 --- a/gio/tests/appinfo-test.desktop.in +++ b/gio/tests/appinfo-test.desktop.in @@ -9,7 +9,7 @@ Comment=GAppInfo example Comment[de]=GAppInfo Beispiel Exec=@installed_tests_dir@/appinfo-test --option %U %i --name %c --filename %k %m %% Icon=testicon.svg -Terminal=true +Terminal=false StartupNotify=true StartupWMClass=appinfo-class MimeType=image/png;image/jpeg; diff --git a/gio/tests/appinfo.c b/gio/tests/appinfo.c index f13698d70..4fec6b379 100644 --- a/gio/tests/appinfo.c +++ b/gio/tests/appinfo.c @@ -87,7 +87,7 @@ test_launch_no_app_id (void) "Comment=GAppInfo example\n" "Comment[de]=GAppInfo Beispiel\n" "Icon=testicon.svg\n" - "Terminal=true\n" + "Terminal=false\n" "StartupNotify=true\n" "StartupWMClass=appinfo-class\n" "MimeType=image/png;image/jpeg;\n" diff --git a/gio/tests/contenttype.c b/gio/tests/contenttype.c index 2424b8e5f..3696e3662 100644 --- a/gio/tests/contenttype.c +++ b/gio/tests/contenttype.c @@ -39,7 +39,7 @@ test_guess (void) g_free (existing_directory); expected = g_content_type_from_mime_type ("inode/directory"); g_assert_content_type_equals (expected, res); - g_assert (uncertain); + g_assert_true (uncertain); g_free (res); g_free (expected); @@ -52,7 +52,7 @@ test_guess (void) res = g_content_type_guess ("foo.txt", data, sizeof (data) - 1, &uncertain); expected = g_content_type_from_mime_type ("text/plain"); g_assert_content_type_equals (expected, res); - g_assert (!uncertain); + g_assert_false (uncertain); g_free (res); g_free (expected); @@ -61,21 +61,21 @@ test_guess (void) res = g_content_type_guess ("foo", data, sizeof (data) - 1, &uncertain); expected = g_content_type_from_mime_type ("text/plain"); g_assert_content_type_equals (expected, res); - g_assert (!uncertain); + g_assert_false (uncertain); g_free (res); g_free (expected); res = g_content_type_guess ("foo.desktop", data, sizeof (data) - 1, &uncertain); expected = g_content_type_from_mime_type ("application/x-desktop"); g_assert_content_type_equals (expected, res); - g_assert (!uncertain); + g_assert_false (uncertain); g_free (res); g_free (expected); res = g_content_type_guess (NULL, data, sizeof (data) - 1, &uncertain); expected = g_content_type_from_mime_type ("application/x-desktop"); g_assert_content_type_equals (expected, res); - g_assert (!uncertain); + g_assert_false (uncertain); g_free (res); g_free (expected); @@ -84,14 +84,14 @@ test_guess (void) res = g_content_type_guess ("test.pot", (guchar *)"ABC abc", 7, &uncertain); expected = g_content_type_from_mime_type ("text/x-gettext-translation-template"); g_assert_content_type_equals (expected, res); - g_assert (!uncertain); + g_assert_false (uncertain); g_free (res); g_free (expected); res = g_content_type_guess ("test.pot", (guchar *)"msgid \"", 7, &uncertain); expected = g_content_type_from_mime_type ("text/x-gettext-translation-template"); g_assert_content_type_equals (expected, res); - g_assert (!uncertain); + g_assert_false (uncertain); g_free (res); g_free (expected); @@ -107,7 +107,7 @@ test_guess (void) res = g_content_type_guess ("test.otf", (guchar *)"OTTO", 4, &uncertain); expected = g_content_type_from_mime_type ("application/x-font-otf"); g_assert_content_type_equals (expected, res); - g_assert (!uncertain); + g_assert_false (uncertain); g_free (res); g_free (expected); #endif @@ -115,7 +115,15 @@ test_guess (void) res = g_content_type_guess (NULL, (guchar *)"%!PS-Adobe-2.0 EPSF-1.2", 23, &uncertain); expected = g_content_type_from_mime_type ("image/x-eps"); g_assert_content_type_equals (expected, res); - g_assert (!uncertain); + g_assert_false (uncertain); + g_free (res); + g_free (expected); + + /* The data below would be detected as a valid content type, but shouldn’t be read at all. */ + res = g_content_type_guess (NULL, (guchar *)"%!PS-Adobe-2.0 EPSF-1.2", 0, &uncertain); + expected = g_content_type_from_mime_type ("application/x-zerosize"); + g_assert_content_type_equals (expected, res); + g_assert_false (uncertain); g_free (res); g_free (expected); } @@ -127,7 +135,7 @@ test_unknown (void) gchar *str; unknown = g_content_type_from_mime_type ("application/octet-stream"); - g_assert (g_content_type_is_unknown (unknown)); + g_assert_true (g_content_type_is_unknown (unknown)); str = g_content_type_get_mime_type (unknown); g_assert_cmpstr (str, ==, "application/octet-stream"); g_free (str); @@ -143,8 +151,8 @@ test_subtype (void) plain = g_content_type_from_mime_type ("text/plain"); xml = g_content_type_from_mime_type ("application/xml"); - g_assert (g_content_type_is_a (xml, plain)); - g_assert (g_content_type_is_mime_type (xml, "text/plain")); + g_assert_true (g_content_type_is_a (xml, plain)); + g_assert_true (g_content_type_is_mime_type (xml, "text/plain")); g_free (plain); g_free (xml); @@ -175,11 +183,11 @@ test_list (void) types = g_content_types_get_registered (); - g_assert (g_list_length (types) > 1); + g_assert_cmpuint (g_list_length (types), >, 1); /* just check that some types are in the list */ - g_assert (g_list_find_custom (types, plain, find_mime) != NULL); - g_assert (g_list_find_custom (types, xml, find_mime) != NULL); + g_assert_nonnull (g_list_find_custom (types, plain, find_mime)); + g_assert_nonnull (g_list_find_custom (types, xml, find_mime)); g_list_free_full (types, g_free); @@ -193,15 +201,15 @@ test_executable (void) gchar *type; type = g_content_type_from_mime_type ("application/x-executable"); - g_assert (g_content_type_can_be_executable (type)); + g_assert_true (g_content_type_can_be_executable (type)); g_free (type); type = g_content_type_from_mime_type ("text/plain"); - g_assert (g_content_type_can_be_executable (type)); + g_assert_true (g_content_type_can_be_executable (type)); g_free (type); type = g_content_type_from_mime_type ("image/png"); - g_assert (!g_content_type_can_be_executable (type)); + g_assert_false (g_content_type_can_be_executable (type)); g_free (type); } @@ -213,7 +221,7 @@ test_description (void) type = g_content_type_from_mime_type ("text/plain"); desc = g_content_type_get_description (type); - g_assert (desc != NULL); + g_assert_nonnull (desc); g_free (desc); g_free (type); @@ -227,17 +235,17 @@ test_icon (void) type = g_content_type_from_mime_type ("text/plain"); icon = g_content_type_get_icon (type); - g_assert (G_IS_ICON (icon)); + g_assert_true (G_IS_ICON (icon)); if (G_IS_THEMED_ICON (icon)) { const gchar *const *names; names = g_themed_icon_get_names (G_THEMED_ICON (icon)); #ifdef __APPLE__ - g_assert (g_strv_contains (names, "text-*")); + g_assert_true (g_strv_contains (names, "text-*")); #else - g_assert (g_strv_contains (names, "text-plain")); - g_assert (g_strv_contains (names, "text-x-generic")); + g_assert_true (g_strv_contains (names, "text-plain")); + g_assert_true (g_strv_contains (names, "text-x-generic")); #endif } g_object_unref (icon); @@ -245,15 +253,15 @@ test_icon (void) type = g_content_type_from_mime_type ("application/rtf"); icon = g_content_type_get_icon (type); - g_assert (G_IS_ICON (icon)); + g_assert_true (G_IS_ICON (icon)); if (G_IS_THEMED_ICON (icon)) { const gchar *const *names; names = g_themed_icon_get_names (G_THEMED_ICON (icon)); - g_assert (g_strv_contains (names, "application-rtf")); + g_assert_true (g_strv_contains (names, "application-rtf")); #ifndef __APPLE__ - g_assert (g_strv_contains (names, "x-office-document")); + g_assert_true (g_strv_contains (names, "x-office-document")); #endif } g_object_unref (icon); @@ -269,20 +277,20 @@ test_symbolic_icon (void) type = g_content_type_from_mime_type ("text/plain"); icon = g_content_type_get_symbolic_icon (type); - g_assert (G_IS_ICON (icon)); + g_assert_true (G_IS_ICON (icon)); if (G_IS_THEMED_ICON (icon)) { const gchar *const *names; names = g_themed_icon_get_names (G_THEMED_ICON (icon)); #ifdef __APPLE__ - g_assert (g_strv_contains (names, "text-*-symbolic")); - g_assert (g_strv_contains (names, "text-*")); + g_assert_true (g_strv_contains (names, "text-*-symbolic")); + g_assert_true (g_strv_contains (names, "text-*")); #else - g_assert (g_strv_contains (names, "text-plain-symbolic")); - g_assert (g_strv_contains (names, "text-x-generic-symbolic")); - g_assert (g_strv_contains (names, "text-plain")); - g_assert (g_strv_contains (names, "text-x-generic")); + g_assert_true (g_strv_contains (names, "text-plain-symbolic")); + g_assert_true (g_strv_contains (names, "text-x-generic-symbolic")); + g_assert_true (g_strv_contains (names, "text-plain")); + g_assert_true (g_strv_contains (names, "text-x-generic")); #endif } g_object_unref (icon); @@ -290,17 +298,17 @@ test_symbolic_icon (void) type = g_content_type_from_mime_type ("application/rtf"); icon = g_content_type_get_symbolic_icon (type); - g_assert (G_IS_ICON (icon)); + g_assert_true (G_IS_ICON (icon)); if (G_IS_THEMED_ICON (icon)) { const gchar *const *names; names = g_themed_icon_get_names (G_THEMED_ICON (icon)); - g_assert (g_strv_contains (names, "application-rtf-symbolic")); - g_assert (g_strv_contains (names, "application-rtf")); + g_assert_true (g_strv_contains (names, "application-rtf-symbolic")); + g_assert_true (g_strv_contains (names, "application-rtf")); #ifndef __APPLE__ - g_assert (g_strv_contains (names, "x-office-document-symbolic")); - g_assert (g_strv_contains (names, "x-office-document")); + g_assert_true (g_strv_contains (names, "x-office-document-symbolic")); + g_assert_true (g_strv_contains (names, "x-office-document")); #endif } g_object_unref (icon); diff --git a/gio/tests/gdbus-addresses.c b/gio/tests/gdbus-addresses.c index d6a5c2360..173383d83 100644 --- a/gio/tests/gdbus-addresses.c +++ b/gio/tests/gdbus-addresses.c @@ -108,14 +108,20 @@ test_unix_address (void) g_test_skip ("unix transport is not supported on non-Unix platforms"); #else assert_is_supported_address ("unix:path=/tmp/dbus-test"); + assert_is_supported_address ("unix:path=/tmp/dbus-test,guid=0"); assert_is_supported_address ("unix:abstract=/tmp/dbus-another-test"); + assert_is_supported_address ("unix:abstract=/tmp/dbus-another-test,guid=1000"); assert_not_supported_address ("unix:foo=bar"); g_assert_false (g_dbus_is_address ("unix:path=/foo;abstract=/bar")); assert_is_supported_address ("unix:path=/tmp/concrete;unix:abstract=/tmp/abstract"); assert_is_supported_address ("unix:tmpdir=/tmp"); + assert_is_supported_address ("unix:dir=/tmp"); assert_not_supported_address ("unix:tmpdir=/tmp,path=/tmp"); assert_not_supported_address ("unix:tmpdir=/tmp,abstract=/tmp/foo"); + assert_not_supported_address ("unix:tmpdir=/tmp,dir=/tmp"); assert_not_supported_address ("unix:path=/tmp,abstract=/tmp/foo"); + assert_not_supported_address ("unix:path=/tmp,dir=/tmp"); + assert_not_supported_address ("unix:abstract=/tmp/foo,dir=/tmp"); assert_not_supported_address ("unix:"); #endif } @@ -124,9 +130,11 @@ static void test_nonce_tcp_address (void) { assert_is_supported_address ("nonce-tcp:host=localhost,port=42,noncefile=/foo/bar"); + assert_is_supported_address ("nonce-tcp:host=localhost,port=42,noncefile=/foo/bar,guid=0"); assert_is_supported_address ("nonce-tcp:host=localhost,port=42,noncefile=/foo/bar,family=ipv6"); assert_is_supported_address ("nonce-tcp:host=localhost,port=42,noncefile=/foo/bar,family=ipv4"); assert_is_supported_address ("nonce-tcp:host=localhost"); + assert_is_supported_address ("nonce-tcp:host=localhost,guid=1000"); assert_not_supported_address ("nonce-tcp:host=localhost,port=42,noncefile=/foo/bar,family=blah"); assert_not_supported_address ("nonce-tcp:host=localhost,port=420000,noncefile=/foo/bar,family=ipv4"); @@ -144,8 +152,10 @@ static void test_tcp_address (void) { assert_is_supported_address ("tcp:host=localhost"); + assert_is_supported_address ("tcp:host=localhost,guid=1000"); assert_not_supported_address ("tcp:host=localhost,noncefile=/tmp/foo"); assert_is_supported_address ("tcp:host=localhost,port=42"); + assert_is_supported_address ("tcp:host=localhost,port=42,guid=1000"); assert_not_supported_address ("tcp:host=localhost,port=-1"); assert_not_supported_address ("tcp:host=localhost,port=420000"); assert_not_supported_address ("tcp:host=localhost,port=42x"); diff --git a/gio/tests/gdbus-connection-loss.c b/gio/tests/gdbus-connection-loss.c index 9dbbeb2a4..8f7023f3f 100644 --- a/gio/tests/gdbus-connection-loss.c +++ b/gio/tests/gdbus-connection-loss.c @@ -136,9 +136,10 @@ main (int argc, ret = g_test_run(); + g_object_unref (c); + session_bus_down (); - g_object_unref (c); g_main_loop_unref (loop); return ret; diff --git a/gio/tests/gdbus-example-peer.c b/gio/tests/gdbus-example-peer.c index bf151cfcf..9d5de32a6 100755 --- a/gio/tests/gdbus-example-peer.c +++ b/gio/tests/gdbus-example-peer.c @@ -169,6 +169,74 @@ on_new_connection (GDBusServer *server, /* ---------------------------------------------------------------------------------------------------- */ +static gboolean +allow_mechanism_cb (GDBusAuthObserver *observer, + const gchar *mechanism, + G_GNUC_UNUSED gpointer user_data) +{ + /* + * In a production GDBusServer that only needs to work on modern Unix + * platforms, consider requiring EXTERNAL (credentials-passing), + * which is the recommended authentication mechanism for AF_UNIX + * sockets: + * + * if (g_strcmp0 (mechanism, "EXTERNAL") == 0) + * return TRUE; + * + * return FALSE; + * + * For this example we accept everything. + */ + + g_print ("Considering whether to accept %s authentication...\n", mechanism); + return TRUE; +} + +static gboolean +authorize_authenticated_peer_cb (GDBusAuthObserver *observer, + G_GNUC_UNUSED GIOStream *stream, + GCredentials *credentials, + G_GNUC_UNUSED gpointer user_data) +{ + gboolean authorized = FALSE; + + g_print ("Considering whether to authorize authenticated peer...\n"); + + if (credentials != NULL) + { + GCredentials *own_credentials; + gchar *credentials_string = NULL; + + credentials_string = g_credentials_to_string (credentials); + g_print ("Peer's credentials: %s\n", credentials_string); + g_free (credentials_string); + + own_credentials = g_credentials_new (); + + credentials_string = g_credentials_to_string (own_credentials); + g_print ("Server's credentials: %s\n", credentials_string); + g_free (credentials_string); + + if (g_credentials_is_same_user (credentials, own_credentials, NULL)) + authorized = TRUE; + + g_object_unref (own_credentials); + } + + if (!authorized) + { + /* In most servers you'd want to reject this, but for this example + * we allow it. */ + g_print ("A server would often not want to authorize this identity\n"); + g_print ("Authorizing it anyway for demonstration purposes\n"); + authorized = TRUE; + } + + return authorized; +} + +/* ---------------------------------------------------------------------------------------------------- */ + int main (int argc, char *argv[]) { @@ -221,6 +289,7 @@ main (int argc, char *argv[]) if (opt_server) { + GDBusAuthObserver *observer; GDBusServer *server; gchar *guid; GMainLoop *loop; @@ -232,14 +301,20 @@ main (int argc, char *argv[]) if (opt_allow_anonymous) server_flags |= G_DBUS_SERVER_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS; + observer = g_dbus_auth_observer_new (); + g_signal_connect (observer, "allow-mechanism", G_CALLBACK (allow_mechanism_cb), NULL); + g_signal_connect (observer, "authorize-authenticated-peer", G_CALLBACK (authorize_authenticated_peer_cb), NULL); + error = NULL; server = g_dbus_server_new_sync (opt_address, server_flags, guid, - NULL, /* GDBusAuthObserver */ + observer, NULL, /* GCancellable */ &error); g_dbus_server_start (server); + + g_object_unref (observer); g_free (guid); if (server == NULL) diff --git a/gio/tests/gdbus-names.c b/gio/tests/gdbus-names.c index 648b54774..4f95b457a 100644 --- a/gio/tests/gdbus-names.c +++ b/gio/tests/gdbus-names.c @@ -472,9 +472,6 @@ test_bus_own_name (void) g_object_unref (c2); session_bus_down (); - - /* See https://bugzilla.gnome.org/show_bug.cgi?id=711807 */ - g_usleep (1000000); } /* ---------------------------------------------------------------------------------------------------- */ diff --git a/gio/tests/gdbus-peer.c b/gio/tests/gdbus-peer.c index c21b9e9f2..c46340386 100644 --- a/gio/tests/gdbus-peer.c +++ b/gio/tests/gdbus-peer.c @@ -53,6 +53,7 @@ static gboolean is_unix = TRUE; static gboolean is_unix = FALSE; #endif +static gchar *tmpdir = NULL; static gchar *tmp_address = NULL; static gchar *test_guid = NULL; static GMutex service_loop_lock; @@ -267,6 +268,58 @@ on_proxy_signal_received_with_name_set (GDBusProxy *proxy, /* ---------------------------------------------------------------------------------------------------- */ +static void +setup_test_address (void) +{ + if (is_unix) + { + g_test_message ("Testing with unix:tmpdir address"); + if (g_unix_socket_address_abstract_names_supported ()) + tmp_address = g_strdup ("unix:tmpdir=/tmp/gdbus-test-"); + else + { + tmpdir = g_dir_make_tmp ("gdbus-test-XXXXXX", NULL); + tmp_address = g_strdup_printf ("unix:tmpdir=%s", tmpdir); + } + } + else + tmp_address = g_strdup ("nonce-tcp:"); +} + +#ifdef G_OS_UNIX +static void +setup_dir_test_address (void) +{ + g_test_message ("Testing with unix:dir address"); + tmpdir = g_dir_make_tmp ("gdbus-test-XXXXXX", NULL); + tmp_address = g_strdup_printf ("unix:dir=%s", tmpdir); +} + +static void +setup_path_test_address (void) +{ + g_test_message ("Testing with unix:path address"); + tmpdir = g_dir_make_tmp ("gdbus-test-XXXXXX", NULL); + tmp_address = g_strdup_printf ("unix:path=%s/gdbus-peer-socket", tmpdir); +} +#endif + +static void +teardown_test_address (void) +{ + g_free (tmp_address); + if (tmpdir) + { + /* Ensuring the rmdir succeeds also ensures any sockets created on the + * filesystem are also deleted. + */ + g_assert_cmpint (g_rmdir (tmpdir), ==, 0); + g_clear_pointer (&tmpdir, g_free); + } +} + +/* ---------------------------------------------------------------------------------------------------- */ + static gboolean on_authorize_authenticated_peer (GDBusAuthObserver *observer, GIOStream *stream, @@ -656,7 +709,7 @@ read_all_from_fd (gint fd, gsize *out_len, GError **error) #endif static void -test_peer (void) +do_test_peer (void) { GDBusConnection *c; GDBusConnection *c2; @@ -977,6 +1030,27 @@ test_peer (void) g_thread_join (service_thread); } +static void +test_peer (void) +{ + /* Run this test multiple times using different address formats to ensure + * they all work. + */ + setup_test_address (); + do_test_peer (); + teardown_test_address (); + +#ifdef G_OS_UNIX + setup_dir_test_address (); + do_test_peer (); + teardown_test_address (); + + setup_path_test_address (); + do_test_peer (); + teardown_test_address (); +#endif +} + /* ---------------------------------------------------------------------------------------------------- */ typedef struct @@ -1116,6 +1190,8 @@ delayed_message_processing (void) GThread *service_thread; guint n; + setup_test_address (); + data = g_new0 (DmpData, 1); service_thread = g_thread_new ("dmp", @@ -1160,6 +1236,7 @@ delayed_message_processing (void) g_main_loop_quit (data->loop); g_thread_join (service_thread); dmp_data_free (data); + teardown_test_address (); } /* ---------------------------------------------------------------------------------------------------- */ @@ -1351,12 +1428,16 @@ test_nonce_tcp (void) g_error_free (error); g_assert (c == NULL); - g_free (nonce_file); + /* Recreate the nonce-file so we can ensure the server deletes it when stopped. */ + g_assert_cmpint (g_creat (nonce_file, 0600), !=, -1); g_dbus_server_stop (server); g_object_unref (server); server = NULL; + g_assert_false (g_file_test (nonce_file, G_FILE_TEST_EXISTS)); + g_free (nonce_file); + g_main_loop_quit (service_loop); g_thread_join (service_thread); @@ -1616,6 +1697,8 @@ codegen_test_peer (void) GVariant *value; const gchar *s; + setup_test_address (); + /* bring up a server - we run the server in a different thread to avoid deadlocks */ service_thread = g_thread_new ("codegen_test_peer", codegen_service_thread_func, @@ -1719,6 +1802,8 @@ codegen_test_peer (void) g_object_unref (animal1); g_object_unref (animal2); g_thread_join (service_thread); + + teardown_test_address (); } /* ---------------------------------------------------------------------------------------------------- */ @@ -1730,7 +1815,6 @@ main (int argc, { gint ret; GDBusNodeInfo *introspection_data = NULL; - gchar *tmpdir = NULL; g_test_init (&argc, &argv, NULL); @@ -1740,19 +1824,6 @@ main (int argc, test_guid = g_dbus_generate_guid (); - if (is_unix) - { - if (g_unix_socket_address_abstract_names_supported ()) - tmp_address = g_strdup ("unix:tmpdir=/tmp/gdbus-test-"); - else - { - tmpdir = g_dir_make_tmp ("gdbus-test-XXXXXX", NULL); - tmp_address = g_strdup_printf ("unix:tmpdir=%s", tmpdir); - } - } - else - tmp_address = g_strdup ("nonce-tcp:"); - /* all the tests rely on a shared main loop */ loop = g_main_loop_new (NULL, FALSE); @@ -1769,13 +1840,6 @@ main (int argc, g_main_loop_unref (loop); g_free (test_guid); g_dbus_node_info_unref (introspection_data); - if (is_unix) - g_free (tmp_address); - if (tmpdir) - { - g_rmdir (tmpdir); - g_free (tmpdir); - } return ret; } diff --git a/gio/tests/gdbus-threading.c b/gio/tests/gdbus-threading.c index 3e4dc92e5..ffca6f317 100644 --- a/gio/tests/gdbus-threading.c +++ b/gio/tests/gdbus-threading.c @@ -361,13 +361,12 @@ test_method_calls_on_proxy (GDBusProxy *proxy) SyncThreadData data1; SyncThreadData data2; SyncThreadData data3; - GTimeVal start_time; - GTimeVal end_time; + gint64 start_time, end_time; guint elapsed_msec; do_async = (n == 0); - g_get_current_time (&start_time); + start_time = g_get_real_time (); data1.proxy = proxy; data1.msec = 40; @@ -397,10 +396,9 @@ test_method_calls_on_proxy (GDBusProxy *proxy) g_thread_join (thread2); g_thread_join (thread3); - g_get_current_time (&end_time); + end_time = g_get_real_time (); - elapsed_msec = ((end_time.tv_sec * G_USEC_PER_SEC + end_time.tv_usec) - - (start_time.tv_sec * G_USEC_PER_SEC + start_time.tv_usec)) / 1000; + elapsed_msec = (end_time - start_time) / 1000; //g_debug ("Elapsed time for %s = %d msec", n == 0 ? "async" : "sync", elapsed_msec); diff --git a/gio/tests/giomodule.c b/gio/tests/giomodule.c index e832e95d3..b4923eeef 100644 --- a/gio/tests/giomodule.c +++ b/gio/tests/giomodule.c @@ -21,6 +21,13 @@ */ #include <gio/gio.h> +#include <glibconfig.h> + +#ifdef _MSC_VER +# define MODULE_FILENAME_PREFIX "" +#else +# define MODULE_FILENAME_PREFIX "lib" +#endif static void test_extension_point (void) @@ -76,6 +83,13 @@ test_extension_point (void) static void test_module_scan_all (void) { +#ifdef GLIB_STATIC_COMPILATION + /* The plugin module is statically linked with a separate copy + * of GLib so g_io_extension_point_implement won't work. */ + g_test_skip ("GIOExtensionPoint with dynamic modules isn't supported in static builds."); + return; +#endif + if (g_test_subprocess ()) { GIOExtensionPoint *ep; @@ -83,7 +97,6 @@ test_module_scan_all (void) GList *list; ep = g_io_extension_point_register ("test-extension-point"); g_io_modules_scan_all_in_directory (g_test_get_filename (G_TEST_BUILT, "modules", NULL)); - g_io_modules_scan_all_in_directory (g_test_get_filename (G_TEST_BUILT, "modules/.libs", NULL)); list = g_io_extension_point_get_extensions (ep); g_assert_cmpint (g_list_length (list), ==, 2); ext = list->data; @@ -99,6 +112,12 @@ test_module_scan_all (void) static void test_module_scan_all_with_scope (void) { +#ifdef GLIB_STATIC_COMPILATION + /* Disabled for the same reason as test_module_scan_all. */ + g_test_skip ("GIOExtensionPoint with dynamic modules isn't supported in static builds."); + return; +#endif + if (g_test_subprocess ()) { GIOExtensionPoint *ep; @@ -108,11 +127,9 @@ test_module_scan_all_with_scope (void) ep = g_io_extension_point_register ("test-extension-point"); scope = g_io_module_scope_new (G_IO_MODULE_SCOPE_BLOCK_DUPLICATES); - g_io_module_scope_block (scope, "libtestmoduleb." G_MODULE_SUFFIX); + g_io_module_scope_block (scope, MODULE_FILENAME_PREFIX "testmoduleb." G_MODULE_SUFFIX); g_io_modules_scan_all_in_directory_with_scope (g_test_get_filename (G_TEST_BUILT, "modules", NULL), scope); list = g_io_extension_point_get_extensions (ep); - g_io_modules_scan_all_in_directory_with_scope (g_test_get_filename (G_TEST_BUILT, "modules/.libs", NULL), scope); - list = g_io_extension_point_get_extensions (ep); g_assert_cmpint (g_list_length (list), ==, 1); ext = list->data; g_assert_cmpstr (g_io_extension_get_name (ext), ==, "test-a"); diff --git a/gio/tests/glistmodel.c b/gio/tests/glistmodel.c index 2fef4ccbe..b867bd54a 100644 --- a/gio/tests/glistmodel.c +++ b/gio/tests/glistmodel.c @@ -77,7 +77,6 @@ test_store_boundaries (void) store = g_list_store_new (G_TYPE_MENU_ITEM); item = g_menu_item_new (NULL, NULL); - g_object_add_weak_pointer (G_OBJECT (item), (gpointer *) &item); /* remove an item from an empty list */ g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, "*g_sequence*"); @@ -123,8 +122,7 @@ test_store_boundaries (void) g_assert_cmpuint (g_list_model_get_n_items (G_LIST_MODEL (store)), ==, 1); g_object_unref (store); - g_object_unref (item); - g_assert_null (item); + g_assert_finalize_object (item); } static void diff --git a/gio/tests/gsubprocess.c b/gio/tests/gsubprocess.c index 52b06a2e6..400fa00a1 100644 --- a/gio/tests/gsubprocess.c +++ b/gio/tests/gsubprocess.c @@ -66,14 +66,11 @@ test_noop (void) GError **error = &local_error; GPtrArray *args; GSubprocess *proc; - const gchar *id; args = get_test_subprocess_args ("noop", NULL); proc = g_subprocess_newv ((const gchar * const *) args->pdata, G_SUBPROCESS_FLAGS_NONE, error); g_ptr_array_free (args, TRUE); g_assert_no_error (local_error); - id = g_subprocess_get_identifier (proc); - g_assert_nonnull (id); g_subprocess_wait_check (proc, NULL, error); g_assert_no_error (local_error); @@ -1297,12 +1294,16 @@ test_terminate (void) GSubprocess *proc; GPtrArray *args; GMainLoop *loop; + const gchar *id; args = get_test_subprocess_args ("sleep-forever", NULL); proc = g_subprocess_newv ((const gchar * const *) args->pdata, G_SUBPROCESS_FLAGS_NONE, error); g_ptr_array_free (args, TRUE); g_assert_no_error (local_error); + id = g_subprocess_get_identifier (proc); + g_assert_nonnull (id); + loop = g_main_loop_new (NULL, TRUE); g_subprocess_wait_async (proc, NULL, on_request_quit_exited, loop); diff --git a/gio/tests/meson.build b/gio/tests/meson.build index a0c09444b..3a6b50bb5 100644 --- a/gio/tests/meson.build +++ b/gio/tests/meson.build @@ -97,7 +97,7 @@ test_env.set('GIO_LAUNCH_DESKTOP', meson.build_root() + '/gio/gio-launch-desktop # 1.2.14 required for dbus_message_set_serial dbus1_dep = dependency('dbus-1', required : false, version : '>= 1.2.14') if not dbus1_dep.found() - if cc.get_id() == 'msvc' + if cc.get_id() == 'msvc' or cc.get_id() == 'clang-cl' # MSVC: Search for the DBus library by the configuration, which corresponds # to the output of CMake builds of DBus. Note that debugoptimized # is really a Release build with .PDB files. @@ -382,7 +382,7 @@ test_extra_programs += { }, } -if cc.get_id() != 'msvc' +if cc.get_id() != 'msvc' and cc.get_id() != 'clang-cl' test_extra_programs += { # These three are manual-run tests because they need a session bus but don't bring one up themselves # FIXME: these build but don't seem to work! @@ -424,13 +424,20 @@ else endif foreach appinfo_test_desktop_file : appinfo_test_desktop_files - configure_file( - input: appinfo_test_desktop_file + '.in', - output: appinfo_test_desktop_file, - install_dir: installed_tests_execdir, - install: installed_tests_enabled, - configuration: cdata, - ) + if installed_tests_enabled + configure_file( + input: appinfo_test_desktop_file + '.in', + output: appinfo_test_desktop_file, + install_dir: installed_tests_execdir, + configuration: cdata, + ) + else + configure_file( + input: appinfo_test_desktop_file + '.in', + output: appinfo_test_desktop_file, + configuration: cdata, + ) + endif endforeach if installed_tests_enabled @@ -558,7 +565,7 @@ if not meson.is_cross_build() or meson.has_exe_wrapper() test_generated_txt = configure_file(input : 'test1.txt', output : 'test-generated.txt', copy : true, - install : false) + ) resources_extra_sources = [ test_gresource, diff --git a/gio/tests/network-address.c b/gio/tests/network-address.c index 0dcd7b292..bda76050a 100644 --- a/gio/tests/network-address.c +++ b/gio/tests/network-address.c @@ -820,6 +820,31 @@ test_happy_eyeballs_ipv6_error_ipv6_first (HappyEyeballsFixture *fixture, } static void +test_happy_eyeballs_ipv6_error_ipv4_very_slow (HappyEyeballsFixture *fixture, + gconstpointer user_data) +{ + AsyncData data = { 0 }; + GError *ipv6_error; + + g_test_bug ("merge_requests/865"); + g_test_summary ("Ensure that we successfully return IPv4 results even when they come significantly later than an IPv6 failure."); + + /* If ipv6 fails, ensuring that ipv6 errors before ipv4 finishes, we still get ipv4. */ + + data.loop = fixture->loop; + ipv6_error = g_error_new_literal (G_IO_ERROR, G_IO_ERROR_TIMED_OUT, "IPv6 Broken"); + mock_resolver_set_ipv6_error (fixture->mock_resolver, ipv6_error); + mock_resolver_set_ipv4_delay_ms (fixture->mock_resolver, SLOW_DELAY_MORE_THAN_TIMEOUT); + + g_socket_address_enumerator_next_async (fixture->enumerator, NULL, got_addr, &data); + g_main_loop_run (fixture->loop); + + assert_list_matches_expected (data.addrs, fixture->input_ipv4_results); + + g_error_free (ipv6_error); +} + +static void test_happy_eyeballs_ipv4_error_ipv4_first (HappyEyeballsFixture *fixture, gconstpointer user_data) { @@ -977,6 +1002,7 @@ main (int argc, char *argv[]) gchar *path; g_test_init (&argc, &argv, NULL); + g_test_bug_base ("https://gitlab.gnome.org/GNOME/glib/"); g_test_add_func ("/network-address/basic", test_basic); @@ -1031,6 +1057,8 @@ main (int argc, char *argv[]) happy_eyeballs_setup, test_happy_eyeballs_ipv6_error_ipv4_first, happy_eyeballs_teardown); g_test_add ("/network-address/happy-eyeballs/ipv6-error-ipv6-first", HappyEyeballsFixture, NULL, happy_eyeballs_setup, test_happy_eyeballs_ipv6_error_ipv6_first, happy_eyeballs_teardown); + g_test_add ("/network-address/happy-eyeballs/ipv6-error-ipv4-very-slow", HappyEyeballsFixture, NULL, + happy_eyeballs_setup, test_happy_eyeballs_ipv6_error_ipv4_very_slow, happy_eyeballs_teardown); g_test_add ("/network-address/happy-eyeballs/ipv4-error-ipv6-first", HappyEyeballsFixture, NULL, happy_eyeballs_setup, test_happy_eyeballs_ipv4_error_ipv6_first, happy_eyeballs_teardown); g_test_add ("/network-address/happy-eyeballs/ipv4-error-ipv4-first", HappyEyeballsFixture, NULL, diff --git a/gio/tests/resourceplugin.c b/gio/tests/resourceplugin.c index b66d54142..fc8d8d2f1 100644 --- a/gio/tests/resourceplugin.c +++ b/gio/tests/resourceplugin.c @@ -1,3 +1,14 @@ +/* + * Ensure the g_io_module_*() symbols are exported + * on all supported compilers without using config.h. + * This must be done before including any GLib headers, + * since GLIB_AVAILABLE_IN_ALL, which is used to mark the + * g_io_module*() symbols, is defined to be _GLIB_EXTERN, + * which must be overriden to export the symbols. + */ +#include "modules/symbol-visibility.h" +#define _GLIB_EXTERN GLIB_TEST_EXPORT_SYMBOL + #include <gio/gio.h> void diff --git a/gio/tests/resources.c b/gio/tests/resources.c index cb2c00a48..c44d21485 100644 --- a/gio/tests/resources.c +++ b/gio/tests/resources.c @@ -18,10 +18,17 @@ #include <string.h> #include <gio/gio.h> +#include <glibconfig.h> #include "gconstructor.h" #include "test_resources2.h" #include "digit_test_resources.h" +#ifdef _MSC_VER +# define MODULE_FILENAME_PREFIX "" +#else +# define MODULE_FILENAME_PREFIX "lib" +#endif + static void test_resource (GResource *resource) { @@ -638,10 +645,18 @@ test_resource_module (void) GBytes *data; GError *error; +#ifdef GLIB_STATIC_COMPILATION + /* The resource module is statically linked with a separate copy + * of a GLib so g_static_resource_init won't work as expected. */ + g_test_skip ("Resource modules aren't supported in static builds."); + return; +#endif + if (g_module_supported ()) { - /* For in-tree, this will find the .la file and use it to get to the .so in .libs/ */ - module = g_io_module_new (g_test_get_filename (G_TEST_BUILT, "libresourceplugin", NULL)); + module = g_io_module_new (g_test_get_filename (G_TEST_BUILT, + MODULE_FILENAME_PREFIX "resourceplugin", + NULL)); error = NULL; diff --git a/gio/tests/send-data.c b/gio/tests/send-data.c index 514442976..a66976fa3 100644 --- a/gio/tests/send-data.c +++ b/gio/tests/send-data.c @@ -66,14 +66,14 @@ socket_client_event (GSocketClient *client, GSocketConnection *connection) { static GEnumClass *event_class; - GTimeVal tv; + gint64 now_us; if (!event_class) event_class = g_type_class_ref (G_TYPE_SOCKET_CLIENT_EVENT); - g_get_current_time (&tv); - printf ("% 12ld.%06ld GSocketClient => %s [%s]\n", - tv.tv_sec, tv.tv_usec, + now_us = g_get_real_time (); + g_print ("%" G_GINT64_FORMAT " GSocketClient => %s [%s]\n", + now_us, g_enum_get_value (event_class, event)->value_nick, connection ? G_OBJECT_TYPE_NAME (connection) : ""); } diff --git a/gio/tests/testfilemonitor.c b/gio/tests/testfilemonitor.c index 0fa72d3d9..605795890 100644 --- a/gio/tests/testfilemonitor.c +++ b/gio/tests/testfilemonitor.c @@ -9,6 +9,37 @@ * the tests, e.g. the length of timeouts */ +typedef struct +{ + GFile *tmp_dir; +} Fixture; + +static void +setup (Fixture *fixture, + gconstpointer user_data) +{ + gchar *path = NULL; + GError *local_error = NULL; + + path = g_dir_make_tmp ("gio-test-testfilemonitor_XXXXXX", &local_error); + g_assert_no_error (local_error); + + fixture->tmp_dir = g_file_new_for_path (path); + + g_test_message ("Using temporary directory: %s", path); +} + +static void +teardown (Fixture *fixture, + gconstpointer user_data) +{ + GError *local_error = NULL; + + g_file_delete (fixture->tmp_dir, NULL, &local_error); + g_assert_no_error (local_error); + g_clear_object (&fixture->tmp_dir); +} + typedef enum { NONE = 0, INOTIFY = (1 << 1), @@ -48,36 +79,24 @@ typedef struct GFileOutputStream *output_stream; } TestData; -#if 0 static void -output_event (RecordedEvent *event) +output_event (const RecordedEvent *event) { if (event->step >= 0) - g_print (">>>> step %d\n", event->step); + g_test_message (">>>> step %d", event->step); else { GTypeClass *class; class = g_type_class_ref (g_type_from_name ("GFileMonitorEvent")); - g_print ("%s file=%s other_file=%s\n", - g_enum_get_value (G_ENUM_CLASS (class), event->event_type)->value_nick, - event->file, - event->other_file); + g_test_message ("%s file=%s other_file=%s\n", + g_enum_get_value (G_ENUM_CLASS (class), event->event_type)->value_nick, + event->file, + event->other_file); g_type_class_unref (class); } } -static void -output_events (GList *list) -{ - GList *l; - - g_print (">>>output events\n"); - for (l = list; l; l = l->next) - output_event ((RecordedEvent *)l->data); -} -#endif - /* a placeholder for temp file names we don't want to compare */ static const gchar DONT_CARE[] = ""; @@ -210,9 +229,20 @@ check_expected_events (RecordedEvent *expected, continue; } /* Run above checks under g_assert_* again to provide more useful - * error messages. */ + * error messages. Print the expected and actual events first. */ else { + GList *l; + gsize j; + + g_test_message ("Recorded events:"); + for (l = recorded; l != NULL; l = l->next) + output_event ((RecordedEvent *) l->data); + + g_test_message ("Expected events:"); + for (j = 0; j < n_expected; j++) + output_event (&expected[j]); + g_assert_cmpint (e1->step, ==, e2->step); g_assert_cmpint (e1->event_type, ==, e2->event_type); @@ -322,7 +352,8 @@ static RecordedEvent atomic_replace_output[] = { }; static void -test_atomic_replace (void) +test_atomic_replace (Fixture *fixture, + gconstpointer user_data) { GError *error = NULL; TestData data; @@ -330,12 +361,14 @@ test_atomic_replace (void) data.step = 0; data.events = NULL; - data.file = g_file_new_for_path ("atomic_replace_file"); + data.file = g_file_get_child (fixture->tmp_dir, "atomic_replace_file"); g_file_delete (data.file, NULL, NULL); data.monitor = g_file_monitor_file (data.file, G_FILE_MONITOR_WATCH_MOVES, NULL, &error); g_assert_no_error (error); + g_test_message ("Using GFileMonitor %s", G_OBJECT_TYPE_NAME (data.monitor)); + g_file_monitor_set_rate_limit (data.monitor, 200); g_signal_connect (data.monitor, "changed", G_CALLBACK (monitor_changed), &data); @@ -345,7 +378,6 @@ test_atomic_replace (void) g_main_loop_run (data.loop); - /*output_events (data.events);*/ check_expected_events (atomic_replace_output, G_N_ELEMENTS (atomic_replace_output), data.events, @@ -425,7 +457,8 @@ static RecordedEvent change_output[] = { }; static void -test_file_changes (void) +test_file_changes (Fixture *fixture, + gconstpointer user_data) { GError *error = NULL; TestData data; @@ -433,12 +466,14 @@ test_file_changes (void) data.step = 0; data.events = NULL; - data.file = g_file_new_for_path ("change_file"); + data.file = g_file_get_child (fixture->tmp_dir, "change_file"); g_file_delete (data.file, NULL, NULL); data.monitor = g_file_monitor_file (data.file, G_FILE_MONITOR_WATCH_MOVES, NULL, &error); g_assert_no_error (error); + g_test_message ("Using GFileMonitor %s", G_OBJECT_TYPE_NAME (data.monitor)); + g_file_monitor_set_rate_limit (data.monitor, 200); g_signal_connect (data.monitor, "changed", G_CALLBACK (monitor_changed), &data); @@ -448,7 +483,6 @@ test_file_changes (void) g_main_loop_run (data.loop); - /*output_events (data.events);*/ check_expected_events (change_output, G_N_ELEMENTS (change_output), data.events, @@ -540,7 +574,8 @@ static RecordedEvent dir_output[] = { }; static void -test_dir_monitor (void) +test_dir_monitor (Fixture *fixture, + gconstpointer user_data) { GError *error = NULL; TestData data; @@ -548,13 +583,15 @@ test_dir_monitor (void) data.step = 0; data.events = NULL; - data.file = g_file_new_for_path ("dir_monitor_test"); + data.file = g_file_get_child (fixture->tmp_dir, "dir_monitor_test"); g_file_delete (data.file, NULL, NULL); g_file_make_directory (data.file, NULL, &error); data.monitor = g_file_monitor_directory (data.file, G_FILE_MONITOR_WATCH_MOVES, NULL, &error); g_assert_no_error (error); + g_test_message ("Using GFileMonitor %s", G_OBJECT_TYPE_NAME (data.monitor)); + g_file_monitor_set_rate_limit (data.monitor, 200); g_signal_connect (data.monitor, "changed", G_CALLBACK (monitor_changed), &data); @@ -564,7 +601,6 @@ test_dir_monitor (void) g_main_loop_run (data.loop); - /*output_events (data.events);*/ check_expected_events (dir_output, G_N_ELEMENTS (dir_output), data.events, @@ -635,7 +671,8 @@ static RecordedEvent nodir_output[] = { }; static void -test_dir_non_existent (void) +test_dir_non_existent (Fixture *fixture, + gconstpointer user_data) { TestData data; GError *error = NULL; @@ -643,10 +680,12 @@ test_dir_non_existent (void) data.step = 0; data.events = NULL; - data.file = g_file_new_for_path ("nosuchdir/nosuchfile"); + data.file = g_file_get_child (fixture->tmp_dir, "nosuchdir/nosuchfile"); data.monitor = g_file_monitor_file (data.file, G_FILE_MONITOR_WATCH_MOVES, NULL, &error); g_assert_no_error (error); + g_test_message ("Using GFileMonitor %s", G_OBJECT_TYPE_NAME (data.monitor)); + g_file_monitor_set_rate_limit (data.monitor, 200); g_signal_connect (data.monitor, "changed", G_CALLBACK (monitor_changed), &data); @@ -659,7 +698,6 @@ test_dir_non_existent (void) g_main_loop_run (data.loop); - /*output_events (data.events);*/ check_expected_events (nodir_output, G_N_ELEMENTS (nodir_output), data.events, @@ -742,7 +780,8 @@ static RecordedEvent cross_dir_b_output[] = { { -1, NULL, NULL, 3, NONE }, }; static void -test_cross_dir_moves (void) +test_cross_dir_moves (Fixture *fixture, + gconstpointer user_data) { GError *error = NULL; TestData data[2]; @@ -750,26 +789,30 @@ test_cross_dir_moves (void) data[0].step = 0; data[0].events = NULL; - data[0].file = g_file_new_for_path ("cross_dir_a"); + data[0].file = g_file_get_child (fixture->tmp_dir, "cross_dir_a"); g_file_delete (data[0].file, NULL, NULL); g_file_make_directory (data[0].file, NULL, &error); data[0].monitor = g_file_monitor_directory (data[0].file, 0, NULL, &error); g_assert_no_error (error); + g_test_message ("Using GFileMonitor 0 %s", G_OBJECT_TYPE_NAME (data[0].monitor)); + g_file_monitor_set_rate_limit (data[0].monitor, 200); g_signal_connect (data[0].monitor, "changed", G_CALLBACK (monitor_changed), &data[0]); data[1].step = 0; data[1].events = NULL; - data[1].file = g_file_new_for_path ("cross_dir_b"); + data[1].file = g_file_get_child (fixture->tmp_dir, "cross_dir_b"); g_file_delete (data[1].file, NULL, NULL); g_file_make_directory (data[1].file, NULL, &error); data[1].monitor = g_file_monitor_directory (data[1].file, G_FILE_MONITOR_WATCH_MOVES, NULL, &error); g_assert_no_error (error); + g_test_message ("Using GFileMonitor 1 %s", G_OBJECT_TYPE_NAME (data[1].monitor)); + g_file_monitor_set_rate_limit (data[1].monitor, 200); g_signal_connect (data[1].monitor, "changed", G_CALLBACK (monitor_changed), &data[1]); @@ -779,13 +822,6 @@ test_cross_dir_moves (void) g_main_loop_run (data[0].loop); -#if 0 - g_print ("monitor a:\n"); - output_events (data[0].events); - g_print ("monitor b:\n"); - output_events (data[1].events); -#endif - check_expected_events (cross_dir_a_output, G_N_ELEMENTS (cross_dir_a_output), data[0].events, @@ -913,7 +949,8 @@ static RecordedEvent file_hard_links_output[] = { }; static void -test_file_hard_links (void) +test_file_hard_links (Fixture *fixture, + gconstpointer user_data) { GError *error = NULL; TestData data; @@ -930,7 +967,7 @@ test_file_hard_links (void) data.events = NULL; /* Create a file which exists and is not a directory. */ - data.file = g_file_new_for_path ("testfilemonitor.db"); + data.file = g_file_get_child (fixture->tmp_dir, "testfilemonitor.db"); data.output_stream = g_file_replace (data.file, NULL, FALSE, G_FILE_CREATE_NONE, NULL, &error); g_assert_no_error (error); @@ -945,6 +982,8 @@ test_file_hard_links (void) g_assert_no_error (error); g_assert_nonnull (data.monitor); + g_test_message ("Using GFileMonitor %s", G_OBJECT_TYPE_NAME (data.monitor)); + /* Change the file a bit. */ g_file_monitor_set_rate_limit (data.monitor, 200); g_signal_connect (data.monitor, "changed", (GCallback) monitor_changed, &data); @@ -953,7 +992,6 @@ test_file_hard_links (void) g_timeout_add (500, file_hard_links_step, &data); g_main_loop_run (data.loop); - /* output_events (data.events); */ check_expected_events (file_hard_links_output, G_N_ELEMENTS (file_hard_links_output), data.events, @@ -973,12 +1011,12 @@ main (int argc, char *argv[]) g_test_bug_base ("https://bugzilla.gnome.org/show_bug.cgi?id="); - g_test_add_func ("/monitor/atomic-replace", test_atomic_replace); - g_test_add_func ("/monitor/file-changes", test_file_changes); - g_test_add_func ("/monitor/dir-monitor", test_dir_monitor); - g_test_add_func ("/monitor/dir-not-existent", test_dir_non_existent); - g_test_add_func ("/monitor/cross-dir-moves", test_cross_dir_moves); - g_test_add_func ("/monitor/file/hard-links", test_file_hard_links); + g_test_add ("/monitor/atomic-replace", Fixture, NULL, setup, test_atomic_replace, teardown); + g_test_add ("/monitor/file-changes", Fixture, NULL, setup, test_file_changes, teardown); + g_test_add ("/monitor/dir-monitor", Fixture, NULL, setup, test_dir_monitor, teardown); + g_test_add ("/monitor/dir-not-existent", Fixture, NULL, setup, test_dir_non_existent, teardown); + g_test_add ("/monitor/cross-dir-moves", Fixture, NULL, setup, test_cross_dir_moves, teardown); + g_test_add ("/monitor/file/hard-links", Fixture, NULL, setup, test_file_hard_links, teardown); return g_test_run (); } diff --git a/gio/tests/tls-interaction.c b/gio/tests/tls-interaction.c index 345656e29..4f0737d7e 100644 --- a/gio/tests/tls-interaction.c +++ b/gio/tests/tls-interaction.c @@ -673,18 +673,10 @@ static void teardown_without_loop (Test *test, gconstpointer unused) { - gpointer weak_pointer = test->interaction; - - g_object_add_weak_pointer (weak_pointer, &weak_pointer); - g_object_unref (test->connection); - g_object_unref (test->password); - g_object_unref (test->interaction); - - g_assert (weak_pointer == NULL); - + g_assert_finalize_object (test->interaction); } typedef struct { diff --git a/gio/win32/gwinhttpfile.c b/gio/win32/gwinhttpfile.c index d5df16d91..465f41b6b 100644 --- a/gio/win32/gwinhttpfile.c +++ b/gio/win32/gwinhttpfile.c @@ -439,31 +439,6 @@ g_winhttp_file_set_display_name (GFile *file, return NULL; } -static time_t -mktime_utc (SYSTEMTIME *t) -{ - time_t retval; - - static const gint days_before[] = - { - 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 - }; - - if (t->wMonth < 1 || t->wMonth > 12) - return (time_t) -1; - - retval = (t->wYear - 1970) * 365; - retval += (t->wYear - 1968) / 4; - retval += days_before[t->wMonth-1] + t->wDay - 1; - - if (t->wYear % 4 == 0 && t->wMonth < 3) - retval -= 1; - - retval = ((((retval * 24) + t->wHour) * 60) + t->wMinute) * 60 + t->wSecond; - - return retval; -} - static GFileInfo * g_winhttp_file_query_info (GFile *file, const char *attributes, @@ -603,12 +578,15 @@ g_winhttp_file_query_info (GFile *file, last_modified.wYear >= 1970 && last_modified.wYear < 2038) { - GTimeVal tv; + GDateTime *dt = NULL, *dt2 = NULL; + + dt = g_date_time_new_from_unix_utc (last_modified.wMilliseconds / 1000); + dt2 = g_date_time_add_seconds (dt, (last_modified.wMilliseconds % 1000) / 1000); - tv.tv_sec = mktime_utc (&last_modified); - tv.tv_usec = last_modified.wMilliseconds * 1000; + g_file_info_set_modification_date_time (info, dt2); - g_file_info_set_modification_time (info, &tv); + g_date_time_unref (dt2); + g_date_time_unref (dt); } g_file_attribute_matcher_unref (matcher); diff --git a/gio/win32/meson.build b/gio/win32/meson.build index f0fc307ba..8d589989b 100644 --- a/gio/win32/meson.build +++ b/gio/win32/meson.build @@ -12,4 +12,4 @@ giowin32_lib = static_library('giowin32', include_directories : [configinc, glibinc, gioinc, gmoduleinc], dependencies : [libintl, gioenumtypes_dep], pic : true, - c_args : [ '-DG_DISABLE_DEPRECATED' ] + gio_c_args) + c_args : gio_c_args) diff --git a/gio/xdgmime/xdgmime.c b/gio/xdgmime/xdgmime.c index 2446d3813..9bb93f791 100644 --- a/gio/xdgmime/xdgmime.c +++ b/gio/xdgmime/xdgmime.c @@ -531,7 +531,8 @@ xdg_mime_get_mime_type_for_data (const void *data, if (len == 0) { - *result_prio = 100; + if (result_prio != NULL) + *result_prio = 100; return XDG_MIME_TYPE_EMPTY; } diff --git a/glib/deprecated/gcache.c b/glib/deprecated/gcache.c index 7056c13ac..179ad9e17 100644 --- a/glib/deprecated/gcache.c +++ b/glib/deprecated/gcache.c @@ -28,6 +28,9 @@ #include "config.h" +/* we know we are deprecated here, no need for warnings */ +#define GLIB_DISABLE_DEPRECATION_WARNINGS + #include "gcache.h" #include "gslice.h" diff --git a/glib/deprecated/gcache.h b/glib/deprecated/gcache.h index 2885697f9..e1c1f2cde 100644 --- a/glib/deprecated/gcache.h +++ b/glib/deprecated/gcache.h @@ -33,13 +33,13 @@ G_BEGIN_DECLS -#ifndef G_DISABLE_DEPRECATED +typedef struct _GCache GCache GLIB_DEPRECATED_TYPE_IN_2_26_FOR(GHashTable); -typedef struct _GCache GCache; +typedef gpointer (*GCacheNewFunc) (gpointer key) GLIB_DEPRECATED_TYPE_IN_2_26; +typedef gpointer (*GCacheDupFunc) (gpointer value) GLIB_DEPRECATED_TYPE_IN_2_26; +typedef void (*GCacheDestroyFunc) (gpointer value) GLIB_DEPRECATED_TYPE_IN_2_26; -typedef gpointer (*GCacheNewFunc) (gpointer key); -typedef gpointer (*GCacheDupFunc) (gpointer value); -typedef void (*GCacheDestroyFunc) (gpointer value); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS /* Caches */ @@ -68,7 +68,7 @@ void g_cache_value_foreach (GCache *cache, GHFunc func, gpointer user_data); -#endif +G_GNUC_END_IGNORE_DEPRECATIONS G_END_DECLS diff --git a/glib/deprecated/gmain.h b/glib/deprecated/gmain.h index d14dd0ed3..2199328fd 100644 --- a/glib/deprecated/gmain.h +++ b/glib/deprecated/gmain.h @@ -33,8 +33,6 @@ G_BEGIN_DECLS -#ifndef G_DISABLE_DEPRECATED - /* ============== Compat main loop stuff ================== */ /** @@ -49,7 +47,7 @@ G_BEGIN_DECLS * * Deprecated: 2.2: Use g_main_loop_new() instead */ -#define g_main_new(is_running) g_main_loop_new (NULL, is_running) +#define g_main_new(is_running) g_main_loop_new (NULL, is_running) GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_main_loop_new) /** * g_main_run: @@ -59,7 +57,7 @@ G_BEGIN_DECLS * * Deprecated: 2.2: Use g_main_loop_run() instead */ -#define g_main_run(loop) g_main_loop_run(loop) +#define g_main_run(loop) g_main_loop_run(loop) GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_main_loop_run) /** * g_main_quit: @@ -70,7 +68,7 @@ G_BEGIN_DECLS * * Deprecated: 2.2: Use g_main_loop_quit() instead */ -#define g_main_quit(loop) g_main_loop_quit(loop) +#define g_main_quit(loop) g_main_loop_quit(loop) GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_main_loop_quit) /** * g_main_destroy: @@ -80,7 +78,7 @@ G_BEGIN_DECLS * * Deprecated: 2.2: Use g_main_loop_unref() instead */ -#define g_main_destroy(loop) g_main_loop_unref(loop) +#define g_main_destroy(loop) g_main_loop_unref(loop) GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_main_loop_unref) /** * g_main_is_running: @@ -92,7 +90,7 @@ G_BEGIN_DECLS * * Deprecated: 2.2: Use g_main_loop_is_running() instead */ -#define g_main_is_running(loop) g_main_loop_is_running(loop) +#define g_main_is_running(loop) g_main_loop_is_running(loop) GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_main_loop_is_running) /** * g_main_iteration: @@ -107,7 +105,7 @@ G_BEGIN_DECLS * * Deprecated: 2.2: Use g_main_context_iteration() instead. */ -#define g_main_iteration(may_block) g_main_context_iteration (NULL, may_block) +#define g_main_iteration(may_block) g_main_context_iteration (NULL, may_block) GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_main_context_iteration) /** * g_main_pending: @@ -119,7 +117,7 @@ G_BEGIN_DECLS * * Deprected: 2.2: Use g_main_context_pending() instead. */ -#define g_main_pending() g_main_context_pending (NULL) +#define g_main_pending() g_main_context_pending (NULL) GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_main_context_pending) /** * g_main_set_poll_func: @@ -130,9 +128,7 @@ G_BEGIN_DECLS * * Deprecated: 2.2: Use g_main_context_set_poll_func() again */ -#define g_main_set_poll_func(func) g_main_context_set_poll_func (NULL, func) - -#endif +#define g_main_set_poll_func(func) g_main_context_set_poll_func (NULL, func) GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_main_context_set_poll_func) G_END_DECLS diff --git a/glib/deprecated/gthread-deprecated.c b/glib/deprecated/gthread-deprecated.c index c0ef4deff..b0d67df88 100644 --- a/glib/deprecated/gthread-deprecated.c +++ b/glib/deprecated/gthread-deprecated.c @@ -1540,7 +1540,7 @@ g_cond_free (GCond *cond) * This function can be used even if g_thread_init() has not yet been * called, and, in that case, will immediately return %TRUE. * - * To easily calculate @abs_time a combination of g_get_current_time() + * To easily calculate @abs_time a combination of g_get_real_time() * and g_time_val_add() can be used. * * Returns: %TRUE if @cond was signalled, or %FALSE on timeout diff --git a/glib/deprecated/gthread.h b/glib/deprecated/gthread.h index 9e1c2ff56..33b422240 100644 --- a/glib/deprecated/gthread.h +++ b/glib/deprecated/gthread.h @@ -33,7 +33,7 @@ G_BEGIN_DECLS -#ifndef G_DISABLE_DEPRECATED +G_GNUC_BEGIN_IGNORE_DEPRECATIONS typedef enum { @@ -41,9 +41,7 @@ typedef enum G_THREAD_PRIORITY_NORMAL, G_THREAD_PRIORITY_HIGH, G_THREAD_PRIORITY_URGENT -} GThreadPriority; - -#endif +} GThreadPriority GLIB_DEPRECATED_TYPE_IN_2_32; struct _GThread { @@ -54,9 +52,7 @@ struct _GThread GThreadPriority priority; }; -#ifndef G_DISABLE_DEPRECATED - -typedef struct _GThreadFunctions GThreadFunctions; +typedef struct _GThreadFunctions GThreadFunctions GLIB_DEPRECATED_TYPE_IN_2_32; struct _GThreadFunctions { GMutex* (*mutex_new) (void); @@ -93,7 +89,7 @@ struct _GThreadFunctions void (*thread_self) (gpointer thread); gboolean (*thread_equal) (gpointer thread1, gpointer thread2); -}; +} GLIB_DEPRECATED_TYPE_IN_2_32; GLIB_VAR GThreadFunctions g_thread_functions_for_glib_use; GLIB_VAR gboolean g_thread_use_default_impl; @@ -128,8 +124,8 @@ void g_thread_foreach (GFunc thread_func, #include <pthread.h> #endif -#define g_static_mutex_get_mutex g_static_mutex_get_mutex_impl -#define G_STATIC_MUTEX_INIT { NULL } +#define g_static_mutex_get_mutex g_static_mutex_get_mutex_impl GLIB_DEPRECATED_MACRO_IN_2_32 +#define G_STATIC_MUTEX_INIT { NULL } GLIB_DEPRECATED_MACRO_IN_2_32_FOR(g_mutex_init) typedef struct { GMutex *mutex; @@ -137,14 +133,14 @@ typedef struct /* only for ABI compatibility reasons */ pthread_mutex_t unused; #endif -} GStaticMutex; +} GStaticMutex GLIB_DEPRECATED_TYPE_IN_2_32_FOR(GMutex); #define g_static_mutex_lock(mutex) \ - g_mutex_lock (g_static_mutex_get_mutex (mutex)) + g_mutex_lock (g_static_mutex_get_mutex (mutex)) GLIB_DEPRECATED_MACRO_IN_2_32_FOR(g_mutex_lock) #define g_static_mutex_trylock(mutex) \ - g_mutex_trylock (g_static_mutex_get_mutex (mutex)) + g_mutex_trylock (g_static_mutex_get_mutex (mutex)) GLIB_DEPRECATED_MACRO_IN_2_32_FOR(g_mutex_trylock) #define g_static_mutex_unlock(mutex) \ - g_mutex_unlock (g_static_mutex_get_mutex (mutex)) + g_mutex_unlock (g_static_mutex_get_mutex (mutex)) GLIB_DEPRECATED_MACRO_IN_2_32_FOR(g_mutex_unlock) GLIB_DEPRECATED_IN_2_32_FOR(g_mutex_init) void g_static_mutex_init (GStaticMutex *mutex); @@ -153,7 +149,7 @@ void g_static_mutex_free (GStaticMutex *mutex); GLIB_DEPRECATED_IN_2_32_FOR(GMutex) GMutex *g_static_mutex_get_mutex_impl (GStaticMutex *mutex); -typedef struct _GStaticRecMutex GStaticRecMutex; +typedef struct _GStaticRecMutex GStaticRecMutex GLIB_DEPRECATED_TYPE_IN_2_32_FOR(GRecMutex); struct _GStaticRecMutex { /*< private >*/ @@ -169,9 +165,9 @@ struct _GStaticRecMutex #endif gdouble dummy; } unused; -}; +} GLIB_DEPRECATED_TYPE_IN_2_32_FOR(GRecMutex); -#define G_STATIC_REC_MUTEX_INIT { G_STATIC_MUTEX_INIT, 0, { 0 } } +#define G_STATIC_REC_MUTEX_INIT { G_STATIC_MUTEX_INIT, 0, { 0 } } GLIB_DEPRECATED_MACRO_IN_2_32_FOR(g_rec_mutex_init) GLIB_DEPRECATED_IN_2_32_FOR(g_rec_mutex_init) void g_static_rec_mutex_init (GStaticRecMutex *mutex); @@ -194,7 +190,7 @@ guint g_static_rec_mutex_unlock_full (GStaticRecMutex *mutex); GLIB_DEPRECATED_IN_2_32_FOR(g_rec_mutex_free) void g_static_rec_mutex_free (GStaticRecMutex *mutex); -typedef struct _GStaticRWLock GStaticRWLock; +typedef struct _GStaticRWLock GStaticRWLock GLIB_DEPRECATED_TYPE_IN_2_32_FOR(GRWLock); struct _GStaticRWLock { /*< private >*/ @@ -205,9 +201,9 @@ struct _GStaticRWLock gboolean have_writer; guint want_to_read; guint want_to_write; -}; +} GLIB_DEPRECATED_TYPE_IN_2_32_FOR(GRWLock); -#define G_STATIC_RW_LOCK_INIT { G_STATIC_MUTEX_INIT, NULL, NULL, 0, FALSE, 0, 0 } +#define G_STATIC_RW_LOCK_INIT { G_STATIC_MUTEX_INIT, NULL, NULL, 0, FALSE, 0, 0 } GLIB_DEPRECATED_MACRO_IN_2_32_FOR(g_rw_lock_init) GLIB_DEPRECATED_IN_2_32_FOR(g_rw_lock_init) void g_static_rw_lock_init (GStaticRWLock *lock); @@ -236,14 +232,14 @@ void g_static_rw_lock_free (GStaticRWLock *lock); GLIB_DEPRECATED_IN_2_32 GPrivate * g_private_new (GDestroyNotify notify); -typedef struct _GStaticPrivate GStaticPrivate; +typedef struct _GStaticPrivate GStaticPrivate GLIB_DEPRECATED_TYPE_IN_2_32_FOR(GPrivate); struct _GStaticPrivate { /*< private >*/ guint index; -}; +} GLIB_DEPRECATED_TYPE_IN_2_32_FOR(GPrivate); -#define G_STATIC_PRIVATE_INIT { 0 } +#define G_STATIC_PRIVATE_INIT { 0 } GLIB_DEPRECATED_MACRO_IN_2_32_FOR(G_PRIVATE_INIT) GLIB_DEPRECATED_IN_2_32 void g_static_private_init (GStaticPrivate *private_key); @@ -271,7 +267,7 @@ gboolean g_thread_get_initialized (void); GLIB_VAR gboolean g_threads_got_initialized; -#define g_thread_supported() (1) +#define g_thread_supported() (1) GLIB_DEPRECATED_MACRO_IN_2_32 GLIB_DEPRECATED_IN_2_32 GMutex * g_mutex_new (void); @@ -286,7 +282,7 @@ gboolean g_cond_timed_wait (GCond *cond, GMutex *mutex, GTimeVal *timeval); -#endif +G_GNUC_END_IGNORE_DEPRECATIONS G_END_DECLS diff --git a/glib/docs.c b/glib/docs.c index 5d09f433e..89b1d5253 100644 --- a/glib/docs.c +++ b/glib/docs.c @@ -1820,22 +1820,6 @@ */ /** - * G_CONST_RETURN: - * - * If %G_DISABLE_CONST_RETURNS is defined, this macro expands - * to nothing. By default, the macro expands to const. The macro - * can be used in place of const for functions that return a value - * that should not be modified. The purpose of this macro is to allow - * us to turn on const for returned constant strings by default, while - * allowing programmers who find that annoying to turn it off. This macro - * should only be used for return values and for "out" parameters, it - * doesn't make sense for "in" parameters. - * - * Deprecated: 2.30: API providers should replace all existing uses with - * const and API consumers should adjust their code accordingly - */ - -/** * G_N_ELEMENTS: * @arr: the array * @@ -2021,7 +2005,44 @@ * has any effect.) * * This macro can be used either inside or outside of a function body, - * but must appear on a line by itself. + * but must appear on a line by itself. Both this macro and the corresponding + * %G_GNUC_END_IGNORE_DEPRECATIONS are considered statements, so they + * should not be used around branching or loop conditions; for instance, + * this use is invalid: + * + * |[<!-- language="C" --> + * G_GNUC_BEGIN_IGNORE_DEPRECATIONS + * if (check == some_deprecated_function ()) + * G_GNUC_END_IGNORE_DEPRECATIONS + * { + * do_something (); + * } + * ]| + * + * and you should move the deprecated section outside the condition + * + * |[<!-- language="C" --> + * + * // Solution A + * some_data_t *res; + * + * G_GNUC_BEGIN_IGNORE_DEPRECATIONS + * res = some_deprecated_function (); + * G_GNUC_END_IGNORE_DEPRECATIONS + * + * if (check == res) + * { + * do_something (); + * } + * + * // Solution B + * G_GNUC_BEGIN_IGNORE_DEPRECATIONS + * if (check == some_deprecated_function ()) + * { + * do_something (); + * } + * G_GNUC_END_IGNORE_DEPRECATIONS + * ]| * * |[<!-- language="C" -- * static void @@ -2103,24 +2124,6 @@ */ /** - * G_GNUC_FUNCTION: - * - * Expands to "" on all modern compilers, and to __FUNCTION__ on gcc - * version 2.x. Don't use it. - * - * Deprecated: 2.16: Use G_STRFUNC() instead - */ - -/** - * G_GNUC_PRETTY_FUNCTION: - * - * Expands to "" on all modern compilers, and to __PRETTY_FUNCTION__ - * on gcc version 2.x. Don't use it. - * - * Deprecated: 2.16: Use G_STRFUNC() instead - */ - -/** * G_GNUC_INTERNAL: * * This attribute can be used for marking library functions as being used @@ -2212,6 +2215,8 @@ * * The variable is cleaned up in a way appropriate to its type when the * variable goes out of scope. The type must support this. + * The way to clean up the type must have been defined using one of the macros + * G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC() or G_DEFINE_AUTO_CLEANUP_FREE_FUNC(). * * This feature is only supported on GCC and clang. This macro is not * defined on other compilers and should not be used in programs that @@ -2266,6 +2271,8 @@ * * The variable is cleaned up in a way appropriate to its type when the * variable goes out of scope. The type must support this. + * The way to clean up the type must have been defined using the macro + * G_DEFINE_AUTOPTR_CLEANUP_FUNC(). * * This feature is only supported on GCC and clang. This macro is not * defined on other compilers and should not be used in programs that diff --git a/glib/garcbox.c b/glib/garcbox.c index 49b62ccb8..0fa207c3f 100644 --- a/glib/garcbox.c +++ b/glib/garcbox.c @@ -155,7 +155,7 @@ * G_DEFINE_AUTOPTR_CLEANUP_FUNC (MyDataStruct, my_data_struct_release) * ]| * - * Since: 2.58. + * Since: 2.58 */ /** @@ -250,7 +250,7 @@ g_atomic_rc_box_alloc0 (gsize block_size) * @block_size: the number of bytes to copy, must be greater than 0 * @mem_block: (not nullable): the memory to copy * - * Allocates a new block of data with atomit reference counting + * Allocates a new block of data with atomic reference counting * semantics, and copies @block_size bytes of @mem_block * into it. * diff --git a/glib/garray.c b/glib/garray.c index 84c816da6..569cff892 100644 --- a/glib/garray.c +++ b/glib/garray.c @@ -785,6 +785,89 @@ g_array_sort_with_data (GArray *farray, user_data); } +/** + * g_array_binary_search: + * @array: a #GArray. + * @target: a pointer to the item to look up. + * @compare_func: A #GCompareFunc used to locate @target. + * @out_match_index: (optional) (out caller-allocates): return location + * for the index of the element, if found. + * + * Checks whether @target exists in @array by performing a binary + * search based on the given comparison function @compare_func which + * get pointers to items as arguments. If the element is found, %TRUE + * is returned and the element’s index is returned in @out_match_index + * (if non-%NULL). Otherwise, %FALSE is returned and @out_match_index + * is undefined. If @target exists multiple times in @array, the index + * of the first instance is returned. This search is using a binary + * search, so the @array must absolutely be sorted to return a correct + * result (if not, the function may produce false-negative). + * + * This example defines a comparison function and search an element in a #GArray: + * |[<!-- language="C" --> + * static gint* + * cmpint (gconstpointer a, gconstpointer b) + * { + * const gint *_a = a; + * const gint *_b = b; + * + * return *_a - *_b; + * } + * ... + * gint i = 424242; + * guint matched_index; + * gboolean result = g_array_binary_search (garray, &i, cmpint, &matched_index); + * ... + * ]| + * + * Returns: %TRUE if @target is one of the elements of @array, %FALSE otherwise. + * + * Since: 2.62 + */ +gboolean +g_array_binary_search (GArray *array, + gconstpointer target, + GCompareFunc compare_func, + guint *out_match_index) +{ + gboolean result = FALSE; + GRealArray *_array = (GRealArray *) array; + guint left, middle, right; + gint val; + + g_return_val_if_fail (_array != NULL, FALSE); + g_return_val_if_fail (compare_func != NULL, FALSE); + + if (G_LIKELY(_array->len)) + { + left = 0; + right = _array->len - 1; + + while (left <= right) + { + middle = left + (right - left) / 2; + + val = compare_func (_array->data + (_array->elt_size * middle), target); + if (val == 0) + { + result = TRUE; + break; + } + else if (val < 0) + left = middle + 1; + else if (/* val > 0 && */ middle > 0) + right = middle - 1; + else + break; /* element not found */ + } + } + + if (result && out_match_index != NULL) + *out_match_index = middle; + + return result; +} + /* Returns the smallest power of 2 greater than n, or n if * such power does not fit in a guint */ @@ -923,6 +1006,59 @@ g_ptr_array_new (void) } /** + * g_ptr_array_copy: + * @array: #GPtrArray to duplicate + * @func: (nullable): a copy function used to copy every element in the array + * @user_data: user data passed to the copy function @func, or %NULL + * + * Makes a full (deep) copy of a #GPtrArray. + * + * @func, as a #GCopyFunc, takes two arguments, the data to be copied + * and a @user_data pointer. On common processor architectures, it's safe to + * pass %NULL as @user_data if the copy function takes only one argument. You + * may get compiler warnings from this though if compiling with GCC’s + * `-Wcast-function-type` warning. + * + * If @func is %NULL, then only the pointers (and not what they are + * pointing to) are copied to the new #GPtrArray. + * + * The copy of @array will have the same #GDestroyNotify for its elements as + * @array. + * + * Returns: (transfer full): a deep copy of the initial #GPtrArray. + * + * Since: 2.62 + **/ +GPtrArray * +g_ptr_array_copy (GPtrArray *array, + GCopyFunc func, + gpointer user_data) +{ + gsize i; + GPtrArray *new_array; + + g_return_val_if_fail (array != NULL, NULL); + + new_array = g_ptr_array_sized_new (array->len); + g_ptr_array_set_free_func (new_array, ((GRealPtrArray *) array)->element_free_func); + + if (func != NULL) + { + for (i = 0; i < array->len; i++) + new_array->pdata[i] = func (array->pdata[i], user_data); + } + else + { + memcpy (new_array->pdata, array->pdata, + array->len * sizeof (*array->pdata)); + } + + new_array->len = array->len; + + return new_array; +} + +/** * g_ptr_array_sized_new: * @reserved_size: number of pointers preallocated * @@ -954,6 +1090,34 @@ g_ptr_array_sized_new (guint reserved_size) } /** + * g_array_copy: + * @array: A #GArray. + * + * Create a shallow copy of a #GArray. If the array elements consist of + * pointers to data, the pointers are copied but the actual data is not. + * + * Returns: (transfer container): A copy of @array. + * + * Since: 2.62 + **/ +GArray * +g_array_copy (GArray *array) +{ + GRealArray *rarray = (GRealArray *) array; + GRealArray *new_rarray; + + g_return_val_if_fail (rarray != NULL, NULL); + + new_rarray = + (GRealArray *) g_array_sized_new (rarray->zero_terminated, rarray->clear, + rarray->elt_size, rarray->len); + new_rarray->len = rarray->len; + memcpy (new_rarray->data, rarray->data, rarray->alloc); + + return (GArray *) new_rarray; +} + +/** * g_ptr_array_new_with_free_func: * @element_free_func: (nullable): A function to free elements with * destroy @array or %NULL @@ -1493,6 +1657,89 @@ g_ptr_array_add (GPtrArray *array, } /** + * g_ptr_array_extend: + * @array_to_extend: a #GPtrArray. + * @array: (transfer none): a #GPtrArray to add to the end of @array_to_extend. + * @func: (nullable): a copy function used to copy every element in the array + * @user_data: user data passed to the copy function @func, or %NULL + * + * Adds all pointers of @array to the end of the array @array_to_extend. + * The array will grow in size automatically if needed. @array_to_extend is + * modified in-place. + * + * @func, as a #GCopyFunc, takes two arguments, the data to be copied + * and a @user_data pointer. On common processor architectures, it's safe to + * pass %NULL as @user_data if the copy function takes only one argument. You + * may get compiler warnings from this though if compiling with GCC’s + * `-Wcast-function-type` warning. + * + * If @func is %NULL, then only the pointers (and not what they are + * pointing to) are copied to the new #GPtrArray. + * + * Since: 2.62 + **/ +void +g_ptr_array_extend (GPtrArray *array_to_extend, + GPtrArray *array, + GCopyFunc func, + gpointer user_data) +{ + GRealPtrArray *rarray_to_extend = (GRealPtrArray *) array_to_extend; + gsize i; + + g_return_if_fail (array_to_extend != NULL); + g_return_if_fail (array != NULL); + + g_ptr_array_maybe_expand (rarray_to_extend, array->len); + + if (func != NULL) + { + for (i = 0; i < array->len; i++) + rarray_to_extend->pdata[i + rarray_to_extend->len] = + func (array->pdata[i], user_data); + } + else + { + memcpy (rarray_to_extend->pdata + rarray_to_extend->len, array->pdata, + array->len * sizeof (*array->pdata)); + } + + rarray_to_extend->len += array->len; +} + +/** + * g_ptr_array_extend_and_steal: + * @array_to_extend: (transfer none): a #GPtrArray. + * @array: (transfer container): a #GPtrArray to add to the end of + * @array_to_extend. + * + * Adds all the pointers in @array to the end of @array_to_extend, transferring + * ownership of each element from @array to @array_to_extend and modifying + * @array_to_extend in-place. @array is then freed. + * + * As with g_ptr_array_free(), @array will be destroyed if its reference count + * is 1. If its reference count is higher, it will be decremented and the + * length of @array set to zero. + * + * Since: 2.62 + **/ +void +g_ptr_array_extend_and_steal (GPtrArray *array_to_extend, + GPtrArray *array) +{ + gpointer *pdata; + + g_ptr_array_extend (array_to_extend, array, NULL, NULL); + + /* Get rid of @array without triggering the GDestroyNotify attached + * to the elements moved from @array to @array_to_extend. */ + pdata = g_steal_pointer (&array->pdata); + array->len = 0; + g_ptr_array_unref (array); + g_free (pdata); +} + +/** * g_ptr_array_insert: * @array: a #GPtrArray * @index_: the index to place the new element at, or -1 to append diff --git a/glib/garray.h b/glib/garray.h index 6c8c2c363..3e7ce7732 100644 --- a/glib/garray.h +++ b/glib/garray.h @@ -75,6 +75,8 @@ GArray* g_array_sized_new (gboolean zero_terminated, gboolean clear_, guint element_size, guint reserved_size); +GLIB_AVAILABLE_IN_2_62 +GArray* g_array_copy (GArray *array); GLIB_AVAILABLE_IN_ALL gchar* g_array_free (GArray *array, gboolean free_segment); @@ -117,6 +119,11 @@ GLIB_AVAILABLE_IN_ALL void g_array_sort_with_data (GArray *array, GCompareDataFunc compare_func, gpointer user_data); +GLIB_AVAILABLE_IN_2_62 +gboolean g_array_binary_search (GArray *array, + gconstpointer target, + GCompareFunc compare_func, + guint *out_match_index); GLIB_AVAILABLE_IN_ALL void g_array_set_clear_func (GArray *array, GDestroyNotify clear_func); @@ -130,6 +137,10 @@ GLIB_AVAILABLE_IN_ALL GPtrArray* g_ptr_array_new (void); GLIB_AVAILABLE_IN_ALL GPtrArray* g_ptr_array_new_with_free_func (GDestroyNotify element_free_func); +GLIB_AVAILABLE_IN_2_62 +GPtrArray *g_ptr_array_copy (GPtrArray *array, + GCopyFunc func, + gpointer user_data); GLIB_AVAILABLE_IN_ALL GPtrArray* g_ptr_array_sized_new (guint reserved_size); GLIB_AVAILABLE_IN_ALL @@ -173,6 +184,14 @@ GPtrArray *g_ptr_array_remove_range (GPtrArray *array, GLIB_AVAILABLE_IN_ALL void g_ptr_array_add (GPtrArray *array, gpointer data); +GLIB_AVAILABLE_IN_2_62 +void g_ptr_array_extend (GPtrArray *array_to_extend, + GPtrArray *array, + GCopyFunc func, + gpointer user_data); +GLIB_AVAILABLE_IN_2_62 +void g_ptr_array_extend_and_steal (GPtrArray *array_to_extend, + GPtrArray *array); GLIB_AVAILABLE_IN_2_40 void g_ptr_array_insert (GPtrArray *array, gint index_, diff --git a/glib/gasyncqueue.c b/glib/gasyncqueue.c index 3eb38393d..5719a5461 100644 --- a/glib/gasyncqueue.c +++ b/glib/gasyncqueue.c @@ -584,7 +584,7 @@ g_async_queue_timeout_pop_unlocked (GAsyncQueue *queue, * * If no data is received before @end_time, %NULL is returned. * - * To easily calculate @end_time, a combination of g_get_current_time() + * To easily calculate @end_time, a combination of g_get_real_time() * and g_time_val_add() can be used. * * Returns: data from the queue or %NULL, when no data is @@ -592,6 +592,7 @@ g_async_queue_timeout_pop_unlocked (GAsyncQueue *queue, * * Deprecated: use g_async_queue_timeout_pop(). */ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS gpointer g_async_queue_timed_pop (GAsyncQueue *queue, GTimeVal *end_time) @@ -615,6 +616,7 @@ g_async_queue_timed_pop (GAsyncQueue *queue, return retval; } +G_GNUC_END_IGNORE_DEPRECATIONS /** * g_async_queue_timed_pop_unlocked: @@ -626,7 +628,7 @@ g_async_queue_timed_pop (GAsyncQueue *queue, * * If no data is received before @end_time, %NULL is returned. * - * To easily calculate @end_time, a combination of g_get_current_time() + * To easily calculate @end_time, a combination of g_get_real_time() * and g_time_val_add() can be used. * * This function must be called while holding the @queue's lock. @@ -636,6 +638,7 @@ g_async_queue_timed_pop (GAsyncQueue *queue, * * Deprecated: use g_async_queue_timeout_pop_unlocked(). */ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS gpointer g_async_queue_timed_pop_unlocked (GAsyncQueue *queue, GTimeVal *end_time) @@ -654,6 +657,7 @@ g_async_queue_timed_pop_unlocked (GAsyncQueue *queue, return g_async_queue_pop_intern_unlocked (queue, TRUE, m_end_time); } +G_GNUC_END_IGNORE_DEPRECATIONS /** * g_async_queue_length: diff --git a/glib/gasyncqueue.h b/glib/gasyncqueue.h index 05980a777..73e537b07 100644 --- a/glib/gasyncqueue.h +++ b/glib/gasyncqueue.h @@ -110,12 +110,14 @@ GLIB_AVAILABLE_IN_2_46 void g_async_queue_push_front_unlocked (GAsyncQueue *queue, gpointer item); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS GLIB_DEPRECATED_FOR(g_async_queue_timeout_pop) gpointer g_async_queue_timed_pop (GAsyncQueue *queue, GTimeVal *end_time); GLIB_DEPRECATED_FOR(g_async_queue_timeout_pop_unlocked) gpointer g_async_queue_timed_pop_unlocked (GAsyncQueue *queue, GTimeVal *end_time); +G_GNUC_END_IGNORE_DEPRECATIONS G_END_DECLS diff --git a/glib/gbookmarkfile.c b/glib/gbookmarkfile.c index 60d228728..88808e72b 100644 --- a/glib/gbookmarkfile.c +++ b/glib/gbookmarkfile.c @@ -245,8 +245,10 @@ static void g_bookmark_file_add_item (GBookmarkFile *bookmark, BookmarkItem *item, GError **error); -static time_t timestamp_from_iso8601 (const gchar *iso_date); -static gchar * timestamp_to_iso8601 (time_t timestamp); +static gboolean timestamp_from_iso8601 (const gchar *iso_date, + time_t *out_timestamp, + GError **error); +static gchar *timestamp_to_iso8601 (time_t timestamp); /******************************** * BookmarkAppInfo * @@ -772,14 +774,14 @@ parse_bookmark_element (GMarkupParseContext *context, item = bookmark_item_new (uri); - if (added) - item->added = timestamp_from_iso8601 (added); + if (added != NULL && !timestamp_from_iso8601 (added, &item->added, error)) + return; - if (modified) - item->modified = timestamp_from_iso8601 (modified); + if (modified != NULL && !timestamp_from_iso8601 (modified, &item->modified, error)) + return; - if (visited) - item->visited = timestamp_from_iso8601 (visited); + if (visited != NULL && !timestamp_from_iso8601 (visited, &item->visited, error)) + return; add_error = NULL; g_bookmark_file_add_item (parse_data->bookmark_file, @@ -872,8 +874,11 @@ parse_application_element (GMarkupParseContext *context, else ai->count = 1; - if (modified) - ai->stamp = timestamp_from_iso8601 (modified); + if (modified != NULL) + { + if (!timestamp_from_iso8601 (modified, &ai->stamp, error)) + return; + } else { /* the timestamp attribute has been deprecated but we still parse @@ -1591,28 +1596,32 @@ out: static gchar * timestamp_to_iso8601 (time_t timestamp) { - GTimeVal stamp; - - if (timestamp == (time_t) -1) - g_get_current_time (&stamp); - else - { - stamp.tv_sec = timestamp; - stamp.tv_usec = 0; - } + GDateTime *dt = g_date_time_new_from_unix_utc (timestamp); + gchar *iso8601_string = g_date_time_format_iso8601 (dt); + g_date_time_unref (dt); - return g_time_val_to_iso8601 (&stamp); + return g_steal_pointer (&iso8601_string); } -static time_t -timestamp_from_iso8601 (const gchar *iso_date) +static gboolean +timestamp_from_iso8601 (const gchar *iso_date, + time_t *out_timestamp, + GError **error) { - GTimeVal stamp; + gint64 time_val; + GDateTime *dt = g_date_time_new_from_iso8601 (iso_date, NULL); + if (dt == NULL) + { + g_set_error (error, G_BOOKMARK_FILE_ERROR, G_BOOKMARK_FILE_ERROR_READ, + _("Invalid date/time ‘%s’ in bookmark file"), iso_date); + return FALSE; + } - if (!g_time_val_from_iso8601 (iso_date, &stamp)) - return (time_t) -1; + time_val = g_date_time_to_unix (dt); + g_date_time_unref (dt); - return (time_t) stamp.tv_sec; + *out_timestamp = time_val; + return TRUE; } G_DEFINE_QUARK (g-bookmark-file-error-quark, g_bookmark_file_error) diff --git a/glib/gcharset.c b/glib/gcharset.c index 8f4f03946..7bce2a15a 100644 --- a/glib/gcharset.c +++ b/glib/gcharset.c @@ -36,6 +36,10 @@ #include <string.h> #include <stdio.h> +#ifdef G_OS_WIN32 +#define WIN32_LEAN_AND_MEAN +#include <windows.h> +#endif G_LOCK_DEFINE_STATIC (aliases); @@ -194,7 +198,7 @@ g_get_charset (const char **charset) raw = _g_locale_charset_raw (); G_UNLOCK (aliases); - if (!(cache->raw && strcmp (cache->raw, raw) == 0)) + if (cache->raw == NULL || strcmp (cache->raw, raw) != 0) { const gchar *new_charset; @@ -229,6 +233,113 @@ g_get_codeset (void) return g_strdup (charset); } +/** + * g_get_console_charset: + * @charset: (out) (optional) (transfer none): return location for character set + * name, or %NULL. + * + * Obtains the character set used by the console attached to the process, + * which is suitable for printing output to the terminal. + * + * Usually this matches the result returned by g_get_charset(), but in + * environments where the locale's character set does not match the encoding + * of the console this function tries to guess a more suitable value instead. + * + * On Windows the character set returned by this function is the + * output code page used by the console associated with the calling process. + * If the codepage can't be determined (for example because there is no + * console attached) UTF-8 is assumed. + * + * The return value is %TRUE if the locale's encoding is UTF-8, in that + * case you can perhaps avoid calling g_convert(). + * + * The string returned in @charset is not allocated, and should not be + * freed. + * + * Returns: %TRUE if the returned charset is UTF-8 + * + * Since: 2.62 + */ +gboolean +g_get_console_charset (const char **charset) +{ +#ifdef G_OS_WIN32 + static GPrivate cache_private = G_PRIVATE_INIT (charset_cache_free); + GCharsetCache *cache = g_private_get (&cache_private); + const gchar *locale; + unsigned int cp; + char buf[2 + 20 + 1]; /* "CP" + G_MAXUINT64 (to be safe) in decimal form (20 bytes) + "\0" */ + const gchar *raw = NULL; + + if (!cache) + cache = g_private_set_alloc0 (&cache_private, sizeof (GCharsetCache)); + + /* first try to query $LANG (works for Cygwin/MSYS/MSYS2 and others using mintty) */ + locale = g_getenv ("LANG"); + if (locale != NULL && locale[0] != '\0') + { + /* If the locale name contains an encoding after the dot, return it. */ + const char *dot = strchr (locale, '.'); + + if (dot != NULL) + { + const char *modifier; + + dot++; + /* Look for the possible @... trailer and remove it, if any. */ + modifier = strchr (dot, '@'); + if (modifier == NULL) + raw = dot; + else if (modifier - dot < sizeof (buf)) + { + memcpy (buf, dot, modifier - dot); + buf[modifier - dot] = '\0'; + raw = buf; + } + } + } + /* next try querying console codepage using native win32 API */ + if (raw == NULL) + { + cp = GetConsoleOutputCP (); + if (cp) + { + sprintf (buf, "CP%u", cp); + raw = buf; + } + else if (GetLastError () != ERROR_INVALID_HANDLE) + { + gchar *emsg = g_win32_error_message (GetLastError ()); + g_warning ("Failed to determine console output code page: %s. " + "Falling back to UTF-8", emsg); + g_free (emsg); + } + } + /* fall-back to UTF-8 if the rest failed (it's a sane and universal default) */ + if (raw == NULL) + raw = "UTF-8"; + + if (cache->raw == NULL || strcmp (cache->raw, raw) != 0) + { + const gchar *new_charset; + + g_free (cache->raw); + g_free (cache->charset); + cache->raw = g_strdup (raw); + cache->is_utf8 = g_utf8_get_charset_internal (raw, &new_charset); + cache->charset = g_strdup (new_charset); + } + + if (charset) + *charset = cache->charset; + + return cache->is_utf8; +#else + /* assume the locale settings match the console encoding on non-Windows OSs */ + return g_get_charset (charset); +#endif +} + #ifndef G_OS_WIN32 /* read an alias file for the locales */ diff --git a/glib/gcharset.h b/glib/gcharset.h index bb20f5d43..82020f604 100644 --- a/glib/gcharset.h +++ b/glib/gcharset.h @@ -31,6 +31,8 @@ GLIB_AVAILABLE_IN_ALL gboolean g_get_charset (const char **charset); GLIB_AVAILABLE_IN_ALL gchar * g_get_codeset (void); +GLIB_AVAILABLE_IN_2_62 +gboolean g_get_console_charset (const char **charset); GLIB_AVAILABLE_IN_ALL const gchar * const * g_get_language_names (void); diff --git a/glib/gdate.c b/glib/gdate.c index b33168018..26b3f598e 100644 --- a/glib/gdate.c +++ b/glib/gdate.c @@ -118,11 +118,13 @@ * Similar to the struct timeval returned by the gettimeofday() * UNIX system call. * - * GLib is attempting to unify around the use of 64bit integers to + * GLib is attempting to unify around the use of 64-bit integers to * represent microsecond-precision time. As such, this type will be * removed from a future version of GLib. A consequence of using `glong` for * `tv_sec` is that on 32-bit systems `GTimeVal` is subject to the year 2038 * problem. + * + * Deprecated: 2.62: Use #GDateTime or #guint64 instead. */ /** @@ -152,12 +154,12 @@ /** * GTime: * - * Simply a replacement for time_t. It has been deprecated - * since it is not equivalent to time_t on 64-bit platforms - * with a 64-bit time_t. Unrelated to #GTimer. + * Simply a replacement for `time_t`. It has been deprecated + * since it is not equivalent to `time_t` on 64-bit platforms + * with a 64-bit `time_t`. Unrelated to #GTimer. * * Note that #GTime is defined to always be a 32-bit integer, - * unlike time_t which may be 64-bit on some systems. Therefore, + * unlike `time_t` which may be 64-bit on some systems. Therefore, * #GTime will overflow in the year 2038, and you cannot use the * address of a #GTime variable as argument to the UNIX time() * function. @@ -170,6 +172,9 @@ * time (&ttime); * gtime = (GTime)ttime; * ]| + * + * Deprecated: 2.62: This is not [Y2038-safe](https://en.wikipedia.org/wiki/Year_2038_problem). + * Use #GDateTime or #time_t instead. */ /** @@ -1444,12 +1449,14 @@ g_date_set_time_t (GDate *date, * * Deprecated: 2.10: Use g_date_set_time_t() instead. */ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS void g_date_set_time (GDate *date, GTime time_) { g_date_set_time_t (date, (time_t) time_); } +G_GNUC_END_IGNORE_DEPRECATIONS /** * g_date_set_time_val: @@ -1463,13 +1470,17 @@ g_date_set_time (GDate *date, * The time to date conversion is done using the user's current timezone. * * Since: 2.10 + * Deprecated: 2.62: #GTimeVal is not year-2038-safe. Use g_date_set_time_t() + * instead. */ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS void g_date_set_time_val (GDate *date, GTimeVal *timeval) { g_date_set_time_t (date, (time_t) timeval->tv_sec); } +G_GNUC_END_IGNORE_DEPRECATIONS /** * g_date_set_month: diff --git a/glib/gdate.h b/glib/gdate.h index 63feb3535..3bc07bf5c 100644 --- a/glib/gdate.h +++ b/glib/gdate.h @@ -45,7 +45,7 @@ G_BEGIN_DECLS * Pennington <hp@pobox.com> */ -typedef gint32 GTime; +typedef gint32 GTime GLIB_DEPRECATED_TYPE_IN_2_62_FOR(GDateTime); typedef guint16 GDateYear; typedef guint8 GDateDay; /* day of the month */ typedef struct _GDate GDate; @@ -195,14 +195,14 @@ void g_date_set_parse (GDate *date, GLIB_AVAILABLE_IN_ALL void g_date_set_time_t (GDate *date, time_t timet); -GLIB_AVAILABLE_IN_ALL +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +GLIB_DEPRECATED_IN_2_62_FOR(g_date_set_time_t) void g_date_set_time_val (GDate *date, GTimeVal *timeval); -#ifndef G_DISABLE_DEPRECATED GLIB_DEPRECATED_FOR(g_date_set_time_t) void g_date_set_time (GDate *date, GTime time_); -#endif +G_GNUC_END_IGNORE_DEPRECATIONS GLIB_AVAILABLE_IN_ALL void g_date_set_month (GDate *date, GDateMonth month); @@ -290,21 +290,17 @@ gsize g_date_strftime (gchar *s, const gchar *format, const GDate *date); -#ifndef G_DISABLE_DEPRECATED - -#define g_date_weekday g_date_get_weekday -#define g_date_month g_date_get_month -#define g_date_year g_date_get_year -#define g_date_day g_date_get_day -#define g_date_julian g_date_get_julian -#define g_date_day_of_year g_date_get_day_of_year -#define g_date_monday_week_of_year g_date_get_monday_week_of_year -#define g_date_sunday_week_of_year g_date_get_sunday_week_of_year -#define g_date_days_in_month g_date_get_days_in_month -#define g_date_monday_weeks_in_year g_date_get_monday_weeks_in_year -#define g_date_sunday_weeks_in_year g_date_get_sunday_weeks_in_year - -#endif /* G_DISABLE_DEPRECATED */ +#define g_date_weekday g_date_get_weekday GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_weekday) +#define g_date_month g_date_get_month GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_month) +#define g_date_year g_date_get_year GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_year) +#define g_date_day g_date_get_day GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_day) +#define g_date_julian g_date_get_julian GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_julian) +#define g_date_day_of_year g_date_get_day_of_year GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_day_of_year) +#define g_date_monday_week_of_year g_date_get_monday_week_of_year GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_monday_week_of_year) +#define g_date_sunday_week_of_year g_date_get_sunday_week_of_year GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_sunday_week_of_year) +#define g_date_days_in_month g_date_get_days_in_month GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_days_in_month) +#define g_date_monday_weeks_in_year g_date_get_monday_weeks_in_year GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_monday_weeks_in_year) +#define g_date_sunday_weeks_in_year g_date_get_sunday_weeks_in_year GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_date_get_sunday_weeks_in_year) G_END_DECLS diff --git a/glib/gdatetime.c b/glib/gdatetime.c index c286954c4..58874ad2a 100644 --- a/glib/gdatetime.c +++ b/glib/gdatetime.c @@ -134,10 +134,16 @@ struct _GDateTime #define UNIX_EPOCH_START 719163 #define INSTANT_TO_UNIX(instant) \ ((instant)/USEC_PER_SECOND - UNIX_EPOCH_START * SEC_PER_DAY) +#define INSTANT_TO_UNIX_USECS(instant) \ + ((instant) - UNIX_EPOCH_START * SEC_PER_DAY * USEC_PER_SECOND) #define UNIX_TO_INSTANT(unix) \ (((gint64) (unix) + UNIX_EPOCH_START * SEC_PER_DAY) * USEC_PER_SECOND) +#define UNIX_USECS_TO_INSTANT(unix_usecs) \ + ((gint64) (unix_usecs) + UNIX_EPOCH_START * SEC_PER_DAY * USEC_PER_SECOND) #define UNIX_TO_INSTANT_IS_VALID(unix) \ ((gint64) (unix) <= INSTANT_TO_UNIX (G_MAXINT64)) +#define UNIX_USECS_TO_INSTANT_IS_VALID(unix_usecs) \ + ((gint64) (unix_usecs) <= INSTANT_TO_UNIX_USECS (G_MAXINT64)) #define DAYS_IN_4YEARS 1461 /* days in 4 years */ #define DAYS_IN_100YEARS 36524 /* days in 100 years */ @@ -854,6 +860,7 @@ g_date_time_replace_days (GDateTime *datetime, /* now/unix/timeval Constructors {{{1 */ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS /*< internal > * g_date_time_new_from_timeval: * @tz: a #GTimeZone @@ -887,13 +894,14 @@ g_date_time_new_from_timeval (GTimeZone *tz, return g_date_time_from_instant (tz, tv->tv_usec + UNIX_TO_INSTANT (tv->tv_sec)); } +G_GNUC_END_IGNORE_DEPRECATIONS /*< internal > * g_date_time_new_from_unix: * @tz: a #GTimeZone - * @t: the Unix time + * @usecs: the Unix time, in microseconds since the epoch * - * Creates a #GDateTime corresponding to the given Unix time @t in the + * Creates a #GDateTime corresponding to the given Unix time @t_us in the * given time zone @tz. * * Unix time is the number of seconds that have elapsed since 1970-01-01 @@ -911,12 +919,12 @@ g_date_time_new_from_timeval (GTimeZone *tz, **/ static GDateTime * g_date_time_new_from_unix (GTimeZone *tz, - gint64 secs) + gint64 usecs) { - if (!UNIX_TO_INSTANT_IS_VALID (secs)) + if (!UNIX_USECS_TO_INSTANT_IS_VALID (usecs)) return NULL; - return g_date_time_from_instant (tz, UNIX_TO_INSTANT (secs)); + return g_date_time_from_instant (tz, UNIX_USECS_TO_INSTANT (usecs)); } /** @@ -941,11 +949,11 @@ g_date_time_new_from_unix (GTimeZone *tz, GDateTime * g_date_time_new_now (GTimeZone *tz) { - GTimeVal tv; + gint64 now_us; - g_get_current_time (&tv); + now_us = g_get_real_time (); - return g_date_time_new_from_timeval (tz, &tv); + return g_date_time_new_from_unix (tz, now_us); } /** @@ -1025,8 +1033,11 @@ g_date_time_new_from_unix_local (gint64 t) GDateTime *datetime; GTimeZone *local; + if (t > G_MAXINT64 / USEC_PER_SECOND) + return NULL; + local = g_time_zone_new_local (); - datetime = g_date_time_new_from_unix (local, t); + datetime = g_date_time_new_from_unix (local, t * USEC_PER_SECOND); g_time_zone_unref (local); return datetime; @@ -1057,8 +1068,11 @@ g_date_time_new_from_unix_utc (gint64 t) GDateTime *datetime; GTimeZone *utc; + if (t > G_MAXINT64 / USEC_PER_SECOND) + return NULL; + utc = g_time_zone_new_utc (); - datetime = g_date_time_new_from_unix (utc, t); + datetime = g_date_time_new_from_unix (utc, t * USEC_PER_SECOND); g_time_zone_unref (utc); return datetime; @@ -1084,7 +1098,10 @@ g_date_time_new_from_unix_utc (gint64 t) * Returns: a new #GDateTime, or %NULL * * Since: 2.26 + * Deprecated: 2.62: #GTimeVal is not year-2038-safe. Use + * g_date_time_new_from_unix_local() instead. **/ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS GDateTime * g_date_time_new_from_timeval_local (const GTimeVal *tv) { @@ -1097,6 +1114,7 @@ g_date_time_new_from_timeval_local (const GTimeVal *tv) return datetime; } +G_GNUC_END_IGNORE_DEPRECATIONS /** * g_date_time_new_from_timeval_utc: @@ -1116,7 +1134,10 @@ g_date_time_new_from_timeval_local (const GTimeVal *tv) * Returns: a new #GDateTime, or %NULL * * Since: 2.26 + * Deprecated: 2.62: #GTimeVal is not year-2038-safe. Use + * g_date_time_new_from_unix_utc() instead. **/ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS GDateTime * g_date_time_new_from_timeval_utc (const GTimeVal *tv) { @@ -1129,6 +1150,7 @@ g_date_time_new_from_timeval_utc (const GTimeVal *tv) return datetime; } +G_GNUC_END_IGNORE_DEPRECATIONS /* Parse integers in the form d (week days), dd (hours etc), ddd (ordinal days) or dddd (years) */ static gboolean @@ -2533,7 +2555,10 @@ g_date_time_to_unix (GDateTime *datetime) * Returns: %TRUE if successful, else %FALSE * * Since: 2.26 + * Deprecated: 2.62: #GTimeVal is not year-2038-safe. Use + * g_date_time_to_unix() instead. **/ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS gboolean g_date_time_to_timeval (GDateTime *datetime, GTimeVal *tv) @@ -2543,6 +2568,7 @@ g_date_time_to_timeval (GDateTime *datetime, return TRUE; } +G_GNUC_END_IGNORE_DEPRECATIONS /* Timezone queries {{{1 */ /** @@ -3393,6 +3419,49 @@ g_date_time_format (GDateTime *datetime, return g_string_free (outstr, FALSE); } +/** + * g_date_time_format_iso8601: + * @datetime: A #GDateTime + * + * Format @datetime in [ISO 8601 format](https://en.wikipedia.org/wiki/ISO_8601), + * including the date, time and time zone, and return that as a UTF-8 encoded + * string. + * + * Returns: a newly allocated string formatted in ISO 8601 format + * or %NULL in the case that there was an error. The string + * should be freed with g_free(). + * Since: 2.62 + */ +gchar * +g_date_time_format_iso8601 (GDateTime *datetime) +{ + GString *outstr = NULL; + gchar *main_date = NULL; + gint64 offset; + + /* Main date and time. */ + main_date = g_date_time_format (datetime, "%Y-%m-%dT%H:%M:%S"); + outstr = g_string_new (main_date); + g_free (main_date); + + /* Timezone. Format it as `%:::z` unless the offset is zero, in which case + * we can simply use `Z`. */ + offset = g_date_time_get_utc_offset (datetime); + + if (offset == 0) + { + g_string_append_c (outstr, 'Z'); + } + else + { + gchar *time_zone = g_date_time_format (datetime, "%:::z"); + g_string_append (outstr, time_zone); + g_free (time_zone); + } + + return g_string_free (outstr, FALSE); +} + /* Epilogue {{{1 */ /* vim:set foldmethod=marker: */ diff --git a/glib/gdatetime.h b/glib/gdatetime.h index 65f9965ac..fa43d8531 100644 --- a/glib/gdatetime.h +++ b/glib/gdatetime.h @@ -113,10 +113,12 @@ GDateTime * g_date_time_new_from_unix_local (gint64 GLIB_AVAILABLE_IN_ALL GDateTime * g_date_time_new_from_unix_utc (gint64 t); -GLIB_AVAILABLE_IN_ALL +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +GLIB_DEPRECATED_IN_2_62_FOR(g_date_time_new_from_unix_local) GDateTime * g_date_time_new_from_timeval_local (const GTimeVal *tv); -GLIB_AVAILABLE_IN_ALL +GLIB_DEPRECATED_IN_2_62_FOR(g_date_time_new_from_unix_utc) GDateTime * g_date_time_new_from_timeval_utc (const GTimeVal *tv); +G_GNUC_END_IGNORE_DEPRECATIONS GLIB_AVAILABLE_IN_2_56 GDateTime * g_date_time_new_from_iso8601 (const gchar *text, @@ -238,9 +240,11 @@ gdouble g_date_time_get_seconds (GDateTi GLIB_AVAILABLE_IN_ALL gint64 g_date_time_to_unix (GDateTime *datetime); -GLIB_AVAILABLE_IN_ALL +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +GLIB_DEPRECATED_IN_2_62_FOR(g_date_time_to_unix) gboolean g_date_time_to_timeval (GDateTime *datetime, GTimeVal *tv); +G_GNUC_END_IGNORE_DEPRECATIONS GLIB_AVAILABLE_IN_ALL GTimeSpan g_date_time_get_utc_offset (GDateTime *datetime); @@ -262,6 +266,8 @@ GDateTime * g_date_time_to_utc (GDateTi GLIB_AVAILABLE_IN_ALL gchar * g_date_time_format (GDateTime *datetime, const gchar *format) G_GNUC_MALLOC; +GLIB_AVAILABLE_IN_2_62 +gchar * g_date_time_format_iso8601 (GDateTime *datetime) G_GNUC_MALLOC; G_END_DECLS diff --git a/glib/gfileutils.c b/glib/gfileutils.c index 676c08c21..275647509 100644 --- a/glib/gfileutils.c +++ b/glib/gfileutils.c @@ -226,6 +226,20 @@ g_mkdir_with_parents (const gchar *pathname, return -1; } + /* try to create the full path first */ + if (g_mkdir (pathname, mode) == 0) + return 0; + else if (errno == EEXIST) + { + if (!g_file_test (pathname, G_FILE_TEST_IS_DIR)) + { + errno = ENOTDIR; + return -1; + } + return 0; + } + + /* walk the full path and try creating each element */ fn = g_strdup (pathname); if (g_path_is_absolute (fn)) @@ -248,9 +262,12 @@ g_mkdir_with_parents (const gchar *pathname, if (g_mkdir (fn, mode) == -1 && errno != EEXIST) { int errno_save = errno; - g_free (fn); - errno = errno_save; - return -1; + if (p && errno != ENOENT) + { + g_free (fn); + errno = errno_save; + return -1; + } } } else if (!g_file_test (fn, G_FILE_TEST_IS_DIR)) @@ -1301,7 +1318,7 @@ get_tmp_file (gchar *tmpl, "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; static const int NLETTERS = sizeof (letters) - 1; glong value; - GTimeVal tv; + gint64 now_us; static int counter = 0; g_return_val_if_fail (tmpl != NULL, -1); @@ -1316,8 +1333,8 @@ get_tmp_file (gchar *tmpl, } /* Get some more or less random data. */ - g_get_current_time (&tv); - value = (tv.tv_usec ^ tv.tv_sec) + counter++; + now_us = g_get_real_time (); + value = ((now_us % G_USEC_PER_SEC) ^ (now_us / G_USEC_PER_SEC)) + counter++; for (count = 0; count < 100; value += 7777, ++count) { diff --git a/glib/gfileutils.h b/glib/gfileutils.h index bcaaa40ff..f60fad858 100644 --- a/glib/gfileutils.h +++ b/glib/gfileutils.h @@ -161,9 +161,7 @@ const gchar *g_path_skip_root (const gchar *file_name); GLIB_DEPRECATED_FOR(g_path_get_basename) const gchar *g_basename (const gchar *file_name); -#ifndef G_DISABLE_DEPRECATED -#define g_dirname g_path_get_dirname -#endif +#define g_dirname g_path_get_dirname GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_path_get_dirname) GLIB_AVAILABLE_IN_ALL gchar *g_get_current_dir (void); diff --git a/glib/ghash.h b/glib/ghash.h index 0256d5411..e9ce64505 100644 --- a/glib/ghash.h +++ b/glib/ghash.h @@ -148,10 +148,8 @@ GHashTable* g_hash_table_ref (GHashTable *hash_table); GLIB_AVAILABLE_IN_ALL void g_hash_table_unref (GHashTable *hash_table); -#ifndef G_DISABLE_DEPRECATED -#define g_hash_table_freeze(hash_table) ((void)0) -#define g_hash_table_thaw(hash_table) ((void)0) -#endif +#define g_hash_table_freeze(hash_table) ((void)0) GLIB_DEPRECATED_MACRO_IN_2_26 +#define g_hash_table_thaw(hash_table) ((void)0) GLIB_DEPRECATED_MACRO_IN_2_26 /* Hash Functions */ diff --git a/glib/glib-private.h b/glib/glib-private.h index d0099236f..8b7ab132e 100644 --- a/glib/glib-private.h +++ b/glib/glib-private.h @@ -84,4 +84,25 @@ typedef struct { GLIB_AVAILABLE_IN_ALL GLibPrivateVTable *glib__private__ (void); +/* Please see following for the use of ".ACP" over "" + * on Windows, although both are accepted at compile-time + * but "" renders translated console messages unreadable if + * built with Visual Studio 2012 and later (this is, unfortunately, + * undocumented): + * + * https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/setlocale-wsetlocale + * https://gitlab.gnome.org/GNOME/glib/merge_requests/895#note_525881 + * https://gitlab.gnome.org/GNOME/glib/merge_requests/895#note_525900 + * + * Additional related items: + * https://stackoverflow.com/questions/22604329/php-5-5-setlocale-not-working-in-cli-on-windows + * https://bugs.php.net/bug.php?id=66265 + */ + +#ifdef G_OS_WIN32 +# define GLIB_DEFAULT_LOCALE ".ACP" +#else +# define GLIB_DEFAULT_LOCALE "" +#endif + #endif /* __GLIB_PRIVATE_H__ */ diff --git a/glib/glib.h b/glib/glib.h index 94a11fb62..5c21b6bf6 100644 --- a/glib/glib.h +++ b/glib/glib.h @@ -102,14 +102,12 @@ #include <glib/gwin32.h> #endif -#ifndef G_DISABLE_DEPRECATED #include <glib/deprecated/gallocator.h> #include <glib/deprecated/gcache.h> #include <glib/deprecated/gcompletion.h> #include <glib/deprecated/gmain.h> #include <glib/deprecated/grel.h> #include <glib/deprecated/gthread.h> -#endif /* G_DISABLE_DEPRECATED */ #include <glib/glib-autocleanups.h> diff --git a/glib/glibconfig.h.in b/glib/glibconfig.h.in index 2bf6c43c1..7ef8c481d 100644 --- a/glib/glibconfig.h.in +++ b/glib/glibconfig.h.in @@ -108,11 +108,6 @@ typedef unsigned @glib_intptr_type_define@ guintptr; #define G_GINTPTR_FORMAT @gintptr_format@ #define G_GUINTPTR_FORMAT @guintptr_format@ -#ifndef G_DISABLE_DEPRECATED -#define g_ATEXIT(proc) (atexit (proc)) -#define g_memmove(dest,src,len) G_STMT_START { memmove ((dest), (src), (len)); } G_STMT_END -#endif - #define GLIB_MAJOR_VERSION @GLIB_MAJOR_VERSION@ #define GLIB_MINOR_VERSION @GLIB_MINOR_VERSION@ #define GLIB_MICRO_VERSION @GLIB_MICRO_VERSION@ diff --git a/glib/gmacros.h b/glib/gmacros.h index db5f0b087..79077e23b 100644 --- a/glib/gmacros.h +++ b/glib/gmacros.h @@ -96,17 +96,15 @@ * Deprecated: 2.48: Use "static inline" instead */ -#ifndef G_DISABLE_DEPRECATED /* For historical reasons we need to continue to support those who * define G_IMPLEMENT_INLINES to mean "don't implement this here". */ #ifdef G_IMPLEMENT_INLINES -# define G_INLINE_FUNC extern +# define G_INLINE_FUNC extern GLIB_DEPRECATED_MACRO_IN_2_48_FOR(static inline) # undef G_CAN_INLINE #else -# define G_INLINE_FUNC static inline +# define G_INLINE_FUNC static inline GLIB_DEPRECATED_MACRO_IN_2_48_FOR(static inline) #endif /* G_IMPLEMENT_INLINES */ -#endif /* !G_DISABLE_DEPRECATED */ /* Provide macros to feature the GCC function attribute. */ @@ -583,7 +581,7 @@ * * Since: 2.2 */ -#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) +#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) || defined (__clang__) #define G_GNUC_DEPRECATED __attribute__((__deprecated__)) #else #define G_GNUC_DEPRECATED @@ -612,7 +610,7 @@ * * Since: 2.26 */ -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) || defined (__clang__) #define G_GNUC_DEPRECATED_FOR(f) \ __attribute__((deprecated("Use " #f " instead"))) #else @@ -631,7 +629,7 @@ _Pragma ("GCC diagnostic ignored \"-Wdeprecated-declarations\"") #define G_GNUC_END_IGNORE_DEPRECATIONS \ _Pragma ("GCC diagnostic pop") -#elif defined (_MSC_VER) && (_MSC_VER >= 1500) +#elif defined (_MSC_VER) && (_MSC_VER >= 1500) && !defined (__clang__) #define G_GNUC_BEGIN_IGNORE_DEPRECATIONS \ __pragma (warning (push)) \ __pragma (warning (disable : 4996)) @@ -689,19 +687,38 @@ #define G_GNUC_WARN_UNUSED_RESULT #endif /* __GNUC__ */ -#ifndef G_DISABLE_DEPRECATED +/** + * G_GNUC_FUNCTION: + * + * Expands to "" on all modern compilers, and to __FUNCTION__ on gcc + * version 2.x. Don't use it. + * + * Deprecated: 2.16: Use G_STRFUNC() instead + */ + +/** + * G_GNUC_PRETTY_FUNCTION: + * + * Expands to "" on all modern compilers, and to __PRETTY_FUNCTION__ + * on gcc version 2.x. Don't use it. + * + * Deprecated: 2.16: Use G_STRFUNC() instead + */ + /* Wrap the gcc __PRETTY_FUNCTION__ and __FUNCTION__ variables with * macros, so we can refer to them as strings unconditionally. * usage not-recommended since gcc-3.0 + * + * Mark them as deprecated since 2.26, since that’s when version macros were + * introduced. */ #if defined (__GNUC__) && (__GNUC__ < 3) -#define G_GNUC_FUNCTION __FUNCTION__ -#define G_GNUC_PRETTY_FUNCTION __PRETTY_FUNCTION__ +#define G_GNUC_FUNCTION __FUNCTION__ GLIB_DEPRECATED_MACRO_IN_2_26_FOR(G_STRFUNC) +#define G_GNUC_PRETTY_FUNCTION __PRETTY_FUNCTION__ GLIB_DEPRECATED_MACRO_IN_2_26_FOR(G_STRFUNC) #else /* !__GNUC__ */ -#define G_GNUC_FUNCTION "" -#define G_GNUC_PRETTY_FUNCTION "" +#define G_GNUC_FUNCTION "" GLIB_DEPRECATED_MACRO_IN_2_26_FOR(G_STRFUNC) +#define G_GNUC_PRETTY_FUNCTION "" GLIB_DEPRECATED_MACRO_IN_2_26_FOR(G_STRFUNC) #endif /* !__GNUC__ */ -#endif /* !G_DISABLE_DEPRECATED */ #if g_macro__has_feature(attribute_analyzer_noreturn) && defined(__clang_analyzer__) #define G_ANALYZER_ANALYZING 1 @@ -717,13 +734,21 @@ #ifndef __GI_SCANNER__ /* The static assert macro really confuses the introspection parser */ #define G_PASTE_ARGS(identifier1,identifier2) identifier1 ## identifier2 #define G_PASTE(identifier1,identifier2) G_PASTE_ARGS (identifier1, identifier2) +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L +#define G_STATIC_ASSERT(expr) _Static_assert (expr, "Expression evaluates to false") +#elif (defined(__cplusplus) && __cplusplus >= 201103L) || \ + (defined(__cplusplus) && defined (_MSC_VER) && (_MSC_VER >= 1600)) || \ + (defined (_MSC_VER) && (_MSC_VER >= 1800)) +#define G_STATIC_ASSERT(expr) static_assert (expr, "Expression evaluates to false") +#else #ifdef __COUNTER__ #define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1] G_GNUC_UNUSED #else #define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __LINE__)[(expr) ? 1 : -1] G_GNUC_UNUSED #endif +#endif /* __STDC_VERSION__ */ #define G_STATIC_ASSERT_EXPR(expr) ((void) sizeof (char[(expr) ? 1 : -1])) -#endif +#endif /* !__GI_SCANNER__ */ /* Provide a string identifying the current code position */ #if defined(__GNUC__) && (__GNUC__ < 3) && !defined(__cplusplus) @@ -867,14 +892,26 @@ #define G_ALIGNOF(type) (G_STRUCT_OFFSET (struct { char a; type b; }, b)) #endif -/* Deprecated -- do not use. */ -#ifndef G_DISABLE_DEPRECATED +/** + * G_CONST_RETURN: + * + * If %G_DISABLE_CONST_RETURNS is defined, this macro expands + * to nothing. By default, the macro expands to const. The macro + * can be used in place of const for functions that return a value + * that should not be modified. The purpose of this macro is to allow + * us to turn on const for returned constant strings by default, while + * allowing programmers who find that annoying to turn it off. This macro + * should only be used for return values and for "out" parameters, it + * doesn't make sense for "in" parameters. + * + * Deprecated: 2.30: API providers should replace all existing uses with + * const and API consumers should adjust their code accordingly + */ #ifdef G_DISABLE_CONST_RETURNS -#define G_CONST_RETURN +#define G_CONST_RETURN GLIB_DEPRECATED_MACRO_IN_2_30_FOR(const) #else -#define G_CONST_RETURN const +#define G_CONST_RETURN const GLIB_DEPRECATED_MACRO_IN_2_30_FOR(const) #endif -#endif /* !G_DISABLE_DEPRECATED */ /* * The G_LIKELY and G_UNLIKELY macros let the programmer give hints to @@ -901,7 +938,7 @@ #define G_UNLIKELY(expr) (expr) #endif -#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) +#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) || defined (__clang__) #define G_DEPRECATED __attribute__((__deprecated__)) #elif defined(_MSC_VER) && (_MSC_VER >= 1300) #define G_DEPRECATED __declspec(deprecated) @@ -909,7 +946,7 @@ #define G_DEPRECATED #endif -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) || defined (__clang__) #define G_DEPRECATED_FOR(f) __attribute__((__deprecated__("Use '" #f "' instead"))) #elif defined(_MSC_FULL_VER) && (_MSC_FULL_VER > 140050320) #define G_DEPRECATED_FOR(f) __declspec(deprecated("is deprecated. Use '" #f "' instead")) @@ -917,7 +954,7 @@ #define G_DEPRECATED_FOR(f) G_DEPRECATED #endif -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) || defined (__clang__) #define G_UNAVAILABLE(maj,min) __attribute__((deprecated("Not available before " #maj "." #min))) #elif defined(_MSC_FULL_VER) && (_MSC_FULL_VER > 140050320) #define G_UNAVAILABLE(maj,min) __declspec(deprecated("is not available before " #maj "." #min)) @@ -929,7 +966,7 @@ #define _GLIB_EXTERN extern #endif -/* These macros are used to mark deprecated functions in GLib headers, +/* These macros are used to mark deprecated symbols in GLib headers, * and thus have to be exposed in installed headers. But please * do *not* use them in other projects. Instead, use G_DEPRECATED * or define your own wrappers around it. @@ -945,9 +982,46 @@ #define GLIB_UNAVAILABLE(maj,min) G_UNAVAILABLE(maj,min) _GLIB_EXTERN #endif +#if !defined(GLIB_DISABLE_DEPRECATION_WARNINGS) && \ + (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || \ + __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 4)) +#define _GLIB_GNUC_DO_PRAGMA(x) _Pragma(G_STRINGIFY (x)) +#define GLIB_DEPRECATED_MACRO _GLIB_GNUC_DO_PRAGMA(GCC warning "Deprecated pre-processor symbol") +#define GLIB_DEPRECATED_MACRO_FOR(f) _GLIB_GNUC_DO_PRAGMA(GCC warning #f) +#define GLIB_UNAVAILABLE_MACRO(maj,min) _GLIB_GNUC_DO_PRAGMA(GCC warning "Not available before " #maj "." #min) +#else +#define GLIB_DEPRECATED_MACRO +#define GLIB_DEPRECATED_MACRO_FOR(f) +#define GLIB_UNAVAILABLE_MACRO(maj,min) +#endif + +#if !defined(GLIB_DISABLE_DEPRECATION_WARNINGS) && \ + ((defined (__GNUC__) && (__GNUC__ > 6 || (__GNUC__ == 6 && __GNUC_MINOR__ >= 1))) || \ + (defined (__clang_major__) && (__clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 0)))) +#define GLIB_DEPRECATED_ENUMERATOR G_DEPRECATED +#define GLIB_DEPRECATED_ENUMERATOR_FOR(f) G_DEPRECATED_FOR(f) +#define GLIB_UNAVAILABLE_ENUMERATOR(maj,min) G_UNAVAILABLE(maj,min) +#else +#define GLIB_DEPRECATED_ENUMERATOR +#define GLIB_DEPRECATED_ENUMERATOR_FOR(f) +#define GLIB_UNAVAILABLE_ENUMERATOR(maj,min) +#endif + +#if !defined(GLIB_DISABLE_DEPRECATION_WARNINGS) && \ + ((defined (__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))) || \ + (defined (__clang_major__) && (__clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 0)))) +#define GLIB_DEPRECATED_TYPE G_DEPRECATED +#define GLIB_DEPRECATED_TYPE_FOR(f) G_DEPRECATED_FOR(f) +#define GLIB_UNAVAILABLE_TYPE(maj,min) G_UNAVAILABLE(maj,min) +#else +#define GLIB_DEPRECATED_TYPE +#define GLIB_DEPRECATED_TYPE_FOR(f) +#define GLIB_UNAVAILABLE_TYPE(maj,min) +#endif + #ifndef __GI_SCANNER__ -#ifdef __GNUC__ +#if defined (__GNUC__) || defined (__clang__) /* these macros are private */ #define _GLIB_AUTOPTR_FUNC_NAME(TypeName) glib_autoptr_cleanup_##TypeName diff --git a/glib/gmain.c b/glib/gmain.c index 43b0250e9..af979c8b8 100644 --- a/glib/gmain.c +++ b/glib/gmain.c @@ -376,15 +376,6 @@ typedef struct _GSourceIter #define SOURCE_DESTROYED(source) (((source)->flags & G_HOOK_FLAG_ACTIVE) == 0) #define SOURCE_BLOCKED(source) (((source)->flags & G_SOURCE_BLOCKED) != 0) -#define SOURCE_UNREF(source, context) \ - G_STMT_START { \ - if ((source)->ref_count > 1) \ - (source)->ref_count--; \ - else \ - g_source_unref_internal ((source), (context), TRUE); \ - } G_STMT_END - - /* Forward declarations */ static void g_source_unref_internal (GSource *source, @@ -981,10 +972,10 @@ g_source_iter_next (GSourceIter *iter, GSource **source) */ if (iter->source && iter->may_modify) - SOURCE_UNREF (iter->source, iter->context); + g_source_unref_internal (iter->source, iter->context, TRUE); iter->source = next_source; if (iter->source && iter->may_modify) - iter->source->ref_count++; + g_source_ref (iter->source); *source = iter->source; return *source != NULL; @@ -998,7 +989,7 @@ g_source_iter_clear (GSourceIter *iter) { if (iter->source && iter->may_modify) { - SOURCE_UNREF (iter->source, iter->context); + g_source_unref_internal (iter->source, iter->context, TRUE); iter->source = NULL; } } @@ -1139,7 +1130,7 @@ g_source_attach_unlocked (GSource *source, source->context = context; source->source_id = id; - source->ref_count++; + g_source_ref (source); g_hash_table_insert (context->sources, GUINT_TO_POINTER (id), source); @@ -1275,7 +1266,10 @@ g_source_destroy_internal (GSource *source, * destroyed. The source cannot be subsequently added to another * context. It is safe to call this on sources which have already been * removed from their context. - **/ + * + * This does not unref the #GSource: if you still hold a reference, use + * g_source_unref() to drop it. + */ void g_source_destroy (GSource *source) { @@ -1695,7 +1689,7 @@ g_source_set_funcs (GSource *source, { g_return_if_fail (source != NULL); g_return_if_fail (source->context == NULL); - g_return_if_fail (source->ref_count > 0); + g_return_if_fail (g_atomic_int_get (&source->ref_count) > 0); g_return_if_fail (funcs != NULL); source->source_funcs = funcs; @@ -2070,19 +2064,9 @@ g_source_set_name_by_id (guint tag, GSource * g_source_ref (GSource *source) { - GMainContext *context; - g_return_val_if_fail (source != NULL, NULL); - context = source->context; - - if (context) - LOCK_CONTEXT (context); - - source->ref_count++; - - if (context) - UNLOCK_CONTEXT (context); + g_atomic_int_inc (&source->ref_count); return source; } @@ -2098,12 +2082,11 @@ g_source_unref_internal (GSource *source, GSourceCallbackFuncs *old_cb_funcs = NULL; g_return_if_fail (source != NULL); - + if (!have_lock && context) LOCK_CONTEXT (context); - source->ref_count--; - if (source->ref_count == 0) + if (g_atomic_int_dec_and_test (&source->ref_count)) { TRACE (GLIB_SOURCE_BEFORE_FREE (source, context, source->source_funcs->finalize)); @@ -2127,20 +2110,20 @@ g_source_unref_internal (GSource *source, { /* Temporarily increase the ref count again so that GSource methods * can be called from finalize(). */ - source->ref_count++; + g_atomic_int_inc (&source->ref_count); if (context) UNLOCK_CONTEXT (context); source->source_funcs->finalize (source); if (context) LOCK_CONTEXT (context); - source->ref_count--; + g_atomic_int_add (&source->ref_count, -1); } if (old_cb_funcs) { /* Temporarily increase the ref count again so that GSource methods * can be called from callback_funcs.unref(). */ - source->ref_count++; + g_atomic_int_inc (&source->ref_count); if (context) UNLOCK_CONTEXT (context); @@ -2148,7 +2131,7 @@ g_source_unref_internal (GSource *source, if (context) LOCK_CONTEXT (context); - source->ref_count--; + g_atomic_int_add (&source->ref_count, -1); } g_free (source->name); @@ -2648,39 +2631,24 @@ g_source_query_unix_fd (GSource *source, * Equivalent to the UNIX gettimeofday() function, but portable. * * You may find g_get_real_time() to be more convenient. + * + * Deprecated: 2.62: #GTimeVal is not year-2038-safe. Use g_get_real_time() + * instead. **/ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS void g_get_current_time (GTimeVal *result) { -#ifndef G_OS_WIN32 - struct timeval r; - - g_return_if_fail (result != NULL); - - /*this is required on alpha, there the timeval structs are int's - not longs and a cast only would fail horribly*/ - gettimeofday (&r, NULL); - result->tv_sec = r.tv_sec; - result->tv_usec = r.tv_usec; -#else - FILETIME ft; - guint64 time64; + gint64 tv; g_return_if_fail (result != NULL); - GetSystemTimeAsFileTime (&ft); - memmove (&time64, &ft, sizeof (FILETIME)); + tv = g_get_real_time (); - /* Convert from 100s of nanoseconds since 1601-01-01 - * to Unix epoch. Yes, this is Y2038 unsafe. - */ - time64 -= G_GINT64_CONSTANT (116444736000000000); - time64 /= 10; - - result->tv_sec = time64 / 1000000; - result->tv_usec = time64 % 1000000; -#endif + result->tv_sec = tv / 1000000; + result->tv_usec = tv % 1000000; } +G_GNUC_END_IGNORE_DEPRECATIONS /** * g_get_real_time: @@ -2702,11 +2670,29 @@ g_get_current_time (GTimeVal *result) gint64 g_get_real_time (void) { - GTimeVal tv; +#ifndef G_OS_WIN32 + struct timeval r; + + /* this is required on alpha, there the timeval structs are ints + * not longs and a cast only would fail horribly */ + gettimeofday (&r, NULL); - g_get_current_time (&tv); + return (((gint64) r.tv_sec) * 1000000) + r.tv_usec; +#else + FILETIME ft; + guint64 time64; - return (((gint64) tv.tv_sec) * 1000000) + tv.tv_usec; + GetSystemTimeAsFileTime (&ft); + memmove (&time64, &ft, sizeof (FILETIME)); + + /* Convert from 100s of nanoseconds since 1601-01-01 + * to Unix epoch. This is Y2038 safe. + */ + time64 -= G_GINT64_CONSTANT (116444736000000000); + time64 /= 10; + + return time64; +#endif } /** @@ -3218,7 +3204,7 @@ g_main_dispatch (GMainContext *context) } } - SOURCE_UNREF (source, context); + g_source_unref_internal (source, context, TRUE); } g_ptr_array_set_size (context->pending_dispatches, 0); @@ -3413,7 +3399,7 @@ g_main_context_wait (GMainContext *context, /** * g_main_context_prepare: * @context: a #GMainContext - * @priority: location to store priority of highest priority + * @priority: (out) (optional): location to store priority of highest priority * source already ready. * * Prepares to poll sources within a main loop. The resulting information @@ -3469,7 +3455,7 @@ g_main_context_prepare (GMainContext *context, for (i = 0; i < context->pending_dispatches->len; i++) { if (context->pending_dispatches->pdata[i]) - SOURCE_UNREF ((GSource *)context->pending_dispatches->pdata[i], context); + g_source_unref_internal ((GSource *)context->pending_dispatches->pdata[i], context, TRUE); } g_ptr_array_set_size (context->pending_dispatches, 0); @@ -3817,7 +3803,7 @@ g_main_context_check (GMainContext *context, if (source->flags & G_SOURCE_READY) { - source->ref_count++; + g_source_ref (source); g_ptr_array_add (context->pending_dispatches, source); n_ready++; @@ -4429,12 +4415,14 @@ g_main_context_remove_poll_unlocked (GMainContext *context, * * Deprecated: 2.28: use g_source_get_time() instead **/ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS void g_source_get_current_time (GSource *source, GTimeVal *timeval) { g_get_current_time (timeval); } +G_GNUC_END_IGNORE_DEPRECATIONS /** * g_source_get_time: diff --git a/glib/gmain.h b/glib/gmain.h index eca14d7d5..d6f51533c 100644 --- a/glib/gmain.h +++ b/glib/gmain.h @@ -544,9 +544,11 @@ GLIB_AVAILABLE_IN_ALL void g_source_remove_child_source (GSource *source, GSource *child_source); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS GLIB_DEPRECATED_IN_2_28_FOR(g_source_get_time) void g_source_get_current_time (GSource *source, GTimeVal *timeval); +G_GNUC_END_IGNORE_DEPRECATIONS GLIB_AVAILABLE_IN_ALL gint64 g_source_get_time (GSource *source); @@ -568,8 +570,11 @@ GSource *g_timeout_source_new_seconds (guint interval); /* Miscellaneous functions */ -GLIB_AVAILABLE_IN_ALL +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +GLIB_DEPRECATED_IN_2_62_FOR(g_get_real_time) void g_get_current_time (GTimeVal *result); +G_GNUC_END_IGNORE_DEPRECATIONS + GLIB_AVAILABLE_IN_ALL gint64 g_get_monotonic_time (void); GLIB_AVAILABLE_IN_ALL diff --git a/glib/gmarkup.c b/glib/gmarkup.c index 8a4e943eb..5b70cef8d 100644 --- a/glib/gmarkup.c +++ b/glib/gmarkup.c @@ -2872,9 +2872,10 @@ g_markup_collect_attributes (const gchar *element_name, g_assert_not_reached (); } - type = va_arg (ap, GMarkupCollectType); - attr = va_arg (ap, const char *); written++; + type = va_arg (ap, GMarkupCollectType); + if (type != G_MARKUP_COLLECT_INVALID) + attr = va_arg (ap, const char *); } va_end (ap); @@ -2950,7 +2951,8 @@ failure: } type = va_arg (ap, GMarkupCollectType); - attr = va_arg (ap, const char *); + if (type != G_MARKUP_COLLECT_INVALID) + attr = va_arg (ap, const char *); } va_end (ap); diff --git a/glib/gmessages.c b/glib/gmessages.c index 0210b7a8e..591185605 100644 --- a/glib/gmessages.c +++ b/glib/gmessages.c @@ -2291,7 +2291,7 @@ g_log_writer_format_fields (GLogLevelFlags log_level, msg = g_string_new (message); escape_string (msg); - if (g_get_charset (&charset)) + if (g_get_console_charset (&charset)) { /* charset is UTF-8 already */ g_string_append (gstring, msg->str); @@ -3186,7 +3186,7 @@ g_print (const gchar *format, { const gchar *charset; - if (g_get_charset (&charset)) + if (g_get_console_charset (&charset)) fputs (string, stdout); /* charset is UTF-8 already */ else { @@ -3265,7 +3265,7 @@ g_printerr (const gchar *format, { const gchar *charset; - if (g_get_charset (&charset)) + if (g_get_console_charset (&charset)) fputs (string, stderr); /* charset is UTF-8 already */ else { diff --git a/glib/gmessages.h b/glib/gmessages.h index c609d087f..95d60c5be 100644 --- a/glib/gmessages.h +++ b/glib/gmessages.h @@ -296,7 +296,7 @@ void g_log_structured_standard (const gchar *log_domain, #endif /* G_LOG_DOMAIN */ #if defined(G_HAVE_ISO_VARARGS) && !G_ANALYZER_ANALYZING -#ifdef G_LOG_USE_STRUCTURED +#if defined(G_LOG_USE_STRUCTURED) && GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_56 #define g_error(...) G_STMT_START { \ g_log_structured_standard (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR, \ __FILE__, G_STRINGIFY (__LINE__), \ @@ -345,7 +345,7 @@ void g_log_structured_standard (const gchar *log_domain, __VA_ARGS__) #endif #elif defined(G_HAVE_GNUC_VARARGS) && !G_ANALYZER_ANALYZING -#ifdef G_LOG_USE_STRUCTURED +#if defined(G_LOG_USE_STRUCTURED) && GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_56 #define g_error(format...) G_STMT_START { \ g_log_structured_standard (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR, \ __FILE__, G_STRINGIFY (__LINE__), \ diff --git a/glib/gnode.h b/glib/gnode.h index b7220a44c..693e6154d 100644 --- a/glib/gnode.h +++ b/glib/gnode.h @@ -60,21 +60,6 @@ typedef gboolean (*GNodeTraverseFunc) (GNode *node, typedef void (*GNodeForeachFunc) (GNode *node, gpointer data); -/** - * GCopyFunc: - * @src: (not nullable): A pointer to the data which should be copied - * @data: Additional data - * - * A function of this signature is used to copy the node data - * when doing a deep-copy of a tree. - * - * Returns: (not nullable): A pointer to the copy - * - * Since: 2.4 - */ -typedef gpointer (*GCopyFunc) (gconstpointer src, - gpointer data); - /* N-way tree implementation */ struct _GNode diff --git a/glib/gnulib/gl_cv_func_frexp_works/meson.build b/glib/gnulib/gl_cv_func_frexp_works/meson.build index 5d0c7cfce..29f7bcabe 100644 --- a/glib/gnulib/gl_cv_func_frexp_works/meson.build +++ b/glib/gnulib/gl_cv_func_frexp_works/meson.build @@ -96,7 +96,7 @@ else gl_cv_func_frexp_works = false gl_cv_func_frexp_broken_beyond_repair = true elif host_system == 'windows' - if cc.get_id () == 'msvc' + if cc.get_id () == 'msvc' or cc.get_id() == 'clang-cl' gl_cv_func_frexp_works = true gl_cv_func_frexp_broken_beyond_repair = false else diff --git a/glib/gnulib/gl_cv_func_printf_directive_f/meson.build b/glib/gnulib/gl_cv_func_printf_directive_f/meson.build index 6e423dbc1..945e01885 100644 --- a/glib/gnulib/gl_cv_func_printf_directive_f/meson.build +++ b/glib/gnulib/gl_cv_func_printf_directive_f/meson.build @@ -70,7 +70,7 @@ else gl_cv_func_printf_directive_f = false elif host_system == 'windows' # Guess yes on MSVC, no on mingw. - if cc.get_id() == 'msvc' + if cc.get_id() == 'msvc' or cc.get_id() == 'clang-cl' gl_cv_func_printf_directive_f = true else gl_cv_func_printf_directive_f = false diff --git a/glib/gnulib/gl_cv_func_printf_infinite/meson.build b/glib/gnulib/gl_cv_func_printf_infinite/meson.build index f33ade42c..5dce54bcf 100644 --- a/glib/gnulib/gl_cv_func_printf_infinite/meson.build +++ b/glib/gnulib/gl_cv_func_printf_infinite/meson.build @@ -123,7 +123,7 @@ else gl_cv_func_printf_infinite = true elif host_system.startswith ('windows') # Guess yes on MSVC, no on mingw. - if cc.get_id() == 'msvc' + if cc.get_id() == 'msvc' or cc.get_id() == 'clang-cl' gl_cv_func_printf_infinite = true else gl_cv_func_printf_infinite = false diff --git a/glib/gnulib/gl_cv_func_printf_infinite_long_double/meson.build b/glib/gnulib/gl_cv_func_printf_infinite_long_double/meson.build index fbdee8d16..b7a714c81 100644 --- a/glib/gnulib/gl_cv_func_printf_infinite_long_double/meson.build +++ b/glib/gnulib/gl_cv_func_printf_infinite_long_double/meson.build @@ -195,7 +195,7 @@ if gl_cv_func_printf_long_double gl_cv_func_printf_infinite_long_double = 'true' elif host_system == 'windows' # Guess yes on MSVC, no on mingw. - if cc.get_id() == 'msvc' + if cc.get_id() == 'msvc' or cc.get_id() == 'clang-cl' gl_cv_func_printf_infinite = 'true' else gl_cv_func_printf_infinite = 'false' diff --git a/glib/gnulib/gl_cv_func_printf_long_double/meson.build b/glib/gnulib/gl_cv_func_printf_long_double/meson.build index 1c0d6b58b..bd68fb377 100644 --- a/glib/gnulib/gl_cv_func_printf_long_double/meson.build +++ b/glib/gnulib/gl_cv_func_printf_long_double/meson.build @@ -39,7 +39,7 @@ else gl_cv_func_printf_long_double = false elif host_system == 'windows' # Guess yes on MSVC, no on mingw. - if cc.get_id() == 'msvc' + if cc.get_id() == 'msvc' or cc.get_id() == 'clang-cl' gl_cv_func_printf_long_double = true else gl_cv_func_printf_long_double = false diff --git a/glib/goption.h b/glib/goption.h index 83d4f77fd..63552fb0d 100644 --- a/glib/goption.h +++ b/glib/goption.h @@ -93,11 +93,12 @@ typedef enum /** * GOptionArg: * @G_OPTION_ARG_NONE: No extra argument. This is useful for simple flags. - * @G_OPTION_ARG_STRING: The option takes a string argument. + * @G_OPTION_ARG_STRING: The option takes a UTF-8 string argument. * @G_OPTION_ARG_INT: The option takes an integer argument. * @G_OPTION_ARG_CALLBACK: The option provides a callback (of type * #GOptionArgFunc) to parse the extra argument. - * @G_OPTION_ARG_FILENAME: The option takes a filename as argument. + * @G_OPTION_ARG_FILENAME: The option takes a filename as argument, which will + be in the GLib filename encoding rather than UTF-8. * @G_OPTION_ARG_STRING_ARRAY: The option takes a string argument, multiple * uses of the option are collected into an array of strings. * @G_OPTION_ARG_FILENAME_ARRAY: The option takes a filename as argument, diff --git a/glib/grand.c b/glib/grand.c index fcbc6f42f..19339afc6 100644 --- a/glib/grand.c +++ b/glib/grand.c @@ -49,6 +49,7 @@ #include "gmem.h" #include "gtestutils.h" #include "gthread.h" +#include "gtimer.h" #ifdef G_OS_UNIX #include <unistd.h> @@ -220,7 +221,6 @@ g_rand_new (void) guint32 seed[4]; #ifdef G_OS_UNIX static gboolean dev_urandom_exists = TRUE; - GTimeVal now; if (dev_urandom_exists) { @@ -254,10 +254,10 @@ g_rand_new (void) } if (!dev_urandom_exists) - { - g_get_current_time (&now); - seed[0] = now.tv_sec; - seed[1] = now.tv_usec; + { + gint64 now_us = g_get_real_time (); + seed[0] = now_us / G_USEC_PER_SEC; + seed[1] = now_us % G_USEC_PER_SEC; seed[2] = getpid (); seed[3] = getppid (); } diff --git a/glib/grcbox.c b/glib/grcbox.c index 22a373b15..68bb73da7 100644 --- a/glib/grcbox.c +++ b/glib/grcbox.c @@ -159,7 +159,7 @@ * G_DEFINE_AUTOPTR_CLEANUP_FUNC (MyDataStruct, my_data_struct_release) * ]| * - * Since: 2.58. + * Since: 2.58 */ /* We use the same alignment as GTypeInstance and GNU libc's malloc */ diff --git a/glib/gscanner.h b/glib/gscanner.h index db0d9aaf9..d87b4533e 100644 --- a/glib/gscanner.h +++ b/glib/gscanner.h @@ -278,25 +278,21 @@ void g_scanner_warn (GScanner *scanner, const gchar *format, ...) G_GNUC_PRINTF (2,3); -#ifndef G_DISABLE_DEPRECATED - /* keep downward source compatibility */ #define g_scanner_add_symbol( scanner, symbol, value ) G_STMT_START { \ g_scanner_scope_add_symbol ((scanner), 0, (symbol), (value)); \ -} G_STMT_END +} G_STMT_END GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_scanner_scope_add_symbol) #define g_scanner_remove_symbol( scanner, symbol ) G_STMT_START { \ g_scanner_scope_remove_symbol ((scanner), 0, (symbol)); \ -} G_STMT_END +} G_STMT_END GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_scanner_scope_remove_symbol) #define g_scanner_foreach_symbol( scanner, func, data ) G_STMT_START { \ g_scanner_scope_foreach_symbol ((scanner), 0, (func), (data)); \ -} G_STMT_END +} G_STMT_END GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_scanner_scope_foreach_symbol) /* The following two functions are deprecated and will be removed in * the next major release. They do no good. */ -#define g_scanner_freeze_symbol_table(scanner) ((void)0) -#define g_scanner_thaw_symbol_table(scanner) ((void)0) - -#endif /* G_DISABLE_DEPRECATED */ +#define g_scanner_freeze_symbol_table(scanner) ((void)0) GLIB_DEPRECATED_MACRO_IN_2_26 +#define g_scanner_thaw_symbol_table(scanner) ((void)0) GLIB_DEPRECATED_MACRO_IN_2_26 G_END_DECLS diff --git a/glib/gslice.c b/glib/gslice.c index 0e1726138..4c758c3be 100644 --- a/glib/gslice.c +++ b/glib/gslice.c @@ -595,9 +595,8 @@ magazine_cache_update_stamp (void) { if (allocator->stamp_counter >= MAX_STAMP_COUNTER) { - GTimeVal tv; - g_get_current_time (&tv); - allocator->last_stamp = tv.tv_sec * 1000 + tv.tv_usec / 1000; /* milli seconds */ + gint64 now_us = g_get_real_time (); + allocator->last_stamp = now_us / 1000; /* milli seconds */ allocator->stamp_counter = 0; } else @@ -1397,7 +1396,9 @@ slab_allocator_free_chunk (gsize chunk_size, */ #if !(HAVE_POSIX_MEMALIGN || HAVE_MEMALIGN || HAVE_VALLOC) +G_GNUC_BEGIN_IGNORE_DEPRECATIONS static GTrashStack *compat_valloc_trash = NULL; +G_GNUC_END_IGNORE_DEPRECATIONS #endif static gpointer diff --git a/glib/gspawn.h b/glib/gspawn.h index d6b0be7d0..240aae768 100644 --- a/glib/gspawn.h +++ b/glib/gspawn.h @@ -46,7 +46,7 @@ G_BEGIN_DECLS * @G_SPAWN_ERROR_ACCES: execv() returned `EACCES` * @G_SPAWN_ERROR_PERM: execv() returned `EPERM` * @G_SPAWN_ERROR_TOO_BIG: execv() returned `E2BIG` - * @G_SPAWN_ERROR_2BIG: deprecated alias for %G_SPAWN_ERROR_TOO_BIG + * @G_SPAWN_ERROR_2BIG: deprecated alias for %G_SPAWN_ERROR_TOO_BIG (deprecated since GLib 2.32) * @G_SPAWN_ERROR_NOEXEC: execv() returned `ENOEXEC` * @G_SPAWN_ERROR_NAMETOOLONG: execv() returned `ENAMETOOLONG` * @G_SPAWN_ERROR_NOENT: execv() returned `ENOENT` @@ -73,9 +73,7 @@ typedef enum G_SPAWN_ERROR_ACCES, /* execv() returned EACCES */ G_SPAWN_ERROR_PERM, /* execv() returned EPERM */ G_SPAWN_ERROR_TOO_BIG,/* execv() returned E2BIG */ -#ifndef G_DISABLE_DEPRECATED - G_SPAWN_ERROR_2BIG = G_SPAWN_ERROR_TOO_BIG, -#endif + G_SPAWN_ERROR_2BIG GLIB_DEPRECATED_ENUMERATOR_IN_2_32_FOR(G_SPAWN_ERROR_TOO_BIG) = G_SPAWN_ERROR_TOO_BIG, G_SPAWN_ERROR_NOEXEC, /* execv() returned ENOEXEC */ G_SPAWN_ERROR_NAMETOOLONG, /* "" "" ENAMETOOLONG */ G_SPAWN_ERROR_NOENT, /* "" "" ENOENT */ diff --git a/glib/gstdio.c b/glib/gstdio.c index 51a1ddbe9..653c8a3a1 100644 --- a/glib/gstdio.c +++ b/glib/gstdio.c @@ -19,7 +19,9 @@ #include "config.h" #include "glibconfig.h" -#define G_STDIO_NO_WRAP_ON_UNIX +/* Don’t redefine (for example) g_open() to open(), since we actually want to + * define g_open() in this file and export it as a symbol. See gstdio.h. */ +#define G_STDIO_WRAP_ON_UNIX #include <sys/types.h> #include <sys/stat.h> @@ -100,22 +102,35 @@ w32_error_to_errno (DWORD error_code) case ERROR_ACCESS_DENIED: return EACCES; break; - case ERROR_INVALID_HANDLE: - return EBADF; + case ERROR_ALREADY_EXISTS: + case ERROR_FILE_EXISTS: + return EEXIST; + case ERROR_FILE_NOT_FOUND: + return ENOENT; break; case ERROR_INVALID_FUNCTION: return EFAULT; break; - case ERROR_FILE_NOT_FOUND: - return ENOENT; + case ERROR_INVALID_HANDLE: + return EBADF; break; - case ERROR_PATH_NOT_FOUND: - return ENOENT; /* or ELOOP, or ENAMETOOLONG */ + case ERROR_INVALID_PARAMETER: + return EINVAL; + break; + case ERROR_LOCK_VIOLATION: + case ERROR_SHARING_VIOLATION: + return EACCES; break; case ERROR_NOT_ENOUGH_MEMORY: case ERROR_OUTOFMEMORY: return ENOMEM; break; + case ERROR_NOT_SAME_DEVICE: + return EXDEV; + break; + case ERROR_PATH_NOT_FOUND: + return ENOENT; /* or ELOOP, or ENAMETOOLONG */ + break; default: return EIO; break; @@ -124,6 +139,26 @@ w32_error_to_errno (DWORD error_code) #include "gstdio-private.c" +/* Windows implementation of fopen() does not accept modes such as + * "wb+". The 'b' needs to be appended to "w+", i.e. "w+b". Note + * that otherwise these 2 modes are supposed to be aliases, hence + * swappable at will. TODO: Is this still true? + */ +static void +_g_win32_fix_mode (wchar_t *mode) +{ + wchar_t *ptr; + wchar_t temp; + + ptr = wcschr (mode, L'+'); + if (ptr != NULL && (ptr - mode) > 1) + { + temp = mode[1]; + mode[1] = *ptr; + *ptr = temp; + } +} + /* From * https://support.microsoft.com/en-ca/help/167296/how-to-convert-a-unix-time-t-to-a-win32-filetime-or-systemtime * FT = UT * 10000000 + 116444736000000000. @@ -763,26 +798,6 @@ g_win32_fstat (int fd, return _g_win32_stat_fd (fd, buf); } -static gchar * -_g_win32_get_mode_alias (const gchar *mode) -{ - gchar *alias; - - alias = g_strdup (mode); - if (strlen (mode) > 2 && mode[2] == '+') - { - /* Windows implementation of fopen() does not accept modes such as - * "wb+". The 'b' needs to be appended to "w+", i.e. "w+b". Note - * that otherwise these 2 modes are supposed to be aliases, hence - * swappable at will. - */ - alias[1] = '+'; - alias[2] = mode[1]; - } - - return alias; -} - /** * g_win32_readlink_utf8: * @filename: (type filename): a pathname in UTF-8 @@ -1152,20 +1167,7 @@ g_rename (const gchar *oldfilename, else { retval = -1; - switch (GetLastError ()) - { -#define CASE(a,b) case ERROR_##a: save_errno = b; break - CASE (FILE_NOT_FOUND, ENOENT); - CASE (PATH_NOT_FOUND, ENOENT); - CASE (ACCESS_DENIED, EACCES); - CASE (NOT_SAME_DEVICE, EXDEV); - CASE (LOCK_VIOLATION, EACCES); - CASE (SHARING_VIOLATION, EACCES); - CASE (FILE_EXISTS, EEXIST); - CASE (ALREADY_EXISTS, EEXIST); -#undef CASE - default: save_errno = EIO; - } + save_errno = w32_error_to_errno (GetLastError ()); } g_free (woldfilename); @@ -1550,7 +1552,6 @@ g_fopen (const gchar *filename, #ifdef G_OS_WIN32 wchar_t *wfilename = g_utf8_to_utf16 (filename, -1, NULL, NULL, NULL); wchar_t *wmode; - gchar *mode2; FILE *retval; int save_errno; @@ -1560,9 +1561,7 @@ g_fopen (const gchar *filename, return NULL; } - mode2 = _g_win32_get_mode_alias (mode); - wmode = g_utf8_to_utf16 (mode2, -1, NULL, NULL, NULL); - g_free (mode2); + wmode = g_utf8_to_utf16 (mode, -1, NULL, NULL, NULL); if (wmode == NULL) { @@ -1571,6 +1570,7 @@ g_fopen (const gchar *filename, return NULL; } + _g_win32_fix_mode (wmode); retval = _wfopen (wfilename, wmode); save_errno = errno; @@ -1609,7 +1609,6 @@ g_freopen (const gchar *filename, #ifdef G_OS_WIN32 wchar_t *wfilename = g_utf8_to_utf16 (filename, -1, NULL, NULL, NULL); wchar_t *wmode; - gchar *mode2; FILE *retval; int save_errno; @@ -1619,9 +1618,7 @@ g_freopen (const gchar *filename, return NULL; } - mode2 = _g_win32_get_mode_alias (mode); - wmode = g_utf8_to_utf16 (mode2, -1, NULL, NULL, NULL); - g_free (mode2); + wmode = g_utf8_to_utf16 (mode, -1, NULL, NULL, NULL); if (wmode == NULL) { @@ -1629,7 +1626,8 @@ g_freopen (const gchar *filename, errno = EINVAL; return NULL; } - + + _g_win32_fix_mode (wmode); retval = _wfreopen (wfilename, wmode, stream); save_errno = errno; diff --git a/glib/gstdio.h b/glib/gstdio.h index 94f4fa36f..f1781f3e9 100644 --- a/glib/gstdio.h +++ b/glib/gstdio.h @@ -54,12 +54,15 @@ typedef struct stat GStatBuf; #endif -#if defined(G_OS_UNIX) && !defined(G_STDIO_NO_WRAP_ON_UNIX) +#if defined(G_OS_UNIX) && !defined(G_STDIO_WRAP_ON_UNIX) /* Just pass on to the system functions, so there's no potential for data * format mismatches, especially with large file interfaces. * A few functions can't be handled in this way, since they are not defined * in a portable system header that we could include here. + * + * #G_STDIO_WRAP_ON_UNIX is not public API and its behaviour is not guaranteed + * in future. */ #ifndef __GTK_DOC_IGNORE__ diff --git a/glib/gstrfuncs.c b/glib/gstrfuncs.c index 99ceb15c7..17e10a72d 100644 --- a/glib/gstrfuncs.c +++ b/glib/gstrfuncs.c @@ -1302,7 +1302,7 @@ g_strerror (gint errnum) g_strlcpy (buf, strerror (errnum), sizeof (buf)); msg = buf; #endif - if (!g_get_charset (NULL)) + if (!g_get_console_charset (NULL)) { msg = g_locale_to_utf8 (msg, -1, NULL, NULL, &error); if (error) @@ -1342,7 +1342,7 @@ g_strsignal (gint signum) #ifdef HAVE_STRSIGNAL msg = strsignal (signum); - if (!g_get_charset (NULL)) + if (!g_get_console_charset (NULL)) msg = tofree = g_locale_to_utf8 (msg, -1, NULL, NULL, NULL); #endif diff --git a/glib/gstring.h b/glib/gstring.h index 77951b041..e1b2e7fca 100644 --- a/glib/gstring.h +++ b/glib/gstring.h @@ -179,10 +179,8 @@ GString *g_string_down (GString *string); GLIB_DEPRECATED GString *g_string_up (GString *string); -#ifndef G_DISABLE_DEPRECATED -#define g_string_sprintf g_string_printf -#define g_string_sprintfa g_string_append_printf -#endif +#define g_string_sprintf g_string_printf GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_string_printf) +#define g_string_sprintfa g_string_append_printf GLIB_DEPRECATED_MACRO_IN_2_26_FOR(g_string_append_printf) G_END_DECLS diff --git a/glib/gtestutils.c b/glib/gtestutils.c index abdaaa607..881789087 100644 --- a/glib/gtestutils.c +++ b/glib/gtestutils.c @@ -1941,6 +1941,18 @@ g_test_bug (const char *bug_uri_snippet) * * This should be called at the top of a test function. * + * For example: + * |[<!-- language="C" --> + * static void + * test_array_sort (void) + * { + * g_test_summary ("Test my_array_sort() sorts the array correctly and stably, " + * "including testing zero length and one-element arrays."); + * + * … + * } + * ]| + * * Since: 2.62 * See also: g_test_bug() */ @@ -3268,6 +3280,7 @@ wait_for_child (GPid pid, * and is not always reliable due to problems inherent in * fork-without-exec. Use g_test_trap_subprocess() instead. */ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS gboolean g_test_trap_fork (guint64 usec_timeout, GTestTrapFlags test_trap_flags) @@ -3310,6 +3323,18 @@ g_test_trap_fork (guint64 usec_timeout, close (stdout_pipe[1]); if (stderr_pipe[1] >= 3) close (stderr_pipe[1]); + + /* We typically expect these child processes to crash, and some + * tests spawn a *lot* of them. Avoid spamming system crash + * collection programs such as systemd-coredump and abrt. + */ +#ifdef HAVE_SYS_RESOURCE_H + { + struct rlimit limit = { 0, 0 }; + (void) setrlimit (RLIMIT_CORE, &limit); + } +#endif + return TRUE; } else /* parent */ @@ -3330,6 +3355,7 @@ g_test_trap_fork (guint64 usec_timeout, return FALSE; #endif } +G_GNUC_END_IGNORE_DEPRECATIONS /** * g_test_trap_subprocess: diff --git a/glib/gtestutils.h b/glib/gtestutils.h index 7a0715c82..26de21216 100644 --- a/glib/gtestutils.h +++ b/glib/gtestutils.h @@ -356,7 +356,7 @@ void g_test_queue_destroy (GDestroyNotify destroy_func, * Test traps are guards around forked tests. * These flags determine what traps to set. * - * Deprecated: #GTestTrapFlags is used only with g_test_trap_fork(), + * Deprecated: 2.38: #GTestTrapFlags is used only with g_test_trap_fork(), * which is deprecated. g_test_trap_subprocess() uses * #GTestSubprocessFlags. */ @@ -364,12 +364,16 @@ typedef enum { G_TEST_TRAP_SILENCE_STDOUT = 1 << 7, G_TEST_TRAP_SILENCE_STDERR = 1 << 8, G_TEST_TRAP_INHERIT_STDIN = 1 << 9 -} GTestTrapFlags; +} GTestTrapFlags GLIB_DEPRECATED_TYPE_IN_2_38_FOR(GTestSubprocessFlags); + +G_GNUC_BEGIN_IGNORE_DEPRECATIONS GLIB_DEPRECATED_IN_2_38_FOR (g_test_trap_subprocess) gboolean g_test_trap_fork (guint64 usec_timeout, GTestTrapFlags test_trap_flags); +G_GNUC_END_IGNORE_DEPRECATIONS + typedef enum { G_TEST_SUBPROCESS_INHERIT_STDIN = 1 << 0, G_TEST_SUBPROCESS_INHERIT_STDOUT = 1 << 1, diff --git a/glib/gthread-posix.c b/glib/gthread-posix.c index 1e2fdb59a..c76f4433f 100644 --- a/glib/gthread-posix.c +++ b/glib/gthread-posix.c @@ -587,8 +587,10 @@ g_rw_lock_writer_unlock (GRWLock *rw_lock) * @rw_lock: a #GRWLock * * Obtain a read lock on @rw_lock. If another thread currently holds - * the write lock on @rw_lock or blocks waiting for it, the current - * thread will block. Read locks can be taken recursively. + * the write lock on @rw_lock, the current thread will block. If another thread + * does not hold the write lock, but is waiting for it, it is implementation + * defined whether the reader or writer will block. Read locks can be taken + * recursively. * * It is implementation-defined how many threads are allowed to * hold read locks on the same lock simultaneously. If the limit is hit, @@ -1439,6 +1441,7 @@ g_cond_wait_until (GCond *cond, struct timespec span; guint sampled; int res; + gboolean success; if (end_time < 0) return FALSE; @@ -1458,9 +1461,10 @@ g_cond_wait_until (GCond *cond, sampled = cond->i[0]; g_mutex_unlock (mutex); res = syscall (__NR_futex, &cond->i[0], (gsize) FUTEX_WAIT_PRIVATE, (gsize) sampled, &span); + success = (res < 0 && errno == ETIMEDOUT) ? FALSE : TRUE; g_mutex_lock (mutex); - return (res < 0 && errno == ETIMEDOUT) ? FALSE : TRUE; + return success; } #endif diff --git a/glib/gtimer.c b/glib/gtimer.c index 4f66826ae..7d21ba822 100644 --- a/glib/gtimer.c +++ b/glib/gtimer.c @@ -237,6 +237,23 @@ g_timer_elapsed (GTimer *timer, } /** + * g_timer_is_active: + * @timer: a #GTimer. + * + * Exposes whether the timer is currently active. + * + * Returns: %TRUE if the timer is running, %FALSE otherwise + * Since: 2.62 + **/ +gboolean +g_timer_is_active (GTimer *timer) +{ + g_return_val_if_fail (timer != NULL, FALSE); + + return timer->active; +} + +/** * g_usleep: * @microseconds: number of microseconds to pause * @@ -269,7 +286,11 @@ g_usleep (gulong microseconds) * * Adds the given number of microseconds to @time_. @microseconds can * also be negative to decrease the value of @time_. + * + * Deprecated: 2.62: #GTimeVal is not year-2038-safe. Use `guint64` for + * representing microseconds since the epoch, or use #GDateTime. **/ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS void g_time_val_add (GTimeVal *time_, glong microseconds) { @@ -297,6 +318,7 @@ g_time_val_add (GTimeVal *time_, glong microseconds) } } } +G_GNUC_END_IGNORE_DEPRECATIONS /* converts a broken down date representation, relative to UTC, * to a timestamp; it uses timegm() if it's available. @@ -347,10 +369,21 @@ mktime_utc (struct tm *tm) * * Any leading or trailing space in @iso_date is ignored. * + * This function was deprecated, along with #GTimeVal itself, in GLib 2.62. + * Equivalent functionality is available using code like: + * |[ + * GDateTime *dt = g_date_time_new_from_iso8601 (iso8601_string, NULL); + * gint64 time_val = g_date_time_to_unix (dt); + * g_date_time_unref (dt); + * ]| + * * Returns: %TRUE if the conversion was successful. * * Since: 2.12 + * Deprecated: 2.62: #GTimeVal is not year-2038-safe. Use + * g_date_time_new_from_iso8601() instead. */ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS gboolean g_time_val_from_iso8601 (const gchar *iso_date, GTimeVal *time_) @@ -511,6 +544,7 @@ g_time_val_from_iso8601 (const gchar *iso_date, return *iso_date == '\0'; } +G_GNUC_END_IGNORE_DEPRECATIONS /** * g_time_val_to_iso8601: @@ -540,7 +574,13 @@ g_time_val_from_iso8601 (const gchar *iso_date, * If @time_ represents a date which is too large to fit into a `struct tm`, * %NULL will be returned. This is platform dependent. Note also that since * `GTimeVal` stores the number of seconds as a `glong`, on 32-bit systems it - * is subject to the year 2038 problem. + * is subject to the year 2038 problem. Accordingly, since GLib 2.62, this + * function has been deprecated. Equivalent functionality is available using: + * |[ + * GDateTime *dt = g_date_time_new_from_unix_utc (time_val); + * iso8601_string = g_date_time_format_iso8601 (dt); + * g_date_time_unref (dt); + * ]| * * The return value of g_time_val_to_iso8601() has been nullable since GLib * 2.54; before then, GLib would crash under the same conditions. @@ -549,7 +589,10 @@ g_time_val_from_iso8601 (const gchar *iso_date, * or %NULL if @time_ was too large * * Since: 2.12 + * Deprecated: 2.62: #GTimeVal is not year-2038-safe. Use + * g_date_time_format_iso8601(dt) instead. */ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS gchar * g_time_val_to_iso8601 (GTimeVal *time_) { @@ -607,3 +650,4 @@ g_time_val_to_iso8601 (GTimeVal *time_) return retval; } +G_GNUC_END_IGNORE_DEPRECATIONS diff --git a/glib/gtimer.h b/glib/gtimer.h index 5699b6964..28794d167 100644 --- a/glib/gtimer.h +++ b/glib/gtimer.h @@ -56,18 +56,22 @@ void g_timer_continue (GTimer *timer); GLIB_AVAILABLE_IN_ALL gdouble g_timer_elapsed (GTimer *timer, gulong *microseconds); +GLIB_AVAILABLE_IN_2_62 +gboolean g_timer_is_active (GTimer *timer); GLIB_AVAILABLE_IN_ALL void g_usleep (gulong microseconds); -GLIB_AVAILABLE_IN_ALL +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +GLIB_DEPRECATED_IN_2_62 void g_time_val_add (GTimeVal *time_, glong microseconds); -GLIB_AVAILABLE_IN_ALL +GLIB_DEPRECATED_IN_2_62_FOR(g_date_time_new_from_iso8601) gboolean g_time_val_from_iso8601 (const gchar *iso_date, GTimeVal *time_); -GLIB_AVAILABLE_IN_ALL +GLIB_DEPRECATED_IN_2_62_FOR(g_date_time_format) gchar* g_time_val_to_iso8601 (GTimeVal *time_) G_GNUC_MALLOC; +G_GNUC_END_IGNORE_DEPRECATIONS G_END_DECLS diff --git a/glib/gtimezone.c b/glib/gtimezone.c index f418401ee..26a563403 100644 --- a/glib/gtimezone.c +++ b/glib/gtimezone.c @@ -39,8 +39,10 @@ #include "gdate.h" #ifdef G_OS_WIN32 + #define STRICT #include <windows.h> +#include <wchar.h> #endif /** @@ -602,10 +604,23 @@ copy_windows_systemtime (SYSTEMTIME *s_time, TimeZoneDate *tzdate) } /* UTC = local time + bias while local time = UTC + offset */ -static void +static gboolean rule_from_windows_time_zone_info (TimeZoneRule *rule, TIME_ZONE_INFORMATION *tzi) { + gchar *std_name, *dlt_name; + + std_name = g_utf16_to_utf8 ((gunichar2 *)tzi->StandardName, -1, NULL, NULL, NULL); + if (std_name == NULL) + return FALSE; + + dlt_name = g_utf16_to_utf8 ((gunichar2 *)tzi->DaylightName, -1, NULL, NULL, NULL); + if (dlt_name == NULL) + { + g_free (std_name); + return FALSE; + } + /* Set offset */ if (tzi->StandardDate.wMonth) { @@ -614,7 +629,6 @@ rule_from_windows_time_zone_info (TimeZoneRule *rule, copy_windows_systemtime (&(tzi->DaylightDate), &(rule->dlt_start)); copy_windows_systemtime (&(tzi->StandardDate), &(rule->dlt_end)); - } else @@ -622,31 +636,41 @@ rule_from_windows_time_zone_info (TimeZoneRule *rule, rule->std_offset = -tzi->Bias * 60; rule->dlt_start.mon = 0; } - strncpy (rule->std_name, (gchar*)tzi->StandardName, NAME_SIZE - 1); - strncpy (rule->dlt_name, (gchar*)tzi->DaylightName, NAME_SIZE - 1); + strncpy (rule->std_name, std_name, NAME_SIZE - 1); + strncpy (rule->dlt_name, dlt_name, NAME_SIZE - 1); + + g_free (std_name); + g_free (dlt_name); + + return TRUE; } static gchar* windows_default_tzname (void) { - const gchar *subkey = - "SYSTEM\\CurrentControlSet\\Control\\TimeZoneInformation"; + const gunichar2 *subkey = + L"SYSTEM\\CurrentControlSet\\Control\\TimeZoneInformation"; HKEY key; gchar *key_name = NULL; - if (RegOpenKeyExA (HKEY_LOCAL_MACHINE, subkey, 0, + gunichar2 *key_name_w = NULL; + if (RegOpenKeyExW (HKEY_LOCAL_MACHINE, subkey, 0, KEY_QUERY_VALUE, &key) == ERROR_SUCCESS) { DWORD size = 0; - if (RegQueryValueExA (key, "TimeZoneKeyName", NULL, NULL, + if (RegQueryValueExW (key, L"TimeZoneKeyName", NULL, NULL, NULL, &size) == ERROR_SUCCESS) { - key_name = g_malloc ((gint)size); - if (RegQueryValueExA (key, "TimeZoneKeyName", NULL, NULL, - (LPBYTE)key_name, &size) != ERROR_SUCCESS) + key_name_w = g_malloc ((gint)size); + + if (key_name_w == NULL || + RegQueryValueExW (key, L"TimeZoneKeyName", NULL, NULL, + (LPBYTE)key_name_w, &size) != ERROR_SUCCESS) { - g_free (key_name); + g_free (key_name_w); key_name = NULL; } + else + key_name = g_utf16_to_utf8 (key_name_w, -1, NULL, NULL, NULL); } RegCloseKey (key); } @@ -693,10 +717,12 @@ register_tzi_to_tzi (RegTZI *reg, TIME_ZONE_INFORMATION *tzi) static guint rules_from_windows_time_zone (const gchar *identifier, gchar **out_identifier, - TimeZoneRule **rules) + TimeZoneRule **rules, + gboolean copy_identifier) { HKEY key; - gchar *subkey, *subkey_dynamic; + gchar *subkey = NULL; + gchar *subkey_dynamic = NULL; gchar *key_name = NULL; const gchar *reg_key = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time Zones\\"; @@ -704,11 +730,18 @@ rules_from_windows_time_zone (const gchar *identifier, DWORD size; guint rules_num = 0; RegTZI regtzi, regtzi_prev; + WCHAR winsyspath[MAX_PATH]; + gunichar2 *subkey_w, *subkey_dynamic_w; - g_assert (out_identifier != NULL); + if (GetSystemDirectoryW (winsyspath, MAX_PATH) == 0) + return 0; + + g_assert (copy_identifier == FALSE || out_identifier != NULL); g_assert (rules != NULL); - *out_identifier = NULL; + if (copy_identifier) + *out_identifier = NULL; + *rules = NULL; key_name = NULL; @@ -721,90 +754,133 @@ rules_from_windows_time_zone (const gchar *identifier, return 0; subkey = g_strconcat (reg_key, key_name, NULL); + subkey_w = g_utf8_to_utf16 (subkey, -1, NULL, NULL, NULL); + if (subkey_w == NULL) + goto utf16_conv_failed; + subkey_dynamic = g_strconcat (subkey, "\\Dynamic DST", NULL); + subkey_dynamic_w = g_utf8_to_utf16 (subkey_dynamic, -1, NULL, NULL, NULL); + if (subkey_dynamic_w == NULL) + goto utf16_conv_failed; - if (RegOpenKeyExA (HKEY_LOCAL_MACHINE, subkey, 0, + if (RegOpenKeyExW (HKEY_LOCAL_MACHINE, subkey_w, 0, KEY_QUERY_VALUE, &key) != ERROR_SUCCESS) - return 0; + goto utf16_conv_failed; + size = sizeof tzi.StandardName; - if (RegQueryValueExA (key, "Std", NULL, NULL, - (LPBYTE)&(tzi.StandardName), &size) != ERROR_SUCCESS) - goto failed; + + /* use RegLoadMUIStringW() to query MUI_Std from the registry if possible, otherwise + fallback to querying Std */ + if (RegLoadMUIStringW (key, L"MUI_Std", tzi.StandardName, + size, &size, 0, winsyspath) != ERROR_SUCCESS) + { + size = sizeof tzi.StandardName; + if (RegQueryValueExW (key, L"Std", NULL, NULL, + (LPBYTE)&(tzi.StandardName), &size) != ERROR_SUCCESS) + goto registry_failed; + } size = sizeof tzi.DaylightName; - if (RegQueryValueExA (key, "Dlt", NULL, NULL, - (LPBYTE)&(tzi.DaylightName), &size) != ERROR_SUCCESS) - goto failed; + /* use RegLoadMUIStringW() to query MUI_Dlt from the registry if possible, otherwise + fallback to querying Dlt */ + if (RegLoadMUIStringW (key, L"MUI_Dlt", tzi.DaylightName, + size, &size, 0, winsyspath) != ERROR_SUCCESS) + { + size = sizeof tzi.DaylightName; + if (RegQueryValueExW (key, L"Dlt", NULL, NULL, + (LPBYTE)&(tzi.DaylightName), &size) != ERROR_SUCCESS) + goto registry_failed; + } RegCloseKey (key); - if (RegOpenKeyExA (HKEY_LOCAL_MACHINE, subkey_dynamic, 0, + if (RegOpenKeyExW (HKEY_LOCAL_MACHINE, subkey_dynamic_w, 0, KEY_QUERY_VALUE, &key) == ERROR_SUCCESS) { DWORD first, last; int year, i; - gchar *s; + wchar_t s[12]; size = sizeof first; - if (RegQueryValueExA (key, "FirstEntry", NULL, NULL, + if (RegQueryValueExW (key, L"FirstEntry", NULL, NULL, (LPBYTE) &first, &size) != ERROR_SUCCESS) - goto failed; + goto registry_failed; size = sizeof last; - if (RegQueryValueExA (key, "LastEntry", NULL, NULL, + if (RegQueryValueExW (key, L"LastEntry", NULL, NULL, (LPBYTE) &last, &size) != ERROR_SUCCESS) - goto failed; + goto registry_failed; rules_num = last - first + 2; *rules = g_new0 (TimeZoneRule, rules_num); - for (year = first, i = 0; year <= last; year++) + for (year = first, i = 0; *rules != NULL && year <= last; year++) { - s = g_strdup_printf ("%d", year); + gboolean failed = FALSE; + swprintf_s (s, 11, L"%d", year); + + if (!failed) + { + size = sizeof regtzi; + if (RegQueryValueExW (key, s, NULL, NULL, + (LPBYTE) ®tzi, &size) != ERROR_SUCCESS) + failed = TRUE; + } - size = sizeof regtzi; - if (RegQueryValueExA (key, s, NULL, NULL, - (LPBYTE) ®tzi, &size) != ERROR_SUCCESS) + if (failed) { g_free (*rules); *rules = NULL; break; } - g_free (s); - if (year > first && memcmp (®tzi_prev, ®tzi, sizeof regtzi) == 0) continue; else memcpy (®tzi_prev, ®tzi, sizeof regtzi); register_tzi_to_tzi (®tzi, &tzi); - rule_from_windows_time_zone_info (&(*rules)[i], &tzi); + + if (!rule_from_windows_time_zone_info (&(*rules)[i], &tzi)) + { + g_free (*rules); + *rules = NULL; + break; + } + (*rules)[i++].start_year = year; } rules_num = i + 1; -failed: +registry_failed: RegCloseKey (key); } - else if (RegOpenKeyExA (HKEY_LOCAL_MACHINE, subkey, 0, + else if (RegOpenKeyExW (HKEY_LOCAL_MACHINE, subkey_w, 0, KEY_QUERY_VALUE, &key) == ERROR_SUCCESS) { size = sizeof regtzi; - if (RegQueryValueExA (key, "TZI", NULL, NULL, + if (RegQueryValueExW (key, L"TZI", NULL, NULL, (LPBYTE) ®tzi, &size) == ERROR_SUCCESS) { rules_num = 2; *rules = g_new0 (TimeZoneRule, 2); register_tzi_to_tzi (®tzi, &tzi); - rule_from_windows_time_zone_info (&(*rules)[0], &tzi); + + if (!rule_from_windows_time_zone_info (&(*rules)[0], &tzi)) + { + g_free (*rules); + *rules = NULL; + } } RegCloseKey (key); } +utf16_conv_failed: + g_free (subkey_dynamic_w); g_free (subkey_dynamic); + g_free (subkey_w); g_free (subkey); if (*rules) @@ -815,7 +891,10 @@ failed: else (*rules)[rules_num - 1].start_year = (*rules)[rules_num - 2].start_year + 1; - *out_identifier = g_steal_pointer (&key_name); + if (copy_identifier) + *out_identifier = g_steal_pointer (&key_name); + else + g_free (key_name); return rules_num; } @@ -850,7 +929,7 @@ find_relative_date (TimeZoneDate *buffer) else /* M.W.D */ { guint days; - guint days_in_month = g_date_days_in_month (buffer->mon, buffer->year); + guint days_in_month = g_date_get_days_in_month (buffer->mon, buffer->year); GDateWeekday first_wday; g_date_set_dmy (&date, 1, buffer->mon, buffer->year); @@ -1352,9 +1431,15 @@ rules_from_identifier (const gchar *identifier, /* Use US rules, Windows' default is Pacific Standard Time */ if ((rules_num = rules_from_windows_time_zone ("Pacific Standard Time", - out_identifier, - rules))) + NULL, + rules, + FALSE))) { + /* We don't want to hardcode our identifier here as + * "Pacific Standard Time", use what was passed in + */ + *out_identifier = g_strdup (identifier); + for (i = 0; i < rules_num - 1; i++) { (*rules)[i].std_offset = - tzr.std_offset; @@ -1499,7 +1584,8 @@ g_time_zone_new (const gchar *identifier) #elif defined (G_OS_WIN32) if ((rules_num = rules_from_windows_time_zone (identifier, &resolved_identifier, - &rules))) + &rules, + TRUE))) { init_zone_from_rules (tz, rules, rules_num, g_steal_pointer (&resolved_identifier)); g_free (rules); @@ -1518,15 +1604,16 @@ g_time_zone_new (const gchar *identifier) { rules = g_new0 (TimeZoneRule, 2); - rule_from_windows_time_zone_info (&rules[0], &tzi); - - memset (rules[0].std_name, 0, NAME_SIZE); - memset (rules[0].dlt_name, 0, NAME_SIZE); + if (rule_from_windows_time_zone_info (&rules[0], &tzi)) + { + memset (rules[0].std_name, 0, NAME_SIZE); + memset (rules[0].dlt_name, 0, NAME_SIZE); - rules[0].start_year = MIN_TZYEAR; - rules[1].start_year = MAX_TZYEAR; + rules[0].start_year = MIN_TZYEAR; + rules[1].start_year = MAX_TZYEAR; - init_zone_from_rules (tz, rules, 2, windows_default_tzname ()); + init_zone_from_rules (tz, rules, 2, windows_default_tzname ()); + } g_free (rules); } diff --git a/glib/gtrashstack.c b/glib/gtrashstack.c index 02599d632..8d5226840 100644 --- a/glib/gtrashstack.c +++ b/glib/gtrashstack.c @@ -24,6 +24,9 @@ #include "config.h" +/* we know we are deprecated here, no need for warnings */ +#define GLIB_DISABLE_DEPRECATION_WARNINGS + #include "gtrashstack.h" /** diff --git a/glib/gtrashstack.h b/glib/gtrashstack.h index 44b3c6c10..0730ec296 100644 --- a/glib/gtrashstack.h +++ b/glib/gtrashstack.h @@ -33,11 +33,13 @@ G_BEGIN_DECLS -typedef struct _GTrashStack GTrashStack; +G_GNUC_BEGIN_IGNORE_DEPRECATIONS + +typedef struct _GTrashStack GTrashStack GLIB_DEPRECATED_TYPE_IN_2_48; struct _GTrashStack { GTrashStack *next; -}; +} GLIB_DEPRECATED_TYPE_IN_2_48; GLIB_DEPRECATED_IN_2_48 void g_trash_stack_push (GTrashStack **stack_p, @@ -49,6 +51,8 @@ gpointer g_trash_stack_peek (GTrashStack **stack_p); GLIB_DEPRECATED_IN_2_48 guint g_trash_stack_height (GTrashStack **stack_p); +G_GNUC_END_IGNORE_DEPRECATIONS + G_END_DECLS #endif /* __G_TRASH_STACK_H_ */ diff --git a/glib/gtree.c b/glib/gtree.c index 115f44659..e8d4e204c 100644 --- a/glib/gtree.c +++ b/glib/gtree.c @@ -853,8 +853,8 @@ g_tree_lookup (GTree *tree, * g_tree_lookup_extended: * @tree: a #GTree * @lookup_key: the key to look up - * @orig_key: (optional) (nullable): returns the original key - * @value: (optional) (nullable): returns the value associated with the key + * @orig_key: (out) (optional) (nullable): returns the original key + * @value: (out) (optional) (nullable): returns the value associated with the key * * Looks up a key in the #GTree, returning the original key and the * associated value. This is useful if you need to free the memory diff --git a/glib/gtypes.h b/glib/gtypes.h index 3eba019be..d646f15e8 100644 --- a/glib/gtypes.h +++ b/glib/gtypes.h @@ -119,6 +119,20 @@ typedef void (*GHFunc) (gpointer key, gpointer user_data); /** + * GCopyFunc: + * @src: (not nullable): A pointer to the data which should be copied + * @data: Additional data + * + * A function of this signature is used to copy the node data + * when doing a deep-copy of a tree. + * + * Returns: (not nullable): A pointer to the copy + * + * Since: 2.4 + */ +typedef gpointer (*GCopyFunc) (gconstpointer src, + gpointer data); +/** * GFreeFunc: * @data: a data pointer * @@ -437,6 +451,9 @@ typedef const gchar * (*GTranslateFunc) (const gchar *str, _GLIB_CHECKED_MUL_U32(dest, a, b) #endif +/* FIXME: Hide this from gtkdoc scanner because it confuses its poor regexes. + * https://gitlab.gnome.org/GNOME/gtk-doc/issues/90 */ +#ifndef __GTK_DOC_IGNORE__ /* The names of the following inlines are private. Use the macro * definitions above. */ @@ -460,6 +477,7 @@ static inline gboolean _GLIB_CHECKED_ADD_U64 (guint64 *dest, guint64 a, guint64 static inline gboolean _GLIB_CHECKED_MUL_U64 (guint64 *dest, guint64 a, guint64 b) { *dest = a * b; return !a || *dest / a == b; } #endif +#endif /* __GTK_DOC_IGNORE__ */ /* IEEE Standard 754 Single Precision Storage Format (gfloat): * @@ -528,13 +546,13 @@ union _GDoubleIEEE754 #error unknown ENDIAN type #endif /* !G_LITTLE_ENDIAN && !G_BIG_ENDIAN */ -typedef struct _GTimeVal GTimeVal; +typedef struct _GTimeVal GTimeVal GLIB_DEPRECATED_TYPE_IN_2_62_FOR(GDateTime); struct _GTimeVal { glong tv_sec; glong tv_usec; -}; +} GLIB_DEPRECATED_TYPE_IN_2_62_FOR(GDateTime); typedef gint grefcount; typedef volatile gint gatomicrefcount; diff --git a/glib/gunicode.h b/glib/gunicode.h index 700a3f2d9..5663aec7e 100644 --- a/glib/gunicode.h +++ b/glib/gunicode.h @@ -154,9 +154,7 @@ typedef enum * * Deprecated: 2.30: Use %G_UNICODE_SPACING_MARK. */ -#ifndef G_DISABLE_DEPRECATED -#define G_UNICODE_COMBINING_MARK G_UNICODE_SPACING_MARK -#endif +#define G_UNICODE_COMBINING_MARK G_UNICODE_SPACING_MARK GLIB_DEPRECATED_MACRO_IN_2_30_FOR(G_UNICODE_SPACING_MARK) /** * GUnicodeBreakType: @@ -422,6 +420,10 @@ typedef enum * @G_UNICODE_SCRIPT_MEDEFAIDRIN: Medefaidrin. Since: 2.58 * @G_UNICODE_SCRIPT_OLD_SOGDIAN: Old Sogdian. Since: 2.58 * @G_UNICODE_SCRIPT_SOGDIAN: Sogdian. Since: 2.58 + * @G_UNICODE_SCRIPT_ELYMAIC: Elym. Since: 2.62 + * @G_UNICODE_SCRIPT_NANDINAGARI: Nand. Since: 2.62 + * @G_UNICODE_SCRIPT_NYIAKENG_PUACHUE_HMONG: Rohg. Since: 2.62 + * @G_UNICODE_SCRIPT_WANCHO: Wcho. Since: 2.62 * * The #GUnicodeScript enumeration identifies different writing * systems. The values correspond to the names as defined in the @@ -563,7 +565,7 @@ typedef enum G_UNICODE_SCRIPT_KHUDAWADI, /* Sind */ G_UNICODE_SCRIPT_LINEAR_A, /* Lina */ G_UNICODE_SCRIPT_MAHAJANI, /* Mahj */ - G_UNICODE_SCRIPT_MANICHAEAN, /* Manu */ + G_UNICODE_SCRIPT_MANICHAEAN, /* Mani */ G_UNICODE_SCRIPT_MENDE_KIKAKUI, /* Mend */ G_UNICODE_SCRIPT_MODI, /* Modi */ G_UNICODE_SCRIPT_MRO, /* Mroo */ diff --git a/glib/gunicollate.c b/glib/gunicollate.c index 161a2de82..f6599f1fb 100644 --- a/glib/gunicollate.c +++ b/glib/gunicollate.c @@ -20,7 +20,7 @@ #include <locale.h> #include <string.h> -#ifdef __STDC_ISO_10646__ +#ifdef HAVE_WCHAR_H #include <wchar.h> #endif @@ -35,10 +35,11 @@ #include "gstrfuncs.h" #include "gtestutils.h" #include "gcharset.h" -#ifndef __STDC_ISO_10646__ #include "gconvert.h" -#endif +#if SIZEOF_WCHAR_T == 4 && defined(__STDC_ISO_10646__) +#define GUNICHAR_EQUALS_WCHAR_T 1 +#endif #ifdef _MSC_VER /* Workaround for bug in MSVCR80.DLL */ @@ -101,7 +102,7 @@ g_utf8_collate (const gchar *str1, g_free (str2_utf16); g_free (str1_utf16); -#elif defined(__STDC_ISO_10646__) +#elif defined(HAVE_WCHAR_H) && defined(GUNICHAR_EQUALS_WCHAR_T) gunichar *str1_norm; gunichar *str2_norm; @@ -117,7 +118,7 @@ g_utf8_collate (const gchar *str1, g_free (str1_norm); g_free (str2_norm); -#else /* !__STDC_ISO_10646__ */ +#else const gchar *charset; gchar *str1_norm; @@ -154,12 +155,12 @@ g_utf8_collate (const gchar *str1, g_free (str1_norm); g_free (str2_norm); -#endif /* __STDC_ISO_10646__ */ +#endif return result; } -#if defined(__STDC_ISO_10646__) +#if defined(HAVE_WCHAR_H) && defined(GUNICHAR_EQUALS_WCHAR_T) /* We need UTF-8 encoding of numbers to encode the weights if * we are using wcsxfrm. However, we aren't encoding Unicode * characters, so we can't simply use g_unichar_to_utf8. @@ -206,7 +207,7 @@ utf8_encode (char *buf, wchar_t val) return retval; } -#endif /* __STDC_ISO_10646__ */ +#endif #ifdef HAVE_CARBON @@ -382,7 +383,7 @@ g_utf8_collate_key (const gchar *str, g_return_val_if_fail (str != NULL, NULL); result = carbon_collate_key (str, len); -#elif defined(__STDC_ISO_10646__) +#elif defined(HAVE_WCHAR_H) && defined(GUNICHAR_EQUALS_WCHAR_T) gsize xfrm_len; gunichar *str_norm; @@ -412,7 +413,7 @@ g_utf8_collate_key (const gchar *str, g_free (str_norm); return result; -#else /* !__STDC_ISO_10646__ */ +#else gsize xfrm_len; const gchar *charset; @@ -466,7 +467,7 @@ g_utf8_collate_key (const gchar *str, } g_free (str_norm); -#endif /* __STDC_ISO_10646__ */ +#endif return result; } diff --git a/glib/gunidecomp.c b/glib/gunidecomp.c index b85351883..19ecdae36 100644 --- a/glib/gunidecomp.c +++ b/glib/gunidecomp.c @@ -521,9 +521,9 @@ _g_utf8_normalize_wc (const gchar *str, * a legacy encoding or pass it to a system with * less capable Unicode handling. * - * Returns: a newly allocated string, that is the - * normalized form of @str, or %NULL if @str is not - * valid UTF-8. + * Returns: (nullable): a newly allocated string, that + * is the normalized form of @str, or %NULL if @str + * is not valid UTF-8. **/ gchar * g_utf8_normalize (const gchar *str, @@ -571,8 +571,8 @@ decompose_hangul_step (gunichar ch, /** * g_unichar_decompose: * @ch: a Unicode character - * @a: return location for the first component of @ch - * @b: return location for the second component of @ch + * @a: (out) (not optional): return location for the first component of @ch + * @b: (out) (not optional): return location for the second component of @ch * * Performs a single decomposition step of the * Unicode canonical decomposition algorithm. @@ -646,7 +646,7 @@ g_unichar_decompose (gunichar ch, * g_unichar_compose: * @a: a Unicode character * @b: a Unicode character - * @ch: return location for the composed character + * @ch: (out) (not optional): return location for the composed character * * Performs a single composition step of the * Unicode canonical composition algorithm. @@ -685,7 +685,7 @@ g_unichar_compose (gunichar a, * g_unichar_fully_decompose: * @ch: a Unicode character. * @compat: whether perform canonical or compatibility decomposition - * @result: (nullable): location to store decomposed result, or %NULL + * @result: (optional) (out caller-allocates): location to store decomposed result, or %NULL * @result_len: length of @result * * Computes the canonical or compatibility decomposition of a diff --git a/glib/guniprop.c b/glib/guniprop.c index 9a79e4316..9f67d9a4e 100644 --- a/glib/guniprop.c +++ b/glib/guniprop.c @@ -1425,7 +1425,7 @@ static const guint32 iso15924_tags[] = PACK ('S','i','n','d'), /* G_UNICODE_SCRIPT_KHUDAWADI */ PACK ('L','i','n','a'), /* G_UNICODE_SCRIPT_LINEAR_A */ PACK ('M','a','h','j'), /* G_UNICODE_SCRIPT_MAHAJANI */ - PACK ('M','a','n','u'), /* G_UNICODE_SCRIPT_MANICHAEAN */ + PACK ('M','a','n','i'), /* G_UNICODE_SCRIPT_MANICHAEAN */ PACK ('M','e','n','d'), /* G_UNICODE_SCRIPT_MENDE_KIKAKUI */ PACK ('M','o','d','i'), /* G_UNICODE_SCRIPT_MODI */ PACK ('M','r','o','o'), /* G_UNICODE_SCRIPT_MRO */ diff --git a/glib/gutf8.c b/glib/gutf8.c index 291534fc8..a19f72044 100644 --- a/glib/gutf8.c +++ b/glib/gutf8.c @@ -136,7 +136,7 @@ const gchar * const g_utf8_skip = utf8_skip_data; * is made to see if the character found is actually valid other than * it starts with an appropriate byte. * - * Returns: a pointer to the found character or %NULL. + * Returns: (transfer none) (nullable): a pointer to the found character or %NULL. */ gchar * g_utf8_find_prev_char (const char *str, @@ -167,7 +167,7 @@ g_utf8_find_prev_char (const char *str, * @end is non-%NULL, the return value will be %NULL if the end of the string * is reached. * - * Returns: (nullable): a pointer to the found character or %NULL if @end is + * Returns: (transfer none) (nullable): a pointer to the found character or %NULL if @end is * set and is reached */ gchar * @@ -199,7 +199,7 @@ g_utf8_find_next_char (const gchar *p, * it starts with an appropriate byte. If @p might be the first * character of the string, you must use g_utf8_find_prev_char() instead. * - * Returns: a pointer to the found character + * Returns: (transfer none) (not nullable): a pointer to the found character */ gchar * g_utf8_prev_char (const gchar *p) @@ -275,7 +275,7 @@ g_utf8_strlen (const gchar *p, * Copies a substring out of a UTF-8 encoded string. * The substring will contain @end_pos - @start_pos characters. * - * Returns: a newly allocated copy of the requested + * Returns: (transfer full): a newly allocated copy of the requested * substring. Free with g_free() when no longer needed. * * Since: 2.30 @@ -344,7 +344,7 @@ g_utf8_get_char (const gchar *p) * This limitation exists as this function is called frequently during * text rendering and therefore has to be as fast as possible. * - * Returns: the resulting pointer + * Returns: (transfer none): the resulting pointer */ gchar * g_utf8_offset_to_pointer (const gchar *str, @@ -412,7 +412,7 @@ g_utf8_pointer_to_offset (const gchar *str, /** * g_utf8_strncpy: - * @dest: buffer to fill with characters from @src + * @dest: (transfer none): buffer to fill with characters from @src * @src: UTF-8 encoded string * @n: character count * @@ -424,7 +424,7 @@ g_utf8_pointer_to_offset (const gchar *str, * Note you must ensure @dest is at least 4 * @n to fit the * largest possible UTF-8 characters * - * Returns: @dest + * Returns: (transfer none): @dest */ gchar * g_utf8_strncpy (gchar *dest, @@ -518,7 +518,7 @@ g_unichar_to_utf8 (gunichar c, * in a UTF-8 encoded string, while limiting the search to @len bytes. * If @len is -1, allow unbounded search. * - * Returns: %NULL if the string does not contain the character, + * Returns: (transfer none) (nullable): %NULL if the string does not contain the character, * otherwise, a pointer to the start of the leftmost occurrence * of the character in the string. */ @@ -546,7 +546,7 @@ g_utf8_strchr (const char *p, * in a UTF-8 encoded string, while limiting the search to @len bytes. * If @len is -1, allow unbounded search. * - * Returns: %NULL if the string does not contain the character, + * Returns: (transfer none) (nullable): %NULL if the string does not contain the character, * otherwise, a pointer to the start of the rightmost occurrence * of the character in the string. */ @@ -709,7 +709,7 @@ g_utf8_get_char_validated (const gchar *p, * but does no error checking on the input. A trailing 0 character * will be added to the string after the converted text. * - * Returns: a pointer to a newly allocated UCS-4 string. + * Returns: (transfer full): a pointer to a newly allocated UCS-4 string. * This value must be freed with g_free(). */ gunichar * @@ -834,7 +834,7 @@ try_malloc_n (gsize n_blocks, gsize n_block_bytes, GError **error) * representation as UCS-4. A trailing 0 character will be added to the * string after the converted text. * - * Returns: a pointer to a newly allocated UCS-4 string. + * Returns: (transfer full): a pointer to a newly allocated UCS-4 string. * This value must be freed with g_free(). If an error occurs, * %NULL will be returned and @error set. */ @@ -915,7 +915,7 @@ g_utf8_to_ucs4 (const gchar *str, * Convert a string from a 32-bit fixed width representation as UCS-4. * to UTF-8. The result will be terminated with a 0 byte. * - * Returns: a pointer to a newly allocated UTF-8 string. + * Returns: (transfer full): a pointer to a newly allocated UTF-8 string. * This value must be freed with g_free(). If an error occurs, * %NULL will be returned and @error set. In that case, @items_read * will be set to the position of the first invalid input character. @@ -1002,7 +1002,7 @@ g_ucs4_to_utf8 (const gunichar *str, * be correctly interpreted as UTF-16, i.e. it doesn't contain * things unpaired surrogates. * - * Returns: a pointer to a newly allocated UTF-8 string. + * Returns: (transfer full): a pointer to a newly allocated UTF-8 string. * This value must be freed with g_free(). If an error occurs, * %NULL will be returned and @error set. **/ @@ -1146,7 +1146,7 @@ g_utf16_to_utf8 (const gunichar2 *str, * Convert a string from UTF-16 to UCS-4. The result will be * nul-terminated. * - * Returns: a pointer to a newly allocated UCS-4 string. + * Returns: (transfer full): a pointer to a newly allocated UCS-4 string. * This value must be freed with g_free(). If an error occurs, * %NULL will be returned and @error set. */ @@ -1284,7 +1284,7 @@ g_utf16_to_ucs4 (const gunichar2 *str, * Convert a string from UTF-8 to UTF-16. A 0 character will be * added to the result after the converted text. * - * Returns: a pointer to a newly allocated UTF-16 string. + * Returns: (transfer full): a pointer to a newly allocated UTF-16 string. * This value must be freed with g_free(). If an error occurs, * %NULL will be returned and @error set. */ @@ -1400,7 +1400,7 @@ g_utf8_to_utf16 (const gchar *str, * Convert a string from UCS-4 to UTF-16. A 0 character will be * added to the result after the converted text. * - * Returns: a pointer to a newly allocated UTF-16 string. + * Returns: (transfer full): a pointer to a newly allocated UTF-16 string. * This value must be freed with g_free(). If an error occurs, * %NULL will be returned and @error set. */ @@ -1752,7 +1752,7 @@ g_unichar_validate (gunichar ch) * newly-allocated memory, which should be freed with g_free() when * no longer needed. * - * Returns: a newly-allocated string which is the reverse of @str + * Returns: (transfer full): a newly-allocated string which is the reverse of @str * * Since: 2.2 */ diff --git a/glib/gutils.c b/glib/gutils.c index 9e2f0b0b7..62a64d912 100644 --- a/glib/gutils.c +++ b/glib/gutils.c @@ -218,6 +218,7 @@ _glib_get_dll_directory (void) * * Deprecated:2.32: It is best to avoid g_atexit(). */ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS void g_atexit (GVoidFunc func) { @@ -232,6 +233,7 @@ g_atexit (GVoidFunc func) g_strerror (errsv)); } } +G_GNUC_END_IGNORE_DEPRECATIONS /* Based on execvp() from GNU Libc. * Some of this code is cut-and-pasted into gspawn.c @@ -1001,8 +1003,37 @@ g_get_host_name (void) gchar *utmp; #ifndef G_OS_WIN32 - gchar *tmp = g_malloc (sizeof (gchar) * 100); - failed = (gethostname (tmp, sizeof (gchar) * 100) == -1); + glong max; + gsize size; + /* The number 256 * 256 is taken from the value of _POSIX_HOST_NAME_MAX, + * which is 255. Since we use _POSIX_HOST_NAME_MAX + 1 (= 256) in the + * fallback case, we pick 256 * 256 as the size of the larger buffer here. + * It should be large enough. It doesn't looks reasonable to name a host + * with a string that is longer than 64 KiB. + */ + const gsize size_large = (gsize) 256 * 256; + gchar *tmp; + + max = sysconf (_SC_HOST_NAME_MAX); + if (max > 0 && max <= G_MAXSIZE - 1) + size = (gsize) max + 1; + else +#ifdef HOST_NAME_MAX + size = HOST_NAME_MAX + 1; +#else + size = _POSIX_HOST_NAME_MAX + 1; +#endif + + tmp = g_malloc (size); + failed = (gethostname (tmp, size) == -1); + if (failed && size < size_large) + { + /* Try again with a larger buffer if 'size' may be too small. */ + g_free (tmp); + tmp = g_malloc (size_large); + failed = (gethostname (tmp, size_large) == -1); + } + if (failed) g_clear_pointer (&tmp, g_free); utmp = tmp; diff --git a/glib/gutils.h b/glib/gutils.h index 070f9cff5..560a84e3a 100644 --- a/glib/gutils.h +++ b/glib/gutils.h @@ -194,7 +194,10 @@ gchar *g_format_size (guint64 size); GLIB_DEPRECATED_IN_2_30_FOR(g_format_size) gchar *g_format_size_for_display (goffset size); -#ifndef G_DISABLE_DEPRECATED +#define g_ATEXIT(proc) (atexit (proc)) GLIB_DEPRECATED_MACRO_IN_2_32 +#define g_memmove(dest,src,len) \ + G_STMT_START { memmove ((dest), (src), (len)); } G_STMT_END GLIB_DEPRECATED_MACRO_IN_2_40_FOR(memmove) + /** * GVoidFunc: * @@ -202,10 +205,13 @@ gchar *g_format_size_for_display (goffset size); * and has no return value. It is used to specify the type * function passed to g_atexit(). */ -typedef void (*GVoidFunc) (void); -#define ATEXIT(proc) g_ATEXIT(proc) +typedef void (*GVoidFunc) (void) GLIB_DEPRECATED_TYPE_IN_2_32; +#define ATEXIT(proc) g_ATEXIT(proc) GLIB_DEPRECATED_MACRO_IN_2_32 + +G_GNUC_BEGIN_IGNORE_DEPRECATIONS GLIB_DEPRECATED void g_atexit (GVoidFunc func); +G_GNUC_END_IGNORE_DEPRECATIONS #ifdef G_OS_WIN32 /* It's a bad idea to wrap atexit() on Windows. If the GLib DLL calls @@ -217,9 +223,7 @@ void g_atexit (GVoidFunc func); #if (defined(__MINGW_H) && !defined(_STDLIB_H_)) || (defined(_MSC_VER) && !defined(_INC_STDLIB)) int atexit (void (*)(void)); #endif -#define g_atexit(func) atexit(func) -#endif - +#define g_atexit(func) atexit(func) GLIB_DEPRECATED_MACRO_IN_2_32 #endif @@ -311,8 +315,6 @@ void g_abort (void) G_GNUC_NORETURN G_ANALYZER_NORETURN; #endif #endif -#ifndef G_DISABLE_DEPRECATED - /* * This macro is deprecated. This DllMain() is too complex. It is * recommended to write an explicit minimal DLlMain() that just saves @@ -331,7 +333,7 @@ void g_abort (void) G_GNUC_NORETURN G_ANALYZER_NORETURN; */ #ifndef G_PLATFORM_WIN32 -# define G_WIN32_DLLMAIN_FOR_DLL_NAME(static, dll_name) +# define G_WIN32_DLLMAIN_FOR_DLL_NAME(static, dll_name) GLIB_DEPRECATED_MACRO_IN_2_26 #else # define G_WIN32_DLLMAIN_FOR_DLL_NAME(static, dll_name) \ static char *dll_name; \ @@ -354,10 +356,7 @@ DllMain (HINSTANCE hinstDLL, \ } \ \ return TRUE; \ -} - -#endif /* !G_DISABLE_DEPRECATED */ - +} GLIB_DEPRECATED_MACRO_IN_2_26 #endif /* G_PLATFORM_WIN32 */ G_END_DECLS diff --git a/glib/gvarianttypeinfo.c b/glib/gvarianttypeinfo.c index bed0bb717..2904686b8 100644 --- a/glib/gvarianttypeinfo.c +++ b/glib/gvarianttypeinfo.c @@ -223,8 +223,8 @@ g_variant_type_info_get_type_string (GVariantTypeInfo *info) /* < private > * g_variant_type_info_query: * @info: a #GVariantTypeInfo - * @alignment: (optional): the location to store the alignment, or %NULL - * @fixed_size: (optional): the location to store the fixed size, or %NULL + * @alignment: (out) (optional): the location to store the alignment, or %NULL + * @fixed_size: (out) (optional): the location to store the fixed size, or %NULL * * Queries @info to determine the alignment requirements and fixed size * (if any) of the type. @@ -332,8 +332,8 @@ g_variant_type_info_element (GVariantTypeInfo *info) /* < private > * g_variant_type_query_element: * @info: a #GVariantTypeInfo for an array or maybe type - * @alignment: (optional): the location to store the alignment, or %NULL - * @fixed_size: (optional): the location to store the fixed size, or %NULL + * @alignment: (out) (optional): the location to store the alignment, or %NULL + * @fixed_size: (out) (optional): the location to store the fixed size, or %NULL * * Returns the alignment requires and fixed size (if any) for the * element type of the array. This call is a convenience wrapper around diff --git a/glib/gversionmacros.h b/glib/gversionmacros.h index e66afdd91..ee91f6d5b 100644 --- a/glib/gversionmacros.h +++ b/glib/gversionmacros.h @@ -319,267 +319,605 @@ #if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_26 # define GLIB_DEPRECATED_IN_2_26 GLIB_DEPRECATED # define GLIB_DEPRECATED_IN_2_26_FOR(f) GLIB_DEPRECATED_FOR(f) +# define GLIB_DEPRECATED_MACRO_IN_2_26 GLIB_DEPRECATED_MACRO +# define GLIB_DEPRECATED_MACRO_IN_2_26_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f) +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_26 GLIB_DEPRECATED_ENUMERATOR +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_26_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f) +# define GLIB_DEPRECATED_TYPE_IN_2_26 GLIB_DEPRECATED_TYPE +# define GLIB_DEPRECATED_TYPE_IN_2_26_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f) #else # define GLIB_DEPRECATED_IN_2_26 _GLIB_EXTERN # define GLIB_DEPRECATED_IN_2_26_FOR(f) _GLIB_EXTERN +# define GLIB_DEPRECATED_MACRO_IN_2_26 +# define GLIB_DEPRECATED_MACRO_IN_2_26_FOR(f) +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_26 +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_26_FOR(f) +# define GLIB_DEPRECATED_TYPE_IN_2_26 +# define GLIB_DEPRECATED_TYPE_IN_2_26_FOR(f) #endif #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_26 # define GLIB_AVAILABLE_IN_2_26 GLIB_UNAVAILABLE(2, 26) +# define GLIB_AVAILABLE_MACRO_IN_2_26 GLIB_UNAVAILABLE_MACRO(2, 26) +# define GLIB_AVAILABLE_ENUMERATOR_IN_2_26 GLIB_UNAVAILABLE_ENUMERATOR(2, 26) +# define GLIB_AVAILABLE_TYPE_IN_2_26 GLIB_UNAVAILABLE_TYPE(2, 26) #else # define GLIB_AVAILABLE_IN_2_26 _GLIB_EXTERN +# define GLIB_AVAILABLE_MACRO_IN_2_26 +# define GLIB_AVAILABLE_ENUMERATOR_IN_2_26 +# define GLIB_AVAILABLE_TYPE_IN_2_26 #endif #if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_28 # define GLIB_DEPRECATED_IN_2_28 GLIB_DEPRECATED # define GLIB_DEPRECATED_IN_2_28_FOR(f) GLIB_DEPRECATED_FOR(f) +# define GLIB_DEPRECATED_MACRO_IN_2_28 GLIB_DEPRECATED_MACRO +# define GLIB_DEPRECATED_MACRO_IN_2_28_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f) +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_28 GLIB_DEPRECATED_ENUMERATOR +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_28_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f) +# define GLIB_DEPRECATED_TYPE_IN_2_28 GLIB_DEPRECATED_TYPE +# define GLIB_DEPRECATED_TYPE_IN_2_28_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f) #else # define GLIB_DEPRECATED_IN_2_28 _GLIB_EXTERN # define GLIB_DEPRECATED_IN_2_28_FOR(f) _GLIB_EXTERN +# define GLIB_DEPRECATED_MACRO_IN_2_28 +# define GLIB_DEPRECATED_MACRO_IN_2_28_FOR(f) +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_28 +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_28_FOR(f) +# define GLIB_DEPRECATED_TYPE_IN_2_28 +# define GLIB_DEPRECATED_TYPE_IN_2_28_FOR(f) #endif #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_28 # define GLIB_AVAILABLE_IN_2_28 GLIB_UNAVAILABLE(2, 28) +# define GLIB_AVAILABLE_MACRO_IN_2_28 GLIB_UNAVAILABLE_MACRO(2, 28) +# define GLIB_AVAILABLE_ENUMERATOR_IN_2_28 GLIB_UNAVAILABLE_ENUMERATOR(2, 28) +# define GLIB_AVAILABLE_TYPE_IN_2_28 GLIB_UNAVAILABLE_TYPE(2, 28) #else # define GLIB_AVAILABLE_IN_2_28 _GLIB_EXTERN +# define GLIB_AVAILABLE_MACRO_IN_2_28 +# define GLIB_AVAILABLE_ENUMERATOR_IN_2_28 +# define GLIB_AVAILABLE_TYPE_IN_2_28 #endif #if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_30 # define GLIB_DEPRECATED_IN_2_30 GLIB_DEPRECATED # define GLIB_DEPRECATED_IN_2_30_FOR(f) GLIB_DEPRECATED_FOR(f) +# define GLIB_DEPRECATED_MACRO_IN_2_30 GLIB_DEPRECATED_MACRO +# define GLIB_DEPRECATED_MACRO_IN_2_30_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f) +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_30 GLIB_DEPRECATED_ENUMERATOR +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_30_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f) +# define GLIB_DEPRECATED_TYPE_IN_2_30 GLIB_DEPRECATED_TYPE +# define GLIB_DEPRECATED_TYPE_IN_2_30_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f) #else # define GLIB_DEPRECATED_IN_2_30 _GLIB_EXTERN # define GLIB_DEPRECATED_IN_2_30_FOR(f) _GLIB_EXTERN +# define GLIB_DEPRECATED_MACRO_IN_2_30 +# define GLIB_DEPRECATED_MACRO_IN_2_30_FOR(f) +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_30 +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_30_FOR(f) +# define GLIB_DEPRECATED_TYPE_IN_2_30 +# define GLIB_DEPRECATED_TYPE_IN_2_30_FOR(f) #endif #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_30 # define GLIB_AVAILABLE_IN_2_30 GLIB_UNAVAILABLE(2, 30) +# define GLIB_AVAILABLE_MACRO_IN_2_30 GLIB_UNAVAILABLE_MACRO(2, 30) +# define GLIB_AVAILABLE_ENUMERATOR_IN_2_30 GLIB_UNAVAILABLE_ENUMERATOR(2, 30) +# define GLIB_AVAILABLE_TYPE_IN_2_30 GLIB_UNAVAILABLE_TYPE(2, 30) #else # define GLIB_AVAILABLE_IN_2_30 _GLIB_EXTERN +# define GLIB_AVAILABLE_MACRO_IN_2_30 +# define GLIB_AVAILABLE_ENUMERATOR_IN_2_30 +# define GLIB_AVAILABLE_TYPE_IN_2_30 #endif #if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_32 # define GLIB_DEPRECATED_IN_2_32 GLIB_DEPRECATED # define GLIB_DEPRECATED_IN_2_32_FOR(f) GLIB_DEPRECATED_FOR(f) +# define GLIB_DEPRECATED_MACRO_IN_2_32 GLIB_DEPRECATED_MACRO +# define GLIB_DEPRECATED_MACRO_IN_2_32_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f) +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_32 GLIB_DEPRECATED_ENUMERATOR +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_32_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f) +# define GLIB_DEPRECATED_TYPE_IN_2_32 GLIB_DEPRECATED_TYPE +# define GLIB_DEPRECATED_TYPE_IN_2_32_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f) #else # define GLIB_DEPRECATED_IN_2_32 _GLIB_EXTERN # define GLIB_DEPRECATED_IN_2_32_FOR(f) _GLIB_EXTERN +# define GLIB_DEPRECATED_MACRO_IN_2_32 +# define GLIB_DEPRECATED_MACRO_IN_2_32_FOR(f) +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_32 +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_32_FOR(f) +# define GLIB_DEPRECATED_TYPE_IN_2_32 +# define GLIB_DEPRECATED_TYPE_IN_2_32_FOR(f) +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_32 +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_32_FOR(f) +# define GLIB_DEPRECATED_TYPE_IN_2_32 +# define GLIB_DEPRECATED_TYPE_IN_2_32_FOR(f) #endif #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_32 # define GLIB_AVAILABLE_IN_2_32 GLIB_UNAVAILABLE(2, 32) +# define GLIB_AVAILABLE_MACRO_IN_2_32 GLIB_UNAVAILABLE_MACRO(2, 32) +# define GLIB_AVAILABLE_ENUMERATOR_IN_2_32 GLIB_UNAVAILABLE_ENUMERATOR(2, 32) +# define GLIB_AVAILABLE_TYPE_IN_2_32 GLIB_UNAVAILABLE_TYPE(2, 32) #else # define GLIB_AVAILABLE_IN_2_32 _GLIB_EXTERN +# define GLIB_AVAILABLE_MACRO_IN_2_32 +# define GLIB_AVAILABLE_ENUMERATOR_IN_2_32 +# define GLIB_AVAILABLE_TYPE_IN_2_32 #endif #if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_34 # define GLIB_DEPRECATED_IN_2_34 GLIB_DEPRECATED # define GLIB_DEPRECATED_IN_2_34_FOR(f) GLIB_DEPRECATED_FOR(f) +# define GLIB_DEPRECATED_MACRO_IN_2_34 GLIB_DEPRECATED_MACRO +# define GLIB_DEPRECATED_MACRO_IN_2_34_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f) +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_34 GLIB_DEPRECATED_ENUMERATOR +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_34_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f) +# define GLIB_DEPRECATED_TYPE_IN_2_34 GLIB_DEPRECATED_TYPE +# define GLIB_DEPRECATED_TYPE_IN_2_34_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f) #else # define GLIB_DEPRECATED_IN_2_34 _GLIB_EXTERN # define GLIB_DEPRECATED_IN_2_34_FOR(f) _GLIB_EXTERN +# define GLIB_DEPRECATED_MACRO_IN_2_34 +# define GLIB_DEPRECATED_MACRO_IN_2_34_FOR(f) +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_34 +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_34_FOR(f) +# define GLIB_DEPRECATED_TYPE_IN_2_34 +# define GLIB_DEPRECATED_TYPE_IN_2_34_FOR(f) #endif #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_34 # define GLIB_AVAILABLE_IN_2_34 GLIB_UNAVAILABLE(2, 34) +# define GLIB_AVAILABLE_MACRO_IN_2_34 GLIB_UNAVAILABLE_MACRO(2, 34) +# define GLIB_AVAILABLE_ENUMERATOR_IN_2_34 GLIB_UNAVAILABLE_ENUMERATOR(2, 34) +# define GLIB_AVAILABLE_TYPE_IN_2_34 GLIB_UNAVAILABLE_TYPE(2, 34) #else # define GLIB_AVAILABLE_IN_2_34 _GLIB_EXTERN +# define GLIB_AVAILABLE_MACRO_IN_2_34 +# define GLIB_AVAILABLE_ENUMERATOR_IN_2_34 +# define GLIB_AVAILABLE_TYPE_IN_2_34 #endif #if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_36 # define GLIB_DEPRECATED_IN_2_36 GLIB_DEPRECATED # define GLIB_DEPRECATED_IN_2_36_FOR(f) GLIB_DEPRECATED_FOR(f) +# define GLIB_DEPRECATED_MACRO_IN_2_36 GLIB_DEPRECATED_MACRO +# define GLIB_DEPRECATED_MACRO_IN_2_36_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f) +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_36 GLIB_DEPRECATED_ENUMERATOR +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_36_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f) +# define GLIB_DEPRECATED_TYPE_IN_2_36 GLIB_DEPRECATED_TYPE +# define GLIB_DEPRECATED_TYPE_IN_2_36_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f) #else # define GLIB_DEPRECATED_IN_2_36 _GLIB_EXTERN # define GLIB_DEPRECATED_IN_2_36_FOR(f) _GLIB_EXTERN +# define GLIB_DEPRECATED_MACRO_IN_2_36 +# define GLIB_DEPRECATED_MACRO_IN_2_36_FOR(f) +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_36 +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_36_FOR(f) +# define GLIB_DEPRECATED_TYPE_IN_2_36 +# define GLIB_DEPRECATED_TYPE_IN_2_36_FOR(f) #endif #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_36 # define GLIB_AVAILABLE_IN_2_36 GLIB_UNAVAILABLE(2, 36) +# define GLIB_AVAILABLE_MACRO_IN_2_36 GLIB_UNAVAILABLE_MACRO(2, 36) +# define GLIB_AVAILABLE_ENUMERATOR_IN_2_36 GLIB_UNAVAILABLE_ENUMERATOR(2, 36) +# define GLIB_AVAILABLE_TYPE_IN_2_36 GLIB_UNAVAILABLE_TYPE(2, 36) #else # define GLIB_AVAILABLE_IN_2_36 _GLIB_EXTERN +# define GLIB_AVAILABLE_MACRO_IN_2_36 +# define GLIB_AVAILABLE_ENUMERATOR_IN_2_36 +# define GLIB_AVAILABLE_TYPE_IN_2_36 #endif #if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_38 # define GLIB_DEPRECATED_IN_2_38 GLIB_DEPRECATED # define GLIB_DEPRECATED_IN_2_38_FOR(f) GLIB_DEPRECATED_FOR(f) +# define GLIB_DEPRECATED_MACRO_IN_2_38 GLIB_DEPRECATED_MACRO +# define GLIB_DEPRECATED_MACRO_IN_2_38_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f) +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_38 GLIB_DEPRECATED_ENUMERATOR +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_38_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f) +# define GLIB_DEPRECATED_TYPE_IN_2_38 GLIB_DEPRECATED_TYPE +# define GLIB_DEPRECATED_TYPE_IN_2_38_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f) #else # define GLIB_DEPRECATED_IN_2_38 _GLIB_EXTERN # define GLIB_DEPRECATED_IN_2_38_FOR(f) _GLIB_EXTERN +# define GLIB_DEPRECATED_MACRO_IN_2_38 +# define GLIB_DEPRECATED_MACRO_IN_2_38_FOR(f) +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_38 +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_38_FOR(f) +# define GLIB_DEPRECATED_TYPE_IN_2_38 +# define GLIB_DEPRECATED_TYPE_IN_2_38_FOR(f) #endif #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_38 # define GLIB_AVAILABLE_IN_2_38 GLIB_UNAVAILABLE(2, 38) +# define GLIB_AVAILABLE_MACRO_IN_2_38 GLIB_UNAVAILABLE_MACRO(2, 38) +# define GLIB_AVAILABLE_ENUMERATOR_IN_2_38 GLIB_UNAVAILABLE_ENUMERATOR(2, 38) +# define GLIB_AVAILABLE_TYPE_IN_2_38 GLIB_UNAVAILABLE_TYPE(2, 38) #else # define GLIB_AVAILABLE_IN_2_38 _GLIB_EXTERN +# define GLIB_AVAILABLE_MACRO_IN_2_38 +# define GLIB_AVAILABLE_ENUMERATOR_IN_2_38 +# define GLIB_AVAILABLE_TYPE_IN_2_38 #endif #if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_40 # define GLIB_DEPRECATED_IN_2_40 GLIB_DEPRECATED # define GLIB_DEPRECATED_IN_2_40_FOR(f) GLIB_DEPRECATED_FOR(f) +# define GLIB_DEPRECATED_MACRO_IN_2_40 GLIB_DEPRECATED_MACRO +# define GLIB_DEPRECATED_MACRO_IN_2_40_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f) +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_40 GLIB_DEPRECATED_ENUMERATOR +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_40_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f) +# define GLIB_DEPRECATED_TYPE_IN_2_40 GLIB_DEPRECATED_TYPE +# define GLIB_DEPRECATED_TYPE_IN_2_40_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f) #else # define GLIB_DEPRECATED_IN_2_40 _GLIB_EXTERN # define GLIB_DEPRECATED_IN_2_40_FOR(f) _GLIB_EXTERN +# define GLIB_DEPRECATED_MACRO_IN_2_40 +# define GLIB_DEPRECATED_MACRO_IN_2_40_FOR(f) +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_40 +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_40_FOR(f) +# define GLIB_DEPRECATED_TYPE_IN_2_40 +# define GLIB_DEPRECATED_TYPE_IN_2_40_FOR(f) #endif #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_40 # define GLIB_AVAILABLE_IN_2_40 GLIB_UNAVAILABLE(2, 40) +# define GLIB_AVAILABLE_MACRO_IN_2_40 GLIB_UNAVAILABLE_MACRO(2, 40) +# define GLIB_AVAILABLE_ENUMERATOR_IN_2_40 GLIB_UNAVAILABLE_ENUMERATOR(2, 40) +# define GLIB_AVAILABLE_TYPE_IN_2_40 GLIB_UNAVAILABLE_TYPE(2, 40) #else # define GLIB_AVAILABLE_IN_2_40 _GLIB_EXTERN +# define GLIB_AVAILABLE_MACRO_IN_2_40 +# define GLIB_AVAILABLE_ENUMERATOR_IN_2_40 +# define GLIB_AVAILABLE_TYPE_IN_2_40 #endif #if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_42 # define GLIB_DEPRECATED_IN_2_42 GLIB_DEPRECATED # define GLIB_DEPRECATED_IN_2_42_FOR(f) GLIB_DEPRECATED_FOR(f) +# define GLIB_DEPRECATED_MACRO_IN_2_42 GLIB_DEPRECATED_MACRO +# define GLIB_DEPRECATED_MACRO_IN_2_42_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f) #else # define GLIB_DEPRECATED_IN_2_42 _GLIB_EXTERN # define GLIB_DEPRECATED_IN_2_42_FOR(f) _GLIB_EXTERN +# define GLIB_DEPRECATED_MACRO_IN_2_42 +# define GLIB_DEPRECATED_MACRO_IN_2_42_FOR(f) +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_42 +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_42_FOR(f) +# define GLIB_DEPRECATED_TYPE_IN_2_42 +# define GLIB_DEPRECATED_TYPE_IN_2_42_FOR(f) #endif #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_42 # define GLIB_AVAILABLE_IN_2_42 GLIB_UNAVAILABLE(2, 42) +# define GLIB_AVAILABLE_MACRO_IN_2_42 GLIB_UNAVAILABLE_MACRO(2, 42) +# define GLIB_AVAILABLE_ENUMERATOR_IN_2_42 GLIB_UNAVAILABLE_ENUMERATOR(2, 42) +# define GLIB_AVAILABLE_TYPE_IN_2_42 GLIB_UNAVAILABLE_TYPE(2, 42) #else # define GLIB_AVAILABLE_IN_2_42 _GLIB_EXTERN +# define GLIB_AVAILABLE_MACRO_IN_2_42 +# define GLIB_AVAILABLE_ENUMERATOR_IN_2_42 +# define GLIB_AVAILABLE_TYPE_IN_2_42 #endif #if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_44 # define GLIB_DEPRECATED_IN_2_44 GLIB_DEPRECATED # define GLIB_DEPRECATED_IN_2_44_FOR(f) GLIB_DEPRECATED_FOR(f) +# define GLIB_DEPRECATED_MACRO_IN_2_44 GLIB_DEPRECATED_MACRO +# define GLIB_DEPRECATED_MACRO_IN_2_44_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f) +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_44 GLIB_DEPRECATED_ENUMERATOR +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_44_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f) +# define GLIB_DEPRECATED_TYPE_IN_2_44 GLIB_DEPRECATED_TYPE +# define GLIB_DEPRECATED_TYPE_IN_2_44_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f) #else # define GLIB_DEPRECATED_IN_2_44 _GLIB_EXTERN # define GLIB_DEPRECATED_IN_2_44_FOR(f) _GLIB_EXTERN +# define GLIB_DEPRECATED_MACRO_IN_2_44 +# define GLIB_DEPRECATED_MACRO_IN_2_44_FOR(f) +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_44 +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_44_FOR(f) +# define GLIB_DEPRECATED_TYPE_IN_2_44 +# define GLIB_DEPRECATED_TYPE_IN_2_44_FOR(f) #endif #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_44 # define GLIB_AVAILABLE_IN_2_44 GLIB_UNAVAILABLE(2, 44) +# define GLIB_AVAILABLE_MACRO_IN_2_44 GLIB_UNAVAILABLE_MACRO(2, 44) +# define GLIB_AVAILABLE_ENUMERATOR_IN_2_44 GLIB_UNAVAILABLE_ENUMERATOR(2, 44) +# define GLIB_AVAILABLE_TYPE_IN_2_44 GLIB_UNAVAILABLE_TYPE(2, 44) #else # define GLIB_AVAILABLE_IN_2_44 _GLIB_EXTERN +# define GLIB_AVAILABLE_MACRO_IN_2_44 +# define GLIB_AVAILABLE_ENUMERATOR_IN_2_44 +# define GLIB_AVAILABLE_TYPE_IN_2_44 #endif #if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_46 # define GLIB_DEPRECATED_IN_2_46 GLIB_DEPRECATED # define GLIB_DEPRECATED_IN_2_46_FOR(f) GLIB_DEPRECATED_FOR(f) +# define GLIB_DEPRECATED_MACRO_IN_2_46 GLIB_DEPRECATED_MACRO +# define GLIB_DEPRECATED_MACRO_IN_2_46_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f) #else # define GLIB_DEPRECATED_IN_2_46 _GLIB_EXTERN # define GLIB_DEPRECATED_IN_2_46_FOR(f) _GLIB_EXTERN +# define GLIB_DEPRECATED_MACRO_IN_2_46 +# define GLIB_DEPRECATED_MACRO_IN_2_46_FOR(f) +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_46 +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_46_FOR(f) +# define GLIB_DEPRECATED_TYPE_IN_2_46 +# define GLIB_DEPRECATED_TYPE_IN_2_46_FOR(f) #endif #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_46 # define GLIB_AVAILABLE_IN_2_46 GLIB_UNAVAILABLE(2, 46) +# define GLIB_AVAILABLE_MACRO_IN_2_46 GLIB_UNAVAILABLE_MACRO(2, 46) +# define GLIB_AVAILABLE_ENUMERATOR_IN_2_46 GLIB_UNAVAILABLE_ENUMERATOR(2, 46) +# define GLIB_AVAILABLE_TYPE_IN_2_46 GLIB_UNAVAILABLE_TYPE(2, 46) #else # define GLIB_AVAILABLE_IN_2_46 _GLIB_EXTERN +# define GLIB_AVAILABLE_MACRO_IN_2_46 +# define GLIB_AVAILABLE_ENUMERATOR_IN_2_46 +# define GLIB_AVAILABLE_TYPE_IN_2_46 #endif #if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_48 # define GLIB_DEPRECATED_IN_2_48 GLIB_DEPRECATED # define GLIB_DEPRECATED_IN_2_48_FOR(f) GLIB_DEPRECATED_FOR(f) +# define GLIB_DEPRECATED_MACRO_IN_2_48 GLIB_DEPRECATED_MACRO +# define GLIB_DEPRECATED_MACRO_IN_2_48_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f) +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_48 GLIB_DEPRECATED_ENUMERATOR +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_48_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f) +# define GLIB_DEPRECATED_TYPE_IN_2_48 GLIB_DEPRECATED_TYPE +# define GLIB_DEPRECATED_TYPE_IN_2_48_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f) #else # define GLIB_DEPRECATED_IN_2_48 _GLIB_EXTERN # define GLIB_DEPRECATED_IN_2_48_FOR(f) _GLIB_EXTERN +# define GLIB_DEPRECATED_MACRO_IN_2_48 +# define GLIB_DEPRECATED_MACRO_IN_2_48_FOR(f) +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_48 +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_48_FOR(f) +# define GLIB_DEPRECATED_TYPE_IN_2_48 +# define GLIB_DEPRECATED_TYPE_IN_2_48_FOR(f) #endif #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_48 # define GLIB_AVAILABLE_IN_2_48 GLIB_UNAVAILABLE(2, 48) +# define GLIB_AVAILABLE_MACRO_IN_2_48 GLIB_UNAVAILABLE_MACRO(2, 48) +# define GLIB_AVAILABLE_ENUMERATOR_IN_2_48 GLIB_UNAVAILABLE_ENUMERATOR(2, 48) +# define GLIB_AVAILABLE_TYPE_IN_2_48 GLIB_UNAVAILABLE_TYPE(2, 48) #else # define GLIB_AVAILABLE_IN_2_48 _GLIB_EXTERN +# define GLIB_AVAILABLE_MACRO_IN_2_48 +# define GLIB_AVAILABLE_ENUMERATOR_IN_2_48 +# define GLIB_AVAILABLE_TYPE_IN_2_48 #endif #if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_50 # define GLIB_DEPRECATED_IN_2_50 GLIB_DEPRECATED # define GLIB_DEPRECATED_IN_2_50_FOR(f) GLIB_DEPRECATED_FOR(f) +# define GLIB_DEPRECATED_MACRO_IN_2_50 GLIB_DEPRECATED_MACRO +# define GLIB_DEPRECATED_MACRO_IN_2_50_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f) +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_50 GLIB_DEPRECATED_ENUMERATOR +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_50_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f) +# define GLIB_DEPRECATED_TYPE_IN_2_50 GLIB_DEPRECATED_TYPE +# define GLIB_DEPRECATED_TYPE_IN_2_50_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f) #else # define GLIB_DEPRECATED_IN_2_50 _GLIB_EXTERN # define GLIB_DEPRECATED_IN_2_50_FOR(f) _GLIB_EXTERN +# define GLIB_DEPRECATED_MACRO_IN_2_50 +# define GLIB_DEPRECATED_MACRO_IN_2_50_FOR(f) +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_50 +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_50_FOR(f) +# define GLIB_DEPRECATED_TYPE_IN_2_50 +# define GLIB_DEPRECATED_TYPE_IN_2_50_FOR(f) #endif #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_50 # define GLIB_AVAILABLE_IN_2_50 GLIB_UNAVAILABLE(2, 50) +# define GLIB_AVAILABLE_MACRO_IN_2_50 GLIB_UNAVAILABLE_MACRO(2, 50) +# define GLIB_AVAILABLE_ENUMERATOR_IN_2_50 GLIB_UNAVAILABLE_ENUMERATOR(2, 50) +# define GLIB_AVAILABLE_TYPE_IN_2_50 GLIB_UNAVAILABLE_TYPE(2, 50) #else # define GLIB_AVAILABLE_IN_2_50 _GLIB_EXTERN +# define GLIB_AVAILABLE_MACRO_IN_2_50 +# define GLIB_AVAILABLE_ENUMERATOR_IN_2_50 +# define GLIB_AVAILABLE_TYPE_IN_2_50 #endif #if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_52 # define GLIB_DEPRECATED_IN_2_52 GLIB_DEPRECATED # define GLIB_DEPRECATED_IN_2_52_FOR(f) GLIB_DEPRECATED_FOR(f) +# define GLIB_DEPRECATED_MACRO_IN_2_52 GLIB_DEPRECATED_MACRO +# define GLIB_DEPRECATED_MACRO_IN_2_52_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f) +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_52 GLIB_DEPRECATED_ENUMERATOR +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_52_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f) +# define GLIB_DEPRECATED_TYPE_IN_2_52 GLIB_DEPRECATED_TYPE +# define GLIB_DEPRECATED_TYPE_IN_2_52_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f) #else # define GLIB_DEPRECATED_IN_2_52 _GLIB_EXTERN # define GLIB_DEPRECATED_IN_2_52_FOR(f) _GLIB_EXTERN +# define GLIB_DEPRECATED_MACRO_IN_2_52 +# define GLIB_DEPRECATED_MACRO_IN_2_52_FOR(f) +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_52 +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_52_FOR(f) +# define GLIB_DEPRECATED_TYPE_IN_2_52 +# define GLIB_DEPRECATED_TYPE_IN_2_52_FOR(f) #endif #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_52 # define GLIB_AVAILABLE_IN_2_52 GLIB_UNAVAILABLE(2, 52) +# define GLIB_AVAILABLE_MACRO_IN_2_52 GLIB_UNAVAILABLE_MACRO(2, 52) +# define GLIB_AVAILABLE_ENUMERATOR_IN_2_52 GLIB_UNAVAILABLE_ENUMERATOR(2, 52) +# define GLIB_AVAILABLE_TYPE_IN_2_52 GLIB_UNAVAILABLE_TYPE(2, 52) #else # define GLIB_AVAILABLE_IN_2_52 _GLIB_EXTERN +# define GLIB_AVAILABLE_MACRO_IN_2_52 +# define GLIB_AVAILABLE_ENUMERATOR_IN_2_52 +# define GLIB_AVAILABLE_TYPE_IN_2_52 #endif #if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_54 # define GLIB_DEPRECATED_IN_2_54 GLIB_DEPRECATED # define GLIB_DEPRECATED_IN_2_54_FOR(f) GLIB_DEPRECATED_FOR(f) +# define GLIB_DEPRECATED_MACRO_IN_2_54 GLIB_DEPRECATED_MACRO +# define GLIB_DEPRECATED_MACRO_IN_2_54_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f) +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_54 GLIB_DEPRECATED_ENUMERATOR +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_54_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f) +# define GLIB_DEPRECATED_TYPE_IN_2_54 GLIB_DEPRECATED_TYPE +# define GLIB_DEPRECATED_TYPE_IN_2_54_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f) #else # define GLIB_DEPRECATED_IN_2_54 _GLIB_EXTERN # define GLIB_DEPRECATED_IN_2_54_FOR(f) _GLIB_EXTERN +# define GLIB_DEPRECATED_MACRO_IN_2_54 +# define GLIB_DEPRECATED_MACRO_IN_2_54_FOR(f) +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_54 +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_54_FOR(f) +# define GLIB_DEPRECATED_TYPE_IN_2_54 +# define GLIB_DEPRECATED_TYPE_IN_2_54_FOR(f) #endif #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_54 # define GLIB_AVAILABLE_IN_2_54 GLIB_UNAVAILABLE(2, 54) +# define GLIB_AVAILABLE_MACRO_IN_2_54 GLIB_UNAVAILABLE_MACRO(2, 54) +# define GLIB_AVAILABLE_ENUMERATOR_IN_2_54 GLIB_UNAVAILABLE_ENUMERATOR(2, 54) +# define GLIB_AVAILABLE_TYPE_IN_2_54 GLIB_UNAVAILABLE_TYPE(2, 54) #else # define GLIB_AVAILABLE_IN_2_54 _GLIB_EXTERN +# define GLIB_AVAILABLE_MACRO_IN_2_54 +# define GLIB_AVAILABLE_ENUMERATOR_IN_2_54 +# define GLIB_AVAILABLE_TYPE_IN_2_54 #endif #if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_56 # define GLIB_DEPRECATED_IN_2_56 GLIB_DEPRECATED # define GLIB_DEPRECATED_IN_2_56_FOR(f) GLIB_DEPRECATED_FOR(f) +# define GLIB_DEPRECATED_MACRO_IN_2_56 GLIB_DEPRECATED_MACRO +# define GLIB_DEPRECATED_MACRO_IN_2_56_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f) +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_56 GLIB_DEPRECATED_ENUMERATOR +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_56_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f) +# define GLIB_DEPRECATED_TYPE_IN_2_56 GLIB_DEPRECATED_TYPE +# define GLIB_DEPRECATED_TYPE_IN_2_56_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f) #else # define GLIB_DEPRECATED_IN_2_56 _GLIB_EXTERN # define GLIB_DEPRECATED_IN_2_56_FOR(f) _GLIB_EXTERN +# define GLIB_DEPRECATED_MACRO_IN_2_56 +# define GLIB_DEPRECATED_MACRO_IN_2_56_FOR(f) +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_56 +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_56_FOR(f) +# define GLIB_DEPRECATED_TYPE_IN_2_56 +# define GLIB_DEPRECATED_TYPE_IN_2_56_FOR(f) #endif #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_56 # define GLIB_AVAILABLE_IN_2_56 GLIB_UNAVAILABLE(2, 56) +# define GLIB_AVAILABLE_MACRO_IN_2_56 GLIB_UNAVAILABLE_MACRO(2, 56) +# define GLIB_AVAILABLE_ENUMERATOR_IN_2_56 GLIB_UNAVAILABLE_ENUMERATOR(2, 56) +# define GLIB_AVAILABLE_TYPE_IN_2_56 GLIB_UNAVAILABLE_TYPE(2, 56) #else # define GLIB_AVAILABLE_IN_2_56 _GLIB_EXTERN +# define GLIB_AVAILABLE_MACRO_IN_2_56 +# define GLIB_AVAILABLE_ENUMERATOR_IN_2_56 +# define GLIB_AVAILABLE_TYPE_IN_2_56 #endif #if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_58 # define GLIB_DEPRECATED_IN_2_58 GLIB_DEPRECATED # define GLIB_DEPRECATED_IN_2_58_FOR(f) GLIB_DEPRECATED_FOR(f) +# define GLIB_DEPRECATED_MACRO_IN_2_58 GLIB_DEPRECATED_MACRO +# define GLIB_DEPRECATED_MACRO_IN_2_58_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f) +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_58 GLIB_DEPRECATED_ENUMERATOR +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_58_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f) +# define GLIB_DEPRECATED_TYPE_IN_2_58 GLIB_DEPRECATED_TYPE +# define GLIB_DEPRECATED_TYPE_IN_2_58_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f) #else # define GLIB_DEPRECATED_IN_2_58 _GLIB_EXTERN # define GLIB_DEPRECATED_IN_2_58_FOR(f) _GLIB_EXTERN +# define GLIB_DEPRECATED_MACRO_IN_2_58 +# define GLIB_DEPRECATED_MACRO_IN_2_58_FOR(f) +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_58 +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_58_FOR(f) +# define GLIB_DEPRECATED_TYPE_IN_2_58 +# define GLIB_DEPRECATED_TYPE_IN_2_58_FOR(f) #endif #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_58 # define GLIB_AVAILABLE_IN_2_58 GLIB_UNAVAILABLE(2, 58) +# define GLIB_AVAILABLE_MACRO_IN_2_58 GLIB_UNAVAILABLE_MACRO(2, 58) +# define GLIB_AVAILABLE_ENUMERATOR_IN_2_58 GLIB_UNAVAILABLE_ENUMERATOR(2, 58) +# define GLIB_AVAILABLE_TYPE_IN_2_58 GLIB_UNAVAILABLE_TYPE(2, 58) #else # define GLIB_AVAILABLE_IN_2_58 _GLIB_EXTERN +# define GLIB_AVAILABLE_MACRO_IN_2_58 +# define GLIB_AVAILABLE_ENUMERATOR_IN_2_58 +# define GLIB_AVAILABLE_TYPE_IN_2_58 #endif #if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_60 # define GLIB_DEPRECATED_IN_2_60 GLIB_DEPRECATED # define GLIB_DEPRECATED_IN_2_60_FOR(f) GLIB_DEPRECATED_FOR(f) +# define GLIB_DEPRECATED_MACRO_IN_2_60 GLIB_DEPRECATED_MACRO +# define GLIB_DEPRECATED_MACRO_IN_2_60_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f) +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_60 GLIB_DEPRECATED_ENUMERATOR +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_60_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f) +# define GLIB_DEPRECATED_TYPE_IN_2_60 GLIB_DEPRECATED_TYPE +# define GLIB_DEPRECATED_TYPE_IN_2_60_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f) #else # define GLIB_DEPRECATED_IN_2_60 _GLIB_EXTERN # define GLIB_DEPRECATED_IN_2_60_FOR(f) _GLIB_EXTERN +# define GLIB_DEPRECATED_MACRO_IN_2_60 +# define GLIB_DEPRECATED_MACRO_IN_2_60_FOR(f) +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_60 +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_60_FOR(f) +# define GLIB_DEPRECATED_TYPE_IN_2_60 +# define GLIB_DEPRECATED_TYPE_IN_2_60_FOR(f) #endif #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_60 # define GLIB_AVAILABLE_IN_2_60 GLIB_UNAVAILABLE(2, 60) +# define GLIB_AVAILABLE_MACRO_IN_2_60 GLIB_UNAVAILABLE_MACRO(2, 60) +# define GLIB_AVAILABLE_ENUMERATOR_IN_2_60 GLIB_UNAVAILABLE_ENUMERATOR(2, 60) +# define GLIB_AVAILABLE_TYPE_IN_2_60 GLIB_UNAVAILABLE_TYPE(2, 60) #else # define GLIB_AVAILABLE_IN_2_60 _GLIB_EXTERN +# define GLIB_AVAILABLE_MACRO_IN_2_60 +# define GLIB_AVAILABLE_ENUMERATOR_IN_2_60 +# define GLIB_AVAILABLE_TYPE_IN_2_60 #endif #if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_62 # define GLIB_DEPRECATED_IN_2_62 GLIB_DEPRECATED # define GLIB_DEPRECATED_IN_2_62_FOR(f) GLIB_DEPRECATED_FOR(f) +# define GLIB_DEPRECATED_MACRO_IN_2_62 GLIB_DEPRECATED_MACRO +# define GLIB_DEPRECATED_MACRO_IN_2_62_FOR(f) GLIB_DEPRECATED_MACRO_FOR(f) +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_62 GLIB_DEPRECATED_ENUMERATOR +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_62_FOR(f) GLIB_DEPRECATED_ENUMERATOR_FOR(f) +# define GLIB_DEPRECATED_TYPE_IN_2_62 GLIB_DEPRECATED_TYPE +# define GLIB_DEPRECATED_TYPE_IN_2_62_FOR(f) GLIB_DEPRECATED_TYPE_FOR(f) #else # define GLIB_DEPRECATED_IN_2_62 _GLIB_EXTERN # define GLIB_DEPRECATED_IN_2_62_FOR(f) _GLIB_EXTERN +# define GLIB_DEPRECATED_MACRO_IN_2_62 +# define GLIB_DEPRECATED_MACRO_IN_2_62_FOR(f) +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_62 +# define GLIB_DEPRECATED_ENUMERATOR_IN_2_62_FOR(f) +# define GLIB_DEPRECATED_TYPE_IN_2_62 +# define GLIB_DEPRECATED_TYPE_IN_2_62_FOR(f) #endif #if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_62 # define GLIB_AVAILABLE_IN_2_62 GLIB_UNAVAILABLE(2, 62) +# define GLIB_AVAILABLE_MACRO_IN_2_62 GLIB_UNAVAILABLE_MACRO(2, 62) +# define GLIB_AVAILABLE_ENUMERATOR_IN_2_62 GLIB_UNAVAILABLE_ENUMERATOR(2, 62) +# define GLIB_AVAILABLE_TYPE_IN_2_62 GLIB_UNAVAILABLE_TYPE(2, 62) #else # define GLIB_AVAILABLE_IN_2_62 _GLIB_EXTERN +# define GLIB_AVAILABLE_MACRO_IN_2_62 +# define GLIB_AVAILABLE_ENUMERATOR_IN_2_62 +# define GLIB_AVAILABLE_TYPE_IN_2_62 #endif #endif /* __G_VERSION_MACROS_H__ */ diff --git a/glib/meson.build b/glib/meson.build index 40b58047d..6bf678247 100644 --- a/glib/meson.build +++ b/glib/meson.build @@ -1,5 +1,4 @@ configure_file(input : 'glibconfig.h.in', output : 'glibconfig.h', - install : true, install_dir : join_paths(get_option('libdir'), 'glib-2.0/include'), configuration : glibconfig_conf) @@ -309,7 +308,7 @@ if host_system == 'windows' glib_sources += [glib_win_res] glib_sources += files('gwin32.c', 'gspawn-win32.c', 'giowin32.c') platform_deps = [winsock2, cc.find_library('winmm')] - if cc.get_id() == 'msvc' + if cc.get_id() == 'msvc' or cc.get_id() == 'clang-cl' glib_sources += files('dirent/wdirent.c') endif else @@ -456,11 +455,11 @@ if enable_systemtap output : '@0@.stp'.format(libglib.full_path().split('/').get(-1)), configuration : stp_cdata, install_dir : tapset_install_dir, - install : true) + ) endif # Don’t build the tests unless we can run them (either natively or in an exe wrapper) build_tests = not meson.is_cross_build() or (meson.is_cross_build() and meson.has_exe_wrapper()) if build_tests subdir('tests') -endif
\ No newline at end of file +endif diff --git a/glib/tests/array-test.c b/glib/tests/array-test.c index e0a6109eb..b26704e25 100644 --- a/glib/tests/array-test.c +++ b/glib/tests/array-test.c @@ -23,7 +23,6 @@ */ #undef G_DISABLE_ASSERT -#undef G_LOG_DOMAIN #include <stdio.h> #include <stdlib.h> @@ -467,6 +466,59 @@ int_compare (gconstpointer p1, gconstpointer p2) return *i1 - *i2; } +static void +array_copy (gconstpointer test_data) +{ + GArray *array, *array_copy; + gsize i; + const ArrayTestData *config = test_data; + const gsize array_size = 100; + + /* Testing degenerated cases */ + if (g_test_undefined ()) + { + g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, + "*assertion*!= NULL*"); + array = g_array_copy (NULL); + g_test_assert_expected_messages (); + + g_assert_null (array); + } + + /* Testing simple copy */ + array = g_array_new (config->zero_terminated, config->clear_, sizeof (gint)); + + for (i = 0; i < array_size; i++) + g_array_append_val (array, i); + + array_copy = g_array_copy (array); + + /* Check internal data */ + for (i = 0; i < array_size; i++) + g_assert_cmpuint (g_array_index (array, gint, i), ==, + g_array_index (array_copy, gint, i)); + + /* Check internal parameters ('zero_terminated' flag) */ + if (config->zero_terminated) + { + const gint *data = (const gint *) array_copy->data; + g_assert_cmpint (data[array_copy->len], ==, 0); + } + + /* Check internal parameters ('clear' flag) */ + if (config->clear_) + { + guint old_length = array_copy->len; + g_array_set_size (array_copy, old_length + 5); + for (i = old_length; i < old_length + 5; i++) + g_assert_cmpint (g_array_index (array_copy, gint, i), ==, 0); + } + + /* Clean-up */ + g_array_unref (array); + g_array_unref (array_copy); +} + static int int_compare_data (gconstpointer p1, gconstpointer p2, gpointer data) { @@ -577,6 +629,137 @@ array_clear_func (void) g_assert_cmpint (num_clear_func_invocations, ==, 10); } +/* Defining a comparison function for testing g_array_binary_search() */ +static gint +cmpint (gconstpointer a, gconstpointer b) +{ + const gint *_a = a; + const gint *_b = b; + + return *_a - *_b; +} + +/* Testing g_array_binary_search() function */ +static void +test_array_binary_search (void) +{ + GArray *garray; + guint i, matched_index; + + if (g_test_undefined ()) + { + /* Testing degenerated cases */ + garray = g_array_sized_new (FALSE, FALSE, sizeof (guint), 0); + g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, + "*assertion*!= NULL*"); + g_assert_false (g_array_binary_search (NULL, &i, cmpint, NULL)); + g_test_assert_expected_messages (); + + g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, + "*assertion*!= NULL*"); + g_assert_false (g_array_binary_search (garray, &i, NULL, NULL)); + g_test_assert_expected_messages (); + g_array_free (garray, TRUE); + } + + /* Testing array of size 0 */ + garray = g_array_sized_new (FALSE, FALSE, sizeof (guint), 0); + + i = 1; + g_assert_false (g_array_binary_search (garray, &i, cmpint, NULL)); + + g_array_free (garray, TRUE); + + /* Testing array of size 1 */ + garray = g_array_sized_new (FALSE, FALSE, sizeof (guint), 1); + i = 1; + g_array_append_val (garray, i); + + g_assert_true (g_array_binary_search (garray, &i, cmpint, NULL)); + + i = 0; + g_assert_false (g_array_binary_search (garray, &i, cmpint, NULL)); + + i = 2; + g_assert_false (g_array_binary_search (garray, &i, cmpint, NULL)); + + g_array_free (garray, TRUE); + + /* Testing array of size 2 */ + garray = g_array_sized_new (FALSE, FALSE, sizeof (guint), 2); + for (i = 1; i < 3; i++) + g_array_append_val (garray, i); + + for (i = 1; i < 3; i++) + g_assert_true (g_array_binary_search (garray, &i, cmpint, NULL)); + + i = 0; + g_assert_false (g_array_binary_search (garray, &i, cmpint, NULL)); + + i = 4; + g_assert_false (g_array_binary_search (garray, &i, cmpint, NULL)); + + g_array_free (garray, TRUE); + + /* Testing array of size 3 */ + garray = g_array_sized_new (FALSE, FALSE, sizeof (guint), 3); + for (i = 1; i < 4; i++) + g_array_append_val (garray, i); + + for (i = 1; i < 4; i++) + g_assert_true (g_array_binary_search (garray, &i, cmpint, NULL)); + + i = 0; + g_assert_false (g_array_binary_search (garray, &i, cmpint, NULL)); + + i = 5; + g_assert_false (g_array_binary_search (garray, &i, cmpint, NULL)); + + g_array_free (garray, TRUE); + + /* Testing array of size 10000 */ + garray = g_array_sized_new (FALSE, FALSE, sizeof (guint), 10000); + + for (i = 1; i < 10001; i++) + g_array_append_val (garray, i); + + for (i = 1; i < 10001; i++) + g_assert_true (g_array_binary_search (garray, &i, cmpint, NULL)); + + for (i = 1; i < 10001; i++) + { + g_assert_true (g_array_binary_search (garray, &i, cmpint, &matched_index)); + g_assert_cmpint (i, ==, matched_index + 1); + } + + /* Testing negative result */ + i = 0; + g_assert_false (g_array_binary_search (garray, &i, cmpint, NULL)); + g_assert_false (g_array_binary_search (garray, &i, cmpint, &matched_index)); + + i = 10002; + g_assert_false (g_array_binary_search (garray, &i, cmpint, NULL)); + g_assert_false (g_array_binary_search (garray, &i, cmpint, &matched_index)); + + g_array_free (garray, TRUE); + + /* Test for a not-found element in the middle of the array. */ + garray = g_array_sized_new (FALSE, FALSE, sizeof (guint), 3); + for (i = 1; i < 10; i += 2) + g_array_append_val (garray, i); + + i = 0; + g_assert_false (g_array_binary_search (garray, &i, cmpint, NULL)); + + i = 2; + g_assert_false (g_array_binary_search (garray, &i, cmpint, NULL)); + + i = 10; + g_assert_false (g_array_binary_search (garray, &i, cmpint, NULL)); + + g_array_free (garray, TRUE); +} + static void pointer_array_add (void) { @@ -746,6 +929,262 @@ pointer_array_free_func (void) g_assert_cmpint (num_free_func_invocations, ==, 0); } +static gpointer +ptr_array_copy_func (gconstpointer src, gpointer userdata) +{ + gsize *dst = g_malloc (sizeof (gsize)); + *dst = *((gsize *) src); + return dst; +} + +/* Test the g_ptr_array_copy() function */ +static void +pointer_array_copy (void) +{ + GPtrArray *ptr_array, *ptr_array2; + gsize i; + const gsize array_size = 100; + gsize *array_test = g_malloc (array_size * sizeof (gsize)); + + g_test_summary ("Check all normal behaviour of stealing elements from one " + "array to append to another, covering different array sizes " + "and element copy functions"); + + if (g_test_undefined ()) + { + /* Testing degenerated cases */ + g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, + "*assertion*!= NULL*"); + ptr_array = g_ptr_array_copy (NULL, NULL, NULL); + g_test_assert_expected_messages (); + g_assert_cmpuint ((gsize) ptr_array, ==, (gsize) NULL); + } + + /* Initializing array_test */ + for (i = 0; i < array_size; i++) + array_test[i] = i; + + /* Test copy an empty array */ + ptr_array = g_ptr_array_sized_new (0); + ptr_array2 = g_ptr_array_copy (ptr_array, NULL, NULL); + + g_assert_cmpuint (ptr_array2->len, ==, ptr_array->len); + + g_ptr_array_unref (ptr_array); + g_ptr_array_unref (ptr_array2); + + /* Test simple copy */ + ptr_array = g_ptr_array_sized_new (array_size); + + for (i = 0; i < array_size; i++) + g_ptr_array_add (ptr_array, &array_test[i]); + + ptr_array2 = g_ptr_array_copy (ptr_array, NULL, NULL); + + g_assert_cmpuint (ptr_array2->len, ==, ptr_array->len); + for (i = 0; i < array_size; i++) + g_assert_cmpuint (*((gsize *) g_ptr_array_index (ptr_array2, i)), ==, i); + + for (i = 0; i < array_size; i++) + g_assert_cmpuint ((gsize) g_ptr_array_index (ptr_array, i), ==, + (gsize) g_ptr_array_index (ptr_array2, i)); + + g_ptr_array_free (ptr_array2, TRUE); + + /* Test copy through GCopyFunc */ + ptr_array2 = g_ptr_array_copy (ptr_array, ptr_array_copy_func, NULL); + g_ptr_array_set_free_func (ptr_array2, g_free); + + g_assert_cmpuint (ptr_array2->len, ==, ptr_array->len); + for (i = 0; i < array_size; i++) + g_assert_cmpuint (*((gsize *) g_ptr_array_index (ptr_array2, i)), ==, i); + + for (i = 0; i < array_size; i++) + g_assert_cmpuint ((gsize) g_ptr_array_index (ptr_array, i), !=, + (gsize) g_ptr_array_index (ptr_array2, i)); + + g_ptr_array_free (ptr_array2, TRUE); + + /* Final cleanup */ + g_ptr_array_free (ptr_array, TRUE); + g_free (array_test); +} + +/* Test the g_ptr_array_extend() function */ +static void +pointer_array_extend (void) +{ + GPtrArray *ptr_array, *ptr_array2; + gsize i; + const gsize array_size = 100; + gsize *array_test = g_malloc (array_size * sizeof (gsize)); + + if (g_test_undefined ()) + { + /* Testing degenerated cases */ + ptr_array = g_ptr_array_sized_new (0); + g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, + "*assertion*!= NULL*"); + g_ptr_array_extend (NULL, ptr_array, NULL, NULL); + g_test_assert_expected_messages (); + + g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, + "*assertion*!= NULL*"); + g_ptr_array_extend (ptr_array, NULL, NULL, NULL); + g_test_assert_expected_messages (); + + g_ptr_array_unref (ptr_array); + } + + /* Initializing array_test */ + for (i = 0; i < array_size; i++) + array_test[i] = i; + + /* Testing extend with array of size zero */ + ptr_array = g_ptr_array_sized_new (0); + ptr_array2 = g_ptr_array_sized_new (0); + + g_ptr_array_extend (ptr_array, ptr_array2, NULL, NULL); + + g_assert_cmpuint (ptr_array->len, ==, 0); + g_assert_cmpuint (ptr_array2->len, ==, 0); + + g_ptr_array_unref (ptr_array); + g_ptr_array_unref (ptr_array2); + + /* Testing extend an array of size zero */ + ptr_array = g_ptr_array_sized_new (array_size); + ptr_array2 = g_ptr_array_sized_new (0); + + for (i = 0; i < array_size; i++) + { + g_ptr_array_add (ptr_array, &array_test[i]); + } + + g_ptr_array_extend (ptr_array, ptr_array2, NULL, NULL); + + for (i = 0; i < array_size; i++) + g_assert_cmpuint (*((gsize *) g_ptr_array_index (ptr_array, i)), ==, i); + + g_ptr_array_unref (ptr_array); + g_ptr_array_unref (ptr_array2); + + /* Testing extend an array of size zero */ + ptr_array = g_ptr_array_sized_new (0); + ptr_array2 = g_ptr_array_sized_new (array_size); + + for (i = 0; i < array_size; i++) + { + g_ptr_array_add (ptr_array2, &array_test[i]); + } + + g_ptr_array_extend (ptr_array, ptr_array2, NULL, NULL); + + for (i = 0; i < array_size; i++) + g_assert_cmpuint (*((gsize *) g_ptr_array_index (ptr_array, i)), ==, i); + + g_ptr_array_unref (ptr_array); + g_ptr_array_unref (ptr_array2); + + /* Testing simple extend */ + ptr_array = g_ptr_array_sized_new (array_size / 2); + ptr_array2 = g_ptr_array_sized_new (array_size / 2); + + for (i = 0; i < array_size / 2; i++) + { + g_ptr_array_add (ptr_array, &array_test[i]); + g_ptr_array_add (ptr_array2, &array_test[i + (array_size / 2)]); + } + + g_ptr_array_extend (ptr_array, ptr_array2, NULL, NULL); + + for (i = 0; i < array_size; i++) + g_assert_cmpuint (*((gsize *) g_ptr_array_index (ptr_array, i)), ==, i); + + g_ptr_array_unref (ptr_array); + g_ptr_array_unref (ptr_array2); + + /* Testing extend with GCopyFunc */ + ptr_array = g_ptr_array_sized_new (array_size / 2); + ptr_array2 = g_ptr_array_sized_new (array_size / 2); + + for (i = 0; i < array_size / 2; i++) + { + g_ptr_array_add (ptr_array, &array_test[i]); + g_ptr_array_add (ptr_array2, &array_test[i + (array_size / 2)]); + } + + g_ptr_array_extend (ptr_array, ptr_array2, ptr_array_copy_func, NULL); + + for (i = 0; i < array_size; i++) + g_assert_cmpuint (*((gsize *) g_ptr_array_index (ptr_array, i)), ==, i); + + /* Clean-up memory */ + for (i = array_size / 2; i < array_size; i++) + g_free (g_ptr_array_index (ptr_array, i)); + + g_ptr_array_unref (ptr_array); + g_ptr_array_unref (ptr_array2); + g_free (array_test); +} + +/* Test the g_ptr_array_extend_and_steal() function */ +static void +pointer_array_extend_and_steal (void) +{ + GPtrArray *ptr_array, *ptr_array2, *ptr_array3; + gsize i; + const gsize array_size = 100; + gsize *array_test = g_malloc (array_size * sizeof (gsize)); + + /* Initializing array_test */ + for (i = 0; i < array_size; i++) + array_test[i] = i; + + /* Testing simple extend_and_steal() */ + ptr_array = g_ptr_array_sized_new (array_size / 2); + ptr_array2 = g_ptr_array_sized_new (array_size / 2); + + for (i = 0; i < array_size / 2; i++) + { + g_ptr_array_add (ptr_array, &array_test[i]); + g_ptr_array_add (ptr_array2, &array_test[i + (array_size / 2)]); + } + + g_ptr_array_extend_and_steal (ptr_array, ptr_array2); + + for (i = 0; i < array_size; i++) + g_assert_cmpuint (*((gsize *) g_ptr_array_index (ptr_array, i)), ==, i); + + g_ptr_array_free (ptr_array, TRUE); + + /* Testing extend_and_steal() with a pending reference to stolen array */ + ptr_array = g_ptr_array_sized_new (array_size / 2); + ptr_array2 = g_ptr_array_sized_new (array_size / 2); + + for (i = 0; i < array_size / 2; i++) + { + g_ptr_array_add (ptr_array, &array_test[i]); + g_ptr_array_add (ptr_array2, &array_test[i + (array_size / 2)]); + } + + ptr_array3 = g_ptr_array_ref (ptr_array2); + + g_ptr_array_extend_and_steal (ptr_array, ptr_array2); + + for (i = 0; i < array_size; i++) + g_assert_cmpuint (*((gsize *) g_ptr_array_index (ptr_array, i)), ==, i); + + g_assert_cmpuint (ptr_array3->len, ==, 0); + g_assert_null (ptr_array3->pdata); + + g_ptr_array_free (ptr_array, TRUE); + g_ptr_array_free (ptr_array3, TRUE); + + /* Final memory clean-up */ + g_free (array_test); +} + static gint ptr_compare (gconstpointer p1, gconstpointer p2) { @@ -1241,6 +1680,7 @@ main (int argc, char *argv[]) g_test_add_func ("/array/new/zero-terminated", array_new_zero_terminated); g_test_add_func ("/array/ref-count", array_ref_count); g_test_add_func ("/array/clear-func", array_clear_func); + g_test_add_func ("/array/binary-search", test_array_binary_search); for (i = 0; i < G_N_ELEMENTS (array_configurations); i++) { @@ -1253,6 +1693,7 @@ main (int argc, char *argv[]) add_array_test ("/array/remove-index", &array_configurations[i], array_remove_index); add_array_test ("/array/remove-index-fast", &array_configurations[i], array_remove_index_fast); add_array_test ("/array/remove-range", &array_configurations[i], array_remove_range); + add_array_test ("/array/copy", &array_configurations[i], array_copy); add_array_test ("/array/sort", &array_configurations[i], array_sort); add_array_test ("/array/sort-with-data", &array_configurations[i], array_sort_with_data); } @@ -1262,6 +1703,9 @@ main (int argc, char *argv[]) g_test_add_func ("/pointerarray/insert", pointer_array_insert); g_test_add_func ("/pointerarray/ref-count", pointer_array_ref_count); g_test_add_func ("/pointerarray/free-func", pointer_array_free_func); + g_test_add_func ("/pointerarray/array_copy", pointer_array_copy); + g_test_add_func ("/pointerarray/array_extend", pointer_array_extend); + g_test_add_func ("/pointerarray/array_extend_and_steal", pointer_array_extend_and_steal); g_test_add_func ("/pointerarray/sort", pointer_array_sort); g_test_add_func ("/pointerarray/sort-with-data", pointer_array_sort_with_data); g_test_add_func ("/pointerarray/find/empty", pointer_array_find_empty); diff --git a/glib/tests/cond.c b/glib/tests/cond.c index 0987f01e0..168064391 100644 --- a/glib/tests/cond.c +++ b/glib/tests/cond.c @@ -270,6 +270,100 @@ test_wait_until (void) g_cond_clear (&cond); } +#ifdef __linux__ + +#include <pthread.h> +#include <signal.h> +#include <unistd.h> + +static pthread_t main_thread; + +static void * +mutex_holder (void *data) +{ + GMutex *lock = data; + + g_mutex_lock (lock); + + /* Let the lock become contended */ + g_usleep (G_TIME_SPAN_SECOND); + + /* Interrupt the wait on the other thread */ + pthread_kill (main_thread, SIGHUP); + + /* If we don't sleep here, then the g_mutex_unlock() below will clear + * the mutex, causing the interrupted futex call in the other thread + * to return success (which is not what we want). + * + * The other thread needs to have time to wake up and see that the + * lock is still contended. + */ + g_usleep (G_TIME_SPAN_SECOND / 10); + + g_mutex_unlock (lock); + + return NULL; +} + +static void +signal_handler (int sig) +{ +} + +static void +test_wait_until_errno (void) +{ + gboolean result; + GMutex lock; + GCond cond; + + struct sigaction act = { { signal_handler, } }; /* important: no SA_RESTART (we want EINTR) */ + + g_test_summary ("Check proper handling of errno in g_cond_wait_until with a contended mutex"); + g_test_bug_base ("https://gitlab.gnome.org/GNOME/glib/"); + g_test_bug ("merge_requests/957"); + + g_mutex_init (&lock); + g_cond_init (&cond); + + main_thread = pthread_self (); + sigaction (SIGHUP, &act, NULL); + + g_mutex_lock (&lock); + + /* We create an annoying worker thread that will do two things: + * + * 1) hold the lock that we want to reacquire after returning from + * the condition variable wait + * + * 2) send us a signal to cause our wait on the contended lock to + * return EINTR, clobbering the errno return from the condition + * variable + */ + g_thread_unref (g_thread_new ("mutex-holder", mutex_holder, &lock)); + + result = g_cond_wait_until (&cond, &lock, + g_get_monotonic_time () + G_TIME_SPAN_SECOND / 50); + + /* Even after all that disruption, we should still successfully return + * 'timed out'. + */ + g_assert_false (result); + + g_mutex_unlock (&lock); + + g_cond_clear (&cond); + g_mutex_clear (&lock); +} + +#else +static void +test_wait_until_errno (void) +{ + g_test_skip ("We only test this on Linux"); +} +#endif + int main (int argc, char *argv[]) { @@ -278,6 +372,7 @@ main (int argc, char *argv[]) g_test_add_func ("/thread/cond1", test_cond1); g_test_add_func ("/thread/cond2", test_cond2); g_test_add_func ("/thread/cond/wait-until", test_wait_until); + g_test_add_func ("/thread/cond/wait-until/contended-and-interrupted", test_wait_until_errno); return g_test_run (); } diff --git a/glib/tests/convert.c b/glib/tests/convert.c index 5ffee6162..c43b3db6e 100644 --- a/glib/tests/convert.c +++ b/glib/tests/convert.c @@ -827,8 +827,11 @@ test_filename_to_utf8_embedded_nul_utf8 (void) gsize bytes_read; GError *error = NULL; +#ifndef G_OS_WIN32 + /* G_FILENAME_ENCODING has no effect on Windows for g_get_filename_charsets() */ g_setenv ("G_FILENAME_ENCODING", "UTF-8", TRUE); g_assert_true (g_get_filename_charsets (NULL)); +#endif res = g_filename_to_utf8 ("ab\0c", 4, &bytes_read, NULL, &error); @@ -848,8 +851,11 @@ test_filename_to_utf8_embedded_nul_iconv (void) gsize bytes_read; GError *error = NULL; +#ifndef G_OS_WIN32 + /* G_FILENAME_ENCODING has no effect on Windows for g_get_filename_charsets() */ g_setenv ("G_FILENAME_ENCODING", "US-ASCII", TRUE); g_assert_false (g_get_filename_charsets (NULL)); +#endif res = g_filename_to_utf8 ("ab\0c", 4, &bytes_read, NULL, &error); @@ -878,8 +884,11 @@ test_filename_from_utf8_embedded_nul_utf8 (void) gsize bytes_read; GError *error = NULL; +#ifndef G_OS_WIN32 + /* G_FILENAME_ENCODING has no effect on Windows for g_get_filename_charsets() */ g_setenv ("G_FILENAME_ENCODING", "UTF-8", TRUE); g_assert_true (g_get_filename_charsets (NULL)); +#endif res = g_filename_from_utf8 ("ab\0c", 4, &bytes_read, NULL, &error); @@ -899,8 +908,11 @@ test_filename_from_utf8_embedded_nul_iconv (void) gsize bytes_read; GError *error = NULL; +#ifndef G_OS_WIN32 + /* G_FILENAME_ENCODING has no effect on Windows for g_get_filename_charsets() */ g_setenv ("G_FILENAME_ENCODING", "US-ASCII", TRUE); g_assert_false (g_get_filename_charsets (NULL)); +#endif res = g_filename_from_utf8 ("ab\0c", 4, &bytes_read, NULL, &error); diff --git a/glib/tests/fileutils.c b/glib/tests/fileutils.c index 34f650247..61ea230bb 100644 --- a/glib/tests/fileutils.c +++ b/glib/tests/fileutils.c @@ -28,8 +28,8 @@ #include <glib.h> -/* Test our stdio wrappers here */ -#define G_STDIO_NO_WRAP_ON_UNIX +/* Test our stdio wrappers here; this disables redefining (e.g.) g_open() to open() */ +#define G_STDIO_WRAP_ON_UNIX #include <glib/gstdio.h> #ifdef G_OS_UNIX @@ -37,6 +37,8 @@ #include <sys/types.h> #include <sys/stat.h> #include <utime.h> + +#define G_TEST_DIR_MODE 0555 #endif #include <fcntl.h> #ifdef G_OS_WIN32 @@ -49,6 +51,8 @@ #ifndef F_OK #define F_OK 0 #endif + +#define G_TEST_DIR_MODE (S_IWRITE | S_IREAD) #endif #define S G_DIR_SEPARATOR_S @@ -936,7 +940,7 @@ test_stdio_wrappers (void) g_free (cwd); g_free (path); - ret = g_creat ("test-creat", 0555); + ret = g_creat ("test-creat", G_TEST_DIR_MODE); g_close (ret, &error); g_assert_no_error (error); diff --git a/glib/tests/gdatetime.c b/glib/tests/gdatetime.c index 00e22181e..9afcf3926 100644 --- a/glib/tests/gdatetime.c +++ b/glib/tests/gdatetime.c @@ -25,6 +25,11 @@ #include <glib/gstdio.h> #include <locale.h> +#ifdef G_OS_WIN32 +#define WIN32_LEAN_AND_MEAN +#include <windows.h> +#endif + #define ASSERT_DATE(dt,y,m,d) G_STMT_START { \ g_assert_nonnull ((dt)); \ g_assert_cmpint ((y), ==, g_date_time_get_year ((dt))); \ @@ -306,6 +311,7 @@ test_GDateTime_get_hour (void) g_date_time_unref (dt); } +G_GNUC_BEGIN_IGNORE_DEPRECATIONS static void test_GDateTime_get_microsecond (void) { @@ -317,6 +323,7 @@ test_GDateTime_get_microsecond (void) g_assert_cmpint (tv.tv_usec, ==, g_date_time_get_microsecond (dt)); g_date_time_unref (dt); } +G_GNUC_END_IGNORE_DEPRECATIONS static void test_GDateTime_get_year (void) @@ -353,6 +360,7 @@ test_GDateTime_hash (void) g_hash_table_destroy (h); } +G_GNUC_BEGIN_IGNORE_DEPRECATIONS static void test_GDateTime_new_from_timeval (void) { @@ -475,6 +483,7 @@ test_GDateTime_new_from_timeval_utc (void) g_assert_cmpint (tv.tv_usec, ==, tv2.tv_usec); g_date_time_unref (dt); } +G_GNUC_END_IGNORE_DEPRECATIONS static void test_GDateTime_new_from_iso8601 (void) @@ -1029,6 +1038,13 @@ test_GDateTime_new_full (void) GTimeZone *tz, *dt_tz; GDateTime *dt; +#ifdef G_OS_WIN32 + LCID currLcid = GetThreadLocale (); + LANGID currLangId = LANGIDFROMLCID (currLcid); + LANGID en = MAKELANGID (LANG_ENGLISH, SUBLANG_ENGLISH_US); + SetThreadUILanguage (en); +#endif + dt = g_date_time_new_utc (2009, 12, 11, 12, 11, 10); g_assert_cmpint (2009, ==, g_date_time_get_year (dt)); g_assert_cmpint (12, ==, g_date_time_get_month (dt)); @@ -1063,6 +1079,7 @@ test_GDateTime_new_full (void) g_date_time_get_timezone_abbreviation (dt)); g_assert_cmpstr ("Pacific Standard Time", ==, g_time_zone_get_identifier (dt_tz)); + SetThreadUILanguage (currLangId); #endif g_assert (!g_date_time_is_daylight_savings (dt)); g_date_time_unref (dt); @@ -1225,6 +1242,7 @@ test_GDateTime_get_utc_offset (void) #endif } +G_GNUC_BEGIN_IGNORE_DEPRECATIONS static void test_GDateTime_to_timeval (void) { @@ -1241,6 +1259,7 @@ test_GDateTime_to_timeval (void) g_assert_cmpint (tv1.tv_usec, ==, tv2.tv_usec); g_date_time_unref (dt); } +G_GNUC_END_IGNORE_DEPRECATIONS static void test_GDateTime_to_local (void) @@ -1327,11 +1346,17 @@ test_GDateTime_printf (void) * that long, and it will cause the test to fail if dst isn't big * enough. */ + gchar *old_lc_all; gchar *old_lc_messages; gchar dst[64]; struct tm tt; time_t t; +#ifdef G_OS_WIN32 + gchar *current_tz = NULL; + DYNAMIC_TIME_ZONE_INFORMATION dtz_info; +#endif + #define TEST_PRINTF(f,o) G_STMT_START { \ GDateTime *__dt = g_date_time_new_local (2009, 10, 24, 0, 0, 0);\ gchar *__p = g_date_time_format (__dt, (f)); \ @@ -1357,6 +1382,9 @@ GDateTime *__dt = g_date_time_new_local (2009, 10, 24, 0, 0, 0);\ g_date_time_unref (dt); \ g_free (p); } G_STMT_END + old_lc_all = g_strdup (g_getenv ("LC_ALL")); + g_unsetenv ("LC_ALL"); + old_lc_messages = g_strdup (g_getenv ("LC_MESSAGES")); g_setenv ("LC_MESSAGES", "C", TRUE); @@ -1426,7 +1454,14 @@ GDateTime *__dt = g_date_time_new_local (2009, 10, 24, 0, 0, 0);\ #ifdef G_OS_UNIX TEST_PRINTF ("%Z", dst); #elif defined G_OS_WIN32 - TEST_PRINTF ("%Z", "Pacific Standard Time"); + g_assert (GetDynamicTimeZoneInformation (&dtz_info) != TIME_ZONE_ID_INVALID); + if (wcscmp (dtz_info.StandardName, L"") != 0) + current_tz = g_utf16_to_utf8 (dtz_info.StandardName, -1, NULL, NULL, NULL); + else + current_tz = g_utf16_to_utf8 (dtz_info.DaylightName, -1, NULL, NULL, NULL); + + TEST_PRINTF ("%Z", current_tz); + g_free (current_tz); #endif if (old_lc_messages != NULL) @@ -1434,6 +1469,10 @@ GDateTime *__dt = g_date_time_new_local (2009, 10, 24, 0, 0, 0);\ else g_unsetenv ("LC_MESSAGES"); g_free (old_lc_messages); + + if (old_lc_all != NULL) + g_setenv ("LC_ALL", old_lc_all, TRUE); + g_free (old_lc_all); } static void @@ -2033,6 +2072,30 @@ test_z (void) g_time_zone_unref (tz); } +static void +test_format_iso8601 (void) +{ + GTimeZone *tz = NULL; + GDateTime *dt = NULL; + gchar *p = NULL; + + tz = g_time_zone_new_utc (); + dt = g_date_time_new (tz, 2019, 6, 26, 15, 1, 5); + p = g_date_time_format_iso8601 (dt); + g_assert_cmpstr (p, ==, "2019-06-26T15:01:05Z"); + g_free (p); + g_date_time_unref (dt); + g_time_zone_unref (tz); + + tz = g_time_zone_new_offset (-60 * 60); + dt = g_date_time_new (tz, 2019, 6, 26, 15, 1, 5); + p = g_date_time_format_iso8601 (dt); + g_assert_cmpstr (p, ==, "2019-06-26T15:01:05-01"); + g_free (p); + g_date_time_unref (dt); + g_time_zone_unref (tz); +} + #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wformat-y2k" static void @@ -2383,6 +2446,12 @@ test_identifier (void) GTimeZone *tz; gchar *old_tz = g_strdup (g_getenv ("TZ")); +#ifdef G_OS_WIN32 + const char *recife_tz = "SA Eastern Standard Time"; +#else + const char *recife_tz = "America/Recife"; +#endif + tz = g_time_zone_new ("UTC"); g_assert_cmpstr (g_time_zone_get_identifier (tz), ==, "UTC"); g_time_zone_unref (tz); @@ -2412,10 +2481,10 @@ test_identifier (void) g_time_zone_unref (tz); /* Local timezone tests. */ - if (g_setenv ("TZ", "America/Recife", TRUE)) + if (g_setenv ("TZ", recife_tz, TRUE)) { tz = g_time_zone_new_local (); - g_assert_cmpstr (g_time_zone_get_identifier (tz), ==, "America/Recife"); + g_assert_cmpstr (g_time_zone_get_identifier (tz), ==, recife_tz); g_time_zone_unref (tz); } @@ -2517,6 +2586,7 @@ main (gint argc, g_test_add_func ("/GDateTime/printf", test_GDateTime_printf); g_test_add_func ("/GDateTime/non_utf8_printf", test_non_utf8_printf); g_test_add_func ("/GDateTime/format_unrepresentable", test_format_unrepresentable); + g_test_add_func ("/GDateTime/format_iso8601", test_format_iso8601); g_test_add_func ("/GDateTime/strftime", test_strftime); g_test_add_func ("/GDateTime/strftime/error_handling", test_GDateTime_strftime_error_handling); g_test_add_func ("/GDateTime/modifiers", test_modifiers); diff --git a/glib/tests/macros.c b/glib/tests/macros.c index 7fc1d6086..89a1322ee 100644 --- a/glib/tests/macros.c +++ b/glib/tests/macros.c @@ -20,6 +20,15 @@ #include <glib.h> +/* Test that G_STATIC_ASSERT_EXPR can be used as an expression */ +static void +test_assert_static (void) +{ + G_STATIC_ASSERT (4 == 4); + if (G_STATIC_ASSERT_EXPR (1 == 1), sizeof (gchar) == 2) + g_assert_not_reached (); +} + /* Test G_ALIGNOF() gives the same results as the G_STRUCT_OFFSET fallback. This * should be the minimal alignment for the given type. * @@ -48,6 +57,7 @@ main (int argc, g_test_init (&argc, &argv, NULL); g_test_add_func ("/alignof/fallback", test_alignof_fallback); + g_test_add_func ("/assert/static", test_assert_static); return g_test_run (); } diff --git a/glib/tests/mainloop.c b/glib/tests/mainloop.c index e46357ae3..a7778153b 100644 --- a/glib/tests/mainloop.c +++ b/glib/tests/mainloop.c @@ -695,7 +695,9 @@ typedef struct { GSource *timeout1, *timeout2; gint64 time1; - GTimeVal tv; +G_GNUC_BEGIN_IGNORE_DEPRECATIONS + GTimeVal tv; /* needed for g_source_get_current_time() */ +G_GNUC_END_IGNORE_DEPRECATIONS } TimeTestData; static gboolean @@ -730,7 +732,9 @@ G_GNUC_END_IGNORE_DEPRECATIONS } else { +G_GNUC_BEGIN_IGNORE_DEPRECATIONS GTimeVal tv; +G_GNUC_END_IGNORE_DEPRECATIONS /* Second iteration */ g_assert_true (g_source_is_destroyed (data->timeout2)); diff --git a/glib/tests/refcount.c b/glib/tests/refcount.c index dfccc92c7..e19a2d7ef 100644 --- a/glib/tests/refcount.c +++ b/glib/tests/refcount.c @@ -76,7 +76,8 @@ test_grefcount (void) /* test_grefcount_saturation: Saturating a grefcount counter * does not cause an overflow; additionally, if we're building - * with checks enabled, it'll cause a warning + * with checks enabled or with non-GCC compilers, it'll cause a + * warning */ static void test_grefcount_saturation (void) @@ -99,16 +100,16 @@ test_grefcount_saturation (void) g_test_trap_subprocess (NULL, 0, 0); -#ifndef G_DISABLE_CHECKS - /* Ensure that we got a warning when building with checks; the - * test will fail because of the critical warning being caught - * by GTest +#if defined (G_DISABLE_CHECKS) && defined (__GNUC__) + /* With checks disabled we don't get any warning */ + g_test_trap_assert_passed (); +#else + /* Ensure that we got a warning when building with checks or with + * non-GCC compilers; the test will fail because of the critical + * warning being caught by GTest */ g_test_trap_assert_failed (); g_test_trap_assert_stderr ("*saturation*"); -#else - /* With checks disabled we don't get any warning */ - g_test_trap_assert_passed (); #endif } @@ -167,9 +168,9 @@ test_gatomicrefcount (void) g_assert_true (g_atomic_ref_count_dec (&a)); } -/* test_grefcount_saturation: Saturating a gatomicrefcount counter - * does not cause an overflow; additionally, if we're building - * with checks enabled, it'll cause a warning +/* test_gatomicrefcount_saturation: Saturating a gatomicrefcount counter + * does not cause an overflow; additionally, if we're building with + * checks enabled or with non-GCC compilers, it'll cause a warning */ static void test_gatomicrefcount_saturation (void) @@ -192,16 +193,16 @@ test_gatomicrefcount_saturation (void) g_test_trap_subprocess (NULL, 0, 0); -#ifndef G_DISABLE_CHECKS - /* Ensure that we got a warning when building with checks; the - * test will fail because of the critical warning being caught - * by GTest +#if defined (G_DISABLE_CHECKS) && defined (__GNUC__) + /* With checks disabled we don't get any warning */ + g_test_trap_assert_passed (); +#else + /* Ensure that we got a warning when building with checks or with + * non-GCC compilers; the test will fail because of the critical + * warning being caught by GTest */ g_test_trap_assert_failed (); g_test_trap_assert_stderr ("*saturation*"); -#else - /* With checks disabled we don't get any warning */ - g_test_trap_assert_passed (); #endif } diff --git a/glib/tests/timer.c b/glib/tests/timer.c index 5b2e71144..149b3af4b 100644 --- a/glib/tests/timer.c +++ b/glib/tests/timer.c @@ -21,6 +21,9 @@ * Author: Matthias Clasen */ +/* We test a few deprecated APIs here. */ +#define GLIB_DISABLE_DEPRECATION_WARNINGS 1 + #include "glib.h" static void @@ -99,6 +102,22 @@ test_timer_reset (void) } static void +test_timer_is_active (void) +{ + GTimer *timer; + gboolean is_active; + + timer = g_timer_new (); + is_active = g_timer_is_active (timer); + g_assert_true (is_active); + g_timer_stop (timer); + is_active = g_timer_is_active (timer); + g_assert_false (is_active); + + g_timer_destroy (timer); +} + +static void test_timeval_add (void) { GTimeVal time = { 1, 0 }; @@ -282,6 +301,7 @@ main (int argc, char *argv[]) g_test_add_func ("/timer/stop", test_timer_stop); g_test_add_func ("/timer/continue", test_timer_continue); g_test_add_func ("/timer/reset", test_timer_reset); + g_test_add_func ("/timer/is_active", test_timer_is_active); g_test_add_func ("/timeval/add", test_timeval_add); g_test_add_func ("/timeval/from-iso8601", test_timeval_from_iso8601); g_test_add_func ("/timeval/to-iso8601", test_timeval_to_iso8601); diff --git a/glib/tests/unicode.c b/glib/tests/unicode.c index 3858b7732..abfe9c9d2 100644 --- a/glib/tests/unicode.c +++ b/glib/tests/unicode.c @@ -64,7 +64,7 @@ test_unichar_character_type (void) { G_UNICODE_OTHER_LETTER, 0x3400 }, { G_UNICODE_TITLECASE_LETTER, 0x01C5 }, { G_UNICODE_UPPERCASE_LETTER, 0xFF21 }, - { G_UNICODE_COMBINING_MARK, 0x0903 }, + { G_UNICODE_SPACING_MARK, 0x0903 }, { G_UNICODE_ENCLOSING_MARK, 0x20DD }, { G_UNICODE_NON_SPACING_MARK, 0xA806 }, { G_UNICODE_DECIMAL_NUMBER, 0xFF10 }, @@ -1516,7 +1516,7 @@ test_iso15924 (void) { G_UNICODE_SCRIPT_KHUDAWADI, "Sind" }, { G_UNICODE_SCRIPT_LINEAR_A, "Lina" }, { G_UNICODE_SCRIPT_MAHAJANI, "Mahj" }, - { G_UNICODE_SCRIPT_MANICHAEAN, "Manu" }, + { G_UNICODE_SCRIPT_MANICHAEAN, "Mani" }, { G_UNICODE_SCRIPT_MENDE_KIKAKUI, "Mend" }, { G_UNICODE_SCRIPT_MODI, "Modi" }, { G_UNICODE_SCRIPT_MRO, "Mroo" }, diff --git a/glib/tests/utils.c b/glib/tests/utils.c index 421a70560..d1ca0b633 100644 --- a/glib/tests/utils.c +++ b/glib/tests/utils.c @@ -29,6 +29,9 @@ #include <stdlib.h> #include <string.h> #include <stdarg.h> +#ifdef G_OS_WIN32 +#include <windows.h> +#endif static gboolean strv_check (const gchar * const *strv, ...) @@ -336,6 +339,42 @@ test_codeset2 (void) } static void +test_console_charset (void) +{ + const gchar *c1; + const gchar *c2; + +#ifdef G_OS_WIN32 + /* store current environment and unset $LANG to make sure it does not interfere */ + const unsigned int initial_cp = GetConsoleOutputCP (); + gchar *initial_lang = g_strdup (g_getenv ("LANG")); + g_unsetenv ("LANG"); + + /* set console output codepage to something specific (ISO-8859-1 aka CP28591) and query it */ + SetConsoleOutputCP (28591); + g_get_console_charset (&c1); + g_assert_cmpstr (c1, ==, "ISO-8859-1"); + + /* set $LANG to something specific (should override the console output codepage) and query it */ + g_setenv ("LANG", "de_DE.ISO-8859-15@euro", TRUE); + g_get_console_charset (&c2); + g_assert_cmpstr (c2, ==, "ISO-8859-15"); + + /* reset environment */ + if (initial_cp) + SetConsoleOutputCP (initial_cp); + if (initial_lang) + g_setenv ("LANG", initial_lang, TRUE); + g_free (initial_lang); +#else + g_get_charset (&c1); + g_get_console_charset (&c2); + + g_assert_cmpstr (c1, ==, c2); +#endif +} + +static void test_basename (void) { const gchar *path = "/path/to/a/file/deep/down.sh"; @@ -717,6 +756,7 @@ main (int argc, g_test_add_func ("/utils/debug", test_debug); g_test_add_func ("/utils/codeset", test_codeset); g_test_add_func ("/utils/codeset2", test_codeset2); + g_test_add_func ("/utils/console-charset", test_console_charset); g_test_add_func ("/utils/basename", test_basename); g_test_add_func ("/utils/gettext", test_gettext); g_test_add_func ("/utils/username", test_username); diff --git a/glib/tests/win32.c b/glib/tests/win32.c index d4b1fc523..a6ba4e261 100644 --- a/glib/tests/win32.c +++ b/glib/tests/win32.c @@ -39,8 +39,8 @@ test_subst_pid_and_event (void) gchar debugger_enough[G_N_ELEMENTS (not_enough) + 1]; gchar debugger_big[65535] = {0}; gchar *output; - DWORD be = 0xFFFFFFFF; - guintptr bp = (guintptr) G_MAXSIZE; + guintptr be = (guintptr) 0xFFFFFFFF; + DWORD bp = G_MAXSIZE; /* %f is not valid */ g_assert_false (_g_win32_subst_pid_and_event (debugger_3, G_N_ELEMENTS (debugger_3), @@ -59,7 +59,7 @@ test_subst_pid_and_event (void) g_assert_true (_g_win32_subst_pid_and_event (debugger_big, G_N_ELEMENTS (debugger_big), "multipl%e big %e %entries and %pids are %provided here", bp, be)); - output = g_strdup_printf ("multipl%lu big %lu %luntries and %lluids are %llurovided here", be, be, be, (guint64) bp, (guint64) bp); + output = g_strdup_printf ("multipl%llu big %llu %lluntries and %luids are %lurovided here", (guint64) be, (guint64) be, (guint64) be, bp, bp); g_assert_cmpstr (debugger_big, ==, output); g_free (output); } diff --git a/gmodule/gmodule-win32.c b/gmodule/gmodule-win32.c index 20459f372..1c7226a68 100644 --- a/gmodule/gmodule-win32.c +++ b/gmodule/gmodule-win32.c @@ -39,6 +39,12 @@ #include <sys/cygwin.h> #endif +/* Default family is DESKTOP_APP which is DESKTOP | APP + * We want to know when we're only building for apps */ +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) +#define G_WINAPI_ONLY_APP +#endif + static void set_error (const gchar *format, ...) @@ -84,7 +90,15 @@ _g_module_open (const gchar *file_name, success = SetThreadErrorMode (SEM_NOOPENFILEERRORBOX | SEM_FAILCRITICALERRORS, &old_mode); if (!success) set_error (""); + + /* When building for UWP, load app asset DLLs instead of filesystem DLLs. + * Needs MSVC, Windows 8 and newer, and is only usable from apps. */ +#if _WIN32_WINNT >= 0x0602 && defined(G_WINAPI_ONLY_APP) + handle = LoadPackagedLibrary (wfilename, 0); +#else handle = LoadLibraryW (wfilename); +#endif + if (success) SetThreadErrorMode (old_mode, NULL); g_free (wfilename); diff --git a/gmodule/meson.build b/gmodule/meson.build index e4a6a1c81..942f9af3c 100644 --- a/gmodule/meson.build +++ b/gmodule/meson.build @@ -45,7 +45,7 @@ if g_module_impl == 'G_MODULE_IMPL_DL' # FIXME: check for OSF1/5.0 RTLD_GLOBAL brokenness (is this still relevant?) # Check whether we need preceding underscores - if cc.get_id() == 'msvc' + if cc.get_id() == 'msvc' or cc.get_id() == 'clang-cl' message('Building for MSVC: assuming that symbols are prefixed with underscore') g_module_need_uscore = 1 elif meson.has_exe_wrapper() @@ -103,7 +103,7 @@ libgmodule = library('gmodule-2.0', install : true, include_directories : [configinc, gmoduleinc], dependencies : [libdl_dep, libglib_dep], - c_args : ['-DG_LOG_DOMAIN="GModule"', '-DG_DISABLE_DEPRECATED'] + glib_hidden_visibility_args, + c_args : ['-DG_LOG_DOMAIN="GModule"'] + glib_hidden_visibility_args, link_args : [glib_link_flags], ) diff --git a/gobject/gboxed.c b/gobject/gboxed.c index c90bb480b..4404de3d6 100644 --- a/gobject/gboxed.c +++ b/gobject/gboxed.c @@ -539,8 +539,8 @@ g_value_set_boxed_take_ownership (GValue *value, * @v_boxed: (nullable): duplicated unowned boxed value to be set * * Sets the contents of a %G_TYPE_BOXED derived #GValue to @v_boxed - * and takes over the ownership of the callers reference to @v_boxed; - * the caller doesn't have to unref it any more. + * and takes over the ownership of the caller’s reference to @v_boxed; + * the caller doesn’t have to unref it any more. * * Since: 2.4 */ diff --git a/gobject/glib-genmarshal.in b/gobject/glib-genmarshal.in index dc4c7eacc..7380f24a8 100755 --- a/gobject/glib-genmarshal.in +++ b/gobject/glib-genmarshal.in @@ -330,12 +330,14 @@ IN_ARGS = { 'ctype': 'gpointer', 'getter': 'g_marshal_value_peek_string', 'box': ['g_strdup', 'g_free'], + 'static-check': True, }, 'PARAM': { 'signal': 'PARAM', 'ctype': 'gpointer', 'getter': 'g_marshal_value_peek_param', 'box': ['g_param_spec_ref', 'g_param_spec_unref'], + 'static-check': True, }, 'BOXED': { 'signal': 'BOXED', @@ -360,7 +362,7 @@ IN_ARGS = { 'signal': 'VARIANT', 'ctype': 'gpointer', 'getter': 'g_marshal_value_peek_variant', - 'box': ['g_variant_ref', 'g_variant_unref'], + 'box': ['g_variant_ref_sink', 'g_variant_unref'], 'static-check': True, 'takes-type': False, }, diff --git a/gobject/gobject.c b/gobject/gobject.c index c95311b3e..3a1fbdd87 100644 --- a/gobject/gobject.c +++ b/gobject/gobject.c @@ -529,7 +529,7 @@ g_object_do_class_init (GObjectClass *class) G_SIGNAL_RUN_FIRST | G_SIGNAL_NO_RECURSE | G_SIGNAL_DETAILED | G_SIGNAL_NO_HOOKS | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GObjectClass, notify), NULL, NULL, - g_cclosure_marshal_VOID__PARAM, + NULL, G_TYPE_NONE, 1, G_TYPE_PARAM); @@ -2017,6 +2017,7 @@ g_object_new_with_properties (GType object_type, * Deprecated: 2.54: Use g_object_new_with_properties() instead. * deprecated. See #GParameter for more information. */ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS gpointer g_object_newv (GType object_type, guint n_parameters, @@ -2068,6 +2069,7 @@ g_object_newv (GType object_type, return object; } +G_GNUC_END_IGNORE_DEPRECATIONS /** * g_object_new_valist: (skip) @@ -2565,9 +2567,15 @@ g_object_set_property (GObject *object, * @property_name: the name of the property to get * @value: return location for the property value * - * Gets a property of an object. @value must have been initialized to the - * expected type of the property (or a type to which the expected type can be - * transformed) using g_value_init(). + * Gets a property of an object. + * + * The @value can be: + * + * - an empty #GValue initialized by %G_VALUE_INIT, which will be + * automatically initialized with the expected type of the property + * - a #GValue initialized with the expected type of the property + * - a #GValue initialized with a type to which the expected type + * of the property can be transformed * * In general, a copy is made of the property contents and the caller is * responsible for freeing the memory by calling g_value_unset(). @@ -2584,7 +2592,7 @@ g_object_get_property (GObject *object, g_return_if_fail (G_IS_OBJECT (object)); g_return_if_fail (property_name != NULL); - g_return_if_fail (G_IS_VALUE (value)); + g_return_if_fail (value != NULL); g_object_ref (object); @@ -2597,33 +2605,38 @@ g_object_get_property (GObject *object, { GValue *prop_value, tmp_value = G_VALUE_INIT; - /* auto-conversion of the callers value type - */ - if (G_VALUE_TYPE (value) == pspec->value_type) - { - g_value_reset (value); - prop_value = value; - } + if (G_VALUE_TYPE (value) == G_TYPE_INVALID) + { + /* uninitialized value */ + g_value_init (value, pspec->value_type); + prop_value = value; + } + else if (G_VALUE_TYPE (value) == pspec->value_type) + { + /* auto-conversion of the callers value type */ + g_value_reset (value); + prop_value = value; + } else if (!g_value_type_transformable (pspec->value_type, G_VALUE_TYPE (value))) - { - g_warning ("%s: can't retrieve property '%s' of type '%s' as value of type '%s'", - G_STRFUNC, pspec->name, - g_type_name (pspec->value_type), - G_VALUE_TYPE_NAME (value)); - g_object_unref (object); - return; - } + { + g_warning ("%s: can't retrieve property '%s' of type '%s' as value of type '%s'", + G_STRFUNC, pspec->name, + g_type_name (pspec->value_type), + G_VALUE_TYPE_NAME (value)); + g_object_unref (object); + return; + } else - { - g_value_init (&tmp_value, pspec->value_type); - prop_value = &tmp_value; - } + { + g_value_init (&tmp_value, pspec->value_type); + prop_value = &tmp_value; + } object_get_property (object, pspec, prop_value); if (prop_value != value) - { - g_value_transform (prop_value, value); - g_value_unset (&tmp_value); - } + { + g_value_transform (prop_value, value); + g_value_unset (&tmp_value); + } } g_object_unref (object); @@ -3966,8 +3979,8 @@ g_value_set_object_take_ownership (GValue *value, * @v_object: (nullable): object value to be set * * Sets the contents of a %G_TYPE_OBJECT derived #GValue to @v_object - * and takes over the ownership of the callers reference to @v_object; - * the caller doesn't have to unref it any more (i.e. the reference + * and takes over the ownership of the caller’s reference to @v_object; + * the caller doesn’t have to unref it any more (i.e. the reference * count of the object is not increased). * * If you want the #GValue to hold its own reference to @v_object, use diff --git a/gobject/gobject.h b/gobject/gobject.h index b5648f137..91b9f6328 100644 --- a/gobject/gobject.h +++ b/gobject/gobject.h @@ -424,10 +424,16 @@ GObject* g_object_new_with_properties (GType object_type, guint n_properties, const char *names[], const GValue values[]); + +G_GNUC_BEGIN_IGNORE_DEPRECATIONS + GLIB_DEPRECATED_IN_2_54_FOR(g_object_new_with_properties) gpointer g_object_newv (GType object_type, guint n_parameters, GParameter *parameters); + +G_GNUC_END_IGNORE_DEPRECATIONS + GLIB_AVAILABLE_IN_ALL GObject* g_object_new_valist (GType object_type, const gchar *first_property_name, @@ -739,6 +745,38 @@ static inline gboolean ) /** + * g_assert_finalize_object: (skip) + * @object: (transfer full) (type GObject.Object): an object + * + * Assert that @object is non-%NULL, then release one reference to it with + * g_object_unref() and assert that it has been finalized (i.e. that there + * are no more references). + * + * If assertions are disabled via `G_DISABLE_ASSERT`, + * this macro just calls g_object_unref() without any further checks. + * + * This macro should only be used in regression tests. + * + * Since: 2.62 + */ +static inline void +(g_assert_finalize_object) (GObject *object) +{ + gpointer weak_pointer = object; + + g_assert_true (G_IS_OBJECT (weak_pointer)); + g_object_add_weak_pointer (object, &weak_pointer); + g_object_unref (weak_pointer); + g_assert_null (weak_pointer); +} + +#ifdef G_DISABLE_ASSERT +#define g_assert_finalize_object(object) g_object_unref (object) +#else +#define g_assert_finalize_object(object) (g_assert_finalize_object ((GObject *) object)) +#endif + +/** * g_clear_weak_pointer: (skip) * @weak_pointer_location: The memory address of a pointer * diff --git a/gobject/gparam.c b/gobject/gparam.c index 6f33f027b..5aa54c02c 100644 --- a/gobject/gparam.c +++ b/gobject/gparam.c @@ -1471,8 +1471,8 @@ g_value_set_param_take_ownership (GValue *value, * @param: (nullable): the #GParamSpec to be set * * Sets the contents of a %G_TYPE_PARAM #GValue to @param and takes - * over the ownership of the callers reference to @param; the caller - * doesn't have to unref it any more. + * over the ownership of the caller’s reference to @param; the caller + * doesn’t have to unref it any more. * * Since: 2.4 */ diff --git a/gobject/gparam.h b/gobject/gparam.h index 535b98035..33f95f0c5 100644 --- a/gobject/gparam.h +++ b/gobject/gparam.h @@ -156,9 +156,7 @@ typedef enum G_PARAM_CONSTRUCT_ONLY = 1 << 3, G_PARAM_LAX_VALIDATION = 1 << 4, G_PARAM_STATIC_NAME = 1 << 5, -#ifndef G_DISABLE_DEPRECATED - G_PARAM_PRIVATE = G_PARAM_STATIC_NAME, -#endif + G_PARAM_PRIVATE GLIB_DEPRECATED_ENUMERATOR_IN_2_26 = G_PARAM_STATIC_NAME, G_PARAM_STATIC_NICK = 1 << 6, G_PARAM_STATIC_BLURB = 1 << 7, /* User defined flags go here */ @@ -193,7 +191,7 @@ typedef enum /* --- typedefs & structures --- */ typedef struct _GParamSpec GParamSpec; typedef struct _GParamSpecClass GParamSpecClass; -typedef struct _GParameter GParameter; +typedef struct _GParameter GParameter GLIB_DEPRECATED_TYPE_IN_2_54; typedef struct _GParamSpecPool GParamSpecPool; /** * GParamSpec: (ref-func g_param_spec_ref_sink) (unref-func g_param_spec_uref) (set-value-func g_value_set_param) (get-value-func g_value_get_param) @@ -274,7 +272,7 @@ struct _GParameter /* auxiliary structure for _setv() variants */ { const gchar *name; GValue value; -}; +} GLIB_DEPRECATED_TYPE_IN_2_54; /* --- prototypes --- */ diff --git a/gobject/gparamspecs.h b/gobject/gparamspecs.h index 26045a368..0309f9bb3 100644 --- a/gobject/gparamspecs.h +++ b/gobject/gparamspecs.h @@ -452,7 +452,7 @@ G_BEGIN_DECLS * * Deprecated: 2.32: Use #GArray instead of #GValueArray */ -#define G_TYPE_PARAM_VALUE_ARRAY (g_param_spec_types[18]) +#define G_TYPE_PARAM_VALUE_ARRAY (g_param_spec_types[18]) GLIB_DEPRECATED_MACRO_IN_2_32 /** * G_IS_PARAM_SPEC_VALUE_ARRAY: * @pspec: a valid #GParamSpec instance @@ -463,7 +463,7 @@ G_BEGIN_DECLS * * Deprecated: 2.32: Use #GArray instead of #GValueArray */ -#define G_IS_PARAM_SPEC_VALUE_ARRAY(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_VALUE_ARRAY)) +#define G_IS_PARAM_SPEC_VALUE_ARRAY(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_VALUE_ARRAY)) GLIB_DEPRECATED_MACRO_IN_2_32 /** * G_PARAM_SPEC_VALUE_ARRAY: * @pspec: a valid #GParamSpec instance @@ -472,7 +472,7 @@ G_BEGIN_DECLS * * Deprecated: 2.32: Use #GArray instead of #GValueArray */ -#define G_PARAM_SPEC_VALUE_ARRAY(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_VALUE_ARRAY, GParamSpecValueArray)) +#define G_PARAM_SPEC_VALUE_ARRAY(pspec) (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_VALUE_ARRAY, GParamSpecValueArray)) GLIB_DEPRECATED_MACRO_IN_2_32 /** * G_TYPE_PARAM_OBJECT: diff --git a/gobject/gsignal.c b/gobject/gsignal.c index 551780327..26fba477f 100644 --- a/gobject/gsignal.c +++ b/gobject/gsignal.c @@ -1410,8 +1410,14 @@ g_signal_query (guint signal_id, * in their class_init method by doing super_class->signal_handler = my_signal_handler. * Instead they will have to use g_signal_override_class_handler(). * - * If c_marshaller is %NULL, g_cclosure_marshal_generic() will be used as - * the marshaller for this signal. + * If @c_marshaller is %NULL, g_cclosure_marshal_generic() will be used as + * the marshaller for this signal. In some simple cases, g_signal_new() + * will use a more optimized c_marshaller and va_marshaller for the signal + * instead of g_cclosure_marshal_generic(). + * + * If @c_marshaller is non-%NULL, you need to also specify a va_marshaller + * using g_signal_set_va_marshaller() or the generic va_marshaller will + * be used. * * Returns: the signal id */ diff --git a/gobject/gtype-private.h b/gobject/gtype-private.h index 5f2f13b47..230dba03a 100644 --- a/gobject/gtype-private.h +++ b/gobject/gtype-private.h @@ -44,7 +44,9 @@ G_STMT_START { \ G_BEGIN_DECLS +G_GNUC_BEGIN_IGNORE_DEPRECATIONS extern GTypeDebugFlags _g_type_debug_flags; +G_GNUC_END_IGNORE_DEPRECATIONS typedef struct _GRealClosure GRealClosure; struct _GRealClosure diff --git a/gobject/gtype.c b/gobject/gtype.c index 67a1eda8b..425c6195d 100644 --- a/gobject/gtype.c +++ b/gobject/gtype.c @@ -380,7 +380,10 @@ static GQuark static_quark_type_flags = 0; static GQuark static_quark_iface_holder = 0; static GQuark static_quark_dependants_array = 0; static guint type_registration_serial = 0; + +G_GNUC_BEGIN_IGNORE_DEPRECATIONS GTypeDebugFlags _g_type_debug_flags = 0; +G_GNUC_END_IGNORE_DEPRECATIONS /* --- type nodes --- */ static GHashTable *static_type_nodes_ht = NULL; @@ -4332,6 +4335,7 @@ _g_type_boxed_init (GType type, * * Deprecated: 2.36: the type system is now initialised automatically */ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS void g_type_init_with_debug_flags (GTypeDebugFlags debug_flags) { @@ -4340,6 +4344,7 @@ g_type_init_with_debug_flags (GTypeDebugFlags debug_flags) if (debug_flags) g_message ("g_type_init_with_debug_flags() is no longer supported. Use the GOBJECT_DEBUG environment variable."); } +G_GNUC_END_IGNORE_DEPRECATIONS /** * g_type_init: diff --git a/gobject/gtype.h b/gobject/gtype.h index a3a07c6a3..a4c777c56 100644 --- a/gobject/gtype.h +++ b/gobject/gtype.h @@ -638,7 +638,7 @@ struct _GTypeQuery * `your_type_get_instance_private()` function instead * Returns: (not nullable): a pointer to the private data structure */ -#define G_TYPE_INSTANCE_GET_PRIVATE(instance, g_type, c_type) ((c_type*) g_type_instance_get_private ((GTypeInstance*) (instance), (g_type))) +#define G_TYPE_INSTANCE_GET_PRIVATE(instance, g_type, c_type) ((c_type*) g_type_instance_get_private ((GTypeInstance*) (instance), (g_type))) GLIB_DEPRECATED_MACRO_IN_2_58_FOR(G_ADD_PRIVATE) /** * G_TYPE_CLASS_GET_PRIVATE: @@ -680,14 +680,17 @@ typedef enum /*< skip >*/ G_TYPE_DEBUG_SIGNALS = 1 << 1, G_TYPE_DEBUG_INSTANCE_COUNT = 1 << 2, G_TYPE_DEBUG_MASK = 0x07 -} GTypeDebugFlags; +} GTypeDebugFlags GLIB_DEPRECATED_TYPE_IN_2_36; /* --- prototypes --- */ +G_GNUC_BEGIN_IGNORE_DEPRECATIONS GLIB_DEPRECATED_IN_2_36 void g_type_init (void); GLIB_DEPRECATED_IN_2_36 void g_type_init_with_debug_flags (GTypeDebugFlags debug_flags); +G_GNUC_END_IGNORE_DEPRECATIONS + GLIB_AVAILABLE_IN_ALL const gchar * g_type_name (GType type); GLIB_AVAILABLE_IN_ALL @@ -1417,8 +1420,8 @@ guint g_type_get_type_registration_serial (void); * @OBJ_NAME: The bare name of the type, in all caps (like 'WIDGET') * @ParentName: the name of the parent type, in camel case (like GtkWidget) * - * A convenience macro for emitting the usual declarations in the header file for a type which will is intended - * to be subclassed. + * A convenience macro for emitting the usual declarations in the + * header file for a type which is intended to be subclassed. * * You might use it in a header as follows: * @@ -1627,6 +1630,11 @@ guint g_type_get_type_registration_serial (void); * Note that private structs added with this macros must have a struct * name of the form @TN Private. * + * The private instance data can be retrieved using the automatically generated + * getter function `t_n_get_instance_private()`. + * + * See also: G_ADD_PRIVATE() + * * Since: 2.38 */ #define G_DEFINE_TYPE_WITH_PRIVATE(TN, t_n, T_P) G_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, 0, G_ADD_PRIVATE (TN)) @@ -1691,6 +1699,7 @@ guint g_type_get_type_registration_serial (void); * gtk_gadget, * GTK_TYPE_WIDGET, * 0, + * G_ADD_PRIVATE (GtkGadget) * G_IMPLEMENT_INTERFACE (TYPE_GIZMO, * gtk_gadget_gizmo_init)); * ]| @@ -1699,11 +1708,18 @@ guint g_type_get_type_registration_serial (void); * static void gtk_gadget_init (GtkGadget *self); * static void gtk_gadget_class_init (GtkGadgetClass *klass); * static gpointer gtk_gadget_parent_class = NULL; + * static gint GtkGadget_private_offset; * static void gtk_gadget_class_intern_init (gpointer klass) * { * gtk_gadget_parent_class = g_type_class_peek_parent (klass); + * if (GtkGadget_private_offset != 0) + * g_type_class_adjust_private_offset (klass, &GtkGadget_private_offset); * gtk_gadget_class_init ((GtkGadgetClass*) klass); * } + * static inline gpointer gtk_gadget_get_instance_private (GtkGadget *self) + * { + * return (G_STRUCT_MEMBER_P (self, GtkGadget_private_offset)); + * } * * GType * gtk_gadget_get_type (void) @@ -1720,6 +1736,10 @@ guint g_type_get_type_registration_serial (void); * (GInstanceInitFunc) gtk_gadget_init, * 0); * { + * GtkGadget_private_offset = + * g_type_add_instance_private (g_define_type_id, sizeof (GtkGadgetPrivate)); + * } + * { * const GInterfaceInfo g_implement_interface_info = { * (GInterfaceInitFunc) gtk_gadget_gizmo_init * }; @@ -1863,9 +1883,9 @@ guint g_type_get_type_registration_serial (void); * Also note that private structs added with these macros must have a struct * name of the form `TypeNamePrivate`. * - * It is safe to call _get_instance_private on %NULL or invalid object since - * it's only adding an offset to the instance pointer. In that case the returned - * pointer must not be dereferenced. + * It is safe to call the `_get_instance_private` function on %NULL or invalid + * objects since it's only adding an offset to the instance pointer. In that + * case the returned pointer must not be dereferenced. * * Since: 2.38 */ diff --git a/gobject/gvalue.c b/gobject/gvalue.c index 8c02e930a..b7a944f4c 100644 --- a/gobject/gvalue.c +++ b/gobject/gvalue.c @@ -162,14 +162,15 @@ GValue* g_value_init (GValue *value, GType g_type) { + GTypeValueTable *value_table; /* g_return_val_if_fail (G_TYPE_IS_VALUE (g_type), NULL); be more elaborate below */ g_return_val_if_fail (value != NULL, NULL); /* g_return_val_if_fail (G_VALUE_TYPE (value) == 0, NULL); be more elaborate below */ - if (G_TYPE_IS_VALUE (g_type) && G_VALUE_TYPE (value) == 0) - { - GTypeValueTable *value_table = g_type_value_table_peek (g_type); + value_table = g_type_value_table_peek (g_type); + if (value_table && G_VALUE_TYPE (value) == 0) + { /* setup and init */ value_meminit (value, g_type); value_table->value_init (value); @@ -181,11 +182,9 @@ g_value_init (GValue *value, g_type_name (G_VALUE_TYPE (value))); else /* !G_TYPE_IS_VALUE (g_type) */ g_warning ("%s: cannot initialize GValue with type '%s', %s", - G_STRLOC, - g_type_name (g_type), - g_type_value_table_peek (g_type) ? - "this type is abstract with regards to GValue use, use a more specific (derived) type" : - "this type has no GTypeValueTable implementation"); + G_STRLOC, + g_type_name (g_type), + value_table ? "this type is abstract with regards to GValue use, use a more specific (derived) type" : "this type has no GTypeValueTable implementation"); return value; } @@ -200,8 +199,8 @@ void g_value_copy (const GValue *src_value, GValue *dest_value) { - g_return_if_fail (G_IS_VALUE (src_value)); - g_return_if_fail (G_IS_VALUE (dest_value)); + g_return_if_fail (src_value); + g_return_if_fail (dest_value); g_return_if_fail (g_value_type_compatible (G_VALUE_TYPE (src_value), G_VALUE_TYPE (dest_value))); if (src_value != dest_value) @@ -209,6 +208,8 @@ g_value_copy (const GValue *src_value, GType dest_type = G_VALUE_TYPE (dest_value); GTypeValueTable *value_table = g_type_value_table_peek (dest_type); + g_return_if_fail (value_table); + /* make sure dest_value's value is free()d */ if (value_table->value_free) value_table->value_free (dest_value); @@ -233,11 +234,12 @@ g_value_reset (GValue *value) { GTypeValueTable *value_table; GType g_type; - - g_return_val_if_fail (G_IS_VALUE (value), NULL); - + + g_return_val_if_fail (value, NULL); g_type = G_VALUE_TYPE (value); + value_table = g_type_value_table_peek (g_type); + g_return_val_if_fail (value_table, NULL); /* make sure value's value is free()d */ if (value_table->value_free) @@ -267,9 +269,10 @@ g_value_unset (GValue *value) if (value->g_type == 0) return; - g_return_if_fail (G_IS_VALUE (value)); + g_return_if_fail (value); value_table = g_type_value_table_peek (G_VALUE_TYPE (value)); + g_return_if_fail (value_table); if (value_table->value_free) value_table->value_free (value); @@ -290,9 +293,10 @@ g_value_fits_pointer (const GValue *value) { GTypeValueTable *value_table; - g_return_val_if_fail (G_IS_VALUE (value), FALSE); + g_return_val_if_fail (value, FALSE); value_table = g_type_value_table_peek (G_VALUE_TYPE (value)); + g_return_val_if_fail (value_table, FALSE); return value_table->value_peek_pointer != NULL; } @@ -312,9 +316,11 @@ g_value_peek_pointer (const GValue *value) { GTypeValueTable *value_table; - g_return_val_if_fail (G_IS_VALUE (value), NULL); + g_return_val_if_fail (value, NULL); value_table = g_type_value_table_peek (G_VALUE_TYPE (value)); + g_return_val_if_fail (value_table, NULL); + if (!value_table->value_peek_pointer) { g_return_val_if_fail (g_value_fits_pointer (value) == TRUE, NULL); @@ -340,17 +346,18 @@ g_value_set_instance (GValue *value, GTypeValueTable *value_table; GTypeCValue cvalue; gchar *error_msg; - - g_return_if_fail (G_IS_VALUE (value)); + + g_return_if_fail (value); + g_type = G_VALUE_TYPE (value); + value_table = g_type_value_table_peek (g_type); + g_return_if_fail (value_table); + if (instance) { g_return_if_fail (G_TYPE_CHECK_INSTANCE (instance)); g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (instance), G_VALUE_TYPE (value))); } - g_type = G_VALUE_TYPE (value); - value_table = g_type_value_table_peek (g_type); - g_return_if_fail (strcmp (value_table->collect_format, "p") == 0); memset (&cvalue, 0, sizeof (cvalue)); @@ -543,8 +550,8 @@ gboolean g_value_type_transformable (GType src_type, GType dest_type) { - g_return_val_if_fail (G_TYPE_IS_VALUE (src_type), FALSE); - g_return_val_if_fail (G_TYPE_IS_VALUE (dest_type), FALSE); + g_return_val_if_fail (src_type, FALSE); + g_return_val_if_fail (dest_type, FALSE); return (g_value_type_compatible (src_type, dest_type) || transform_func_lookup (src_type, dest_type) != NULL); @@ -564,8 +571,12 @@ gboolean g_value_type_compatible (GType src_type, GType dest_type) { - g_return_val_if_fail (G_TYPE_IS_VALUE (src_type), FALSE); - g_return_val_if_fail (G_TYPE_IS_VALUE (dest_type), FALSE); + g_return_val_if_fail (src_type, FALSE); + g_return_val_if_fail (dest_type, FALSE); + + /* Fast path */ + if (src_type == dest_type) + return TRUE; return (g_type_is_a (src_type, dest_type) && g_type_value_table_peek (dest_type) == g_type_value_table_peek (src_type)); @@ -593,8 +604,8 @@ g_value_transform (const GValue *src_value, { GType dest_type; - g_return_val_if_fail (G_IS_VALUE (src_value), FALSE); - g_return_val_if_fail (G_IS_VALUE (dest_value), FALSE); + g_return_val_if_fail (src_value, FALSE); + g_return_val_if_fail (dest_value, FALSE); dest_type = G_VALUE_TYPE (dest_value); if (g_value_type_compatible (G_VALUE_TYPE (src_value), dest_type)) diff --git a/gobject/gvaluearray.h b/gobject/gvaluearray.h index d8b6bb55c..dbc6be765 100644 --- a/gobject/gvaluearray.h +++ b/gobject/gvaluearray.h @@ -35,7 +35,7 @@ G_BEGIN_DECLS * * Deprecated: 2.32: Use #GArray instead of #GValueArray */ -#define G_TYPE_VALUE_ARRAY (g_value_array_get_type ()) +#define G_TYPE_VALUE_ARRAY (g_value_array_get_type ()) GLIB_DEPRECATED_MACRO_IN_2_32_FOR(G_TYPE_ARRAY) /* --- typedefs & structs --- */ typedef struct _GValueArray GValueArray; diff --git a/gobject/meson.build b/gobject/meson.build index 81dcffda5..c7805c556 100644 --- a/gobject/meson.build +++ b/gobject/meson.build @@ -75,7 +75,6 @@ foreach tool: python_tools input : tool + '.in', output : tool, configuration : python_tools_conf, - install : true, install_dir : glib_bindir, ) @@ -163,11 +162,11 @@ if enable_systemtap output : '@0@.stp'.format(libgobject.full_path().split('/').get(-1)), configuration : stp_cdata, install_dir : tapset_install_dir, - install : true) + ) endif # Don’t build the tests unless we can run them (either natively or in an exe wrapper) build_tests = not meson.is_cross_build() or (meson.is_cross_build() and meson.has_exe_wrapper()) if build_tests subdir('tests') -endif
\ No newline at end of file +endif diff --git a/gobject/tests/genmarshal.py b/gobject/tests/genmarshal.py new file mode 100644 index 000000000..46d9063e3 --- /dev/null +++ b/gobject/tests/genmarshal.py @@ -0,0 +1,747 @@ +#!/usr/bin/python3 +# -*- coding: utf-8 -*- +# +# Copyright © 2019 Endless Mobile, Inc. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301 USA + +"""Integration tests for glib-genmarshal utility.""" + +import collections +import os +import shutil +import subprocess +import sys +import tempfile +from textwrap import dedent +import unittest + +import taptestrunner + + +Result = collections.namedtuple('Result', ('info', 'out', 'err', 'subs')) + + +class TestGenmarshal(unittest.TestCase): + """Integration test for running glib-genmarshal. + + This can be run when installed or uninstalled. When uninstalled, it + requires G_TEST_BUILDDIR and G_TEST_SRCDIR to be set. + + The idea with this test harness is to test the glib-genmarshal utility, its + handling of command line arguments, its exit statuses, and its handling of + various marshaller lists. In future we could split the core glib-genmarshal + parsing and generation code out into a library and unit test that, and + convert this test to just check command line behaviour. + """ + # Track the cwd, we want to back out to that to clean up our tempdir + cwd = '' + + def setUp(self): + self.timeout_seconds = 10 # seconds per test + self.tmpdir = tempfile.TemporaryDirectory() + self.cwd = os.getcwd() + os.chdir(self.tmpdir.name) + print('tmpdir:', self.tmpdir.name) + if 'G_TEST_BUILDDIR' in os.environ: + self.__genmarshal = \ + os.path.join(os.environ['G_TEST_BUILDDIR'], '..', + 'glib-genmarshal') + else: + self.__genmarshal = shutil.which('glib-genmarshal') + print('genmarshal:', self.__genmarshal) + + def tearDown(self): + os.chdir(self.cwd) + self.tmpdir.cleanup() + + def runGenmarshal(self, *args): + argv = [self.__genmarshal] + + # shebang lines are not supported on native + # Windows consoles + if os.name == 'nt': + argv.insert(0, sys.executable) + + argv.extend(args) + print('Running:', argv) + + env = os.environ.copy() + env['LC_ALL'] = 'C.UTF-8' + print('Environment:', env) + + # We want to ensure consistent line endings... + info = subprocess.run(argv, timeout=self.timeout_seconds, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + env=env, + universal_newlines=True) + info.check_returncode() + out = info.stdout.strip() + err = info.stderr.strip() + + # Known substitutions for standard boilerplate + subs = { + 'standard_top_comment': + 'This file is generated by glib-genmarshal, do not modify ' + 'it. This code is licensed under the same license as the ' + 'containing project. Note that it links to GLib, so must ' + 'comply with the LGPL linking clauses.', + 'standard_top_pragma': dedent( + ''' + #ifndef __G_CCLOSURE_USER_MARSHAL_MARSHAL_H__ + #define __G_CCLOSURE_USER_MARSHAL_MARSHAL_H__ + ''').strip(), + 'standard_bottom_pragma': dedent( + ''' + #endif /* __G_CCLOSURE_USER_MARSHAL_MARSHAL_H__ */ + ''').strip(), + 'standard_includes': dedent( + ''' + #include <glib-object.h> + ''').strip(), + 'standard_marshal_peek_defines': dedent( + ''' + #ifdef G_ENABLE_DEBUG + #define g_marshal_value_peek_boolean(v) g_value_get_boolean (v) + #define g_marshal_value_peek_char(v) g_value_get_schar (v) + #define g_marshal_value_peek_uchar(v) g_value_get_uchar (v) + #define g_marshal_value_peek_int(v) g_value_get_int (v) + #define g_marshal_value_peek_uint(v) g_value_get_uint (v) + #define g_marshal_value_peek_long(v) g_value_get_long (v) + #define g_marshal_value_peek_ulong(v) g_value_get_ulong (v) + #define g_marshal_value_peek_int64(v) g_value_get_int64 (v) + #define g_marshal_value_peek_uint64(v) g_value_get_uint64 (v) + #define g_marshal_value_peek_enum(v) g_value_get_enum (v) + #define g_marshal_value_peek_flags(v) g_value_get_flags (v) + #define g_marshal_value_peek_float(v) g_value_get_float (v) + #define g_marshal_value_peek_double(v) g_value_get_double (v) + #define g_marshal_value_peek_string(v) (char*) g_value_get_string (v) + #define g_marshal_value_peek_param(v) g_value_get_param (v) + #define g_marshal_value_peek_boxed(v) g_value_get_boxed (v) + #define g_marshal_value_peek_pointer(v) g_value_get_pointer (v) + #define g_marshal_value_peek_object(v) g_value_get_object (v) + #define g_marshal_value_peek_variant(v) g_value_get_variant (v) + #else /* !G_ENABLE_DEBUG */ + /* WARNING: This code accesses GValues directly, which is UNSUPPORTED API. + * Do not access GValues directly in your code. Instead, use the + * g_value_get_*() functions + */ + #define g_marshal_value_peek_boolean(v) (v)->data[0].v_int + #define g_marshal_value_peek_char(v) (v)->data[0].v_int + #define g_marshal_value_peek_uchar(v) (v)->data[0].v_uint + #define g_marshal_value_peek_int(v) (v)->data[0].v_int + #define g_marshal_value_peek_uint(v) (v)->data[0].v_uint + #define g_marshal_value_peek_long(v) (v)->data[0].v_long + #define g_marshal_value_peek_ulong(v) (v)->data[0].v_ulong + #define g_marshal_value_peek_int64(v) (v)->data[0].v_int64 + #define g_marshal_value_peek_uint64(v) (v)->data[0].v_uint64 + #define g_marshal_value_peek_enum(v) (v)->data[0].v_long + #define g_marshal_value_peek_flags(v) (v)->data[0].v_ulong + #define g_marshal_value_peek_float(v) (v)->data[0].v_float + #define g_marshal_value_peek_double(v) (v)->data[0].v_double + #define g_marshal_value_peek_string(v) (v)->data[0].v_pointer + #define g_marshal_value_peek_param(v) (v)->data[0].v_pointer + #define g_marshal_value_peek_boxed(v) (v)->data[0].v_pointer + #define g_marshal_value_peek_pointer(v) (v)->data[0].v_pointer + #define g_marshal_value_peek_object(v) (v)->data[0].v_pointer + #define g_marshal_value_peek_variant(v) (v)->data[0].v_pointer + #endif /* !G_ENABLE_DEBUG */ + ''').strip(), + } + + result = Result(info, out, err, subs) + + print('Output:', result.out) + return result + + def runGenmarshalWithList(self, list_contents, *args): + with tempfile.NamedTemporaryFile(dir=self.tmpdir.name, + suffix='.list', + delete=False) as list_file: + # Write out the list. + list_file.write(list_contents.encode('utf-8')) + print(list_file.name + ':', list_contents) + list_file.flush() + + header_result = self.runGenmarshal(list_file.name, + '--header', *args) + body_result = self.runGenmarshal(list_file.name, + '--body', *args) + + header_result.subs['list_path'] = list_file.name + body_result.subs['list_path'] = list_file.name + + return (header_result, body_result) + + def test_help(self): + """Test the --help argument.""" + result = self.runGenmarshal('--help') + self.assertIn('usage: glib-genmarshal', result.out) + + def test_no_args(self): + """Test running with no arguments at all.""" + result = self.runGenmarshal() + self.assertEqual('', result.err) + self.assertEqual('', result.out) + + def test_empty_list(self): + """Test running with an empty list.""" + (header_result, body_result) = \ + self.runGenmarshalWithList('', '--quiet') + + self.assertEqual('', header_result.err) + self.assertEqual('', body_result.err) + + self.assertEqual(dedent( + ''' + /* {standard_top_comment} */ + {standard_top_pragma} + + {standard_includes} + + G_BEGIN_DECLS + + + G_END_DECLS + + {standard_bottom_pragma} + ''').strip().format(**header_result.subs), + header_result.out.strip()) + + self.assertEqual(dedent( + ''' + /* {standard_top_comment} */ + {standard_includes} + + {standard_marshal_peek_defines} + ''').strip().format(**body_result.subs), + body_result.out.strip()) + + def test_void_boolean(self): + """Test running with a basic VOID:BOOLEAN list.""" + (header_result, body_result) = \ + self.runGenmarshalWithList('VOID:BOOLEAN', '--quiet') + + self.assertEqual('', header_result.err) + self.assertEqual('', body_result.err) + + self.assertEqual(dedent( + ''' + /* {standard_top_comment} */ + {standard_top_pragma} + + {standard_includes} + + G_BEGIN_DECLS + + /* VOID:BOOLEAN ({list_path}:1) */ + #define g_cclosure_user_marshal_VOID__BOOLEAN g_cclosure_marshal_VOID__BOOLEAN + + + G_END_DECLS + + {standard_bottom_pragma} + ''').strip().format(**header_result.subs), + header_result.out.strip()) + + self.assertEqual(dedent( + ''' + /* {standard_top_comment} */ + {standard_includes} + + {standard_marshal_peek_defines} + ''').strip().format(**body_result.subs), + body_result.out.strip()) + + def test_void_boolean_int64(self): + """Test running with a non-trivial VOID:BOOLEAN,INT64 list.""" + (header_result, body_result) = \ + self.runGenmarshalWithList('VOID:BOOLEAN,INT64', '--quiet') + + self.assertEqual('', header_result.err) + self.assertEqual('', body_result.err) + + self.assertEqual(dedent( + ''' + /* {standard_top_comment} */ + {standard_top_pragma} + + {standard_includes} + + G_BEGIN_DECLS + + /* VOID:BOOLEAN,INT64 ({list_path}:1) */ + extern + void g_cclosure_user_marshal_VOID__BOOLEAN_INT64 (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); + + + G_END_DECLS + + {standard_bottom_pragma} + ''').strip().format(**header_result.subs), + header_result.out.strip()) + + self.assertEqual(dedent( + ''' + /* {standard_top_comment} */ + {standard_includes} + + {standard_marshal_peek_defines} + + /* VOID:BOOLEAN,INT64 ({list_path}:1) */ + void + g_cclosure_user_marshal_VOID__BOOLEAN_INT64 (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint G_GNUC_UNUSED, + gpointer marshal_data) + {{ + typedef void (*GMarshalFunc_VOID__BOOLEAN_INT64) (gpointer data1, + gboolean arg1, + gint64 arg2, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_VOID__BOOLEAN_INT64 callback; + + g_return_if_fail (n_param_values == 3); + + if (G_CCLOSURE_SWAP_DATA (closure)) + {{ + data1 = closure->data; + data2 = g_value_peek_pointer (param_values + 0); + }} + else + {{ + data1 = g_value_peek_pointer (param_values + 0); + data2 = closure->data; + }} + callback = (GMarshalFunc_VOID__BOOLEAN_INT64) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + g_marshal_value_peek_boolean (param_values + 1), + g_marshal_value_peek_int64 (param_values + 2), + data2); + }} + ''').strip().format(**body_result.subs), + body_result.out.strip()) + + def test_void_variant_nostdinc_valist_marshaller(self): + """Test running with a basic VOID:VARIANT list, but without the + standard marshallers, and with valist support enabled. This checks that + the valist marshaller for VARIANT correctly sinks floating variants. + + See issue #1793. + """ + (header_result, body_result) = \ + self.runGenmarshalWithList('VOID:VARIANT', '--quiet', '--nostdinc', + '--valist-marshaller') + + self.assertEqual('', header_result.err) + self.assertEqual('', body_result.err) + + self.assertEqual(dedent( + ''' + /* {standard_top_comment} */ + {standard_top_pragma} + + G_BEGIN_DECLS + + /* VOID:VARIANT ({list_path}:1) */ + extern + void g_cclosure_user_marshal_VOID__VARIANT (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); + extern + void g_cclosure_user_marshal_VOID__VARIANTv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + + + G_END_DECLS + + {standard_bottom_pragma} + ''').strip().format(**header_result.subs), + header_result.out.strip()) + + self.assertEqual(dedent( + ''' + /* {standard_top_comment} */ + {standard_marshal_peek_defines} + + /* VOID:VARIANT ({list_path}:1) */ + void + g_cclosure_user_marshal_VOID__VARIANT (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint G_GNUC_UNUSED, + gpointer marshal_data) + {{ + typedef void (*GMarshalFunc_VOID__VARIANT) (gpointer data1, + gpointer arg1, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_VOID__VARIANT callback; + + g_return_if_fail (n_param_values == 2); + + if (G_CCLOSURE_SWAP_DATA (closure)) + {{ + data1 = closure->data; + data2 = g_value_peek_pointer (param_values + 0); + }} + else + {{ + data1 = g_value_peek_pointer (param_values + 0); + data2 = closure->data; + }} + callback = (GMarshalFunc_VOID__VARIANT) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + g_marshal_value_peek_variant (param_values + 1), + data2); + }} + + void + g_cclosure_user_marshal_VOID__VARIANTv (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types) + {{ + typedef void (*GMarshalFunc_VOID__VARIANT) (gpointer data1, + gpointer arg1, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_VOID__VARIANT callback; + gpointer arg0; + va_list args_copy; + + G_VA_COPY (args_copy, args); + arg0 = (gpointer) va_arg (args_copy, gpointer); + if ((param_types[0] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg0 != NULL) + arg0 = g_variant_ref_sink (arg0); + va_end (args_copy); + + + if (G_CCLOSURE_SWAP_DATA (closure)) + {{ + data1 = closure->data; + data2 = instance; + }} + else + {{ + data1 = instance; + data2 = closure->data; + }} + callback = (GMarshalFunc_VOID__VARIANT) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + arg0, + data2); + if ((param_types[0] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg0 != NULL) + g_variant_unref (arg0); + }} + ''').strip().format(**body_result.subs), + body_result.out.strip()) + + def test_void_string_nostdinc(self): + """Test running with a basic VOID:STRING list, but without the + standard marshallers, and with valist support enabled. This checks that + the valist marshaller for STRING correctly skips a string copy if the + argument is static. + + See issue #1792. + """ + (header_result, body_result) = \ + self.runGenmarshalWithList('VOID:STRING', '--quiet', '--nostdinc', + '--valist-marshaller') + + self.assertEqual('', header_result.err) + self.assertEqual('', body_result.err) + + self.assertEqual(dedent( + ''' + /* {standard_top_comment} */ + {standard_top_pragma} + + G_BEGIN_DECLS + + /* VOID:STRING ({list_path}:1) */ + extern + void g_cclosure_user_marshal_VOID__STRING (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); + extern + void g_cclosure_user_marshal_VOID__STRINGv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + + + G_END_DECLS + + {standard_bottom_pragma} + ''').strip().format(**header_result.subs), + header_result.out.strip()) + + self.assertEqual(dedent( + ''' + /* {standard_top_comment} */ + {standard_marshal_peek_defines} + + /* VOID:STRING ({list_path}:1) */ + void + g_cclosure_user_marshal_VOID__STRING (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint G_GNUC_UNUSED, + gpointer marshal_data) + {{ + typedef void (*GMarshalFunc_VOID__STRING) (gpointer data1, + gpointer arg1, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_VOID__STRING callback; + + g_return_if_fail (n_param_values == 2); + + if (G_CCLOSURE_SWAP_DATA (closure)) + {{ + data1 = closure->data; + data2 = g_value_peek_pointer (param_values + 0); + }} + else + {{ + data1 = g_value_peek_pointer (param_values + 0); + data2 = closure->data; + }} + callback = (GMarshalFunc_VOID__STRING) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + g_marshal_value_peek_string (param_values + 1), + data2); + }} + + void + g_cclosure_user_marshal_VOID__STRINGv (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types) + {{ + typedef void (*GMarshalFunc_VOID__STRING) (gpointer data1, + gpointer arg1, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_VOID__STRING callback; + gpointer arg0; + va_list args_copy; + + G_VA_COPY (args_copy, args); + arg0 = (gpointer) va_arg (args_copy, gpointer); + if ((param_types[0] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg0 != NULL) + arg0 = g_strdup (arg0); + va_end (args_copy); + + + if (G_CCLOSURE_SWAP_DATA (closure)) + {{ + data1 = closure->data; + data2 = instance; + }} + else + {{ + data1 = instance; + data2 = closure->data; + }} + callback = (GMarshalFunc_VOID__STRING) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + arg0, + data2); + if ((param_types[0] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg0 != NULL) + g_free (arg0); + }} + ''').strip().format(**body_result.subs), + body_result.out.strip()) + + def test_void_param_nostdinc(self): + """Test running with a basic VOID:PARAM list, but without the + standard marshallers, and with valist support enabled. This checks that + the valist marshaller for PARAM correctly skips a param copy if the + argument is static. + + See issue #1792. + """ + self.maxDiff = None # TODO + (header_result, body_result) = \ + self.runGenmarshalWithList('VOID:PARAM', '--quiet', '--nostdinc', + '--valist-marshaller') + + self.assertEqual('', header_result.err) + self.assertEqual('', body_result.err) + + self.assertEqual(dedent( + ''' + /* {standard_top_comment} */ + {standard_top_pragma} + + G_BEGIN_DECLS + + /* VOID:PARAM ({list_path}:1) */ + extern + void g_cclosure_user_marshal_VOID__PARAM (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); + extern + void g_cclosure_user_marshal_VOID__PARAMv (GClosure *closure, + GValue *return_value, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types); + + + G_END_DECLS + + {standard_bottom_pragma} + ''').strip().format(**header_result.subs), + header_result.out.strip()) + + self.assertEqual(dedent( + ''' + /* {standard_top_comment} */ + {standard_marshal_peek_defines} + + /* VOID:PARAM ({list_path}:1) */ + void + g_cclosure_user_marshal_VOID__PARAM (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint G_GNUC_UNUSED, + gpointer marshal_data) + {{ + typedef void (*GMarshalFunc_VOID__PARAM) (gpointer data1, + gpointer arg1, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_VOID__PARAM callback; + + g_return_if_fail (n_param_values == 2); + + if (G_CCLOSURE_SWAP_DATA (closure)) + {{ + data1 = closure->data; + data2 = g_value_peek_pointer (param_values + 0); + }} + else + {{ + data1 = g_value_peek_pointer (param_values + 0); + data2 = closure->data; + }} + callback = (GMarshalFunc_VOID__PARAM) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + g_marshal_value_peek_param (param_values + 1), + data2); + }} + + void + g_cclosure_user_marshal_VOID__PARAMv (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + gpointer instance, + va_list args, + gpointer marshal_data, + int n_params, + GType *param_types) + {{ + typedef void (*GMarshalFunc_VOID__PARAM) (gpointer data1, + gpointer arg1, + gpointer data2); + GCClosure *cc = (GCClosure *) closure; + gpointer data1, data2; + GMarshalFunc_VOID__PARAM callback; + gpointer arg0; + va_list args_copy; + + G_VA_COPY (args_copy, args); + arg0 = (gpointer) va_arg (args_copy, gpointer); + if ((param_types[0] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg0 != NULL) + arg0 = g_param_spec_ref (arg0); + va_end (args_copy); + + + if (G_CCLOSURE_SWAP_DATA (closure)) + {{ + data1 = closure->data; + data2 = instance; + }} + else + {{ + data1 = instance; + data2 = closure->data; + }} + callback = (GMarshalFunc_VOID__PARAM) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + arg0, + data2); + if ((param_types[0] & G_SIGNAL_TYPE_STATIC_SCOPE) == 0 && arg0 != NULL) + g_param_spec_unref (arg0); + }} + ''').strip().format(**body_result.subs), + body_result.out.strip()) + + +if __name__ == '__main__': + unittest.main(testRunner=taptestrunner.TAPTestRunner()) diff --git a/gobject/tests/meson.build b/gobject/tests/meson.build index 7c3e5cd9d..35ae4b033 100644 --- a/gobject/tests/meson.build +++ b/gobject/tests/meson.build @@ -56,6 +56,11 @@ if cc.get_id() != 'msvc' gobject_tests += {'autoptr' : {}} endif +python_tests = [ + 'genmarshal.py', + 'mkenums.py', +] + # FIXME: put common bits of test environment() in one location # Not entirely random of course, but at least it changes over time random_number = minor_version + meson.version().split('.').get(1).to_int() @@ -106,10 +111,39 @@ foreach test_name, extra_args : gobject_tests test(test_name, exe, env : test_env, timeout : timeout, suite : suite) endforeach -test( - 'mkenums.py', - python, - args: files('mkenums.py'), - env: test_env, - suite: ['gobject'], -) +foreach test_name : python_tests + test( + test_name, + python, + args: ['-B', files(test_name)], + env: test_env, + suite: ['gobject'], + ) + + if installed_tests_enabled + install_data( + files(test_name), + install_dir: installed_tests_execdir, + install_mode: 'rwxr-xr-x', + ) + + test_conf = configuration_data() + test_conf.set('installed_tests_dir', installed_tests_execdir) + test_conf.set('program', test_name) + test_conf.set('env', '') + configure_file( + input: installed_tests_template_tap, + output: test_name + '.test', + install_dir: installed_tests_metadir, + configuration: test_conf, + ) + endif +endforeach + +# TAP test runner for Python tests +if installed_tests_enabled + install_data( + files('taptestrunner.py'), + install_dir: installed_tests_execdir, + ) +endif diff --git a/gobject/tests/mkenums.py b/gobject/tests/mkenums.py index f2a1ad95c..5f28b9cc6 100644 --- a/gobject/tests/mkenums.py +++ b/gobject/tests/mkenums.py @@ -22,7 +22,9 @@ import collections import os +import shutil import subprocess +import sys import tempfile import textwrap import unittest @@ -45,11 +47,14 @@ class TestMkenums(unittest.TestCase): parsing and generation code out into a library and unit test that, and convert this test to just check command line behaviour. """ + # Track the cwd, we want to back out to that to clean up our tempdir + cwd = '' rspfile = False def setUp(self): self.timeout_seconds = 10 # seconds per test self.tmpdir = tempfile.TemporaryDirectory() + self.cwd = os.getcwd() os.chdir(self.tmpdir.name) print('tmpdir:', self.tmpdir.name) if 'G_TEST_BUILDDIR' in os.environ: @@ -57,10 +62,11 @@ class TestMkenums(unittest.TestCase): os.path.join(os.environ['G_TEST_BUILDDIR'], '..', 'glib-mkenums') else: - self.__mkenums = os.path.join('/', 'usr', 'bin', 'glib-mkenums') + self.__mkenums = shutil.which('glib-mkenums') print('rspfile: {}, mkenums:'.format(self.rspfile), self.__mkenums) def tearDown(self): + os.chdir(self.cwd) self.tmpdir.cleanup() def _write_rspfile(self, argv): @@ -71,13 +77,19 @@ class TestMkenums(unittest.TestCase): print('Response file contains:', contents) f.write(contents) f.flush() - return f.name + return f.name def runMkenums(self, *args): if self.rspfile: rspfile = self._write_rspfile(args) args = ['@' + rspfile] argv = [self.__mkenums] + + # shebang lines are not supported on native + # Windows consoles + if os.name == 'nt': + argv.insert(0, sys.executable) + argv.extend(args) print('Running:', argv) @@ -85,13 +97,15 @@ class TestMkenums(unittest.TestCase): env['LC_ALL'] = 'C.UTF-8' print('Environment:', env) + # We want to ensure consistent line endings... info = subprocess.run(argv, timeout=self.timeout_seconds, stdout=subprocess.PIPE, stderr=subprocess.PIPE, - env=env) + env=env, + universal_newlines=True) info.check_returncode() - out = info.stdout.decode('utf-8').strip() - err = info.stderr.decode('utf-8').strip() + out = info.stdout.strip() + err = info.stderr.strip() # Known substitutions for standard boilerplate subs = { @@ -110,7 +124,8 @@ class TestMkenums(unittest.TestCase): def runMkenumsWithTemplate(self, template_contents, *args): with tempfile.NamedTemporaryFile(dir=self.tmpdir.name, - suffix='.template') as template_file: + suffix='.template', + delete=False) as template_file: # Write out the template. template_file.write(template_contents.encode('utf-8')) print(template_file.name + ':', template_contents) @@ -190,7 +205,8 @@ file-tail def runMkenumsWithHeader(self, h_contents, encoding='utf-8'): with tempfile.NamedTemporaryFile(dir=self.tmpdir.name, - suffix='.h') as h_file: + suffix='.h', + delete=False) as h_file: # Write out the header to be scanned. h_file.write(h_contents.encode(encoding)) print(h_file.name + ':', h_contents) @@ -380,9 +396,9 @@ comment: {standard_bottom_comment} ''' with tempfile.NamedTemporaryFile(dir=self.tmpdir.name, - suffix='1.h') as h_file1, \ + suffix='1.h', delete=False) as h_file1, \ tempfile.NamedTemporaryFile(dir=self.tmpdir.name, - suffix='2.h') as h_file2: + suffix='2.h', delete=False) as h_file2: # Write out the headers. h_file1.write(h_contents1.encode('utf-8')) h_file2.write(h_contents2.encode('utf-8')) diff --git a/gobject/tests/private.c b/gobject/tests/private.c index 678222190..ee8fd8f45 100644 --- a/gobject/tests/private.c +++ b/gobject/tests/private.c @@ -1,3 +1,6 @@ +/* We are testing some deprecated APIs here */ +#define GLIB_DISABLE_DEPRECATION_WARNINGS + #include <glib-object.h> typedef struct { diff --git a/gobject/tests/properties.c b/gobject/tests/properties.c index 0aa325a74..1e48e3389 100644 --- a/gobject/tests/properties.c +++ b/gobject/tests/properties.c @@ -542,6 +542,51 @@ properties_testv_getv (void) } static void +properties_get_property (void) +{ + TestObject *test_obj; + struct { + const char *name; + GType gtype; + GValue value; + } test_props[] = { + { "foo", G_TYPE_INT, G_VALUE_INIT }, + { "bar", G_TYPE_INVALID, G_VALUE_INIT }, + { "bar", G_TYPE_STRING, G_VALUE_INIT }, + }; + int i; + + g_test_summary ("g_object_get_property() accepts uninitialized, " + "initialized, and transformable values"); + + for (i = 0; i < G_N_ELEMENTS (test_props); i++) + { + if (test_props[i].gtype != G_TYPE_INVALID) + g_value_init (&(test_props[i].value), test_props[i].gtype); + } + + test_obj = (TestObject *) g_object_new_with_properties (test_object_get_type (), 0, NULL, NULL); + + g_test_message ("Test g_object_get_property with an initialized value"); + g_object_get_property (G_OBJECT (test_obj), test_props[0].name, &(test_props[0].value)); + g_assert_cmpint (g_value_get_int (&(test_props[0].value)), ==, 42); + + g_test_message ("Test g_object_get_property with an uninitialized value"); + g_object_get_property (G_OBJECT (test_obj), test_props[1].name, &(test_props[1].value)); + g_assert_true (g_value_get_boolean (&(test_props[1].value))); + + g_test_message ("Test g_object_get_property with a transformable value"); + g_object_get_property (G_OBJECT (test_obj), test_props[2].name, &(test_props[2].value)); + g_assert_true (G_VALUE_HOLDS_STRING (&(test_props[2].value))); + g_assert_cmpstr (g_value_get_string (&(test_props[2].value)), ==, "TRUE"); + + for (i = 0; i < G_N_ELEMENTS (test_props); i++) + g_value_unset (&(test_props[i].value)); + + g_object_unref (test_obj); +} + +static void properties_testv_notify_queue (void) { TestObject *test_obj; @@ -599,6 +644,7 @@ main (int argc, char *argv[]) g_test_add_func ("/properties/notify", properties_notify); g_test_add_func ("/properties/notify-queue", properties_notify_queue); g_test_add_func ("/properties/construct", properties_construct); + g_test_add_func ("/properties/get-property", properties_get_property); g_test_add_func ("/properties/testv_with_no_properties", properties_testv_with_no_properties); diff --git a/gobject/tests/signals.c b/gobject/tests/signals.c index 63ce86ea1..44e3f6217 100644 --- a/gobject/tests/signals.c +++ b/gobject/tests/signals.c @@ -1267,7 +1267,7 @@ test_clear_signal_handler (void) { handler = g_random_int_range (0x01, 0xFF); g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_WARNING, - "*instance '0x* has no handler with id *'"); + "*instance '* has no handler with id *'"); g_clear_signal_handler (&handler, test_obj); g_assert_cmpuint (handler, ==, 0); g_test_assert_expected_messages (); diff --git a/meson.build b/meson.build index 6db3e8fe6..9efc5a52c 100644 --- a/meson.build +++ b/meson.build @@ -1,6 +1,7 @@ project('glib', 'c', 'cpp', - version : '2.61.1', - meson_version : '>= 0.48.0', + version : '2.61.2', + # NOTE: We keep this pinned at 0.49 because that's what Debian 10 ships + meson_version : '>= 0.49.2', default_options : [ 'buildtype=debugoptimized', 'warning_level=1', @@ -117,7 +118,7 @@ if host_system == 'windows' glib_conf.set('BROKEN_POLL', true) endif -if host_system == 'windows' and cc.get_id() != 'msvc' +if host_system == 'windows' and cc.get_id() != 'msvc' and cc.get_id() != 'clang-cl' # FIXME: Ideally we shouldn't depend on this on Windows and should use # 64 bit capable Windows API that also works with MSVC. # The autotools build did set this for mingw and while meson sets it @@ -171,7 +172,7 @@ glib_hidden_visibility_args = [] if get_option('default_library') != 'static' if host_system == 'windows' or host_system == 'cygwin' glib_conf.set('DLL_EXPORT', true) - if cc.get_id() == 'msvc' + if cc.get_id() == 'msvc' or cc.get_id() == 'clang-cl' glib_conf.set('_GLIB_EXTERN', '__declspec(dllexport) extern') elif cc.has_argument('-fvisibility=hidden') glib_conf.set('_GLIB_EXTERN', '__attribute__((visibility("default"))) __declspec(dllexport) extern') @@ -183,7 +184,7 @@ if get_option('default_library') != 'static' endif endif -if host_system == 'windows' and get_option('default_library') == 'static' +if get_option('default_library') == 'static' glibconfig_conf.set('GLIB_STATIC_COMPILATION', '1') glibconfig_conf.set('GOBJECT_STATIC_COMPILATION', '1') endif @@ -268,6 +269,7 @@ headers = [ 'termios.h', 'unistd.h', 'values.h', + 'wchar.h', 'xlocale.h', ] @@ -772,7 +774,7 @@ have_good_vsnprintf = false have_good_snprintf = false have_good_printf = false -if host_system == 'windows' and cc.get_id() == 'msvc' +if host_system == 'windows' and (cc.get_id() == 'msvc' or cc.get_id() == 'clang-cl') # Unfortunately the Visual Studio 2015+ implementations of C99-style # snprintf and vsnprintf don't seem to be quite good enough. # (Sorry, I don't know exactly what is the problem, @@ -1121,7 +1123,7 @@ else long_long_size = 0 endif sizet_size = cc.sizeof('size_t') -if cc.get_id() == 'msvc' +if cc.get_id() == 'msvc' or cc.get_id() == 'clang-cl' ssizet_size = cc.sizeof('SSIZE_T', prefix : '#include <BaseTsd.h>') else ssizet_size = cc.sizeof('ssize_t') @@ -1181,6 +1183,7 @@ glib_conf.set('SIZEOF_LONG_LONG', long_long_size) glib_conf.set('SIZEOF_SIZE_T', sizet_size) glib_conf.set('SIZEOF_SSIZE_T', ssizet_size) glib_conf.set('SIZEOF_VOID_P', voidp_size) +glib_conf.set('SIZEOF_WCHAR_T', cc.sizeof('wchar_t', prefix: '#include <stddef.h>')) if short_size == 2 gint16 = 'short' @@ -1593,10 +1596,10 @@ atomicdefine = ''' ''' # We know that we can always use real ("lock free") atomic operations with MSVC -if cc.get_id() == 'msvc' or cc.links(atomictest, name : 'atomic ops') +if cc.get_id() == 'msvc' or cc.get_id() == 'clang-cl' or cc.links(atomictest, name : 'atomic ops') have_atomic_lock_free = true - if (host_system == 'android' or host_system == 'linux') and not cc.compiles(atomicdefine, name : 'atomic ops define') - # When building for armv5 on Linux, gcc provides + if cc.get_id() == 'gcc' and not cc.compiles(atomicdefine, name : 'atomic ops define') + # Old gcc release may provide # __sync_bool_compare_and_swap but doesn't define # __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 glib_conf.set('__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4', true) @@ -1723,7 +1726,7 @@ if get_option('internal_pcre') else pcre = dependency('libpcre', version: '>= 8.31', required : false) # Should check for Unicode support, too. FIXME if not pcre.found() - if cc.get_id() == 'msvc' + if cc.get_id() == 'msvc' or cc.get_id() == 'clang-cl' # MSVC: Search for the PCRE library by the configuration, which corresponds # to the output of CMake builds of PCRE. Note that debugoptimized # is really a Release build with .PDB files. @@ -1766,7 +1769,7 @@ libffi_dep = dependency('libffi', version : '>= 3.0.0', fallback : ['libffi', 'f # the system libz_dep = dependency('zlib', required : false) if not libz_dep.found() - if cc.get_id() != 'msvc' + if cc.get_id() != 'msvc' and cc.get_id() != 'clang-cl' libz_dep = cc.find_library('z', required : false) else libz_dep = cc.find_library('zlib1', required : false) @@ -1978,7 +1981,7 @@ endif win32_cflags = [] win32_ldflags = [] -if host_system == 'windows' and cc.get_id() != 'msvc' +if host_system == 'windows' and cc.get_id() != 'msvc' and cc.get_id() != 'clang-cl' # Ensure MSVC-compatible struct packing convention is used when # compiling for Win32 with gcc. It is used for the whole project and exposed # in glib-2.0.pc. @@ -2035,7 +2038,7 @@ if want_systemtap and enable_dtrace endif test_timeout = 60 -test_timeout_slow = 120 +test_timeout_slow = 180 pkg = import('pkgconfig') windows = import('windows') @@ -2066,7 +2069,6 @@ if have_sh gettextize_conf.set('datarootdir', glib_datadir) gettextize_conf.set('datadir', glib_datadir) configure_file(input : 'glib-gettextize.in', - install : true, install_dir : glib_bindir, output : 'glib-gettextize', configuration : gettextize_conf) @@ -2107,4 +2109,4 @@ if get_option('man') endif gnome = import('gnome') -subdir('docs/reference')
\ No newline at end of file +subdir('docs/reference') @@ -14,8 +14,8 @@ msgid "" msgstr "" "Project-Id-Version: glib.master\n" "Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/glib/issues\n" -"POT-Creation-Date: 2019-03-19 10:54+0000\n" -"PO-Revision-Date: 2019-04-23 10:08+0200\n" +"POT-Creation-Date: 2019-06-17 18:06+0000\n" +"PO-Revision-Date: 2019-06-18 14:51+0200\n" "Last-Translator: Daniel Mustieles <daniel.mustieles@gmail.com>\n" "Language-Team: es <gnome-es-list@gnome.org>\n" "Language: es\n" @@ -110,7 +110,7 @@ msgstr "" msgid "APPID" msgstr "APPID" -#: gio/gapplication-tool.c:70 gio/gapplication-tool.c:133 gio/gdbus-tool.c:91 +#: gio/gapplication-tool.c:70 gio/gapplication-tool.c:133 gio/gdbus-tool.c:102 #: gio/gio-tool.c:224 msgid "COMMAND" msgstr "COMANDO" @@ -290,7 +290,7 @@ msgstr "El flujo ya se cerró" msgid "Truncate not supported on base stream" msgstr "No se soporta el truncado en el flujo base" -#: gio/gcancellable.c:319 gio/gdbusconnection.c:1867 gio/gdbusprivate.c:1406 +#: gio/gcancellable.c:319 gio/gdbusconnection.c:1867 gio/gdbusprivate.c:1409 #: gio/gsimpleasyncresult.c:871 gio/gsimpleasyncresult.c:897 #, c-format msgid "Operation was cancelled" @@ -309,29 +309,29 @@ msgid "Not enough space in destination" msgstr "No hay suficiente espacio en el destino" #: gio/gcharsetconverter.c:342 gio/gdatainputstream.c:848 -#: gio/gdatainputstream.c:1261 glib/gconvert.c:455 glib/gconvert.c:885 -#: glib/giochannel.c:1561 glib/giochannel.c:1603 glib/giochannel.c:2447 +#: gio/gdatainputstream.c:1261 glib/gconvert.c:447 glib/gconvert.c:877 +#: glib/giochannel.c:1561 glib/giochannel.c:1603 glib/giochannel.c:2450 #: glib/gutf8.c:869 glib/gutf8.c:1322 msgid "Invalid byte sequence in conversion input" msgstr "Hay una secuencia de bytes no válida en la entrada de conversión" -#: gio/gcharsetconverter.c:347 glib/gconvert.c:463 glib/gconvert.c:799 -#: glib/giochannel.c:1568 glib/giochannel.c:2459 +#: gio/gcharsetconverter.c:347 glib/gconvert.c:455 glib/gconvert.c:791 +#: glib/giochannel.c:1568 glib/giochannel.c:2462 #, c-format msgid "Error during conversion: %s" msgstr "Falló durante la conversión: %s" -#: gio/gcharsetconverter.c:445 gio/gsocket.c:1093 +#: gio/gcharsetconverter.c:445 gio/gsocket.c:1094 msgid "Cancellable initialization not supported" msgstr "La inicialización cancelable no eestá soportada" -#: gio/gcharsetconverter.c:456 glib/gconvert.c:328 glib/giochannel.c:1389 +#: gio/gcharsetconverter.c:456 glib/gconvert.c:320 glib/giochannel.c:1389 #, c-format msgid "Conversion from character set “%s” to “%s” is not supported" msgstr "" "La conversión desde el conjunto de caracteres «%s» a «%s» no está soportada" -#: gio/gcharsetconverter.c:460 glib/gconvert.c:332 +#: gio/gcharsetconverter.c:460 glib/gconvert.c:324 #, c-format msgid "Could not open converter from “%s” to “%s”" msgstr "No se pudo abrir el conversor de «%s» a «%s»" @@ -370,52 +370,56 @@ msgstr "No se soporta la burla de credenciales en este SO" msgid "Unexpected early end-of-stream" msgstr "Final de flujo inesperadamente prematuro" -#: gio/gdbusaddress.c:154 gio/gdbusaddress.c:229 gio/gdbusaddress.c:310 +#: gio/gdbusaddress.c:158 gio/gdbusaddress.c:232 gio/gdbusaddress.c:313 #, c-format msgid "Unsupported key “%s” in address entry “%s”" msgstr "Clave «%s» no soportada en la entrada de dirección «%s»" -#: gio/gdbusaddress.c:168 +#: gio/gdbusaddress.c:171 #, c-format msgid "Meaningless key/value pair combination in address entry “%s”" msgstr "" "Combinación del par clave/valor sin sentido en la entrada de dirección «%s»" -#: gio/gdbusaddress.c:177 +#: gio/gdbusaddress.c:180 #, c-format +#| msgid "" +#| "Address “%s” is invalid (need exactly one of path, tmpdir or abstract " +#| "keys)" msgid "" -"Address “%s” is invalid (need exactly one of path, tmpdir or abstract keys)" +"Address “%s” is invalid (need exactly one of path, dir, tmpdir, or abstract " +"keys)" msgstr "" -"La dirección «%s» no es válida (se necesita exactamente una ruta, carpeta " -"temporal o claves abstractas)" +"La dirección «%s» no es válida (se necesita exactamente una ruta, carpeta, " +"carpeta temporal o claves abstractas)" -#: gio/gdbusaddress.c:244 gio/gdbusaddress.c:325 +#: gio/gdbusaddress.c:247 gio/gdbusaddress.c:328 #, c-format msgid "Error in address “%s” — the port attribute is malformed" msgstr "Error en la dirección «%s»; el atributo de puerto está mal formado" -#: gio/gdbusaddress.c:255 gio/gdbusaddress.c:336 +#: gio/gdbusaddress.c:258 gio/gdbusaddress.c:339 #, c-format msgid "Error in address “%s” — the family attribute is malformed" msgstr "Error en la dirección «%s»; el atributo de familia está mal formado" -#: gio/gdbusaddress.c:406 gio/gdbusaddress.c:670 +#: gio/gdbusaddress.c:409 gio/gdbusaddress.c:673 #, c-format msgid "Unknown or unsupported transport “%s” for address “%s”" msgstr "Transporte «%s» desconocido o no soportado para la dirección «%s»" -#: gio/gdbusaddress.c:450 +#: gio/gdbusaddress.c:453 #, c-format msgid "Address element “%s” does not contain a colon (:)" msgstr "El elemento de dirección «%s» no contiene dos puntos (:)" -#: gio/gdbusaddress.c:459 +#: gio/gdbusaddress.c:462 #, c-format msgid "Transport name in address element “%s” must not be empty" msgstr "" "El nombre del transporte en el elemento de dirección «%s» no debe estar vacío" -#: gio/gdbusaddress.c:480 +#: gio/gdbusaddress.c:483 #, c-format msgid "" "Key/Value pair %d, “%s”, in address element “%s” does not contain an equal " @@ -424,18 +428,15 @@ msgstr "" "El par clave/valor %d, «%s», en el elemento de dirección «%s», no contiene " "un signo de igual" -#: gio/gdbusaddress.c:491 +#: gio/gdbusaddress.c:494 #, c-format -#| msgid "" -#| "Key/Value pair %d, “%s”, in address element “%s” does not contain an " -#| "equal sign" msgid "" "Key/Value pair %d, “%s”, in address element “%s” must not have an empty key" msgstr "" "El par clave/valor %d, «%s», en el elemento de dirección «%s», no debe " "contener una clave vacía" -#: gio/gdbusaddress.c:505 +#: gio/gdbusaddress.c:508 #, c-format msgid "" "Error unescaping key or value in Key/Value pair %d, “%s”, in address element " @@ -444,7 +445,7 @@ msgstr "" "Error al desescapar la clave o el valor en el par clave/valor %d, «%s», en " "el elemento de dirección «%s»" -#: gio/gdbusaddress.c:577 +#: gio/gdbusaddress.c:580 #, c-format msgid "" "Error in address “%s” — the unix transport requires exactly one of the keys " @@ -453,86 +454,86 @@ msgstr "" "Error en la dirección «%s»: el transporte UNIX requiere exactamente que una " "de las claves «path» o «abstract» esté establecida" -#: gio/gdbusaddress.c:613 +#: gio/gdbusaddress.c:616 #, c-format msgid "Error in address “%s” — the host attribute is missing or malformed" msgstr "" "Error en la dirección «%s»: falta o está mal formado el atributo para el " "servidor" -#: gio/gdbusaddress.c:627 +#: gio/gdbusaddress.c:630 #, c-format msgid "Error in address “%s” — the port attribute is missing or malformed" msgstr "" "Error en la dirección «%s»: falta o está mal formado el atributo para el " "puerto" -#: gio/gdbusaddress.c:641 +#: gio/gdbusaddress.c:644 #, c-format msgid "Error in address “%s” — the noncefile attribute is missing or malformed" msgstr "" "Error en la dirección «%s»: falta o está mal formado el atributo para el " "archivo de número usado una sola vez" -#: gio/gdbusaddress.c:662 +#: gio/gdbusaddress.c:665 msgid "Error auto-launching: " msgstr "Error al autolanzar: " -#: gio/gdbusaddress.c:715 +#: gio/gdbusaddress.c:718 #, c-format msgid "Error opening nonce file “%s”: %s" msgstr "Error al abrir el archivo de número usado una sola vez «%s»: %s" -#: gio/gdbusaddress.c:734 +#: gio/gdbusaddress.c:737 #, c-format msgid "Error reading from nonce file “%s”: %s" msgstr "Error al leer el archivo de número usado una sola vez «%s»: %s" -#: gio/gdbusaddress.c:743 +#: gio/gdbusaddress.c:746 #, c-format msgid "Error reading from nonce file “%s”, expected 16 bytes, got %d" msgstr "" "Error al leer el archivo de número usado una sola vez «%s», se esperaban 16 " "bytes, se obtuvieron %d" -#: gio/gdbusaddress.c:761 +#: gio/gdbusaddress.c:764 #, c-format msgid "Error writing contents of nonce file “%s” to stream:" msgstr "" "Error al escribir el contenido del archivo de número usado una sola vez «%s» " "al flujo:" -#: gio/gdbusaddress.c:970 +#: gio/gdbusaddress.c:973 msgid "The given address is empty" msgstr "La dirección proporcionada está vacía" -#: gio/gdbusaddress.c:1083 +#: gio/gdbusaddress.c:1086 #, c-format msgid "Cannot spawn a message bus when setuid" msgstr "No se puede lanzar («spawn») un mensaje al bus con setuid" -#: gio/gdbusaddress.c:1090 +#: gio/gdbusaddress.c:1093 msgid "Cannot spawn a message bus without a machine-id: " msgstr "No se puede lanzar («spawn») un mensaje al bus sin un ID de máquina: " -#: gio/gdbusaddress.c:1097 +#: gio/gdbusaddress.c:1100 #, c-format msgid "Cannot autolaunch D-Bus without X11 $DISPLAY" msgstr "No se puede lanzar D-Bus automáticamente sin X11 $DISPLAY" -#: gio/gdbusaddress.c:1139 +#: gio/gdbusaddress.c:1142 #, c-format msgid "Error spawning command line “%s”: " msgstr "Error al lanzar («spawn») el comando «%s»: " -#: gio/gdbusaddress.c:1208 +#: gio/gdbusaddress.c:1211 #, c-format msgid "Cannot determine session bus address (not implemented for this OS)" msgstr "" "No se puede determinar la dirección del bus de sesión (no implementado para " "este SO)" -#: gio/gdbusaddress.c:1346 gio/gdbusconnection.c:7174 +#: gio/gdbusaddress.c:1349 gio/gdbusconnection.c:7174 #, c-format msgid "" "Cannot determine bus address from DBUS_STARTER_BUS_TYPE environment variable " @@ -541,7 +542,7 @@ msgstr "" "No se puede determinar la dirección del bus desde la variable de entorno " "DBUS_STARTER_BUS_TYPE; variable «%s» desconocida" -#: gio/gdbusaddress.c:1355 gio/gdbusconnection.c:7183 +#: gio/gdbusaddress.c:1358 gio/gdbusconnection.c:7183 msgid "" "Cannot determine bus address because the DBUS_STARTER_BUS_TYPE environment " "variable is not set" @@ -549,7 +550,7 @@ msgstr "" "No se puede determinar la dirección del bus porque la variable de entorno " "DBUS_STARTER_BUS_TYPE no está establecida" -#: gio/gdbusaddress.c:1365 +#: gio/gdbusaddress.c:1368 #, c-format msgid "Unknown bus type %d" msgstr "Tipo de bus %d desconocido" @@ -959,23 +960,23 @@ msgstr "Error al devolver el cuerpo de tipo «%s»" msgid "Error return with empty body" msgstr "Error al devolver un cuepro vacío" -#: gio/gdbusprivate.c:2233 +#: gio/gdbusprivate.c:2243 #, c-format msgid "(Type any character to close this window)\n" msgstr "(Escriba un carácter cualquiera para cerrar esta ventana)\n" -#: gio/gdbusprivate.c:2407 +#: gio/gdbusprivate.c:2417 #, c-format msgid "Session dbus not running, and autolaunch failed" msgstr "" "La sesión de dbus no está en ejecución, y falló el lanzamiento automático" -#: gio/gdbusprivate.c:2430 +#: gio/gdbusprivate.c:2440 #, c-format msgid "Unable to get Hardware profile: %s" msgstr "No se pudo obtener el perfil de hardware: %s" -#: gio/gdbusprivate.c:2475 +#: gio/gdbusprivate.c:2485 msgid "Unable to load /var/lib/dbus/machine-id or /etc/machine-id: " msgstr "No se puede cargar /var/lib/dbus/machine-id o /etc/machine-id: " @@ -999,32 +1000,33 @@ msgstr "" "%sconocido y el proxy se construyó con la opción " "G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START" -#: gio/gdbusserver.c:708 -msgid "Abstract name space not supported" -msgstr "No se soporta el espacio de nombres abstracto" +#: gio/gdbusserver.c:742 +#| msgid "Abstract name space not supported" +msgid "Abstract namespace not supported" +msgstr "Espacio de nombres abstracto no soportado" -#: gio/gdbusserver.c:795 +#: gio/gdbusserver.c:835 msgid "Cannot specify nonce file when creating a server" msgstr "" "No se puede especificar el archivo de número usado una sola vez al crear un " "servidor" -#: gio/gdbusserver.c:876 +#: gio/gdbusserver.c:917 #, c-format msgid "Error writing nonce file at “%s”: %s" msgstr "Error al escribir el archivo de número usado una sola vez en «%s»: %s" -#: gio/gdbusserver.c:1047 +#: gio/gdbusserver.c:1090 #, c-format msgid "The string “%s” is not a valid D-Bus GUID" msgstr "La cadena «%s» no es un GUID válido de D-Bus" -#: gio/gdbusserver.c:1087 +#: gio/gdbusserver.c:1130 #, c-format msgid "Cannot listen on unsupported transport “%s”" msgstr "No se puede escuchar en un transporte no soportado «%s»" -#: gio/gdbus-tool.c:96 +#: gio/gdbus-tool.c:107 #, c-format msgid "" "Commands:\n" @@ -1047,54 +1049,54 @@ msgstr "" "\n" "Use «%s COMANDO --help» para obtener ayuda de cada comando.\n" -#: gio/gdbus-tool.c:186 gio/gdbus-tool.c:253 gio/gdbus-tool.c:325 -#: gio/gdbus-tool.c:349 gio/gdbus-tool.c:835 gio/gdbus-tool.c:1172 -#: gio/gdbus-tool.c:1614 +#: gio/gdbus-tool.c:197 gio/gdbus-tool.c:264 gio/gdbus-tool.c:336 +#: gio/gdbus-tool.c:360 gio/gdbus-tool.c:846 gio/gdbus-tool.c:1183 +#: gio/gdbus-tool.c:1668 #, c-format msgid "Error: %s\n" msgstr "Error: %s\n" -#: gio/gdbus-tool.c:197 gio/gdbus-tool.c:266 gio/gdbus-tool.c:1630 +#: gio/gdbus-tool.c:208 gio/gdbus-tool.c:277 gio/gdbus-tool.c:1684 #, c-format msgid "Error parsing introspection XML: %s\n" msgstr "Error al analizar la introspección XML: %s\n" -#: gio/gdbus-tool.c:235 +#: gio/gdbus-tool.c:246 #, c-format msgid "Error: %s is not a valid name\n" msgstr "Error: %s no es un nombre válido\n" -#: gio/gdbus-tool.c:383 +#: gio/gdbus-tool.c:394 msgid "Connect to the system bus" msgstr "Conectar con el bus del sistema" -#: gio/gdbus-tool.c:384 +#: gio/gdbus-tool.c:395 msgid "Connect to the session bus" msgstr "Conectar con el bus de sesión" -#: gio/gdbus-tool.c:385 +#: gio/gdbus-tool.c:396 msgid "Connect to given D-Bus address" msgstr "Conectar con la dirección de D-Bus proporcionada" -#: gio/gdbus-tool.c:395 +#: gio/gdbus-tool.c:406 msgid "Connection Endpoint Options:" msgstr "Opciones de conexión del extremo:" -#: gio/gdbus-tool.c:396 +#: gio/gdbus-tool.c:407 msgid "Options specifying the connection endpoint" msgstr "Opciones para especificar la conexión del extremo:" -#: gio/gdbus-tool.c:418 +#: gio/gdbus-tool.c:429 #, c-format msgid "No connection endpoint specified" msgstr "No se especificó ningún punto de conexión extremo" -#: gio/gdbus-tool.c:428 +#: gio/gdbus-tool.c:439 #, c-format msgid "Multiple connection endpoints specified" msgstr "Se especificaron varios puntos de conexión extremos" -#: gio/gdbus-tool.c:498 +#: gio/gdbus-tool.c:509 #, c-format msgid "" "Warning: According to introspection data, interface “%s” does not exist\n" @@ -1102,7 +1104,7 @@ msgstr "" "Advertencia: según la introspección de los datos, la interfaz «%s» no " "existe\n" -#: gio/gdbus-tool.c:507 +#: gio/gdbus-tool.c:518 #, c-format msgid "" "Warning: According to introspection data, method “%s” does not exist on " @@ -1111,162 +1113,162 @@ msgstr "" "Advertencia: según la introspección de los datos, el método «%s» no existe " "en la interfaz «%s»\n" -#: gio/gdbus-tool.c:569 +#: gio/gdbus-tool.c:580 msgid "Optional destination for signal (unique name)" msgstr "Destino opcional para la señal (nombre único)" -#: gio/gdbus-tool.c:570 +#: gio/gdbus-tool.c:581 msgid "Object path to emit signal on" msgstr "Ruta del objeto sobre el que emitir la señal" -#: gio/gdbus-tool.c:571 +#: gio/gdbus-tool.c:582 msgid "Signal and interface name" msgstr "Nombres de la interfaz y señal" -#: gio/gdbus-tool.c:604 +#: gio/gdbus-tool.c:615 msgid "Emit a signal." msgstr "Emitir una señal." -#: gio/gdbus-tool.c:659 gio/gdbus-tool.c:966 gio/gdbus-tool.c:1716 -#: gio/gdbus-tool.c:1945 gio/gdbus-tool.c:2165 +#: gio/gdbus-tool.c:670 gio/gdbus-tool.c:977 gio/gdbus-tool.c:1771 +#: gio/gdbus-tool.c:2003 gio/gdbus-tool.c:2223 #, c-format msgid "Error connecting: %s\n" msgstr "Error al conectar: %s\n" -#: gio/gdbus-tool.c:679 +#: gio/gdbus-tool.c:690 #, c-format msgid "Error: %s is not a valid unique bus name.\n" msgstr "Error: %s no es un nombre de bus único válido.\n" -#: gio/gdbus-tool.c:698 gio/gdbus-tool.c:1009 gio/gdbus-tool.c:1759 +#: gio/gdbus-tool.c:709 gio/gdbus-tool.c:1020 gio/gdbus-tool.c:1814 msgid "Error: Object path is not specified\n" msgstr "Error: no se especificó la ruta del objeto\n" -#: gio/gdbus-tool.c:721 gio/gdbus-tool.c:1029 gio/gdbus-tool.c:1779 -#: gio/gdbus-tool.c:2016 +#: gio/gdbus-tool.c:732 gio/gdbus-tool.c:1040 gio/gdbus-tool.c:1834 +#: gio/gdbus-tool.c:2074 #, c-format msgid "Error: %s is not a valid object path\n" msgstr "Error: %s no es una ruta de objeto válida\n" -#: gio/gdbus-tool.c:741 +#: gio/gdbus-tool.c:752 msgid "Error: Signal name is not specified\n" msgstr "Error: no se especificó el nombre de la señal\n" -#: gio/gdbus-tool.c:755 +#: gio/gdbus-tool.c:766 #, c-format msgid "Error: Signal name “%s” is invalid\n" msgstr "Error: el nombre de la señal «%s» no es válido\n" -#: gio/gdbus-tool.c:767 +#: gio/gdbus-tool.c:778 #, c-format msgid "Error: %s is not a valid interface name\n" msgstr "Error: %s no es un nombre de interfaz válida\n" -#: gio/gdbus-tool.c:773 +#: gio/gdbus-tool.c:784 #, c-format msgid "Error: %s is not a valid member name\n" msgstr "Error: %s no es un nombre de miembro válido\n" #. Use the original non-"parse-me-harder" error -#: gio/gdbus-tool.c:810 gio/gdbus-tool.c:1141 +#: gio/gdbus-tool.c:821 gio/gdbus-tool.c:1152 #, c-format msgid "Error parsing parameter %d: %s\n" msgstr "Error al analizar el parámetro %d: %s\n" -#: gio/gdbus-tool.c:842 +#: gio/gdbus-tool.c:853 #, c-format msgid "Error flushing connection: %s\n" msgstr "Error al limpiar la conexión: %s\n" -#: gio/gdbus-tool.c:869 +#: gio/gdbus-tool.c:880 msgid "Destination name to invoke method on" msgstr "Nombre del detino sobre el que invocar elmétodo" -#: gio/gdbus-tool.c:870 +#: gio/gdbus-tool.c:881 msgid "Object path to invoke method on" msgstr "Ruta del objeto sobre la que invocar el método" -#: gio/gdbus-tool.c:871 +#: gio/gdbus-tool.c:882 msgid "Method and interface name" msgstr "Nombre de la interfaz y método" -#: gio/gdbus-tool.c:872 +#: gio/gdbus-tool.c:883 msgid "Timeout in seconds" msgstr "Tiempo de expiración en segundos" -#: gio/gdbus-tool.c:911 +#: gio/gdbus-tool.c:922 msgid "Invoke a method on a remote object." msgstr "Invocar un método en un objeto remoto." -#: gio/gdbus-tool.c:983 gio/gdbus-tool.c:1733 gio/gdbus-tool.c:1970 +#: gio/gdbus-tool.c:994 gio/gdbus-tool.c:1788 gio/gdbus-tool.c:2028 msgid "Error: Destination is not specified\n" msgstr "Error: el destino no está especificado\n" -#: gio/gdbus-tool.c:994 gio/gdbus-tool.c:1750 gio/gdbus-tool.c:1981 +#: gio/gdbus-tool.c:1005 gio/gdbus-tool.c:1805 gio/gdbus-tool.c:2039 #, c-format msgid "Error: %s is not a valid bus name\n" msgstr "Error: %s no es un nombre de bus válido\n" -#: gio/gdbus-tool.c:1044 +#: gio/gdbus-tool.c:1055 msgid "Error: Method name is not specified\n" msgstr "Error: no se especificó el nombre del método\n" -#: gio/gdbus-tool.c:1055 +#: gio/gdbus-tool.c:1066 #, c-format msgid "Error: Method name “%s” is invalid\n" msgstr "Error: el nombre del método «%s» no es válido\n" -#: gio/gdbus-tool.c:1133 +#: gio/gdbus-tool.c:1144 #, c-format msgid "Error parsing parameter %d of type “%s”: %s\n" msgstr "Error al analizar el parámetro %d del tipo «%s»: %s\n" -#: gio/gdbus-tool.c:1577 +#: gio/gdbus-tool.c:1630 msgid "Destination name to introspect" msgstr "Nombre de destino que introspeccionar" -#: gio/gdbus-tool.c:1578 +#: gio/gdbus-tool.c:1631 msgid "Object path to introspect" msgstr "Ruta del objeto que introspeccionar" -#: gio/gdbus-tool.c:1579 +#: gio/gdbus-tool.c:1632 msgid "Print XML" msgstr "Imprimir XML" -#: gio/gdbus-tool.c:1580 +#: gio/gdbus-tool.c:1633 msgid "Introspect children" msgstr "Introspeccionar hijo" -#: gio/gdbus-tool.c:1581 +#: gio/gdbus-tool.c:1634 msgid "Only print properties" msgstr "Solo mostrar propiedades" -#: gio/gdbus-tool.c:1668 +#: gio/gdbus-tool.c:1723 msgid "Introspect a remote object." msgstr "Introspeccionar un objeto remoto." -#: gio/gdbus-tool.c:1871 +#: gio/gdbus-tool.c:1929 msgid "Destination name to monitor" msgstr "Nombre de destino para monitorizar" -#: gio/gdbus-tool.c:1872 +#: gio/gdbus-tool.c:1930 msgid "Object path to monitor" msgstr "Ruta objeto para monitorizar" -#: gio/gdbus-tool.c:1897 +#: gio/gdbus-tool.c:1955 msgid "Monitor a remote object." msgstr "Monitorizar un objeto remoto." -#: gio/gdbus-tool.c:1955 +#: gio/gdbus-tool.c:2013 msgid "Error: can’t monitor a non-message-bus connection\n" msgstr "" "Error: no se puede monitorizar una conexión que no sea de mensajes del bus\n" -#: gio/gdbus-tool.c:2079 +#: gio/gdbus-tool.c:2137 msgid "Service to activate before waiting for the other one (well-known name)" msgstr "Servicio que activar antes de esperar a otro (nombre conocido)" -#: gio/gdbus-tool.c:2082 +#: gio/gdbus-tool.c:2140 msgid "" "Timeout to wait for before exiting with an error (seconds); 0 for no timeout " "(default)" @@ -1274,65 +1276,65 @@ msgstr "" "Tiempo que esperar antes de salir con un error (en segundos); 0 para que no " "haya tiempo de expiración (predeterminado)" -#: gio/gdbus-tool.c:2130 +#: gio/gdbus-tool.c:2188 msgid "[OPTION…] BUS-NAME" msgstr "[OPCIÓN…] NOMBRE-BUS" -#: gio/gdbus-tool.c:2131 +#: gio/gdbus-tool.c:2189 msgid "Wait for a bus name to appear." msgstr "Esperar a que aparezca el nombre del bus." -#: gio/gdbus-tool.c:2207 +#: gio/gdbus-tool.c:2265 msgid "Error: A service to activate for must be specified.\n" msgstr "Error: se debe especificar un servicio que activar.\n" -#: gio/gdbus-tool.c:2212 +#: gio/gdbus-tool.c:2270 msgid "Error: A service to wait for must be specified.\n" msgstr "Error: se debe especificar un servicio al que esperar.\n" -#: gio/gdbus-tool.c:2217 +#: gio/gdbus-tool.c:2275 msgid "Error: Too many arguments.\n" msgstr "Demasiados argumentos.\n" -#: gio/gdbus-tool.c:2225 gio/gdbus-tool.c:2232 +#: gio/gdbus-tool.c:2283 gio/gdbus-tool.c:2290 #, c-format msgid "Error: %s is not a valid well-known bus name.\n" msgstr "Error: %s no es un nombre de bus conocido válido\n" -#: gio/gdesktopappinfo.c:2041 gio/gdesktopappinfo.c:4822 +#: gio/gdesktopappinfo.c:2045 gio/gdesktopappinfo.c:4834 msgid "Unnamed" msgstr "Sin nombre" -#: gio/gdesktopappinfo.c:2451 +#: gio/gdesktopappinfo.c:2455 msgid "Desktop file didn’t specify Exec field" msgstr "El archivo de escritorio no especificó el campo Exec" -#: gio/gdesktopappinfo.c:2710 +#: gio/gdesktopappinfo.c:2718 msgid "Unable to find terminal required for application" msgstr "Imposible encontrar el terminal requerido por la aplicación" -#: gio/gdesktopappinfo.c:3362 +#: gio/gdesktopappinfo.c:3370 #, c-format msgid "Can’t create user application configuration folder %s: %s" msgstr "" "No se puede crear la carpeta de configuración de la aplicación %s del " "usuario: %s" -#: gio/gdesktopappinfo.c:3366 +#: gio/gdesktopappinfo.c:3374 #, c-format msgid "Can’t create user MIME configuration folder %s: %s" msgstr "No se puede crear la carpeta de configuración MIME %s del usuario: %s" -#: gio/gdesktopappinfo.c:3606 gio/gdesktopappinfo.c:3630 +#: gio/gdesktopappinfo.c:3614 gio/gdesktopappinfo.c:3638 msgid "Application information lacks an identifier" msgstr "La información de la aplicación carece de un identificador" -#: gio/gdesktopappinfo.c:3864 +#: gio/gdesktopappinfo.c:3872 #, c-format msgid "Can’t create user desktop file %s" msgstr "No se puede crear el archivo de escritorio %s del usuario" -#: gio/gdesktopappinfo.c:3998 +#: gio/gdesktopappinfo.c:4006 #, c-format msgid "Custom definition for %s" msgstr "Definición personalizada para %s" @@ -1395,10 +1397,10 @@ msgstr "Se esperaba un GEmblem para GEmblemedIconjo" #: gio/gfile.c:1076 gio/gfile.c:1314 gio/gfile.c:1452 gio/gfile.c:1690 #: gio/gfile.c:1745 gio/gfile.c:1803 gio/gfile.c:1887 gio/gfile.c:1944 -#: gio/gfile.c:2008 gio/gfile.c:2063 gio/gfile.c:3738 gio/gfile.c:3793 -#: gio/gfile.c:4029 gio/gfile.c:4071 gio/gfile.c:4539 gio/gfile.c:4950 -#: gio/gfile.c:5035 gio/gfile.c:5125 gio/gfile.c:5222 gio/gfile.c:5309 -#: gio/gfile.c:5410 gio/gfile.c:8114 gio/gfile.c:8204 gio/gfile.c:8288 +#: gio/gfile.c:2008 gio/gfile.c:2063 gio/gfile.c:3739 gio/gfile.c:3794 +#: gio/gfile.c:4030 gio/gfile.c:4072 gio/gfile.c:4540 gio/gfile.c:4951 +#: gio/gfile.c:5036 gio/gfile.c:5126 gio/gfile.c:5223 gio/gfile.c:5310 +#: gio/gfile.c:5411 gio/gfile.c:8115 gio/gfile.c:8205 gio/gfile.c:8289 #: gio/win32/gwinhttpfile.c:437 msgid "Operation not supported" msgstr "Operación no soportada" @@ -1452,24 +1454,24 @@ msgstr "Copiar (reflink/clone) no está soportado o no ha funcionado" msgid "Can’t copy special file" msgstr "No se puede copiar el archivo especial" -#: gio/gfile.c:4019 +#: gio/gfile.c:4020 msgid "Invalid symlink value given" msgstr "El valor del enlace simbólico dado no es válido" -#: gio/gfile.c:4180 +#: gio/gfile.c:4181 msgid "Trash not supported" msgstr "No se soporta mover a la papelera" -#: gio/gfile.c:4292 +#: gio/gfile.c:4293 #, c-format msgid "File names cannot contain “%c”" msgstr "Los nombres de archivo no pueden contener «%c»" -#: gio/gfile.c:6773 gio/gvolume.c:364 +#: gio/gfile.c:6774 gio/gvolume.c:364 msgid "volume doesn’t implement mount" msgstr "el volumen no implementa el montaje" -#: gio/gfile.c:6884 gio/gfile.c:6930 +#: gio/gfile.c:6885 gio/gfile.c:6931 msgid "No application is registered as handling this file" msgstr "No hay ninguna aplicación registrada para manejar este archivo" @@ -1514,8 +1516,8 @@ msgstr "No se permite truncar en el flujo de entrada" msgid "Truncate not supported on stream" msgstr "No se soporta el truncamiento en el flujo" -#: gio/ghttpproxy.c:91 gio/gresolver.c:377 gio/gresolver.c:529 -#: glib/gconvert.c:1785 +#: gio/ghttpproxy.c:91 gio/gresolver.c:386 gio/gresolver.c:538 +#: glib/gconvert.c:1777 msgid "Invalid hostname" msgstr "El nombre del host no es válido" @@ -1632,7 +1634,7 @@ msgstr "Mantener con archivo cuando se mueva" msgid "“version” takes no arguments" msgstr "«version» no lleva ningún argumento" -#: gio/gio-tool.c:207 gio/gio-tool.c:223 glib/goption.c:857 +#: gio/gio-tool.c:207 gio/gio-tool.c:223 glib/goption.c:861 msgid "Usage:" msgstr "Uso:" @@ -2348,7 +2350,7 @@ msgstr "Error al comprimir el archivo %s" msgid "text may not appear inside <%s>" msgstr "El texto no debe aparecer dentro de <%s>" -#: gio/glib-compile-resources.c:737 gio/glib-compile-schemas.c:2141 +#: gio/glib-compile-resources.c:737 gio/glib-compile-schemas.c:2175 msgid "Show program version and exit" msgstr "Mostrar la versión del programa y salir" @@ -2364,8 +2366,8 @@ msgstr "" "La carpeta de la que se tienen que leer los archivos indicados en ARCHIVO " "(la predeterminada es la carpeta actual)" -#: gio/glib-compile-resources.c:739 gio/glib-compile-schemas.c:2142 -#: gio/glib-compile-schemas.c:2171 +#: gio/glib-compile-resources.c:739 gio/glib-compile-schemas.c:2176 +#: gio/glib-compile-schemas.c:2205 msgid "DIRECTORY" msgstr "CARPETA" @@ -2768,98 +2770,160 @@ msgid "Warning: undefined reference to <schema id='%s'/>" msgstr "Advertencia: referencia a <schema id='%s'/> no definida" #. Translators: Do not translate "--strict". -#: gio/glib-compile-schemas.c:1836 gio/glib-compile-schemas.c:1912 -#: gio/glib-compile-schemas.c:2027 -#, c-format -msgid "--strict was specified; exiting.\n" -msgstr "se especificó --strict; saliendo.\n" +#: gio/glib-compile-schemas.c:1836 gio/glib-compile-schemas.c:1915 +#| msgid "--strict was specified; exiting.\n" +msgid "--strict was specified; exiting." +msgstr "se especificó --strict; saliendo." -#: gio/glib-compile-schemas.c:1846 -#, c-format -msgid "This entire file has been ignored.\n" -msgstr "Se ha ignorado este archivo completamente.\n" +#: gio/glib-compile-schemas.c:1848 +#| msgid "This entire file has been ignored.\n" +msgid "This entire file has been ignored." +msgstr "Se ha ignorado este archivo completamente." -#: gio/glib-compile-schemas.c:1908 +#: gio/glib-compile-schemas.c:1911 +#| msgid "Ignoring this file.\n" +msgid "Ignoring this file." +msgstr "Ignorando este archivo." + +#: gio/glib-compile-schemas.c:1966 #, c-format -msgid "Ignoring this file.\n" -msgstr "Ignorando este archivo.\n" +#| msgid "No such key “%s” in schema “%s” as specified in override file “%s”" +msgid "" +"No such key “%s” in schema “%s” as specified in override file “%s”; ignoring " +"override for this key." +msgstr "" +"No existe la clave «%s» en el esquema «%s» como se especificó en el archivo " +"de sobrescritura «%s»; se ignora para esta clave." -#: gio/glib-compile-schemas.c:1961 +#: gio/glib-compile-schemas.c:1974 #, c-format -msgid "No such key “%s” in schema “%s” as specified in override file “%s”" +#| msgid "No such key “%s” in schema “%s” as specified in override file “%s”" +msgid "" +"No such key “%s” in schema “%s” as specified in override file “%s” and --" +"strict was specified; exiting." msgstr "" "No existe la clave «%s» en el esquema «%s» como se especificó en el archivo " -"de sobrescritura «%s»" +"de sobrescritura «%s» y se ha especificado --strict; saliendo." -#: gio/glib-compile-schemas.c:1967 gio/glib-compile-schemas.c:1992 -#: gio/glib-compile-schemas.c:2052 gio/glib-compile-schemas.c:2081 +#: gio/glib-compile-schemas.c:1996 #, c-format -msgid "; ignoring override for this key.\n" -msgstr "; ignorando la sobrescritura para esta clave.\n" +#| msgid "" +#| "cannot provide per-desktop overrides for localised key “%s” in schema " +#| "“%s” (override file “%s”)" +msgid "" +"Cannot provide per-desktop overrides for localised key “%s” in schema " +"“%s” (override file “%s”); ignoring override for this key." +msgstr "" +"No se pueden proporcionar las alternativas para la clave «%s» traducida en " +"el esquema «%s» (sobrescribe el archivo %s): se ignora para esta clave." + +#: gio/glib-compile-schemas.c:2005 +#, c-format +#| msgid "" +#| "cannot provide per-desktop overrides for localised key “%s” in schema " +#| "“%s” (override file “%s”)" +msgid "" +"Cannot provide per-desktop overrides for localised key “%s” in schema " +"“%s” (override file “%s”) and --strict was specified; exiting." +msgstr "" +"No se pueden proporcionar las alternativas para la clave «%s» traducida en " +"el esquema «%s» (sobrescribe el archivo %s) y se ha especificado --strict; " +"saliendo." -#: gio/glib-compile-schemas.c:1971 gio/glib-compile-schemas.c:1996 -#: gio/glib-compile-schemas.c:2056 gio/glib-compile-schemas.c:2085 +#: gio/glib-compile-schemas.c:2029 #, c-format -msgid " and --strict was specified; exiting.\n" -msgstr "y se especificó --strict; saliendo.\n" +#| msgid "" +#| "error parsing key “%s” in schema “%s” as specified in override file “%s”: " +#| "%s." +msgid "" +"Error parsing key “%s” in schema “%s” as specified in override file “%s”: " +"%s. Ignoring override for this key." +msgstr "" +"Error al analizar la clave «%s» en el esquema «%s» como se especificó en el " +"archivo de sobrescritura «%s»: %s; se ignora para esta clave." -#: gio/glib-compile-schemas.c:1986 +#: gio/glib-compile-schemas.c:2041 #, c-format +#| msgid "" +#| "error parsing key “%s” in schema “%s” as specified in override file “%s”: " +#| "%s." msgid "" -"cannot provide per-desktop overrides for localised key “%s” in schema " -"“%s” (override file “%s”)" +"Error parsing key “%s” in schema “%s” as specified in override file “%s”: " +"%s. --strict was specified; exiting." msgstr "" -"no se pueden proporcionar las alternativas para la clave «%s» traducida en " -"el esquema «%s» (sobrescribe el archivo %s)" +"Error al analizar la clave «%s» en el esquema «%s» como se especificó en el " +"archivo de sobrescritura «%s»: %s y se ha especificado --strict; saliendo." -#: gio/glib-compile-schemas.c:2013 +#: gio/glib-compile-schemas.c:2068 #, c-format +#| msgid "" +#| "override for key “%s” in schema “%s” in override file “%s” is outside the " +#| "range given in the schema" msgid "" -"error parsing key “%s” in schema “%s” as specified in override file “%s”: %s." +"Override for key “%s” in schema “%s” in override file “%s” is outside the " +"range given in the schema; ignoring override for this key." msgstr "" -"error al analizar la clave «%s» en el esquema «%s» como se especificó en el " -"archivo de sobrescritura «%s»: %s." +"La clave de sobrescritura «%s» en el esquema «%s» en el archivo de " +"sobrescritura «%s» está fuera del rango proporcionado en el esquema; se " +"ignora para esta clave." -#: gio/glib-compile-schemas.c:2023 +#: gio/glib-compile-schemas.c:2078 #, c-format -msgid "Ignoring override for this key.\n" -msgstr "Ignorando la sobrescritura para esta clave.\n" +#| msgid "" +#| "override for key “%s” in schema “%s” in override file “%s” is outside the " +#| "range given in the schema" +msgid "" +"Override for key “%s” in schema “%s” in override file “%s” is outside the " +"range given in the schema and --strict was specified; exiting." +msgstr "" +"La clave de sobrescritura «%s» en el esquema «%s» en el archivo de " +"sobrescritura «%s» está fuera del rango proporcionado en el esquema y se ha " +"especificado --strict; saliendo." -#: gio/glib-compile-schemas.c:2042 +#: gio/glib-compile-schemas.c:2104 #, c-format +#| msgid "" +#| "override for key “%s” in schema “%s” in override file “%s” is not in the " +#| "list of valid choices" msgid "" -"override for key “%s” in schema “%s” in override file “%s” is outside the " -"range given in the schema" +"Override for key “%s” in schema “%s” in override file “%s” is not in the " +"list of valid choices; ignoring override for this key." msgstr "" -"la clave de sobrescritura «%s» en el esquema «%s» en el archivo de " -"sobrescritura «%s» está fuera del rango proporcionado en el esquema" +"La clave de sobrescritura «%s» en el esquema «%s» en el archivo de " +"sobrescritura «%s» no está en la lista de opciones válidas; se ignora para " +"esta clave." -#: gio/glib-compile-schemas.c:2071 +#: gio/glib-compile-schemas.c:2114 #, c-format +#| msgid "" +#| "override for key “%s” in schema “%s” in override file “%s” is not in the " +#| "list of valid choices" msgid "" -"override for key “%s” in schema “%s” in override file “%s” is not in the " -"list of valid choices" +"Override for key “%s” in schema “%s” in override file “%s” is not in the " +"list of valid choices and --strict was specified; exiting." msgstr "" -"la clave de sobrescritura «%s» en el esquema «%s» en el archivo de " -"sobrescritura «%s» no está en la lista de opciones válidas" +"La clave de sobrescritura «%s» en el esquema «%s» en el archivo de " +"sobrescritura «%s» no está en la lista de opciones válidas y se ha " +"especificado --strict; saliendo." -#: gio/glib-compile-schemas.c:2142 -msgid "where to store the gschemas.compiled file" -msgstr "dónde almacenar el archivo gschemas.compiled" +#: gio/glib-compile-schemas.c:2176 +#| msgid "where to store the gschemas.compiled file" +msgid "Where to store the gschemas.compiled file" +msgstr "Dónde almacenar el archivo gschemas.compiled" -#: gio/glib-compile-schemas.c:2143 +#: gio/glib-compile-schemas.c:2177 msgid "Abort on any errors in schemas" msgstr "Abortar ante cualquier error en los esquemas" -#: gio/glib-compile-schemas.c:2144 +#: gio/glib-compile-schemas.c:2178 msgid "Do not write the gschema.compiled file" msgstr "No escribir el archivo gschemas.compiled" -#: gio/glib-compile-schemas.c:2145 +#: gio/glib-compile-schemas.c:2179 msgid "Do not enforce key name restrictions" msgstr "No forzar las restricciones de nombre de las claves" -#: gio/glib-compile-schemas.c:2174 +#: gio/glib-compile-schemas.c:2208 msgid "" "Compile all GSettings schema files into a schema cache.\n" "Schema files are required to have the extension .gschema.xml,\n" @@ -2870,25 +2934,22 @@ msgstr "" "Los archivos de esquema deben tener la extensión .gschema.xml,\n" "y el archivo de caché se llama gschemas.compiled." -#: gio/glib-compile-schemas.c:2195 -#, c-format -msgid "You should give exactly one directory name\n" -msgstr "Deberá proporcionar exactamente un nombre de carpeta\n" +#: gio/glib-compile-schemas.c:2229 +#| msgid "You should give exactly one directory name\n" +msgid "You should give exactly one directory name" +msgstr "Deberá proporcionar exactamente un nombre de carpeta" -#: gio/glib-compile-schemas.c:2237 -#, c-format -msgid "No schema files found: " -msgstr "No se encontró ningún archivo de esquemas: " - -#: gio/glib-compile-schemas.c:2240 -#, c-format -msgid "doing nothing.\n" -msgstr "sin hacer nada.\n" +#: gio/glib-compile-schemas.c:2272 +#| msgid "No schema files found: " +msgid "No schema files found: doing nothing." +msgstr "No se encontró ningún archivo de esquemas: no se hace nada." -#: gio/glib-compile-schemas.c:2243 -#, c-format -msgid "removed existing output file.\n" -msgstr "se quitó el archivo de salida existente.\n" +#: gio/glib-compile-schemas.c:2274 +#| msgid "removed existing output file.\n" +msgid "No schema files found: removed existing output file." +msgstr "" +"No se han encontrado archivos de esquemas: se ha eliminado el archivo de " +"salida existente." #: gio/glocalfile.c:546 gio/win32/gwinhttpfile.c:420 #, c-format @@ -2923,7 +2984,7 @@ msgid "Can’t rename file, filename already exists" msgstr "No se puede renombrar el archivo, el nombre de archivo ya existe" #: gio/glocalfile.c:1213 gio/glocalfile.c:2322 gio/glocalfile.c:2350 -#: gio/glocalfile.c:2507 gio/glocalfileoutputstream.c:646 +#: gio/glocalfile.c:2507 gio/glocalfileoutputstream.c:647 msgid "Invalid filename" msgstr "Nombre de archivo no válido" @@ -3011,9 +3072,9 @@ msgstr "Error al mover el archivo %s: %s" msgid "Can’t move directory over directory" msgstr "No se puede mover una carpeta sobre una carpeta" -#: gio/glocalfile.c:2467 gio/glocalfileoutputstream.c:1030 -#: gio/glocalfileoutputstream.c:1044 gio/glocalfileoutputstream.c:1059 -#: gio/glocalfileoutputstream.c:1076 gio/glocalfileoutputstream.c:1090 +#: gio/glocalfile.c:2467 gio/glocalfileoutputstream.c:1031 +#: gio/glocalfileoutputstream.c:1045 gio/glocalfileoutputstream.c:1060 +#: gio/glocalfileoutputstream.c:1077 gio/glocalfileoutputstream.c:1091 msgid "Backup file creation failed" msgstr "Falló la creación del archivo de respaldo" @@ -3052,7 +3113,7 @@ msgstr "Error al establecer el atributo extendido «%s»: %s" msgid " (invalid encoding)" msgstr " (codificación no válida)" -#: gio/glocalfileinfo.c:1798 gio/glocalfileoutputstream.c:908 +#: gio/glocalfileinfo.c:1798 gio/glocalfileoutputstream.c:909 #, c-format msgid "Error when getting information for file “%s”: %s" msgstr "Error al obtener la información del archivo «%s»: %s" @@ -3126,20 +3187,20 @@ msgstr "SELinux no está activado en este sistema" msgid "Setting attribute %s not supported" msgstr "Establecer el atributo %s no está soportado" -#: gio/glocalfileinputstream.c:168 gio/glocalfileoutputstream.c:791 +#: gio/glocalfileinputstream.c:168 gio/glocalfileoutputstream.c:792 #, c-format msgid "Error reading from file: %s" msgstr "Error al leer del archivo: %s" #: gio/glocalfileinputstream.c:199 gio/glocalfileinputstream.c:211 #: gio/glocalfileinputstream.c:225 gio/glocalfileinputstream.c:333 -#: gio/glocalfileoutputstream.c:553 gio/glocalfileoutputstream.c:1108 +#: gio/glocalfileoutputstream.c:554 gio/glocalfileoutputstream.c:1109 #, c-format msgid "Error seeking in file: %s" msgstr "Error al buscar en el archivo: %s" -#: gio/glocalfileinputstream.c:255 gio/glocalfileoutputstream.c:343 -#: gio/glocalfileoutputstream.c:437 +#: gio/glocalfileinputstream.c:255 gio/glocalfileoutputstream.c:344 +#: gio/glocalfileoutputstream.c:438 #, c-format msgid "Error closing file: %s" msgstr "Error al cerrar el archivo: %s" @@ -3150,51 +3211,51 @@ msgstr "" "No se pudo encontrar el tipo de monitorización del archivo local " "predeterminado" -#: gio/glocalfileoutputstream.c:208 gio/glocalfileoutputstream.c:286 -#: gio/glocalfileoutputstream.c:323 gio/glocalfileoutputstream.c:812 +#: gio/glocalfileoutputstream.c:209 gio/glocalfileoutputstream.c:287 +#: gio/glocalfileoutputstream.c:324 gio/glocalfileoutputstream.c:813 #, c-format msgid "Error writing to file: %s" msgstr "Error al escribir en el archivo: %s" -#: gio/glocalfileoutputstream.c:370 +#: gio/glocalfileoutputstream.c:371 #, c-format msgid "Error removing old backup link: %s" msgstr "Error al eliminar el enlace de respaldo antiguo: %s" -#: gio/glocalfileoutputstream.c:384 gio/glocalfileoutputstream.c:397 +#: gio/glocalfileoutputstream.c:385 gio/glocalfileoutputstream.c:398 #, c-format msgid "Error creating backup copy: %s" msgstr "Error al crear una copia de respaldo: %s" -#: gio/glocalfileoutputstream.c:415 +#: gio/glocalfileoutputstream.c:416 #, c-format msgid "Error renaming temporary file: %s" msgstr "Error al renombrar el archivo temporal: %s" -#: gio/glocalfileoutputstream.c:599 gio/glocalfileoutputstream.c:1159 +#: gio/glocalfileoutputstream.c:600 gio/glocalfileoutputstream.c:1160 #, c-format msgid "Error truncating file: %s" msgstr "Error al truncar el archivo: %s" -#: gio/glocalfileoutputstream.c:652 gio/glocalfileoutputstream.c:890 -#: gio/glocalfileoutputstream.c:1140 gio/gsubprocess.c:380 +#: gio/glocalfileoutputstream.c:653 gio/glocalfileoutputstream.c:891 +#: gio/glocalfileoutputstream.c:1141 gio/gsubprocess.c:380 #, c-format msgid "Error opening file “%s”: %s" msgstr "Error al abrir el archivo %s: %s" -#: gio/glocalfileoutputstream.c:921 +#: gio/glocalfileoutputstream.c:922 msgid "Target file is a directory" msgstr "El archivo destino es una carpeta" -#: gio/glocalfileoutputstream.c:926 +#: gio/glocalfileoutputstream.c:927 msgid "Target file is not a regular file" msgstr "El archivo destino no es un archivo regular" -#: gio/glocalfileoutputstream.c:938 +#: gio/glocalfileoutputstream.c:939 msgid "The file was externally modified" msgstr "El archivo se modificó externamente" -#: gio/glocalfileoutputstream.c:1124 +#: gio/glocalfileoutputstream.c:1125 #, c-format msgid "Error removing old file: %s" msgstr "Error al eliminar el archivo antiguo: %s" @@ -3289,7 +3350,7 @@ msgid "mount doesn’t implement synchronous content type guessing" msgstr "" "el punto de montaje no implementa averiguación síncrona del tipo de contenido" -#: gio/gnetworkaddress.c:388 +#: gio/gnetworkaddress.c:415 #, c-format msgid "Hostname “%s” contains “[” but not “]”" msgstr "El nombre del equipo «%s» contiene «[» pero no «]»" @@ -3316,12 +3377,12 @@ msgstr "No se pudo crear el monitor de red: " msgid "Could not get network status: " msgstr "No se pudo obtener el estado de la red: " -#: gio/gnetworkmonitornm.c:314 +#: gio/gnetworkmonitornm.c:347 #, c-format msgid "NetworkManager not running" msgstr "NetworkManager no está en ejecución" -#: gio/gnetworkmonitornm.c:325 +#: gio/gnetworkmonitornm.c:358 #, c-format msgid "NetworkManager version too old" msgstr "Versión de NetworkManager demasiado antigua" @@ -3339,18 +3400,18 @@ msgstr "La suma de vectores pasada a %s es demasiado grande" msgid "Source stream is already closed" msgstr "El flujo de origen ya está cerrado" -#: gio/gresolver.c:344 gio/gthreadedresolver.c:150 gio/gthreadedresolver.c:160 +#: gio/gresolver.c:351 gio/gthreadedresolver.c:150 gio/gthreadedresolver.c:168 #, c-format msgid "Error resolving “%s”: %s" msgstr "Error al resolver «%s»: %s" #. Translators: The placeholder is for a function name. -#: gio/gresolver.c:389 gio/gresolver.c:547 +#: gio/gresolver.c:398 gio/gresolver.c:556 #, c-format msgid "%s not implemented" msgstr "%s no está implementado" -#: gio/gresolver.c:915 gio/gresolver.c:967 +#: gio/gresolver.c:924 gio/gresolver.c:976 msgid "Invalid domain" msgstr "Dominio no válido" @@ -3727,176 +3788,176 @@ msgstr "Se proporcionó un nombre de esquema vacío\n" msgid "No such key “%s”\n" msgstr "No existe la clave «%s»\n" -#: gio/gsocket.c:373 +#: gio/gsocket.c:374 msgid "Invalid socket, not initialized" msgstr "Socket no válido, no inicializado" -#: gio/gsocket.c:380 +#: gio/gsocket.c:381 #, c-format msgid "Invalid socket, initialization failed due to: %s" msgstr "Socket no válido, falló la instalación debido a: %s" -#: gio/gsocket.c:388 +#: gio/gsocket.c:389 msgid "Socket is already closed" msgstr "El socket ya está cerrado" -#: gio/gsocket.c:403 gio/gsocket.c:3027 gio/gsocket.c:4244 gio/gsocket.c:4302 +#: gio/gsocket.c:404 gio/gsocket.c:3028 gio/gsocket.c:4245 gio/gsocket.c:4303 msgid "Socket I/O timed out" msgstr "Expiró la E/S del socket" -#: gio/gsocket.c:538 +#: gio/gsocket.c:539 #, c-format msgid "creating GSocket from fd: %s" msgstr "creando el GSocket desde fd: %s" -#: gio/gsocket.c:567 gio/gsocket.c:621 gio/gsocket.c:628 +#: gio/gsocket.c:568 gio/gsocket.c:622 gio/gsocket.c:629 #, c-format msgid "Unable to create socket: %s" msgstr "No se pudo crear el socket: %s" -#: gio/gsocket.c:621 +#: gio/gsocket.c:622 msgid "Unknown family was specified" msgstr "Se especificó una familia desconocida" -#: gio/gsocket.c:628 +#: gio/gsocket.c:629 msgid "Unknown protocol was specified" msgstr "Se especificó un protocolo desconocido" -#: gio/gsocket.c:1119 +#: gio/gsocket.c:1120 #, c-format msgid "Cannot use datagram operations on a non-datagram socket." msgstr "" "No se pueden usar operaciones de datagrama en un zócalo que no es de " "datagrama." -#: gio/gsocket.c:1136 +#: gio/gsocket.c:1137 #, c-format msgid "Cannot use datagram operations on a socket with a timeout set." msgstr "" "No se pueden usar operaciones de datagrama en un zócalo sin un tiempo de " "expiración establecido." -#: gio/gsocket.c:1943 +#: gio/gsocket.c:1944 #, c-format msgid "could not get local address: %s" msgstr "no se pudo obtener la dirección local: %s" -#: gio/gsocket.c:1989 +#: gio/gsocket.c:1990 #, c-format msgid "could not get remote address: %s" msgstr "no se pudo obtener la dirección remota: %s" -#: gio/gsocket.c:2055 +#: gio/gsocket.c:2056 #, c-format msgid "could not listen: %s" msgstr "no se pudo escuchar: %s" -#: gio/gsocket.c:2157 +#: gio/gsocket.c:2158 #, c-format msgid "Error binding to address: %s" msgstr "Error al vincular con la dirección: %s" -#: gio/gsocket.c:2215 gio/gsocket.c:2252 gio/gsocket.c:2362 gio/gsocket.c:2387 -#: gio/gsocket.c:2460 gio/gsocket.c:2518 gio/gsocket.c:2536 +#: gio/gsocket.c:2216 gio/gsocket.c:2253 gio/gsocket.c:2363 gio/gsocket.c:2388 +#: gio/gsocket.c:2461 gio/gsocket.c:2519 gio/gsocket.c:2537 #, c-format msgid "Error joining multicast group: %s" msgstr "Error al unirse al grupo de multicast: %s" -#: gio/gsocket.c:2216 gio/gsocket.c:2253 gio/gsocket.c:2363 gio/gsocket.c:2388 -#: gio/gsocket.c:2461 gio/gsocket.c:2519 gio/gsocket.c:2537 +#: gio/gsocket.c:2217 gio/gsocket.c:2254 gio/gsocket.c:2364 gio/gsocket.c:2389 +#: gio/gsocket.c:2462 gio/gsocket.c:2520 gio/gsocket.c:2538 #, c-format msgid "Error leaving multicast group: %s" msgstr "Error al abandonar al grupo de multicast: %s" -#: gio/gsocket.c:2217 +#: gio/gsocket.c:2218 msgid "No support for source-specific multicast" msgstr "No se soporta el multicast específico de la fuente" -#: gio/gsocket.c:2364 +#: gio/gsocket.c:2365 msgid "Unsupported socket family" msgstr "Familia del socket no soportada" -#: gio/gsocket.c:2389 +#: gio/gsocket.c:2390 msgid "source-specific not an IPv4 address" msgstr "la fuente específica no es una dirección IPv4" -#: gio/gsocket.c:2407 gio/gsocket.c:2436 gio/gsocket.c:2486 +#: gio/gsocket.c:2408 gio/gsocket.c:2437 gio/gsocket.c:2487 #, c-format msgid "Interface not found: %s" msgstr "Interfaz no encontrada: %s" -#: gio/gsocket.c:2423 +#: gio/gsocket.c:2424 #, c-format msgid "Interface name too long" msgstr "El nombre de la interfaz es demasiado largo" -#: gio/gsocket.c:2462 +#: gio/gsocket.c:2463 msgid "No support for IPv4 source-specific multicast" msgstr "No se soporta el multicast específico de la fuente para IPv4" -#: gio/gsocket.c:2520 +#: gio/gsocket.c:2521 msgid "No support for IPv6 source-specific multicast" msgstr "No se soporta el multicast específico de la fuente para IPv6" -#: gio/gsocket.c:2729 +#: gio/gsocket.c:2730 #, c-format msgid "Error accepting connection: %s" msgstr "Error al aceptar la conexión: %s" -#: gio/gsocket.c:2855 +#: gio/gsocket.c:2856 msgid "Connection in progress" msgstr "Conexión en progreso" -#: gio/gsocket.c:2906 +#: gio/gsocket.c:2907 msgid "Unable to get pending error: " msgstr "No se pudo obtener el error pendiente: " -#: gio/gsocket.c:3092 +#: gio/gsocket.c:3093 #, c-format msgid "Error receiving data: %s" msgstr "Error al recibir los datos: %s" -#: gio/gsocket.c:3289 +#: gio/gsocket.c:3290 #, c-format msgid "Error sending data: %s" msgstr "Error al enviar los datos: %s" -#: gio/gsocket.c:3476 +#: gio/gsocket.c:3477 #, c-format msgid "Unable to shutdown socket: %s" msgstr "No se pudo desconectar el socket: %s" -#: gio/gsocket.c:3557 +#: gio/gsocket.c:3558 #, c-format msgid "Error closing socket: %s" msgstr "Error al cerrar el socket: %s" -#: gio/gsocket.c:4237 +#: gio/gsocket.c:4238 #, c-format msgid "Waiting for socket condition: %s" msgstr "Esperando la condición del socket: %s" -#: gio/gsocket.c:4614 gio/gsocket.c:4616 gio/gsocket.c:4762 gio/gsocket.c:4847 -#: gio/gsocket.c:5027 gio/gsocket.c:5067 gio/gsocket.c:5069 +#: gio/gsocket.c:4616 gio/gsocket.c:4618 gio/gsocket.c:4765 gio/gsocket.c:4850 +#: gio/gsocket.c:5028 gio/gsocket.c:5068 gio/gsocket.c:5070 #, c-format msgid "Error sending message: %s" msgstr "Error al enviar el mensaje: %s" -#: gio/gsocket.c:4789 +#: gio/gsocket.c:4792 msgid "GSocketControlMessage not supported on Windows" msgstr "GSocketControlMessage no está soportado en Windows" -#: gio/gsocket.c:5260 gio/gsocket.c:5333 gio/gsocket.c:5560 +#: gio/gsocket.c:5261 gio/gsocket.c:5334 gio/gsocket.c:5560 #, c-format msgid "Error receiving message: %s" msgstr "Error al recibir el mensaje: %s" -#: gio/gsocket.c:5832 +#: gio/gsocket.c:5841 #, c-format msgid "Unable to read socket credentials: %s" msgstr "No se pudieron leer las credenciales del socket: %s" -#: gio/gsocket.c:5841 +#: gio/gsocket.c:5850 msgid "g_socket_get_credentials not implemented for this OS" msgstr "g_socket_get_credentials no está implementado en este SO" @@ -3914,16 +3975,16 @@ msgstr "No se pudo conectar a %s: " msgid "Could not connect: " msgstr "No se pudo conectar: " -#: gio/gsocketclient.c:1033 gio/gsocketclient.c:1750 +#: gio/gsocketclient.c:1033 gio/gsocketclient.c:1760 msgid "Unknown error on connect" msgstr "Error desconocido al conectar" -#: gio/gsocketclient.c:1087 gio/gsocketclient.c:1658 +#: gio/gsocketclient.c:1087 gio/gsocketclient.c:1668 msgid "Proxying over a non-TCP connection is not supported." msgstr "" "No se soporta intentar hacer de proxy sobre una conexión que no es TCP." -#: gio/gsocketclient.c:1116 gio/gsocketclient.c:1684 +#: gio/gsocketclient.c:1116 gio/gsocketclient.c:1694 #, c-format msgid "Proxy protocol “%s” is not supported." msgstr "El protocolo del proxy «%s» no está soportado." @@ -4036,24 +4097,24 @@ msgstr "No se puede manejar la versión %d de la codificación GThemedIcon" msgid "No valid addresses were found" msgstr "No se han encontrado direcciones válidas" -#: gio/gthreadedresolver.c:317 +#: gio/gthreadedresolver.c:334 #, c-format msgid "Error reverse-resolving “%s”: %s" msgstr "Error al resolver «%s» de forma inversa: %s" -#: gio/gthreadedresolver.c:653 gio/gthreadedresolver.c:732 -#: gio/gthreadedresolver.c:830 gio/gthreadedresolver.c:880 +#: gio/gthreadedresolver.c:671 gio/gthreadedresolver.c:750 +#: gio/gthreadedresolver.c:848 gio/gthreadedresolver.c:898 #, c-format msgid "No DNS record of the requested type for “%s”" msgstr "No hay un registro de DNS del tipo solicitado para «%s»" -#: gio/gthreadedresolver.c:658 gio/gthreadedresolver.c:835 +#: gio/gthreadedresolver.c:676 gio/gthreadedresolver.c:853 #, c-format msgid "Temporarily unable to resolve “%s”" msgstr "No se puede resolver «%s» temporalmente" -#: gio/gthreadedresolver.c:663 gio/gthreadedresolver.c:840 -#: gio/gthreadedresolver.c:950 +#: gio/gthreadedresolver.c:681 gio/gthreadedresolver.c:858 +#: gio/gthreadedresolver.c:968 #, c-format msgid "Error resolving “%s”" msgstr "Error al resolver «%s»" @@ -4100,14 +4161,14 @@ msgstr "" msgid "The password entered is incorrect." msgstr "La contraseña introducida no es correcta." -#: gio/gunixconnection.c:166 gio/gunixconnection.c:563 +#: gio/gunixconnection.c:166 gio/gunixconnection.c:579 #, c-format msgid "Expecting 1 control message, got %d" msgid_plural "Expecting 1 control message, got %d" msgstr[0] "Se esperaba un mensaje de control, se obtuvo %d" msgstr[1] "Se esperaba un mensaje de control, se obtuvieron %d" -#: gio/gunixconnection.c:182 gio/gunixconnection.c:575 +#: gio/gunixconnection.c:182 gio/gunixconnection.c:591 msgid "Unexpected type of ancillary data" msgstr "Tipos de datos complementarios inesperados" @@ -4122,33 +4183,33 @@ msgstr[1] "Se esperaba un fd pero se obtuvieron %d\n" msgid "Received invalid fd" msgstr "Se recibió un fd no válido" -#: gio/gunixconnection.c:355 +#: gio/gunixconnection.c:363 msgid "Error sending credentials: " msgstr "Error al enviar las credenciales: " -#: gio/gunixconnection.c:504 +#: gio/gunixconnection.c:520 #, c-format msgid "Error checking if SO_PASSCRED is enabled for socket: %s" msgstr "Error al comprobar si SO_PASSCRED está activada para el socket: %s" -#: gio/gunixconnection.c:520 +#: gio/gunixconnection.c:536 #, c-format msgid "Error enabling SO_PASSCRED: %s" msgstr "Error al activar SO_PASSCRED: %s" -#: gio/gunixconnection.c:549 +#: gio/gunixconnection.c:565 msgid "" "Expecting to read a single byte for receiving credentials but read zero bytes" msgstr "" "Se esperaba leer un solo byte para recibir las credenciales pero se leyeron " "cero bytes" -#: gio/gunixconnection.c:589 +#: gio/gunixconnection.c:605 #, c-format msgid "Not expecting control message, but got %d" msgstr "No se esperaba un mensaje de control, pero se obtuvo %d" -#: gio/gunixconnection.c:614 +#: gio/gunixconnection.c:630 #, c-format msgid "Error while disabling SO_PASSCRED: %s" msgstr "Error al desactivar SO_PASSCRED: %s" @@ -4158,19 +4219,19 @@ msgstr "Error al desactivar SO_PASSCRED: %s" msgid "Error reading from file descriptor: %s" msgstr "Error al leer del descriptor del archivo: %s" -#: gio/gunixinputstream.c:426 gio/gunixoutputstream.c:534 +#: gio/gunixinputstream.c:426 gio/gunixoutputstream.c:535 #: gio/gwin32inputstream.c:217 gio/gwin32outputstream.c:204 #, c-format msgid "Error closing file descriptor: %s" msgstr "Error al cerrar el descriptor del archivo: %s" -#: gio/gunixmounts.c:2650 gio/gunixmounts.c:2703 +#: gio/gunixmounts.c:2661 gio/gunixmounts.c:2714 msgid "Filesystem root" msgstr "Sistema de archivos raíz" -#: gio/gunixoutputstream.c:371 gio/gunixoutputstream.c:391 -#: gio/gunixoutputstream.c:478 gio/gunixoutputstream.c:498 -#: gio/gunixoutputstream.c:675 +#: gio/gunixoutputstream.c:372 gio/gunixoutputstream.c:392 +#: gio/gunixoutputstream.c:479 gio/gunixoutputstream.c:499 +#: gio/gunixoutputstream.c:676 #, c-format msgid "Error writing to file descriptor: %s" msgstr "Error al escribir en el descriptor del archivo: %s" @@ -4319,54 +4380,54 @@ msgstr "Ninguna aplicación con nombre «%s» registró un marcador para «%s»" msgid "Failed to expand exec line “%s” with URI “%s”" msgstr "Falló la expansión de lalinea ejecutable «%s» con el URI «%s»" -#: glib/gconvert.c:474 +#: glib/gconvert.c:466 msgid "Unrepresentable character in conversion input" msgstr "Carácter no representable en entrada de conversión" -#: glib/gconvert.c:501 glib/gutf8.c:865 glib/gutf8.c:1077 glib/gutf8.c:1214 +#: glib/gconvert.c:493 glib/gutf8.c:865 glib/gutf8.c:1077 glib/gutf8.c:1214 #: glib/gutf8.c:1318 msgid "Partial character sequence at end of input" msgstr "Hay una secuencia parcial de caracteres en el final de la entrada" -#: glib/gconvert.c:770 +#: glib/gconvert.c:762 #, c-format msgid "Cannot convert fallback “%s” to codeset “%s”" msgstr "No se puede convertir el fallback «%s» al conjunto de códigos «%s»" -#: glib/gconvert.c:942 +#: glib/gconvert.c:934 msgid "Embedded NUL byte in conversion input" msgstr "Tipo NUL empotrado en la entrada de conversión" -#: glib/gconvert.c:963 +#: glib/gconvert.c:955 msgid "Embedded NUL byte in conversion output" msgstr "Tipo NUL empotrado en la salida de conversión" -#: glib/gconvert.c:1648 +#: glib/gconvert.c:1640 #, c-format msgid "The URI “%s” is not an absolute URI using the “file” scheme" msgstr "El URI «%s» no es una URI absoluta utilizando el esquema «file»" -#: glib/gconvert.c:1658 +#: glib/gconvert.c:1650 #, c-format msgid "The local file URI “%s” may not include a “#”" msgstr "El archivo local en la URI «%s» no debe incluir un «#»" -#: glib/gconvert.c:1675 +#: glib/gconvert.c:1667 #, c-format msgid "The URI “%s” is invalid" msgstr "El URI «%s» no es válido" -#: glib/gconvert.c:1687 +#: glib/gconvert.c:1679 #, c-format msgid "The hostname of the URI “%s” is invalid" msgstr "El nombre del host de la URI «%s» no es válido" -#: glib/gconvert.c:1703 +#: glib/gconvert.c:1695 #, c-format msgid "The URI “%s” contains invalidly escaped characters" msgstr "El URI «%s» contiene caracteres de escape no válidos" -#: glib/gconvert.c:1775 +#: glib/gconvert.c:1767 #, c-format msgid "The pathname “%s” is not an absolute path" msgstr "El nombre de la ruta «%s» no es una ruta absoluta" @@ -5236,61 +5297,61 @@ msgstr "" "El documento termina inesperadamente dentro de un comentario o instrucción " "de proceso" -#: glib/goption.c:861 +#: glib/goption.c:865 msgid "[OPTION…]" msgstr "[OPCIÓN…]" -#: glib/goption.c:977 +#: glib/goption.c:981 msgid "Help Options:" msgstr "Opciones de ayuda:" -#: glib/goption.c:978 +#: glib/goption.c:982 msgid "Show help options" msgstr "Mostrar opciones de ayuda" -#: glib/goption.c:984 +#: glib/goption.c:988 msgid "Show all help options" msgstr "Muestra todas las opciones de ayuda" -#: glib/goption.c:1047 +#: glib/goption.c:1051 msgid "Application Options:" msgstr "Opciones de la aplicación:" -#: glib/goption.c:1049 +#: glib/goption.c:1053 msgid "Options:" msgstr "Opciones:" -#: glib/goption.c:1113 glib/goption.c:1183 +#: glib/goption.c:1117 glib/goption.c:1187 #, c-format msgid "Cannot parse integer value “%s” for %s" msgstr "No se puede analizar el valor entero «%s» para %s" -#: glib/goption.c:1123 glib/goption.c:1191 +#: glib/goption.c:1127 glib/goption.c:1195 #, c-format msgid "Integer value “%s” for %s out of range" msgstr "El valor entero «%s» para %s está fuera de rango" -#: glib/goption.c:1148 +#: glib/goption.c:1152 #, c-format msgid "Cannot parse double value “%s” for %s" msgstr "No se puede analizar el valor doble «%s» para %s" -#: glib/goption.c:1156 +#: glib/goption.c:1160 #, c-format msgid "Double value “%s” for %s out of range" msgstr "El valor doble «%s» para %s está fuera de rango" -#: glib/goption.c:1448 glib/goption.c:1527 +#: glib/goption.c:1452 glib/goption.c:1531 #, c-format msgid "Error parsing option %s" msgstr "Error al analizar la opción: %s" -#: glib/goption.c:1558 glib/goption.c:1671 +#: glib/goption.c:1562 glib/goption.c:1675 #, c-format msgid "Missing argument for %s" msgstr "Falta un argumento para %s" -#: glib/goption.c:2132 +#: glib/goption.c:2181 #, c-format msgid "Unknown option %s" msgstr "Opción desconocida %s" @@ -5828,21 +5889,21 @@ msgstr "" "Falló inesperado en g_io_channel_win32_poll() al leer datos desde un proceso " "hijo" -#: glib/gstrfuncs.c:3286 glib/gstrfuncs.c:3388 +#: glib/gstrfuncs.c:3301 glib/gstrfuncs.c:3403 msgid "Empty string is not a number" msgstr "Una cadena vacía no es un número" -#: glib/gstrfuncs.c:3310 +#: glib/gstrfuncs.c:3325 #, c-format msgid "“%s” is not a signed number" msgstr "«%s» no es un número con signo" -#: glib/gstrfuncs.c:3320 glib/gstrfuncs.c:3424 +#: glib/gstrfuncs.c:3335 glib/gstrfuncs.c:3439 #, c-format msgid "Number “%s” is out of bounds [%s, %s]" msgstr "El número «%s» está fuera de los límites [%s, %s]" -#: glib/gstrfuncs.c:3414 +#: glib/gstrfuncs.c:3429 #, c-format msgid "“%s” is not an unsigned number" msgstr "«%s» no es un número sin signo" @@ -5865,157 +5926,157 @@ msgid "Character out of range for UTF-16" msgstr "El carácter se sale del rango para UTF-16" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2339 +#: glib/gutils.c:2319 #, c-format msgid "%.1f kB" msgstr "%.1f kB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2341 +#: glib/gutils.c:2321 #, c-format msgid "%.1f MB" msgstr "%.1f MB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2343 +#: glib/gutils.c:2323 #, c-format msgid "%.1f GB" msgstr "%.1f GB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2345 +#: glib/gutils.c:2325 #, c-format msgid "%.1f TB" msgstr "%.1f TB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2347 +#: glib/gutils.c:2327 #, c-format msgid "%.1f PB" msgstr "%.1f PB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2349 +#: glib/gutils.c:2329 #, c-format msgid "%.1f EB" msgstr "%.1f EB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2353 +#: glib/gutils.c:2333 #, c-format msgid "%.1f KiB" msgstr "%.1f KiB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2355 +#: glib/gutils.c:2335 #, c-format msgid "%.1f MiB" msgstr "%.1f MiB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2357 +#: glib/gutils.c:2337 #, c-format msgid "%.1f GiB" msgstr "%.1f GiB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2359 +#: glib/gutils.c:2339 #, c-format msgid "%.1f TiB" msgstr "%.1f TiB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2361 +#: glib/gutils.c:2341 #, c-format msgid "%.1f PiB" msgstr "%.1f PiB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2363 +#: glib/gutils.c:2343 #, c-format msgid "%.1f EiB" msgstr "%.1f EiB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2367 +#: glib/gutils.c:2347 #, c-format msgid "%.1f kb" msgstr "%.1f kb" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2369 +#: glib/gutils.c:2349 #, c-format msgid "%.1f Mb" msgstr "%.1f Mb" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2371 +#: glib/gutils.c:2351 #, c-format msgid "%.1f Gb" msgstr "%.1f Gb" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2373 +#: glib/gutils.c:2353 #, c-format msgid "%.1f Tb" msgstr "%.1f Tb" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2375 +#: glib/gutils.c:2355 #, c-format msgid "%.1f Pb" msgstr "%.1f Pb" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2377 +#: glib/gutils.c:2357 #, c-format msgid "%.1f Eb" msgstr "%.1f Eb" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2381 +#: glib/gutils.c:2361 #, c-format msgid "%.1f Kib" msgstr "%.1f Kib" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2383 +#: glib/gutils.c:2363 #, c-format msgid "%.1f Mib" msgstr "%.1f Mib" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2385 +#: glib/gutils.c:2365 #, c-format msgid "%.1f Gib" msgstr "%.1f Gib" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2387 +#: glib/gutils.c:2367 #, c-format msgid "%.1f Tib" msgstr "%.1f Tib" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2389 +#: glib/gutils.c:2369 #, c-format msgid "%.1f Pib" msgstr "%.1f Pib" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2391 +#: glib/gutils.c:2371 #, c-format msgid "%.1f Eib" msgstr "%.1f Eib" -#: glib/gutils.c:2425 glib/gutils.c:2551 +#: glib/gutils.c:2405 glib/gutils.c:2522 #, c-format msgid "%u byte" msgid_plural "%u bytes" msgstr[0] "%u byte" msgstr[1] "%u bytes" -#: glib/gutils.c:2429 +#: glib/gutils.c:2409 #, c-format msgid "%u bit" msgid_plural "%u bits" @@ -6023,7 +6084,7 @@ msgstr[0] "%u bit" msgstr[1] "%u bits" #. Translators: the %s in "%s bytes" will always be replaced by a number. -#: glib/gutils.c:2496 +#: glib/gutils.c:2476 #, c-format msgid "%s byte" msgid_plural "%s bytes" @@ -6031,7 +6092,7 @@ msgstr[0] "%s byte" msgstr[1] "%s bytes" #. Translators: the %s in "%s bits" will always be replaced by a number. -#: glib/gutils.c:2501 +#: glib/gutils.c:2481 #, c-format msgid "%s bit" msgid_plural "%s bits" @@ -6043,36 +6104,48 @@ msgstr[1] "%s bits" #. * compatibility. Users will not see this string unless a program is using this deprecated function. #. * Please translate as literally as possible. #. -#: glib/gutils.c:2564 +#: glib/gutils.c:2535 #, c-format msgid "%.1f KB" msgstr "%.1f KB" -#: glib/gutils.c:2569 +#: glib/gutils.c:2540 #, c-format msgid "%.1f MB" msgstr "%.1f MB" -#: glib/gutils.c:2574 +#: glib/gutils.c:2545 #, c-format msgid "%.1f GB" msgstr "%.1f GB" -#: glib/gutils.c:2579 +#: glib/gutils.c:2550 #, c-format msgid "%.1f TB" msgstr "%.1f TB" -#: glib/gutils.c:2584 +#: glib/gutils.c:2555 #, c-format msgid "%.1f PB" msgstr "%.1f PB" -#: glib/gutils.c:2589 +#: glib/gutils.c:2560 #, c-format msgid "%.1f EB" msgstr "%.1f EB" +#~ msgid "; ignoring override for this key.\n" +#~ msgstr "; ignorando la sobrescritura para esta clave.\n" + +#~ msgid " and --strict was specified; exiting.\n" +#~ msgstr "y se especificó --strict; saliendo.\n" + +#~ msgid "Ignoring override for this key.\n" +#~ msgstr "Ignorando la sobrescritura para esta clave.\n" + +#~ msgid "doing nothing.\n" +#~ msgstr "sin hacer nada.\n" + #~ msgid "No such interface '%s'" #~ msgstr "La interfaz «%s» no existe" @@ -4,15 +4,15 @@ # # Szabolcs Varga <shirokuma at shirokuma dot hu>, 2005. # Gabor Kelemen <kelemeng at gnome dot hu>, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2016, 2017. -# Balázs Úr <urbalazs at gmail dot com>, 2013, 2014, 2015, 2016, 2018, 2019. -# Balázs Meskó <meskobalazs at fedoraproject dot org>, 2017, 2018. +# Balázs Úr <ur.balazs at fsf dot hu>, 2013, 2014, 2015, 2016, 2018, 2019. +# Balázs Meskó <mesko.balazs at fsf dot hu>, 2017, 2018. msgid "" msgstr "" "Project-Id-Version: glib master\n" "Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/glib/issues\n" -"POT-Creation-Date: 2019-01-29 20:59+0000\n" -"PO-Revision-Date: 2019-02-03 16:30+0100\n" -"Last-Translator: Balázs Úr <urbalazs@gmail.com>\n" +"POT-Creation-Date: 2019-03-19 10:54+0000\n" +"PO-Revision-Date: 2019-06-01 17:40+0200\n" +"Last-Translator: Balázs Úr <ur.balazs at fsf dot hu>\n" "Language-Team: Hungarian <gnome-hu-list at gnome dot org>\n" "Language: hu\n" "MIME-Version: 1.0\n" @@ -20,7 +20,7 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Loco-Source-Locale: de_AT\n" -"X-Generator: Lokalize 1.2\n" +"X-Generator: Lokalize 18.12.3\n" "X-Loco-Parser: loco_parse_po\n" #: gio/gapplication.c:499 @@ -108,7 +108,7 @@ msgstr "Egy alkalmazás statikus műveleteinek felsorolása (.desktop fájlból) msgid "APPID" msgstr "ALKALMAZÁSAZONOSÍTÓ" -#: gio/gapplication-tool.c:70 gio/gapplication-tool.c:133 gio/gdbus-tool.c:90 +#: gio/gapplication-tool.c:70 gio/gapplication-tool.c:133 gio/gdbus-tool.c:91 #: gio/gio-tool.c:224 msgid "COMMAND" msgstr "PARANCS" @@ -285,7 +285,7 @@ msgstr "Az adatfolyam már le van zárva" msgid "Truncate not supported on base stream" msgstr "Az alap adatfolyam csonkítása nem engedélyezett" -#: gio/gcancellable.c:317 gio/gdbusconnection.c:1867 gio/gdbusprivate.c:1402 +#: gio/gcancellable.c:319 gio/gdbusconnection.c:1867 gio/gdbusprivate.c:1406 #: gio/gsimpleasyncresult.c:871 gio/gsimpleasyncresult.c:897 #, c-format msgid "Operation was cancelled" @@ -305,13 +305,13 @@ msgstr "Nincs elég hely a célon" #: gio/gcharsetconverter.c:342 gio/gdatainputstream.c:848 #: gio/gdatainputstream.c:1261 glib/gconvert.c:455 glib/gconvert.c:885 -#: glib/giochannel.c:1557 glib/giochannel.c:1599 glib/giochannel.c:2443 +#: glib/giochannel.c:1561 glib/giochannel.c:1603 glib/giochannel.c:2447 #: glib/gutf8.c:869 glib/gutf8.c:1322 msgid "Invalid byte sequence in conversion input" msgstr "Érvénytelen bájtsorrend az átalakítás bemenetében" #: gio/gcharsetconverter.c:347 glib/gconvert.c:463 glib/gconvert.c:799 -#: glib/giochannel.c:1564 glib/giochannel.c:2455 +#: glib/giochannel.c:1568 glib/giochannel.c:2459 #, c-format msgid "Error during conversion: %s" msgstr "Hiba az átalakításkor: %s" @@ -320,7 +320,7 @@ msgstr "Hiba az átalakításkor: %s" msgid "Cancellable initialization not supported" msgstr "A megszakítható előkészítés nem támogatott" -#: gio/gcharsetconverter.c:456 glib/gconvert.c:328 glib/giochannel.c:1385 +#: gio/gcharsetconverter.c:456 glib/gconvert.c:328 glib/giochannel.c:1389 #, c-format msgid "Conversion from character set “%s” to “%s” is not supported" msgstr "A(z) „%s” és „%s” karakterkészletek közötti átalakítás nem támogatott" @@ -366,12 +366,17 @@ msgstr "A hitelesítési adatok hamisítása nincs megvalósítva ezen a rendsze msgid "Unexpected early end-of-stream" msgstr "Váratlan korai adatfolyam vége" -#: gio/gdbusaddress.c:158 gio/gdbusaddress.c:246 gio/gdbusaddress.c:327 +#: gio/gdbusaddress.c:154 gio/gdbusaddress.c:229 gio/gdbusaddress.c:310 #, c-format msgid "Unsupported key “%s” in address entry “%s”" msgstr "Nem támogatott „%s” kulcs a(z) „%s” címbejegyzésben" -#: gio/gdbusaddress.c:185 +#: gio/gdbusaddress.c:168 +#, c-format +msgid "Meaningless key/value pair combination in address entry “%s”" +msgstr "Értelmetlen kulcs-érték pár kombináció a(z) „%s” címbejegyzésben" + +#: gio/gdbusaddress.c:177 #, c-format msgid "" "Address “%s” is invalid (need exactly one of path, tmpdir or abstract keys)" @@ -379,48 +384,56 @@ msgstr "" "A(z) „%s” cím érvénytelen (csak az útvonal, tmp könyvtár vagy absztrakt " "kulcs egyike lehet)" -#: gio/gdbusaddress.c:198 -#, c-format -msgid "Meaningless key/value pair combination in address entry “%s”" -msgstr "Értelmetlen kulcs/érték párkombináció a(z) „%s” címbejegyzésben" - -#: gio/gdbusaddress.c:261 gio/gdbusaddress.c:342 +#: gio/gdbusaddress.c:244 gio/gdbusaddress.c:325 #, c-format msgid "Error in address “%s” — the port attribute is malformed" msgstr "Hiba a(z) „%s” címben – a port attribútum rosszul formázott" -#: gio/gdbusaddress.c:272 gio/gdbusaddress.c:353 +#: gio/gdbusaddress.c:255 gio/gdbusaddress.c:336 #, c-format msgid "Error in address “%s” — the family attribute is malformed" msgstr "Hiba a(z) „%s” címben – a család attribútum rosszul formázott" -#: gio/gdbusaddress.c:423 gio/gdbusaddress.c:673 +#: gio/gdbusaddress.c:406 gio/gdbusaddress.c:670 #, c-format msgid "Unknown or unsupported transport “%s” for address “%s”" msgstr "Ismeretlen vagy nem támogatott szállítás („%s”) a címhez („%s”)" -#: gio/gdbusaddress.c:467 +#: gio/gdbusaddress.c:450 #, c-format msgid "Address element “%s” does not contain a colon (:)" msgstr "A(z) „%s” címelem nem tartalmaz kettőspontot (:)" -#: gio/gdbusaddress.c:488 +#: gio/gdbusaddress.c:459 +#, c-format +msgid "Transport name in address element “%s” must not be empty" +msgstr "Az átvitel neve a(z) „%s” címelemben nem lehet üres" + +#: gio/gdbusaddress.c:480 #, c-format msgid "" "Key/Value pair %d, “%s”, in address element “%s” does not contain an equal " "sign" -msgstr "%d. kulcspár: „%s” a(z) „%s” címelemben nem tartalmaz egyenlőségjelet" +msgstr "" +"%d. kulcs-érték pár: „%s” a(z) „%s” címelemben nem tartalmaz egyenlőségjelet" -#: gio/gdbusaddress.c:502 +#: gio/gdbusaddress.c:491 +#, c-format +msgid "" +"Key/Value pair %d, “%s”, in address element “%s” must not have an empty key" +msgstr "" +"%d. kulcs-érték pár: „%s” a(z) „%s” címelemben nem tartalmazhat üres kulcsot" + +#: gio/gdbusaddress.c:505 #, c-format msgid "" "Error unescaping key or value in Key/Value pair %d, “%s”, in address element " "“%s”" msgstr "" -"Hiba a(z) „%3$s” címelemben található a(z) %1$d. kulcspárban lévő „%2$s” " -"kulcs vagy érték értelmezésekor" +"Hiba a(z) „%3$s” címelemben található a(z) %1$d. kulcs-érték párban lévő „" +"%2$s” kulcs vagy érték értelmezésekor" -#: gio/gdbusaddress.c:580 +#: gio/gdbusaddress.c:577 #, c-format msgid "" "Error in address “%s” — the unix transport requires exactly one of the keys " @@ -429,91 +442,81 @@ msgstr "" "Hiba a(z) „%s” címben – a unix szállítás a „path” vagy „abstract” kulcsok " "pontosan egyikének jelenlétét igényli" -#: gio/gdbusaddress.c:616 +#: gio/gdbusaddress.c:613 #, c-format msgid "Error in address “%s” — the host attribute is missing or malformed" msgstr "" "Hiba a(z) „%s” címben – a host attribútum hiányzik vagy rosszul formázott" -#: gio/gdbusaddress.c:630 +#: gio/gdbusaddress.c:627 #, c-format msgid "Error in address “%s” — the port attribute is missing or malformed" msgstr "" "Hiba a(z) „%s” címben – a port attribútum hiányzik vagy rosszul formázott" -#: gio/gdbusaddress.c:644 +#: gio/gdbusaddress.c:641 #, c-format msgid "Error in address “%s” — the noncefile attribute is missing or malformed" msgstr "" "Hiba a(z) „%s” címben – a noncefile attribútum hiányzik vagy rosszul " "formázott" -#: gio/gdbusaddress.c:665 +#: gio/gdbusaddress.c:662 msgid "Error auto-launching: " msgstr "Hiba az automatikus indításkor: " -#: gio/gdbusaddress.c:718 +#: gio/gdbusaddress.c:715 #, c-format msgid "Error opening nonce file “%s”: %s" msgstr "Hiba a(z) „%s” ideiglenes fájl megnyitásakor: %s" -#: gio/gdbusaddress.c:737 +#: gio/gdbusaddress.c:734 #, c-format msgid "Error reading from nonce file “%s”: %s" msgstr "Hiba a(z) „%s” ideiglenes fájl olvasásakor: %s" -#: gio/gdbusaddress.c:746 +#: gio/gdbusaddress.c:743 #, c-format msgid "Error reading from nonce file “%s”, expected 16 bytes, got %d" msgstr "" "Hiba a(z) „%s” ideiglenes fájl olvasásakor, a várt 16 bájt helyett %d " "érkezett" -#: gio/gdbusaddress.c:764 +#: gio/gdbusaddress.c:761 #, c-format msgid "Error writing contents of nonce file “%s” to stream:" msgstr "Hiba az ideiglenes fájl („%s”) tartalmának írásakor az adatfolyamba:" -#: gio/gdbusaddress.c:973 +#: gio/gdbusaddress.c:970 msgid "The given address is empty" msgstr "A megadott cím üres" -#: gio/gdbusaddress.c:1086 +#: gio/gdbusaddress.c:1083 #, c-format msgid "Cannot spawn a message bus when setuid" msgstr "Nem indítható üzenetbusz setuid módban" -#: gio/gdbusaddress.c:1093 +#: gio/gdbusaddress.c:1090 msgid "Cannot spawn a message bus without a machine-id: " msgstr "Nem indítható üzenetbusz gépazonosító nélkül: " -#: gio/gdbusaddress.c:1100 +#: gio/gdbusaddress.c:1097 #, c-format msgid "Cannot autolaunch D-Bus without X11 $DISPLAY" msgstr "Nem indítható automatikusan a D-Bus X11 $DISPLAY nélkül" -#: gio/gdbusaddress.c:1142 +#: gio/gdbusaddress.c:1139 #, c-format msgid "Error spawning command line “%s”: " msgstr "Hiba a(z) „%s” parancssor indításakor: " -#: gio/gdbusaddress.c:1359 -#, c-format -msgid "(Type any character to close this window)\n" -msgstr "(Az ablak bezárásához nyomjon le egy gombot)\n" - -#: gio/gdbusaddress.c:1513 -#, c-format -msgid "Session dbus not running, and autolaunch failed" -msgstr "A munkamenet D-Bus nem fut, és az automatikus indítás sikertelen" - -#: gio/gdbusaddress.c:1524 +#: gio/gdbusaddress.c:1208 #, c-format msgid "Cannot determine session bus address (not implemented for this OS)" msgstr "" "Nem határozható meg a munkamenetbusz címe (nincs megvalósítva erre az OS-re)" -#: gio/gdbusaddress.c:1662 gio/gdbusconnection.c:7174 +#: gio/gdbusaddress.c:1346 gio/gdbusconnection.c:7174 #, c-format msgid "" "Cannot determine bus address from DBUS_STARTER_BUS_TYPE environment variable " @@ -522,7 +525,7 @@ msgstr "" "Nem határozható meg a busz címe a DBUS_STARTER_BUS_TYPE környezeti " "változóból – ismeretlen „%s” érték" -#: gio/gdbusaddress.c:1671 gio/gdbusconnection.c:7183 +#: gio/gdbusaddress.c:1355 gio/gdbusconnection.c:7183 msgid "" "Cannot determine bus address because the DBUS_STARTER_BUS_TYPE environment " "variable is not set" @@ -530,7 +533,7 @@ msgstr "" "Nem határozható meg a busz címe, mivel a DBUS_STARTER_BUS_TYPE környezeti " "változó nincs beállítva" -#: gio/gdbusaddress.c:1681 +#: gio/gdbusaddress.c:1365 #, c-format msgid "Unknown bus type %d" msgstr "Ismeretlen busztípus: %d" @@ -844,7 +847,7 @@ msgstr "" msgid "Invalid major protocol version. Expected 1 but found %d" msgstr "Érvénytelen fő protokollverzió. A várt 1 helyett %d található" -#: gio/gdbusmessage.c:2132 gio/gdbusmessage.c:2724 +#: gio/gdbusmessage.c:2132 gio/gdbusmessage.c:2727 msgid "Signature header found but is not of type signature" msgstr "Aláírásfejléc található, de nem aláírás típusú" @@ -869,30 +872,30 @@ msgstr[1] "Nincs aláírásfejléc az üzenetben, de az üzenettörzs %u bájt" msgid "Cannot deserialize message: " msgstr "Nem fejthető sorba az üzenet: " -#: gio/gdbusmessage.c:2541 +#: gio/gdbusmessage.c:2544 #, c-format msgid "" "Error serializing GVariant with type string “%s” to the D-Bus wire format" msgstr "" "Hiba a(z) „%s” típusú GVariant sorbafejtésekor a D-Bus átviteli formátumba" -#: gio/gdbusmessage.c:2678 +#: gio/gdbusmessage.c:2681 #, c-format msgid "" "Number of file descriptors in message (%d) differs from header field (%d)" msgstr "" "Az üzenetben található fájlleírók száma (%d) eltér a fejléc mezőtől (%d)" -#: gio/gdbusmessage.c:2686 +#: gio/gdbusmessage.c:2689 msgid "Cannot serialize message: " msgstr "Az üzenet nem fejthető sorba: " -#: gio/gdbusmessage.c:2739 +#: gio/gdbusmessage.c:2742 #, c-format msgid "Message body has signature “%s” but there is no signature header" msgstr "Az üzenettörzs „%s” aláírással rendelkezik, de nincs aláírásfejléc" -#: gio/gdbusmessage.c:2749 +#: gio/gdbusmessage.c:2752 #, c-format msgid "" "Message body has type signature “%s” but signature in the header field is " @@ -901,26 +904,36 @@ msgstr "" "Az üzenettörzs „%s” típusaláírással rendelkezik, de az aláírásfejlécben lévő " "aláírás: „%s”" -#: gio/gdbusmessage.c:2765 +#: gio/gdbusmessage.c:2768 #, c-format msgid "Message body is empty but signature in the header field is “(%s)”" msgstr "Az üzenettörzs üres, de az aláírásfejlécben lévő aláírás: „%s”" -#: gio/gdbusmessage.c:3318 +#: gio/gdbusmessage.c:3321 #, c-format msgid "Error return with body of type “%s”" msgstr "Hiba került visszaadásra a(z) „%s” típusú törzzsel" -#: gio/gdbusmessage.c:3326 +#: gio/gdbusmessage.c:3329 msgid "Error return with empty body" msgstr "Hiba került visszaadásra az üres törzzsel" -#: gio/gdbusprivate.c:2075 +#: gio/gdbusprivate.c:2233 +#, c-format +msgid "(Type any character to close this window)\n" +msgstr "(Az ablak bezárásához nyomjon le egy gombot)\n" + +#: gio/gdbusprivate.c:2407 +#, c-format +msgid "Session dbus not running, and autolaunch failed" +msgstr "A munkamenet D-Bus nem fut, és az automatikus indítás sikertelen" + +#: gio/gdbusprivate.c:2430 #, c-format msgid "Unable to get Hardware profile: %s" msgstr "Nem kérhető le hardverprofil: %s" -#: gio/gdbusprivate.c:2120 +#: gio/gdbusprivate.c:2475 msgid "Unable to load /var/lib/dbus/machine-id or /etc/machine-id: " msgstr "Nem tölthető be a /var/lib/dbus/machine-id vagy az /etc/machine-id: " @@ -966,7 +979,7 @@ msgstr "A(z) „%s” karakterlánc nem érvényes D-Bus GUID" msgid "Cannot listen on unsupported transport “%s”" msgstr "Nem figyelhető a nem támogatott „%s” szállítás" -#: gio/gdbus-tool.c:95 +#: gio/gdbus-tool.c:96 #, c-format msgid "" "Commands:\n" @@ -988,54 +1001,54 @@ msgstr "" "\n" "Az egyes parancsok súgója a „%s PARANCS --help” kiadásával érhető el.\n" -#: gio/gdbus-tool.c:185 gio/gdbus-tool.c:252 gio/gdbus-tool.c:324 -#: gio/gdbus-tool.c:348 gio/gdbus-tool.c:834 gio/gdbus-tool.c:1171 -#: gio/gdbus-tool.c:1613 +#: gio/gdbus-tool.c:186 gio/gdbus-tool.c:253 gio/gdbus-tool.c:325 +#: gio/gdbus-tool.c:349 gio/gdbus-tool.c:835 gio/gdbus-tool.c:1172 +#: gio/gdbus-tool.c:1614 #, c-format msgid "Error: %s\n" msgstr "Hiba: %s\n" -#: gio/gdbus-tool.c:196 gio/gdbus-tool.c:265 gio/gdbus-tool.c:1629 +#: gio/gdbus-tool.c:197 gio/gdbus-tool.c:266 gio/gdbus-tool.c:1630 #, c-format msgid "Error parsing introspection XML: %s\n" msgstr "Hiba a betekintési XML feldolgozásakor: %s\n" -#: gio/gdbus-tool.c:234 +#: gio/gdbus-tool.c:235 #, c-format msgid "Error: %s is not a valid name\n" msgstr "Hiba: a(z) %s nem érvényes név\n" -#: gio/gdbus-tool.c:382 +#: gio/gdbus-tool.c:383 msgid "Connect to the system bus" msgstr "Csatlakozás a rendszerbuszhoz" -#: gio/gdbus-tool.c:383 +#: gio/gdbus-tool.c:384 msgid "Connect to the session bus" msgstr "Csatlakozás a munkamenetbuszhoz" -#: gio/gdbus-tool.c:384 +#: gio/gdbus-tool.c:385 msgid "Connect to given D-Bus address" msgstr "Csatlakozás a megadott D-Bus címhez" -#: gio/gdbus-tool.c:394 +#: gio/gdbus-tool.c:395 msgid "Connection Endpoint Options:" msgstr "Kapcsolatvégpont beállításai:" -#: gio/gdbus-tool.c:395 +#: gio/gdbus-tool.c:396 msgid "Options specifying the connection endpoint" msgstr "A kapcsolat végpontját megadó beállítások" -#: gio/gdbus-tool.c:417 +#: gio/gdbus-tool.c:418 #, c-format msgid "No connection endpoint specified" msgstr "Nincs megadva kapcsolatvégpont" -#: gio/gdbus-tool.c:427 +#: gio/gdbus-tool.c:428 #, c-format msgid "Multiple connection endpoints specified" msgstr "Több kapcsolatvégpontot adott meg" -#: gio/gdbus-tool.c:497 +#: gio/gdbus-tool.c:498 #, c-format msgid "" "Warning: According to introspection data, interface “%s” does not exist\n" @@ -1043,7 +1056,7 @@ msgstr "" "Figyelmeztetés: a betekintési adatok szerint a(z) „%s” interfész nem " "létezik\n" -#: gio/gdbus-tool.c:506 +#: gio/gdbus-tool.c:507 #, c-format msgid "" "Warning: According to introspection data, method “%s” does not exist on " @@ -1052,161 +1065,161 @@ msgstr "" "Figyelmeztetés: a betekintési adatok szerint a(z) „%2$s” interfészen nem " "létezik „%1$s” metódus\n" -#: gio/gdbus-tool.c:568 +#: gio/gdbus-tool.c:569 msgid "Optional destination for signal (unique name)" msgstr "A szignál elhagyható célja (egyedi név)" -#: gio/gdbus-tool.c:569 +#: gio/gdbus-tool.c:570 msgid "Object path to emit signal on" msgstr "Szignál kibocsátása ezen az objektumútvonalon" -#: gio/gdbus-tool.c:570 +#: gio/gdbus-tool.c:571 msgid "Signal and interface name" msgstr "Szignál és interfész neve" -#: gio/gdbus-tool.c:603 +#: gio/gdbus-tool.c:604 msgid "Emit a signal." msgstr "Szignál kibocsátása." -#: gio/gdbus-tool.c:658 gio/gdbus-tool.c:965 gio/gdbus-tool.c:1715 -#: gio/gdbus-tool.c:1944 gio/gdbus-tool.c:2164 +#: gio/gdbus-tool.c:659 gio/gdbus-tool.c:966 gio/gdbus-tool.c:1716 +#: gio/gdbus-tool.c:1945 gio/gdbus-tool.c:2165 #, c-format msgid "Error connecting: %s\n" msgstr "Hiba a csatlakozáskor: %s\n" -#: gio/gdbus-tool.c:678 +#: gio/gdbus-tool.c:679 #, c-format msgid "Error: %s is not a valid unique bus name.\n" msgstr "Hiba: a(z) %s nem érvényes egyedi busznév.\n" -#: gio/gdbus-tool.c:697 gio/gdbus-tool.c:1008 gio/gdbus-tool.c:1758 +#: gio/gdbus-tool.c:698 gio/gdbus-tool.c:1009 gio/gdbus-tool.c:1759 msgid "Error: Object path is not specified\n" msgstr "Hiba: az objektumútvonal nincs megadva\n" -#: gio/gdbus-tool.c:720 gio/gdbus-tool.c:1028 gio/gdbus-tool.c:1778 -#: gio/gdbus-tool.c:2015 +#: gio/gdbus-tool.c:721 gio/gdbus-tool.c:1029 gio/gdbus-tool.c:1779 +#: gio/gdbus-tool.c:2016 #, c-format msgid "Error: %s is not a valid object path\n" msgstr "Hiba: a(z) %s nem érvényes objektumútvonal\n" -#: gio/gdbus-tool.c:740 +#: gio/gdbus-tool.c:741 msgid "Error: Signal name is not specified\n" msgstr "Hiba: a szignálnév nincs megadva\n" -#: gio/gdbus-tool.c:754 +#: gio/gdbus-tool.c:755 #, c-format msgid "Error: Signal name “%s” is invalid\n" msgstr "Hiba: a szignálnév („%s”) érvénytelen\n" -#: gio/gdbus-tool.c:766 +#: gio/gdbus-tool.c:767 #, c-format msgid "Error: %s is not a valid interface name\n" msgstr "Hiba: a(z) %s nem érvényes interfésznév\n" -#: gio/gdbus-tool.c:772 +#: gio/gdbus-tool.c:773 #, c-format msgid "Error: %s is not a valid member name\n" msgstr "Hiba: a(z) %s nem érvényes tagnév\n" #. Use the original non-"parse-me-harder" error -#: gio/gdbus-tool.c:809 gio/gdbus-tool.c:1140 +#: gio/gdbus-tool.c:810 gio/gdbus-tool.c:1141 #, c-format msgid "Error parsing parameter %d: %s\n" msgstr "Hiba a(z) %d. paraméter feldolgozásakor: %s\n" -#: gio/gdbus-tool.c:841 +#: gio/gdbus-tool.c:842 #, c-format msgid "Error flushing connection: %s\n" msgstr "Hiba a kapcsolat kiürítésekor: %s\n" -#: gio/gdbus-tool.c:868 +#: gio/gdbus-tool.c:869 msgid "Destination name to invoke method on" msgstr "A cél neve a metódushíváshoz" -#: gio/gdbus-tool.c:869 +#: gio/gdbus-tool.c:870 msgid "Object path to invoke method on" msgstr "Objektum útvonala a metódushíváshoz" -#: gio/gdbus-tool.c:870 +#: gio/gdbus-tool.c:871 msgid "Method and interface name" msgstr "Metódus és interfész neve" -#: gio/gdbus-tool.c:871 +#: gio/gdbus-tool.c:872 msgid "Timeout in seconds" msgstr "Időkorlát másodpercben" -#: gio/gdbus-tool.c:910 +#: gio/gdbus-tool.c:911 msgid "Invoke a method on a remote object." msgstr "Metódus hívása távoli objektumon." -#: gio/gdbus-tool.c:982 gio/gdbus-tool.c:1732 gio/gdbus-tool.c:1969 +#: gio/gdbus-tool.c:983 gio/gdbus-tool.c:1733 gio/gdbus-tool.c:1970 msgid "Error: Destination is not specified\n" msgstr "Hiba: a cél nincs megadva\n" -#: gio/gdbus-tool.c:993 gio/gdbus-tool.c:1749 gio/gdbus-tool.c:1980 +#: gio/gdbus-tool.c:994 gio/gdbus-tool.c:1750 gio/gdbus-tool.c:1981 #, c-format msgid "Error: %s is not a valid bus name\n" msgstr "Hiba: a(z) %s nem érvényes busznév\n" -#: gio/gdbus-tool.c:1043 +#: gio/gdbus-tool.c:1044 msgid "Error: Method name is not specified\n" msgstr "Hiba: a metódusnév nincs megadva\n" -#: gio/gdbus-tool.c:1054 +#: gio/gdbus-tool.c:1055 #, c-format msgid "Error: Method name “%s” is invalid\n" msgstr "Hiba: a metódusnév („%s”) érvénytelen\n" -#: gio/gdbus-tool.c:1132 +#: gio/gdbus-tool.c:1133 #, c-format msgid "Error parsing parameter %d of type “%s”: %s\n" msgstr "Hiba a(z) „%2$s” típusú %1$d. paraméter feldolgozásakor: %3$s\n" -#: gio/gdbus-tool.c:1576 +#: gio/gdbus-tool.c:1577 msgid "Destination name to introspect" msgstr "A cél neve a betekintéshez" -#: gio/gdbus-tool.c:1577 +#: gio/gdbus-tool.c:1578 msgid "Object path to introspect" msgstr "Az objektumútvonal a betekintéshez" -#: gio/gdbus-tool.c:1578 +#: gio/gdbus-tool.c:1579 msgid "Print XML" msgstr "XML kiírása" -#: gio/gdbus-tool.c:1579 +#: gio/gdbus-tool.c:1580 msgid "Introspect children" msgstr "Betekintés gyermekekbe" -#: gio/gdbus-tool.c:1580 +#: gio/gdbus-tool.c:1581 msgid "Only print properties" msgstr "Csak a tulajdonságok kiírása" -#: gio/gdbus-tool.c:1667 +#: gio/gdbus-tool.c:1668 msgid "Introspect a remote object." msgstr "Betekintés távoli objektumba." -#: gio/gdbus-tool.c:1870 +#: gio/gdbus-tool.c:1871 msgid "Destination name to monitor" msgstr "Megfigyelendő cél neve" -#: gio/gdbus-tool.c:1871 +#: gio/gdbus-tool.c:1872 msgid "Object path to monitor" msgstr "Megfigyelendő objektumútvonal" -#: gio/gdbus-tool.c:1896 +#: gio/gdbus-tool.c:1897 msgid "Monitor a remote object." msgstr "Távoli objektum megfigyelése." -#: gio/gdbus-tool.c:1954 +#: gio/gdbus-tool.c:1955 msgid "Error: can’t monitor a non-message-bus connection\n" msgstr "Hiba: nem figyelhető meg a nem üzenetbusz kapcsolat\n" -#: gio/gdbus-tool.c:2078 +#: gio/gdbus-tool.c:2079 msgid "Service to activate before waiting for the other one (well-known name)" msgstr "Az aktiválandó szolgáltatás, mielőtt a másikra várna (ismert név)" -#: gio/gdbus-tool.c:2081 +#: gio/gdbus-tool.c:2082 msgid "" "Timeout to wait for before exiting with an error (seconds); 0 for no timeout " "(default)" @@ -1214,27 +1227,27 @@ msgstr "" "Az időtúllépés, mielőtt hibával kilépne (másodpercben); 0, ha nincs " "időtúllépés (alapértelmezett)" -#: gio/gdbus-tool.c:2129 +#: gio/gdbus-tool.c:2130 msgid "[OPTION…] BUS-NAME" msgstr "[KAPCSOLÓ…] BUSZNÉV" -#: gio/gdbus-tool.c:2130 +#: gio/gdbus-tool.c:2131 msgid "Wait for a bus name to appear." msgstr "Várakozás egy busznévre." -#: gio/gdbus-tool.c:2206 +#: gio/gdbus-tool.c:2207 msgid "Error: A service to activate for must be specified.\n" msgstr "Hiba: az objektumútvonal nincs megadva.\n" -#: gio/gdbus-tool.c:2211 +#: gio/gdbus-tool.c:2212 msgid "Error: A service to wait for must be specified.\n" msgstr "Hiba: az objektumútvonal nincs megadva.\n" -#: gio/gdbus-tool.c:2216 +#: gio/gdbus-tool.c:2217 msgid "Error: Too many arguments.\n" msgstr "Hiba: Túl sok argumentum.\n" -#: gio/gdbus-tool.c:2224 gio/gdbus-tool.c:2231 +#: gio/gdbus-tool.c:2225 gio/gdbus-tool.c:2232 #, c-format msgid "Error: %s is not a valid well-known bus name.\n" msgstr "Hiba: a(z) %s nem érvényes busznév\n" @@ -1338,7 +1351,7 @@ msgstr "Egy GEmblem kellene a GEmblemedIconhoz" #: gio/gfile.c:2008 gio/gfile.c:2063 gio/gfile.c:3738 gio/gfile.c:3793 #: gio/gfile.c:4029 gio/gfile.c:4071 gio/gfile.c:4539 gio/gfile.c:4950 #: gio/gfile.c:5035 gio/gfile.c:5125 gio/gfile.c:5222 gio/gfile.c:5309 -#: gio/gfile.c:5410 gio/gfile.c:8113 gio/gfile.c:8203 gio/gfile.c:8287 +#: gio/gfile.c:5410 gio/gfile.c:8114 gio/gfile.c:8204 gio/gfile.c:8288 #: gio/win32/gwinhttpfile.c:437 msgid "Operation not supported" msgstr "A művelet nem támogatott" @@ -1351,7 +1364,7 @@ msgstr "A művelet nem támogatott" msgid "Containing mount does not exist" msgstr "A tartalmazó csatolás nem létezik" -#: gio/gfile.c:2622 gio/glocalfile.c:2441 +#: gio/gfile.c:2622 gio/glocalfile.c:2446 msgid "Can’t copy over directory" msgstr "Nem lehet a könyvtárra másolni" @@ -2227,7 +2240,7 @@ msgstr "Szimbolikus linkek, csatolások és indítóikonok követése" msgid "List contents of directories in a tree-like format." msgstr "Könyvtárak tartalmának felsorolása fa-szerű formátumban." -#: gio/glib-compile-resources.c:143 gio/glib-compile-schemas.c:1515 +#: gio/glib-compile-resources.c:143 gio/glib-compile-schemas.c:1517 #, c-format msgid "Element <%s> not allowed inside <%s>" msgstr "<%s> elem nem engedélyezett ezen belül: <%s>" @@ -2284,7 +2297,7 @@ msgstr "Hiba a fájl tömörítésekor: %s" msgid "text may not appear inside <%s>" msgstr "nem jelenhet meg szöveg ezen belül: <%s>" -#: gio/glib-compile-resources.c:737 gio/glib-compile-schemas.c:2139 +#: gio/glib-compile-resources.c:737 gio/glib-compile-schemas.c:2141 msgid "Show program version and exit" msgstr "A programverzió megjelenítése és kilépés" @@ -2300,8 +2313,8 @@ msgstr "" "A FILE-ban megadott fájlok olvasása ebből a könyvtárból (alapértelmezett: " "aktuális könyvtár)" -#: gio/glib-compile-resources.c:739 gio/glib-compile-schemas.c:2140 -#: gio/glib-compile-schemas.c:2169 +#: gio/glib-compile-resources.c:739 gio/glib-compile-schemas.c:2142 +#: gio/glib-compile-schemas.c:2171 msgid "DIRECTORY" msgstr "KÖNYVTÁR" @@ -2518,16 +2531,16 @@ msgstr "„%s” álnév célja nem <choices> címkében van" msgid "<aliases> must contain at least one <alias>" msgstr "<aliases> legalább egy <alias> címkét kell tartalmazzon" -#: gio/glib-compile-schemas.c:798 +#: gio/glib-compile-schemas.c:800 msgid "Empty names are not permitted" msgstr "Az üres nevek nem engedélyezettek" -#: gio/glib-compile-schemas.c:808 +#: gio/glib-compile-schemas.c:810 #, c-format msgid "Invalid name “%s”: names must begin with a lowercase letter" msgstr "Érvénytelen név („%s”): a neveknek kisbetűvel kell kezdődniük" -#: gio/glib-compile-schemas.c:820 +#: gio/glib-compile-schemas.c:822 #, c-format msgid "" "Invalid name “%s”: invalid character “%c”; only lowercase letters, numbers " @@ -2536,37 +2549,37 @@ msgstr "" "Érvénytelen név („%s”): érvénytelen karakter: „%c”. Csak kisbetűk, számok és " "kötőjel („-”) engedélyezettek" -#: gio/glib-compile-schemas.c:829 +#: gio/glib-compile-schemas.c:831 #, c-format msgid "Invalid name “%s”: two successive hyphens (“--”) are not permitted" msgstr "" "Érvénytelen név („%s”): két egymást követő kötőjel („--”) nem engedélyezett" -#: gio/glib-compile-schemas.c:838 +#: gio/glib-compile-schemas.c:840 #, c-format msgid "Invalid name “%s”: the last character may not be a hyphen (“-”)" msgstr "Érvénytelen név („%s”): az utolsó karakter nem lehet kötőjel („-”)" -#: gio/glib-compile-schemas.c:846 +#: gio/glib-compile-schemas.c:848 #, c-format msgid "Invalid name “%s”: maximum length is 1024" msgstr "Érvénytelen név („%s”): a maximális hossz 1024 karakter" -#: gio/glib-compile-schemas.c:918 +#: gio/glib-compile-schemas.c:920 #, c-format msgid "<child name='%s'> already specified" msgstr "<child name='%s'> már meg van adva" -#: gio/glib-compile-schemas.c:944 +#: gio/glib-compile-schemas.c:946 msgid "Cannot add keys to a “list-of” schema" msgstr "Nem adhatók kulcsok „list-of” sémához" -#: gio/glib-compile-schemas.c:955 +#: gio/glib-compile-schemas.c:957 #, c-format msgid "<key name='%s'> already specified" msgstr "<key name='%s'> már meg van adva" -#: gio/glib-compile-schemas.c:973 +#: gio/glib-compile-schemas.c:975 #, c-format msgid "" "<key name='%s'> shadows <key name='%s'> in <schema id='%s'>; use <override> " @@ -2575,7 +2588,7 @@ msgstr "" "<key name='%s'> leárnyékolja ezt: <key name='%s'> ebben: <schema id='%s'>; " "az érték módosításához használja az <override> címkét" -#: gio/glib-compile-schemas.c:984 +#: gio/glib-compile-schemas.c:986 #, c-format msgid "" "Exactly one of “type”, “enum” or “flags” must be specified as an attribute " @@ -2583,63 +2596,63 @@ msgid "" msgstr "" "A <key> attribútumaként csak a „type”, „enum” vagy „flags” egyike adható meg" -#: gio/glib-compile-schemas.c:1003 +#: gio/glib-compile-schemas.c:1005 #, c-format msgid "<%s id='%s'> not (yet) defined." msgstr "<%s id='%s'> (még) nincs megadva." -#: gio/glib-compile-schemas.c:1018 +#: gio/glib-compile-schemas.c:1020 #, c-format msgid "Invalid GVariant type string “%s”" msgstr "Érvénytelen GVariant típuskarakterlánc: „%s”" -#: gio/glib-compile-schemas.c:1048 +#: gio/glib-compile-schemas.c:1050 msgid "<override> given but schema isn’t extending anything" msgstr "Az <override> megadva, de a séma nem terjeszt ki semmit" -#: gio/glib-compile-schemas.c:1061 +#: gio/glib-compile-schemas.c:1063 #, c-format msgid "No <key name='%s'> to override" msgstr "Nincs felülírandó <key name='%s'>" -#: gio/glib-compile-schemas.c:1069 +#: gio/glib-compile-schemas.c:1071 #, c-format msgid "<override name='%s'> already specified" msgstr "<override name='%s'> már megadva" -#: gio/glib-compile-schemas.c:1142 +#: gio/glib-compile-schemas.c:1144 #, c-format msgid "<schema id='%s'> already specified" msgstr "<schema id='%s'> már megadva" -#: gio/glib-compile-schemas.c:1154 +#: gio/glib-compile-schemas.c:1156 #, c-format msgid "<schema id='%s'> extends not yet existing schema “%s”" msgstr "A <schema id='%s'> a még nem létező „%s” sémát terjeszti ki" -#: gio/glib-compile-schemas.c:1170 +#: gio/glib-compile-schemas.c:1172 #, c-format msgid "<schema id='%s'> is list of not yet existing schema “%s”" msgstr "A <schema id='%s'> a még nem létező „%s” séma listája" -#: gio/glib-compile-schemas.c:1178 +#: gio/glib-compile-schemas.c:1180 #, c-format msgid "Cannot be a list of a schema with a path" msgstr "Nem lehet séma listája útvonallal" -#: gio/glib-compile-schemas.c:1188 +#: gio/glib-compile-schemas.c:1190 #, c-format msgid "Cannot extend a schema with a path" msgstr "Nem terjeszthet ki sémát útvonallal" -#: gio/glib-compile-schemas.c:1198 +#: gio/glib-compile-schemas.c:1200 #, c-format msgid "" "<schema id='%s'> is a list, extending <schema id='%s'> which is not a list" msgstr "" "a <schema id='%s'> lista a nem lista <schema id='%s'> sémát terjeszti ki" -#: gio/glib-compile-schemas.c:1208 +#: gio/glib-compile-schemas.c:1210 #, c-format msgid "" "<schema id='%s' list-of='%s'> extends <schema id='%s' list-of='%s'> but “%s” " @@ -2648,18 +2661,18 @@ msgstr "" "A <schema id='%s' list-of='%s'> kiterjeszti ezt: <schema id='%s' list-" "of='%s'>, de „%s” nem terjeszti ki ezt: „%s”" -#: gio/glib-compile-schemas.c:1225 +#: gio/glib-compile-schemas.c:1227 #, c-format msgid "A path, if given, must begin and end with a slash" msgstr "" "Ha meg van adva útvonal, akkor osztásjellel kell kezdődnie és végződnie" -#: gio/glib-compile-schemas.c:1232 +#: gio/glib-compile-schemas.c:1234 #, c-format msgid "The path of a list must end with “:/”" msgstr "A lista útvonalának „:/” karakterekkel kell végződnie" -#: gio/glib-compile-schemas.c:1241 +#: gio/glib-compile-schemas.c:1243 #, c-format msgid "" "Warning: Schema “%s” has path “%s”. Paths starting with “/apps/”, “/" @@ -2668,72 +2681,72 @@ msgstr "" "Figyelmeztetés: „%s” sémához „%s” útvonal tartozik. Az „/apps/”, \"/" "desktop/” vagy „/system/” kezdetű útvonalak elavultak." -#: gio/glib-compile-schemas.c:1271 +#: gio/glib-compile-schemas.c:1273 #, c-format msgid "<%s id='%s'> already specified" msgstr "<%s id='%s'> már meg van adva" -#: gio/glib-compile-schemas.c:1421 gio/glib-compile-schemas.c:1437 +#: gio/glib-compile-schemas.c:1423 gio/glib-compile-schemas.c:1439 #, c-format msgid "Only one <%s> element allowed inside <%s>" msgstr "Csak egy <%s> elem engedélyezett ezen belül: <%s>" -#: gio/glib-compile-schemas.c:1519 +#: gio/glib-compile-schemas.c:1521 #, c-format msgid "Element <%s> not allowed at the top level" msgstr "<%s> elem nem engedélyezett a felső szinten" -#: gio/glib-compile-schemas.c:1537 +#: gio/glib-compile-schemas.c:1539 msgid "Element <default> is required in <key>" msgstr "A <default> elem kötelező a <key>-ben" -#: gio/glib-compile-schemas.c:1627 +#: gio/glib-compile-schemas.c:1629 #, c-format msgid "Text may not appear inside <%s>" msgstr "Nem jelenhet meg szöveg ezen belül: <%s>" -#: gio/glib-compile-schemas.c:1695 +#: gio/glib-compile-schemas.c:1697 #, c-format msgid "Warning: undefined reference to <schema id='%s'/>" msgstr "Figyelmeztetés: nem definiált hivatkozás erre: <schema id='%s'/>" #. Translators: Do not translate "--strict". -#: gio/glib-compile-schemas.c:1834 gio/glib-compile-schemas.c:1910 -#: gio/glib-compile-schemas.c:2025 +#: gio/glib-compile-schemas.c:1836 gio/glib-compile-schemas.c:1912 +#: gio/glib-compile-schemas.c:2027 #, c-format msgid "--strict was specified; exiting.\n" msgstr "a --strict meg lett adva, kilépés.\n" -#: gio/glib-compile-schemas.c:1844 +#: gio/glib-compile-schemas.c:1846 #, c-format msgid "This entire file has been ignored.\n" msgstr "Ez az egész fájl figyelmen kívül marad.\n" -#: gio/glib-compile-schemas.c:1906 +#: gio/glib-compile-schemas.c:1908 #, c-format msgid "Ignoring this file.\n" msgstr "Fájl figyelmen kívül hagyása.\n" -#: gio/glib-compile-schemas.c:1959 +#: gio/glib-compile-schemas.c:1961 #, c-format msgid "No such key “%s” in schema “%s” as specified in override file “%s”" msgstr "" "Nincs „%s” kulcs a(z) „%s” sémában a(z) „%s” felülbírálási fájlban megadott " "módon" -#: gio/glib-compile-schemas.c:1965 gio/glib-compile-schemas.c:1990 -#: gio/glib-compile-schemas.c:2050 gio/glib-compile-schemas.c:2079 +#: gio/glib-compile-schemas.c:1967 gio/glib-compile-schemas.c:1992 +#: gio/glib-compile-schemas.c:2052 gio/glib-compile-schemas.c:2081 #, c-format msgid "; ignoring override for this key.\n" msgstr "; kulcs felülbírálásának figyelmen kívül hagyása.\n" -#: gio/glib-compile-schemas.c:1969 gio/glib-compile-schemas.c:1994 -#: gio/glib-compile-schemas.c:2054 gio/glib-compile-schemas.c:2083 +#: gio/glib-compile-schemas.c:1971 gio/glib-compile-schemas.c:1996 +#: gio/glib-compile-schemas.c:2056 gio/glib-compile-schemas.c:2085 #, c-format msgid " and --strict was specified; exiting.\n" msgstr " és a --strict meg lett adva, kilépés.\n" -#: gio/glib-compile-schemas.c:1984 +#: gio/glib-compile-schemas.c:1986 #, c-format msgid "" "cannot provide per-desktop overrides for localised key “%s” in schema " @@ -2742,7 +2755,7 @@ msgstr "" "nem képes asztalonkénti felülírás biztosítására a(z) „%s” lokalizált kulcs " "esetén a(z) „%s” sémában („%s” fájl felülírás)" -#: gio/glib-compile-schemas.c:2011 +#: gio/glib-compile-schemas.c:2013 #, c-format msgid "" "error parsing key “%s” in schema “%s” as specified in override file “%s”: %s." @@ -2750,12 +2763,12 @@ msgstr "" "hiba a(z) „%s” kulcs feldolgozásakor a(z) „%s” sémában a(z) „%s” " "felülbírálási fájlban megadott módon: %s." -#: gio/glib-compile-schemas.c:2021 +#: gio/glib-compile-schemas.c:2023 #, c-format msgid "Ignoring override for this key.\n" msgstr "Kulcs felülbírálásának figyelmen kívül hagyása.\n" -#: gio/glib-compile-schemas.c:2040 +#: gio/glib-compile-schemas.c:2042 #, c-format msgid "" "override for key “%s” in schema “%s” in override file “%s” is outside the " @@ -2764,7 +2777,7 @@ msgstr "" "a(z) „%2$s” séma „%1$s” kulcsának felülbírálása a(z) „%3$s” felülbírálási " "fájlban a sémában megadott tartományon kívül esik" -#: gio/glib-compile-schemas.c:2069 +#: gio/glib-compile-schemas.c:2071 #, c-format msgid "" "override for key “%s” in schema “%s” in override file “%s” is not in the " @@ -2773,23 +2786,23 @@ msgstr "" "a(z) „%2$s” séma „%1$s” kulcsának felülbírálása a(z) „%3$s” felülbírálási " "fájlban nincs az érvényes lehetőségek listájában" -#: gio/glib-compile-schemas.c:2140 +#: gio/glib-compile-schemas.c:2142 msgid "where to store the gschemas.compiled file" msgstr "a gschemas.compiled fájl tárolási helye" -#: gio/glib-compile-schemas.c:2141 +#: gio/glib-compile-schemas.c:2143 msgid "Abort on any errors in schemas" msgstr "Megszakítás a sémák bármely hibája esetén" -#: gio/glib-compile-schemas.c:2142 +#: gio/glib-compile-schemas.c:2144 msgid "Do not write the gschema.compiled file" msgstr "Ne írja ki a gschema.compiled fájlt" -#: gio/glib-compile-schemas.c:2143 +#: gio/glib-compile-schemas.c:2145 msgid "Do not enforce key name restrictions" msgstr "Ne kényszerítse ki a kulcsnévmegszorításokat" -#: gio/glib-compile-schemas.c:2172 +#: gio/glib-compile-schemas.c:2174 msgid "" "Compile all GSettings schema files into a schema cache.\n" "Schema files are required to have the extension .gschema.xml,\n" @@ -2799,32 +2812,32 @@ msgstr "" "A sémafájloknak .gschema.xml kiterjesztéssel kell rendelkezniük,\n" "és a gyorsítótárfájl neve gschemas.compiled." -#: gio/glib-compile-schemas.c:2193 +#: gio/glib-compile-schemas.c:2195 #, c-format msgid "You should give exactly one directory name\n" msgstr "Pontosan egy könyvtárnevet kell megadnia\n" -#: gio/glib-compile-schemas.c:2235 +#: gio/glib-compile-schemas.c:2237 #, c-format msgid "No schema files found: " msgstr "Nem találhatók sémafájlok: " -#: gio/glib-compile-schemas.c:2238 +#: gio/glib-compile-schemas.c:2240 #, c-format msgid "doing nothing.\n" msgstr "nem történik semmi.\n" -#: gio/glib-compile-schemas.c:2241 +#: gio/glib-compile-schemas.c:2243 #, c-format msgid "removed existing output file.\n" msgstr "meglévő kimeneti fájl eltávolítva.\n" -#: gio/glocalfile.c:544 gio/win32/gwinhttpfile.c:420 +#: gio/glocalfile.c:546 gio/win32/gwinhttpfile.c:420 #, c-format msgid "Invalid filename %s" msgstr "Érvénytelen fájlnév: %s" -#: gio/glocalfile.c:1011 +#: gio/glocalfile.c:1013 #, c-format msgid "Error getting filesystem info for %s: %s" msgstr "Hiba a(z) %s fájlrendszer-információinak lekérésekor: %s" @@ -2833,222 +2846,222 @@ msgstr "Hiba a(z) %s fájlrendszer-információinak lekérésekor: %s" #. * the enclosing (user visible) mount of a file, but none #. * exists. #. -#: gio/glocalfile.c:1150 +#: gio/glocalfile.c:1152 #, c-format msgid "Containing mount for file %s not found" msgstr "A(z) %s fájlt tartalmazó csatolás nem található" -#: gio/glocalfile.c:1173 +#: gio/glocalfile.c:1175 msgid "Can’t rename root directory" msgstr "Nem nevezhető át a gyökérkönyvtár" -#: gio/glocalfile.c:1191 gio/glocalfile.c:1214 +#: gio/glocalfile.c:1193 gio/glocalfile.c:1216 #, c-format msgid "Error renaming file %s: %s" msgstr "Hiba a(z) %s fájl átnevezésekor: %s" -#: gio/glocalfile.c:1198 +#: gio/glocalfile.c:1200 msgid "Can’t rename file, filename already exists" msgstr "A fájl nem nevezhető át, a fájlnév már létezik" -#: gio/glocalfile.c:1211 gio/glocalfile.c:2317 gio/glocalfile.c:2345 -#: gio/glocalfile.c:2502 gio/glocalfileoutputstream.c:646 +#: gio/glocalfile.c:1213 gio/glocalfile.c:2322 gio/glocalfile.c:2350 +#: gio/glocalfile.c:2507 gio/glocalfileoutputstream.c:646 msgid "Invalid filename" msgstr "Érvénytelen fájlnév" -#: gio/glocalfile.c:1379 gio/glocalfile.c:1394 +#: gio/glocalfile.c:1381 gio/glocalfile.c:1396 #, c-format msgid "Error opening file %s: %s" msgstr "Hiba a(z) %s fájl megnyitásakor: %s" -#: gio/glocalfile.c:1519 +#: gio/glocalfile.c:1521 #, c-format msgid "Error removing file %s: %s" msgstr "Hiba a(z) %s fájl eltávolításakor: %s" -#: gio/glocalfile.c:1958 +#: gio/glocalfile.c:1963 #, c-format msgid "Error trashing file %s: %s" msgstr "Hiba a(z) %s fájl Kukába dobásakor: %s" -#: gio/glocalfile.c:1999 +#: gio/glocalfile.c:2004 #, c-format msgid "Unable to create trash dir %s: %s" msgstr "Nem sikerült létrehozni a(z) %s Kuka könyvtárat: %s" -#: gio/glocalfile.c:2020 +#: gio/glocalfile.c:2025 #, c-format msgid "Unable to find toplevel directory to trash %s" msgstr "Nem található a felső szintű könyvtár a(z) %s kidobásához" -#: gio/glocalfile.c:2029 +#: gio/glocalfile.c:2034 #, c-format msgid "Trashing on system internal mounts is not supported" msgstr "A rendszer belső csatolásain a Kukába dobás nem támogatott" -#: gio/glocalfile.c:2113 gio/glocalfile.c:2133 +#: gio/glocalfile.c:2118 gio/glocalfile.c:2138 #, c-format msgid "Unable to find or create trash directory for %s" msgstr "Nem található vagy nem hozható létre a Kuka könyvtár ehhez: %s" -#: gio/glocalfile.c:2168 +#: gio/glocalfile.c:2173 #, c-format msgid "Unable to create trashing info file for %s: %s" msgstr "Nem sikerült létrehozni a(z) %s kukainformációs fájlját: %s" -#: gio/glocalfile.c:2228 +#: gio/glocalfile.c:2233 #, c-format msgid "Unable to trash file %s across filesystem boundaries" msgstr "Nem lehet fájlrendszer-határokon át Kukába dobni a(z) %s fájlt" -#: gio/glocalfile.c:2232 gio/glocalfile.c:2288 +#: gio/glocalfile.c:2237 gio/glocalfile.c:2293 #, c-format msgid "Unable to trash file %s: %s" msgstr "Nem lehet a Kukába dobni a(z) %s fájlt: %s" -#: gio/glocalfile.c:2294 +#: gio/glocalfile.c:2299 #, c-format msgid "Unable to trash file %s" msgstr "Nem lehet a Kukába dobni a(z) %s fájlt" -#: gio/glocalfile.c:2320 +#: gio/glocalfile.c:2325 #, c-format msgid "Error creating directory %s: %s" msgstr "Hiba a(z) %s könyvtár létrehozásakor: %s" -#: gio/glocalfile.c:2349 +#: gio/glocalfile.c:2354 #, c-format msgid "Filesystem does not support symbolic links" msgstr "A fájlrendszer nem támogatja a szimbolikus linkeket" -#: gio/glocalfile.c:2352 +#: gio/glocalfile.c:2357 #, c-format msgid "Error making symbolic link %s: %s" msgstr "Hiba a(z) %s szimbolikus link létrehozásakor: %s" -#: gio/glocalfile.c:2358 glib/gfileutils.c:2138 +#: gio/glocalfile.c:2363 glib/gfileutils.c:2155 msgid "Symbolic links not supported" msgstr "A szimbolikus linkek használata nem támogatott" -#: gio/glocalfile.c:2413 gio/glocalfile.c:2448 gio/glocalfile.c:2505 +#: gio/glocalfile.c:2418 gio/glocalfile.c:2453 gio/glocalfile.c:2510 #, c-format msgid "Error moving file %s: %s" msgstr "Hiba a(z) %s fájl áthelyezésekor: %s" -#: gio/glocalfile.c:2436 +#: gio/glocalfile.c:2441 msgid "Can’t move directory over directory" msgstr "A könyvtár nem helyezhető át könyvtárba" -#: gio/glocalfile.c:2462 gio/glocalfileoutputstream.c:1030 +#: gio/glocalfile.c:2467 gio/glocalfileoutputstream.c:1030 #: gio/glocalfileoutputstream.c:1044 gio/glocalfileoutputstream.c:1059 #: gio/glocalfileoutputstream.c:1076 gio/glocalfileoutputstream.c:1090 msgid "Backup file creation failed" msgstr "A mentési fájl létrehozása meghiúsult" -#: gio/glocalfile.c:2481 +#: gio/glocalfile.c:2486 #, c-format msgid "Error removing target file: %s" msgstr "Hiba a célfájl eltávolításakor: %s" -#: gio/glocalfile.c:2495 +#: gio/glocalfile.c:2500 msgid "Move between mounts not supported" msgstr "A csatolások közti áthelyezés nem támogatott" -#: gio/glocalfile.c:2686 +#: gio/glocalfile.c:2691 #, c-format msgid "Could not determine the disk usage of %s: %s" msgstr "Nem lehet meghatározni %s lemezhasználatát: %s" -#: gio/glocalfileinfo.c:745 +#: gio/glocalfileinfo.c:752 msgid "Attribute value must be non-NULL" msgstr "Az attribútum értéke nem lehet NULL" -#: gio/glocalfileinfo.c:752 +#: gio/glocalfileinfo.c:759 msgid "Invalid attribute type (string expected)" msgstr "Érvénytelen attribútumtípus (a várt karakterlánc helyett)" -#: gio/glocalfileinfo.c:759 +#: gio/glocalfileinfo.c:766 msgid "Invalid extended attribute name" msgstr "Érvénytelen kiterjesztett attribútumnév" -#: gio/glocalfileinfo.c:799 +#: gio/glocalfileinfo.c:806 #, c-format msgid "Error setting extended attribute “%s”: %s" msgstr "Hiba a(z) „%s” kiterjesztett attribútum beállításakor: %s" -#: gio/glocalfileinfo.c:1625 +#: gio/glocalfileinfo.c:1634 msgid " (invalid encoding)" msgstr " (érvénytelen kódolás)" -#: gio/glocalfileinfo.c:1789 gio/glocalfileoutputstream.c:908 +#: gio/glocalfileinfo.c:1798 gio/glocalfileoutputstream.c:908 #, c-format msgid "Error when getting information for file “%s”: %s" msgstr "Hiba a(z) „%s” fájl információinak lekérésekor: %s" -#: gio/glocalfileinfo.c:2059 +#: gio/glocalfileinfo.c:2068 #, c-format msgid "Error when getting information for file descriptor: %s" msgstr "Hiba a fájlleíró információinak lekérésekor: %s" -#: gio/glocalfileinfo.c:2104 +#: gio/glocalfileinfo.c:2113 msgid "Invalid attribute type (uint32 expected)" msgstr "Érvénytelen attribútumtípus (a várt uint32 helyett)" -#: gio/glocalfileinfo.c:2122 +#: gio/glocalfileinfo.c:2131 msgid "Invalid attribute type (uint64 expected)" msgstr "Érvénytelen attribútumtípus (a várt uint64 helyett)" -#: gio/glocalfileinfo.c:2141 gio/glocalfileinfo.c:2160 +#: gio/glocalfileinfo.c:2150 gio/glocalfileinfo.c:2169 msgid "Invalid attribute type (byte string expected)" msgstr "Érvénytelen attribútumtípus (a várt bájtkarakterlánc helyett)" -#: gio/glocalfileinfo.c:2207 +#: gio/glocalfileinfo.c:2216 msgid "Cannot set permissions on symlinks" msgstr "Nem állíthatók be a szimbolikus linkek jogosultságai" -#: gio/glocalfileinfo.c:2223 +#: gio/glocalfileinfo.c:2232 #, c-format msgid "Error setting permissions: %s" msgstr "Hiba a jogosultságok beállításakor: %s" -#: gio/glocalfileinfo.c:2274 +#: gio/glocalfileinfo.c:2283 #, c-format msgid "Error setting owner: %s" msgstr "Hiba a tulajdonos beállításakor: %s" -#: gio/glocalfileinfo.c:2297 +#: gio/glocalfileinfo.c:2306 msgid "symlink must be non-NULL" msgstr "a szimbolikus link nem lehet NULL" -#: gio/glocalfileinfo.c:2307 gio/glocalfileinfo.c:2326 -#: gio/glocalfileinfo.c:2337 +#: gio/glocalfileinfo.c:2316 gio/glocalfileinfo.c:2335 +#: gio/glocalfileinfo.c:2346 #, c-format msgid "Error setting symlink: %s" msgstr "Hiba a szimbolikus link beállításakor: %s" -#: gio/glocalfileinfo.c:2316 +#: gio/glocalfileinfo.c:2325 msgid "Error setting symlink: file is not a symlink" msgstr "Hiba a szimbolikus link beállításakor: a fájl nem szimbolikus link" -#: gio/glocalfileinfo.c:2442 +#: gio/glocalfileinfo.c:2451 #, c-format msgid "Error setting modification or access time: %s" msgstr "Hiba a módosítási vagy hozzáférési idő beállításakor: %s" -#: gio/glocalfileinfo.c:2465 +#: gio/glocalfileinfo.c:2474 msgid "SELinux context must be non-NULL" msgstr "A SELinux környezet nem lehet NULL" -#: gio/glocalfileinfo.c:2480 +#: gio/glocalfileinfo.c:2489 #, c-format msgid "Error setting SELinux context: %s" msgstr "Hiba a SELinux környezet beállításakor: %s" -#: gio/glocalfileinfo.c:2487 +#: gio/glocalfileinfo.c:2496 msgid "SELinux is not enabled on this system" msgstr "A SELinux nem engedélyezett ezen rendszeren" -#: gio/glocalfileinfo.c:2579 +#: gio/glocalfileinfo.c:2588 #, c-format msgid "Setting attribute %s not supported" msgstr "A(z) %s attribútum beállítása nem támogatott" @@ -3071,7 +3084,7 @@ msgstr "Hiba a fájlban kereséskor: %s" msgid "Error closing file: %s" msgstr "Hiba a fájl lezárásakor: %s" -#: gio/glocalfilemonitor.c:856 +#: gio/glocalfilemonitor.c:858 msgid "Unable to find default local file monitor type" msgstr "Nem található az alapértelmezett helyi fájlfigyelő típus" @@ -3213,7 +3226,7 @@ msgstr "A csatolás nem valósítja meg a tartalomtípus meghatározását" msgid "mount doesn’t implement synchronous content type guessing" msgstr "A csatolás nem valósítja meg a tartalomtípus szinkron meghatározását" -#: gio/gnetworkaddress.c:384 +#: gio/gnetworkaddress.c:388 #, c-format msgid "Hostname “%s” contains “[” but not “]”" msgstr "A gépnév („%s”) „[” karaktert tartalmaz „]” nélkül" @@ -3240,12 +3253,12 @@ msgstr "Nem hozható létre a hálózatfigyelő: " msgid "Could not get network status: " msgstr "Nem kérhető le a hálózat állapota: " -#: gio/gnetworkmonitornm.c:313 +#: gio/gnetworkmonitornm.c:314 #, c-format msgid "NetworkManager not running" msgstr "A Hálózatkezelő nem fut" -#: gio/gnetworkmonitornm.c:324 +#: gio/gnetworkmonitornm.c:325 #, c-format msgid "NetworkManager version too old" msgstr "A Hálózatkezelő verziója túl régi" @@ -3800,27 +3813,27 @@ msgstr "Hiba a foglalat lezárásakor: %s" msgid "Waiting for socket condition: %s" msgstr "Várakozás a foglalat állapotára: %s" -#: gio/gsocket.c:4612 gio/gsocket.c:4756 gio/gsocket.c:4841 gio/gsocket.c:5021 -#: gio/gsocket.c:5059 +#: gio/gsocket.c:4614 gio/gsocket.c:4616 gio/gsocket.c:4762 gio/gsocket.c:4847 +#: gio/gsocket.c:5027 gio/gsocket.c:5067 gio/gsocket.c:5069 #, c-format msgid "Error sending message: %s" msgstr "Hiba az üzenet küldésekor: %s" -#: gio/gsocket.c:4783 +#: gio/gsocket.c:4789 msgid "GSocketControlMessage not supported on Windows" msgstr "A GSocketControlMessage nem támogatott Windowson" -#: gio/gsocket.c:5248 gio/gsocket.c:5321 gio/gsocket.c:5548 +#: gio/gsocket.c:5260 gio/gsocket.c:5333 gio/gsocket.c:5560 #, c-format msgid "Error receiving message: %s" msgstr "Hiba az üzenet fájl eltávolítása fogadásakor: %s" -#: gio/gsocket.c:5820 +#: gio/gsocket.c:5832 #, c-format msgid "Unable to read socket credentials: %s" msgstr "Nem sikerült olvasni a foglalat hitelesítési adatait: %s" -#: gio/gsocket.c:5829 +#: gio/gsocket.c:5841 msgid "g_socket_get_credentials not implemented for this OS" msgstr "a g_socket_get_credentials nincs megvalósítva erre az OS-re" @@ -3838,15 +3851,15 @@ msgstr "Nem sikerült kapcsolódni a következőhöz: %s: " msgid "Could not connect: " msgstr "Nem sikerült kapcsolódni: " -#: gio/gsocketclient.c:1032 gio/gsocketclient.c:1731 +#: gio/gsocketclient.c:1033 gio/gsocketclient.c:1750 msgid "Unknown error on connect" msgstr "Ismeretlen csatlakozási hiba" -#: gio/gsocketclient.c:1086 gio/gsocketclient.c:1640 +#: gio/gsocketclient.c:1087 gio/gsocketclient.c:1658 msgid "Proxying over a non-TCP connection is not supported." msgstr "A proxyzás nem TCP kapcsolaton keresztül nem támogatott." -#: gio/gsocketclient.c:1115 gio/gsocketclient.c:1666 +#: gio/gsocketclient.c:1116 gio/gsocketclient.c:1684 #, c-format msgid "Proxy protocol “%s” is not supported." msgstr "A proxyprotokoll („%s”) nem támogatott." @@ -3971,7 +3984,7 @@ msgid "Temporarily unable to resolve “%s”" msgstr "Ideiglenesen nem oldható fel: „%s”" #: gio/gthreadedresolver.c:663 gio/gthreadedresolver.c:840 -#: gio/gthreadedresolver.c:948 +#: gio/gthreadedresolver.c:950 #, c-format msgid "Error resolving “%s”" msgstr "Hiba a(z) „%s” feloldásakor" @@ -4786,30 +4799,30 @@ msgstr "A(z) „%s” sablon érvénytelen, „%s” nem lehet benne" msgid "Template “%s” doesn’t contain XXXXXX" msgstr "A(z) „%s” sablon nem tartalmaz XXXXXX karaktersorozatot" -#: glib/gfileutils.c:2116 +#: glib/gfileutils.c:2112 glib/gfileutils.c:2140 #, c-format msgid "Failed to read the symbolic link “%s”: %s" msgstr "Nem sikerült kiolvasni a(z) „%s” szimbolikus linket: %s" -#: glib/giochannel.c:1389 +#: glib/giochannel.c:1393 #, c-format msgid "Could not open converter from “%s” to “%s”: %s" msgstr "Az átalakító a(z) „%s” elemről „%s” elemre nem nyitható meg: %s" -#: glib/giochannel.c:1734 +#: glib/giochannel.c:1738 msgid "Can’t do a raw read in g_io_channel_read_line_string" msgstr "" "Nem lehet nyers (raw) olvasást végezni a g_io_channel_read_line_string-ben" -#: glib/giochannel.c:1781 glib/giochannel.c:2039 glib/giochannel.c:2126 +#: glib/giochannel.c:1785 glib/giochannel.c:2043 glib/giochannel.c:2130 msgid "Leftover unconverted data in read buffer" msgstr "Át nem alakított adatok maradtak az olvasási pufferben" -#: glib/giochannel.c:1862 glib/giochannel.c:1939 +#: glib/giochannel.c:1866 glib/giochannel.c:1943 msgid "Channel terminates in a partial character" msgstr "A csatorna töredék karakterrel ér véget" -#: glib/giochannel.c:1925 +#: glib/giochannel.c:1929 msgid "Can’t do a raw read in g_io_channel_read_to_end" msgstr "Nem lehet nyers (raw) olvasást végezni a g_io_channel_read_to_end-ben" @@ -5779,157 +5792,157 @@ msgid "Character out of range for UTF-16" msgstr "A karakter az UTF-16 tartományon kívülre esik" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2384 +#: glib/gutils.c:2339 #, c-format msgid "%.1f kB" msgstr "%.1f kB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2386 +#: glib/gutils.c:2341 #, c-format msgid "%.1f MB" msgstr "%.1f MB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2388 +#: glib/gutils.c:2343 #, c-format msgid "%.1f GB" msgstr "%.1f GB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2390 +#: glib/gutils.c:2345 #, c-format msgid "%.1f TB" msgstr "%.1f TB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2392 +#: glib/gutils.c:2347 #, c-format msgid "%.1f PB" msgstr "%.1f PB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2394 +#: glib/gutils.c:2349 #, c-format msgid "%.1f EB" msgstr "%.1f EB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2398 +#: glib/gutils.c:2353 #, c-format msgid "%.1f KiB" msgstr "%.1f KiB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2400 +#: glib/gutils.c:2355 #, c-format msgid "%.1f MiB" msgstr "%.1f MiB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2402 +#: glib/gutils.c:2357 #, c-format msgid "%.1f GiB" msgstr "%.1f GiB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2404 +#: glib/gutils.c:2359 #, c-format msgid "%.1f TiB" msgstr "%.1f TiB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2406 +#: glib/gutils.c:2361 #, c-format msgid "%.1f PiB" msgstr "%.1f PiB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2408 +#: glib/gutils.c:2363 #, c-format msgid "%.1f EiB" msgstr "%.1f EiB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2412 +#: glib/gutils.c:2367 #, c-format msgid "%.1f kb" msgstr "%.1f kb" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2414 +#: glib/gutils.c:2369 #, c-format msgid "%.1f Mb" msgstr "%.1f Mb" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2416 +#: glib/gutils.c:2371 #, c-format msgid "%.1f Gb" msgstr "%.1f Gb" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2418 +#: glib/gutils.c:2373 #, c-format msgid "%.1f Tb" msgstr "%.1f Tb" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2420 +#: glib/gutils.c:2375 #, c-format msgid "%.1f Pb" msgstr "%.1f Pb" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2422 +#: glib/gutils.c:2377 #, c-format msgid "%.1f Eb" msgstr "%.1f Eb" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2426 +#: glib/gutils.c:2381 #, c-format msgid "%.1f Kib" msgstr "%.1f Kib" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2428 +#: glib/gutils.c:2383 #, c-format msgid "%.1f Mib" msgstr "%.1f Mib" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2430 +#: glib/gutils.c:2385 #, c-format msgid "%.1f Gib" msgstr "%.1f Gib" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2432 +#: glib/gutils.c:2387 #, c-format msgid "%.1f Tib" msgstr "%.1f Tib" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2434 +#: glib/gutils.c:2389 #, c-format msgid "%.1f Pib" msgstr "%.1f Pib" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2436 +#: glib/gutils.c:2391 #, c-format msgid "%.1f Eib" msgstr "%.1f Eib" -#: glib/gutils.c:2470 glib/gutils.c:2596 +#: glib/gutils.c:2425 glib/gutils.c:2551 #, c-format msgid "%u byte" msgid_plural "%u bytes" msgstr[0] "%u bájt" msgstr[1] "%u bájt" -#: glib/gutils.c:2474 +#: glib/gutils.c:2429 #, c-format msgid "%u bit" msgid_plural "%u bits" @@ -5937,7 +5950,7 @@ msgstr[0] "%u bit" msgstr[1] "%u bit" #. Translators: the %s in "%s bytes" will always be replaced by a number. -#: glib/gutils.c:2541 +#: glib/gutils.c:2496 #, c-format msgid "%s byte" msgid_plural "%s bytes" @@ -5945,7 +5958,7 @@ msgstr[0] "%s bájt" msgstr[1] "%s bájt" #. Translators: the %s in "%s bits" will always be replaced by a number. -#: glib/gutils.c:2546 +#: glib/gutils.c:2501 #, c-format msgid "%s bit" msgid_plural "%s bits" @@ -5957,33 +5970,32 @@ msgstr[1] "%s bit" #. * compatibility. Users will not see this string unless a program is using this deprecated function. #. * Please translate as literally as possible. #. -#: glib/gutils.c:2609 +#: glib/gutils.c:2564 #, c-format msgid "%.1f KB" msgstr "%.1f KB" -#: glib/gutils.c:2614 +#: glib/gutils.c:2569 #, c-format msgid "%.1f MB" msgstr "%.1f MB" -#: glib/gutils.c:2619 +#: glib/gutils.c:2574 #, c-format msgid "%.1f GB" msgstr "%.1f GB" -#: glib/gutils.c:2624 +#: glib/gutils.c:2579 #, c-format msgid "%.1f TB" msgstr "%.1f TB" -#: glib/gutils.c:2629 +#: glib/gutils.c:2584 #, c-format msgid "%.1f PB" msgstr "%.1f PB" -#: glib/gutils.c:2634 +#: glib/gutils.c:2589 #, c-format msgid "%.1f EB" msgstr "%.1f EB" - @@ -10,8 +10,8 @@ msgid "" msgstr "" "Project-Id-Version: glib master\n" "Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/glib/issues\n" -"POT-Creation-Date: 2019-03-19 10:54+0000\n" -"PO-Revision-Date: 2019-04-25 15:47+0700\n" +"POT-Creation-Date: 2019-06-24 16:19+0000\n" +"PO-Revision-Date: 2019-07-08 15:27+0700\n" "Last-Translator: Kukuh Syafaat <kukuhsyafaat@gnome.org>\n" "Language-Team: Indonesian <gnome@i15n.org>\n" "Language: id\n" @@ -19,34 +19,34 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural= n!=1;\n" -"X-Generator: Poedit 2.2.1\n" +"X-Generator: Poedit 2.2.3\n" -#: gio/gapplication.c:499 +#: gio/gapplication.c:500 msgid "GApplication options" msgstr "Opsi GApplication" -#: gio/gapplication.c:499 +#: gio/gapplication.c:500 msgid "Show GApplication options" msgstr "Tunjukkan opsi GApplication" -#: gio/gapplication.c:544 +#: gio/gapplication.c:545 msgid "Enter GApplication service mode (use from D-Bus service files)" msgstr "Masuk mode layanan GApplication (pakai dari berkas layanan D-Bus)" -#: gio/gapplication.c:556 +#: gio/gapplication.c:557 msgid "Override the application’s ID" msgstr "Timpa ID aplikasi" -#: gio/gapplication.c:568 +#: gio/gapplication.c:569 msgid "Replace the running instance" msgstr "Ganti instance yang berjalan" #: gio/gapplication-tool.c:45 gio/gapplication-tool.c:46 gio/gio-tool.c:227 -#: gio/gresource-tool.c:495 gio/gsettings-tool.c:569 +#: gio/gresource-tool.c:493 gio/gsettings-tool.c:567 msgid "Print help" msgstr "Cetak bantuan" -#: gio/gapplication-tool.c:47 gio/gresource-tool.c:496 gio/gresource-tool.c:564 +#: gio/gapplication-tool.c:47 gio/gresource-tool.c:494 gio/gresource-tool.c:562 msgid "[COMMAND]" msgstr "[PERINTAH]" @@ -54,7 +54,7 @@ msgstr "[PERINTAH]" msgid "Print version" msgstr "Cetak versi" -#: gio/gapplication-tool.c:50 gio/gsettings-tool.c:575 +#: gio/gapplication-tool.c:50 gio/gsettings-tool.c:573 msgid "Print version information and exit" msgstr "Cetak informasi versi dan keluar" @@ -104,7 +104,7 @@ msgstr "Buat daftar aksi statik bagi suatu aplikasi (dari berkas .desktop)" msgid "APPID" msgstr "APPID" -#: gio/gapplication-tool.c:70 gio/gapplication-tool.c:133 gio/gdbus-tool.c:91 +#: gio/gapplication-tool.c:70 gio/gapplication-tool.c:133 gio/gdbus-tool.c:102 #: gio/gio-tool.c:224 msgid "COMMAND" msgstr "PERINTAH" @@ -117,9 +117,9 @@ msgstr "Perintah yang ingin dicetak bantuan terrincinya" msgid "Application identifier in D-Bus format (eg: org.example.viewer)" msgstr "Identifier aplikasi dalam format D-Bus (mis: org.example.viewer)" -#: gio/gapplication-tool.c:72 gio/glib-compile-resources.c:738 -#: gio/glib-compile-resources.c:744 gio/glib-compile-resources.c:772 -#: gio/gresource-tool.c:502 gio/gresource-tool.c:568 +#: gio/gapplication-tool.c:72 gio/glib-compile-resources.c:735 +#: gio/glib-compile-resources.c:741 gio/glib-compile-resources.c:769 +#: gio/gresource-tool.c:500 gio/gresource-tool.c:566 msgid "FILE" msgstr "BERKAS" @@ -143,7 +143,7 @@ msgstr "PARAMETER" msgid "Optional parameter to the action invocation, in GVariant format" msgstr "Parameter opsional untuk pemanggilan aksi, dalam format GVariant" -#: gio/gapplication-tool.c:96 gio/gresource-tool.c:533 gio/gsettings-tool.c:661 +#: gio/gapplication-tool.c:96 gio/gresource-tool.c:531 gio/gsettings-tool.c:659 #, c-format msgid "" "Unknown command %s\n" @@ -156,8 +156,8 @@ msgstr "" msgid "Usage:\n" msgstr "Cara pakai:\n" -#: gio/gapplication-tool.c:114 gio/gresource-tool.c:558 -#: gio/gsettings-tool.c:696 +#: gio/gapplication-tool.c:114 gio/gresource-tool.c:556 +#: gio/gsettings-tool.c:694 msgid "Arguments:\n" msgstr "Argumen:\n" @@ -280,7 +280,7 @@ msgstr "Stream telah ditutup" msgid "Truncate not supported on base stream" msgstr "Pemenggalan tak didukung pada stream basis" -#: gio/gcancellable.c:319 gio/gdbusconnection.c:1867 gio/gdbusprivate.c:1406 +#: gio/gcancellable.c:319 gio/gdbusconnection.c:1871 gio/gdbusprivate.c:1409 #: gio/gsimpleasyncresult.c:871 gio/gsimpleasyncresult.c:897 #, c-format msgid "Operation was cancelled" @@ -299,28 +299,28 @@ msgid "Not enough space in destination" msgstr "Tak cukup ruang di tujuan" #: gio/gcharsetconverter.c:342 gio/gdatainputstream.c:848 -#: gio/gdatainputstream.c:1261 glib/gconvert.c:455 glib/gconvert.c:885 -#: glib/giochannel.c:1561 glib/giochannel.c:1603 glib/giochannel.c:2447 +#: gio/gdatainputstream.c:1261 glib/gconvert.c:447 glib/gconvert.c:877 +#: glib/giochannel.c:1561 glib/giochannel.c:1603 glib/giochannel.c:2450 #: glib/gutf8.c:869 glib/gutf8.c:1322 msgid "Invalid byte sequence in conversion input" msgstr "Rangkaian bita dalam input konversi tidak benar" -#: gio/gcharsetconverter.c:347 glib/gconvert.c:463 glib/gconvert.c:799 -#: glib/giochannel.c:1568 glib/giochannel.c:2459 +#: gio/gcharsetconverter.c:347 glib/gconvert.c:455 glib/gconvert.c:791 +#: glib/giochannel.c:1568 glib/giochannel.c:2462 #, c-format msgid "Error during conversion: %s" msgstr "Galat ketika konversi: %s" -#: gio/gcharsetconverter.c:445 gio/gsocket.c:1093 +#: gio/gcharsetconverter.c:445 gio/gsocket.c:1094 msgid "Cancellable initialization not supported" msgstr "Inisialisasi yang dapat dibatalkan tak didukung" -#: gio/gcharsetconverter.c:456 glib/gconvert.c:328 glib/giochannel.c:1389 +#: gio/gcharsetconverter.c:456 glib/gconvert.c:320 glib/giochannel.c:1389 #, c-format msgid "Conversion from character set “%s” to “%s” is not supported" msgstr "Konversi dari gugus karakter \"%s\" ke \"%s\" tak didukung" -#: gio/gcharsetconverter.c:460 glib/gconvert.c:332 +#: gio/gcharsetconverter.c:460 glib/gconvert.c:324 #, c-format msgid "Could not open converter from “%s” to “%s”" msgstr "Tidak dapat membuka pengubah dari \"%s\" ke \"%s\"" @@ -359,50 +359,51 @@ msgstr "Pemalsuan kredensial tak diimplementasikan di OS ini" msgid "Unexpected early end-of-stream" msgstr "Akhir stream terlalu dini, tak diharapkan" -#: gio/gdbusaddress.c:154 gio/gdbusaddress.c:229 gio/gdbusaddress.c:310 +#: gio/gdbusaddress.c:158 gio/gdbusaddress.c:232 gio/gdbusaddress.c:313 #, c-format msgid "Unsupported key “%s” in address entry “%s”" msgstr "Kunci \"%s\" tak didukung pada entri alamat \"%s\"" -#: gio/gdbusaddress.c:168 +#: gio/gdbusaddress.c:171 #, c-format msgid "Meaningless key/value pair combination in address entry “%s”" msgstr "Kombinasi pasangan kunci/nilai tanpa arti di entri alamat \"%s\"" -#: gio/gdbusaddress.c:177 +#: gio/gdbusaddress.c:180 #, c-format msgid "" -"Address “%s” is invalid (need exactly one of path, tmpdir or abstract keys)" +"Address “%s” is invalid (need exactly one of path, dir, tmpdir, or abstract " +"keys)" msgstr "" -"Alamat \"%s\" tak valid (perlu hanya salah satu dari path, tmpdir, atau " +"Alamat \"%s\" tak valid (perlu hanya salah satu dari path, dir, tmpdir, atau " "kunci abstrak)" -#: gio/gdbusaddress.c:244 gio/gdbusaddress.c:325 +#: gio/gdbusaddress.c:247 gio/gdbusaddress.c:328 #, c-format msgid "Error in address “%s” — the port attribute is malformed" msgstr "Galat dalam alamat \"%s\" — atribut port salah bentuk" -#: gio/gdbusaddress.c:255 gio/gdbusaddress.c:336 +#: gio/gdbusaddress.c:258 gio/gdbusaddress.c:339 #, c-format msgid "Error in address “%s” — the family attribute is malformed" msgstr "Galat dalam alamat \"%s\" — atribut family salah bentuk" -#: gio/gdbusaddress.c:406 gio/gdbusaddress.c:670 +#: gio/gdbusaddress.c:409 gio/gdbusaddress.c:673 #, c-format msgid "Unknown or unsupported transport “%s” for address “%s”" msgstr "Transport \"%s\" tak dikenal atau tak didukung bagi alamat \"%s\"" -#: gio/gdbusaddress.c:450 +#: gio/gdbusaddress.c:453 #, c-format msgid "Address element “%s” does not contain a colon (:)" msgstr "Elemen alamat \"%s\" tak memuat titik dua (:)" -#: gio/gdbusaddress.c:459 +#: gio/gdbusaddress.c:462 #, c-format msgid "Transport name in address element “%s” must not be empty" msgstr "Nama transport dalam elemen alamat “%s” tidak boleh kosong" -#: gio/gdbusaddress.c:480 +#: gio/gdbusaddress.c:483 #, c-format msgid "" "Key/Value pair %d, “%s”, in address element “%s” does not contain an equal " @@ -411,7 +412,7 @@ msgstr "" "Pasangan kunci/nilai %d, \"%s\", dalam elemen alamat \"%s\" tak memuat tanda " "sama dengan" -#: gio/gdbusaddress.c:491 +#: gio/gdbusaddress.c:494 #, c-format msgid "" "Key/Value pair %d, “%s”, in address element “%s” must not have an empty key" @@ -419,7 +420,7 @@ msgstr "" "Pasangan kunci/nilai %d, \"%s\", dalam elemen alamat \"%s\" tak boleh " "memiliki kunci kosong" -#: gio/gdbusaddress.c:505 +#: gio/gdbusaddress.c:508 #, c-format msgid "" "Error unescaping key or value in Key/Value pair %d, “%s”, in address element " @@ -428,7 +429,7 @@ msgstr "" "Galat saat membongkar kunci atau nilai dalam pasangan Key/Value %d, \"%s\", " "dalam elemen alamat \"%s\"" -#: gio/gdbusaddress.c:577 +#: gio/gdbusaddress.c:580 #, c-format msgid "" "Error in address “%s” — the unix transport requires exactly one of the keys " @@ -437,75 +438,75 @@ msgstr "" "Galat dalam alamat \"%s\" — transport unix memerlukan hanya satu dari kunci " "\"path\" atau \"abstract\" untuk ditata" -#: gio/gdbusaddress.c:613 +#: gio/gdbusaddress.c:616 #, c-format msgid "Error in address “%s” — the host attribute is missing or malformed" msgstr "Galat dalam alamat \"%s\" — atribut host kurang atau salah bentuk" -#: gio/gdbusaddress.c:627 +#: gio/gdbusaddress.c:630 #, c-format msgid "Error in address “%s” — the port attribute is missing or malformed" msgstr "Galat dalam alamat \"%s\" — atribut portt kurang atau salah bentuk" -#: gio/gdbusaddress.c:641 +#: gio/gdbusaddress.c:644 #, c-format msgid "Error in address “%s” — the noncefile attribute is missing or malformed" msgstr "Galat di alamat \"%s\" — atribut berkas nonce kurang atau salah bentuk" -#: gio/gdbusaddress.c:662 +#: gio/gdbusaddress.c:665 msgid "Error auto-launching: " msgstr "Galat saat meluncurkan otomatis: " -#: gio/gdbusaddress.c:715 +#: gio/gdbusaddress.c:718 #, c-format msgid "Error opening nonce file “%s”: %s" msgstr "Galat saat membuka berkas nonce \"%s\": %s" -#: gio/gdbusaddress.c:734 +#: gio/gdbusaddress.c:737 #, c-format msgid "Error reading from nonce file “%s”: %s" msgstr "Galat saat membaca berkas nonce \"%s\": %s" -#: gio/gdbusaddress.c:743 +#: gio/gdbusaddress.c:746 #, c-format msgid "Error reading from nonce file “%s”, expected 16 bytes, got %d" msgstr "Galat saat membaca berkas nonce \"%s\", berharap 16 bita, mendapat %d" -#: gio/gdbusaddress.c:761 +#: gio/gdbusaddress.c:764 #, c-format msgid "Error writing contents of nonce file “%s” to stream:" msgstr "Galat saat menulis isi dari berkas nonce \"%s\" ke stream:" -#: gio/gdbusaddress.c:970 +#: gio/gdbusaddress.c:973 msgid "The given address is empty" msgstr "Tidak ada alamat yang diberikan" -#: gio/gdbusaddress.c:1083 +#: gio/gdbusaddress.c:1086 #, c-format msgid "Cannot spawn a message bus when setuid" msgstr "Tidak bisa spawn suatu bus pesan ketika setuid" -#: gio/gdbusaddress.c:1090 +#: gio/gdbusaddress.c:1093 msgid "Cannot spawn a message bus without a machine-id: " msgstr "Tidak bisa spawn suatu bus pesan tanpa id-mesin: " -#: gio/gdbusaddress.c:1097 +#: gio/gdbusaddress.c:1100 #, c-format msgid "Cannot autolaunch D-Bus without X11 $DISPLAY" msgstr "Tidak bisa meluncurkan mandiri D-Bus tanpa $DISPLAY X11" -#: gio/gdbusaddress.c:1139 +#: gio/gdbusaddress.c:1142 #, c-format msgid "Error spawning command line “%s”: " msgstr "Galat saat spawn baris perintah \"%s\": " -#: gio/gdbusaddress.c:1208 +#: gio/gdbusaddress.c:1211 #, c-format msgid "Cannot determine session bus address (not implemented for this OS)" msgstr "" "Tidak bisa menentukan alamat bus sesi (tidak diimplementasi bagi OS ini)" -#: gio/gdbusaddress.c:1346 gio/gdbusconnection.c:7174 +#: gio/gdbusaddress.c:1349 gio/gdbusconnection.c:7178 #, c-format msgid "" "Cannot determine bus address from DBUS_STARTER_BUS_TYPE environment variable " @@ -514,7 +515,7 @@ msgstr "" "Tak bisa menentukan alamat bus dari variabel lingkungan " "DBUS_STARTER_BUS_TYPE — nilai tak dikenal \"%s\"" -#: gio/gdbusaddress.c:1355 gio/gdbusconnection.c:7183 +#: gio/gdbusaddress.c:1358 gio/gdbusconnection.c:7187 msgid "" "Cannot determine bus address because the DBUS_STARTER_BUS_TYPE environment " "variable is not set" @@ -522,7 +523,7 @@ msgstr "" "Tak bisa menentukan alamat bus karena variabel lingkungan " "DBUS_STARTER_BUS_TYPE tak diisi" -#: gio/gdbusaddress.c:1365 +#: gio/gdbusaddress.c:1368 #, c-format msgid "Unknown bus type %d" msgstr "Tipe bus %d tak dikenal" @@ -541,7 +542,7 @@ msgstr "" msgid "" "Exhausted all available authentication mechanisms (tried: %s) (available: %s)" msgstr "" -"Menghabiskan semua mekanisme otentikasi yang tersedia (dicoba: %s) " +"Menghabiskan semua mekanisme autentikasi yang tersedia (dicoba: %s) " "(tersedia: %s)" #: gio/gdbusauth.c:1144 @@ -626,21 +627,21 @@ msgstr "Galat saat membuka gantungan kunci \"%s\" untuk ditulisi: " msgid "(Additionally, releasing the lock for “%s” also failed: %s) " msgstr "(Selain itu, melepas kunci bagi \"%s\" juga gagal: %s) " -#: gio/gdbusconnection.c:603 gio/gdbusconnection.c:2396 +#: gio/gdbusconnection.c:604 gio/gdbusconnection.c:2400 msgid "The connection is closed" msgstr "Sambungan tertutup" -#: gio/gdbusconnection.c:1897 +#: gio/gdbusconnection.c:1901 msgid "Timeout was reached" msgstr "Kehabisan waktu" -#: gio/gdbusconnection.c:2518 +#: gio/gdbusconnection.c:2522 msgid "" "Unsupported flags encountered when constructing a client-side connection" msgstr "" "Ditemui flag yang tak didukung ketika membangun sambungan di sisi klien" -#: gio/gdbusconnection.c:4147 gio/gdbusconnection.c:4494 +#: gio/gdbusconnection.c:4151 gio/gdbusconnection.c:4498 #, c-format msgid "" "No such interface “org.freedesktop.DBus.Properties” on object at path %s" @@ -648,76 +649,76 @@ msgstr "" "Tidak ada antarmuka \"org.freedesktop.DBus.Properties\" pada objek pada path " "%s" -#: gio/gdbusconnection.c:4289 +#: gio/gdbusconnection.c:4293 #, c-format msgid "No such property “%s”" msgstr "Tak ada properti \"%s\"" -#: gio/gdbusconnection.c:4301 +#: gio/gdbusconnection.c:4305 #, c-format msgid "Property “%s” is not readable" msgstr "Properti \"%s\" tidak dapat dibaca" -#: gio/gdbusconnection.c:4312 +#: gio/gdbusconnection.c:4316 #, c-format msgid "Property “%s” is not writable" msgstr "Properti \"%s\" tidak dapat ditulisi" -#: gio/gdbusconnection.c:4332 +#: gio/gdbusconnection.c:4336 #, c-format msgid "Error setting property “%s”: Expected type “%s” but got “%s”" msgstr "" "Galat menata properti \"%s\": Tipe yang diharapkan \"%s\" tapi diperoleh \"%s" "\"" -#: gio/gdbusconnection.c:4437 gio/gdbusconnection.c:4645 -#: gio/gdbusconnection.c:6614 +#: gio/gdbusconnection.c:4441 gio/gdbusconnection.c:4649 +#: gio/gdbusconnection.c:6618 #, c-format msgid "No such interface “%s”" msgstr "Tak ada antarmuka \"%s\"" -#: gio/gdbusconnection.c:4863 gio/gdbusconnection.c:7123 +#: gio/gdbusconnection.c:4867 gio/gdbusconnection.c:7127 #, c-format msgid "No such interface “%s” on object at path %s" msgstr "Tak ada antarmuka \"%s\" pada objek di lokasi %s" -#: gio/gdbusconnection.c:4961 +#: gio/gdbusconnection.c:4965 #, c-format msgid "No such method “%s”" msgstr "Tidak ada metode seperti \"%s\"" -#: gio/gdbusconnection.c:4992 +#: gio/gdbusconnection.c:4996 #, c-format msgid "Type of message, “%s”, does not match expected type “%s”" msgstr "Tipe pesan \"%s\" tak cocok dengan tipe yang diharapkan \"%s\"" -#: gio/gdbusconnection.c:5190 +#: gio/gdbusconnection.c:5194 #, c-format msgid "An object is already exported for the interface %s at %s" msgstr "Suatu objek telah diekspor bagi antar muka %s pada %s" -#: gio/gdbusconnection.c:5416 +#: gio/gdbusconnection.c:5420 #, c-format msgid "Unable to retrieve property %s.%s" msgstr "Tak bisa mengambil properti %s.%s" -#: gio/gdbusconnection.c:5472 +#: gio/gdbusconnection.c:5476 #, c-format msgid "Unable to set property %s.%s" msgstr "Tak bisa menata properti %s.%s" -#: gio/gdbusconnection.c:5650 +#: gio/gdbusconnection.c:5654 #, c-format msgid "Method “%s” returned type “%s”, but expected “%s”" -msgstr "Metoda \"%s\" mengembalikan tipe \"%s\", tapi yang diharapkan \"%s\"" +msgstr "Metode \"%s\" mengembalikan tipe \"%s\", tapi yang diharapkan \"%s\"" -#: gio/gdbusconnection.c:6725 +#: gio/gdbusconnection.c:6729 #, c-format msgid "Method “%s” on interface “%s” with signature “%s” does not exist" msgstr "" -"Metoda \"%s\" pada antar muka \"%s\" dengan tanda tangan \"%s\"' tak ada" +"Metode \"%s\" pada antar muka \"%s\" dengan tanda tangan \"%s\"' tak ada" -#: gio/gdbusconnection.c:6846 +#: gio/gdbusconnection.c:6850 #, c-format msgid "A subtree is already exported for %s" msgstr "Subtree telah diekspor bagi %s" @@ -917,68 +918,68 @@ msgstr "Galat balikan dengan tubuh bertipe \"%s\"" msgid "Error return with empty body" msgstr "Galat balikan dengan body kosong" -#: gio/gdbusprivate.c:2233 +#: gio/gdbusprivate.c:2243 #, c-format msgid "(Type any character to close this window)\n" msgstr "(Ketikkan karakter apapun untuk menutup jendela ini)\n" -#: gio/gdbusprivate.c:2407 +#: gio/gdbusprivate.c:2417 #, c-format msgid "Session dbus not running, and autolaunch failed" msgstr "dbus sesi tak sedang berjalan, dan peluncuran-otomatis gagal" -#: gio/gdbusprivate.c:2430 +#: gio/gdbusprivate.c:2440 #, c-format msgid "Unable to get Hardware profile: %s" msgstr "Tak bisa mendapat profil perangkat keras: %s" -#: gio/gdbusprivate.c:2475 +#: gio/gdbusprivate.c:2485 msgid "Unable to load /var/lib/dbus/machine-id or /etc/machine-id: " msgstr "Tak bisa memuat /var/lib/dbus/machine-id ata /etc/machine-id: " -#: gio/gdbusproxy.c:1617 +#: gio/gdbusproxy.c:1625 #, c-format msgid "Error calling StartServiceByName for %s: " msgstr "Galat sewaktu memanggil StartServiceByName untuk %s: " -#: gio/gdbusproxy.c:1640 +#: gio/gdbusproxy.c:1648 #, c-format msgid "Unexpected reply %d from StartServiceByName(\"%s\") method" msgstr "Balasan tak diharapkan %d dari metode StartServiceByName(\"%s\")" -#: gio/gdbusproxy.c:2740 gio/gdbusproxy.c:2875 +#: gio/gdbusproxy.c:2748 gio/gdbusproxy.c:2883 #, c-format msgid "" "Cannot invoke method; proxy is for the well-known name %s without an owner, " "and proxy was constructed with the G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag" msgstr "" -"Tidak bisa menjalankan metoda; proksi adalah nama terkenal %s tanpa pemilik " +"Tidak bisa menjalankan metode; proksi adalah nama terkenal %s tanpa pemilik " "dan proksi dibangun dengan flag G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START" -#: gio/gdbusserver.c:708 -msgid "Abstract name space not supported" +#: gio/gdbusserver.c:746 +msgid "Abstract namespace not supported" msgstr "Ruang nama abstrak tak didukung" -#: gio/gdbusserver.c:795 +#: gio/gdbusserver.c:839 msgid "Cannot specify nonce file when creating a server" msgstr "Tidak dapat menyatakan berkas nonce ketika membuat suatu server" -#: gio/gdbusserver.c:876 +#: gio/gdbusserver.c:921 #, c-format msgid "Error writing nonce file at “%s”: %s" msgstr "Galat saat menulis berkas nonce pada \"%s\": %s" -#: gio/gdbusserver.c:1047 +#: gio/gdbusserver.c:1094 #, c-format msgid "The string “%s” is not a valid D-Bus GUID" msgstr "String \"%s\" bukan suatu GUID D-Bus yang valid" -#: gio/gdbusserver.c:1087 +#: gio/gdbusserver.c:1134 #, c-format msgid "Cannot listen on unsupported transport “%s”" msgstr "Tidak dapat mendengarkan pada transport yang tak didukung \"%s\"" -#: gio/gdbus-tool.c:96 +#: gio/gdbus-tool.c:107 #, c-format msgid "" "Commands:\n" @@ -1002,225 +1003,225 @@ msgstr "" "Gunakan \"%s PERINTAH --help\" untuk memperoleh bantuan pada setiap " "perintah.\n" -#: gio/gdbus-tool.c:186 gio/gdbus-tool.c:253 gio/gdbus-tool.c:325 -#: gio/gdbus-tool.c:349 gio/gdbus-tool.c:835 gio/gdbus-tool.c:1172 -#: gio/gdbus-tool.c:1614 +#: gio/gdbus-tool.c:197 gio/gdbus-tool.c:264 gio/gdbus-tool.c:336 +#: gio/gdbus-tool.c:360 gio/gdbus-tool.c:846 gio/gdbus-tool.c:1183 +#: gio/gdbus-tool.c:1668 #, c-format msgid "Error: %s\n" msgstr "Galat: %s\n" -#: gio/gdbus-tool.c:197 gio/gdbus-tool.c:266 gio/gdbus-tool.c:1630 +#: gio/gdbus-tool.c:208 gio/gdbus-tool.c:277 gio/gdbus-tool.c:1684 #, c-format msgid "Error parsing introspection XML: %s\n" msgstr "Galat saat mengurai XML introspeksi: %s\n" -#: gio/gdbus-tool.c:235 +#: gio/gdbus-tool.c:246 #, c-format msgid "Error: %s is not a valid name\n" msgstr "Galat: %s bukan nama yang valid\n" -#: gio/gdbus-tool.c:383 +#: gio/gdbus-tool.c:394 msgid "Connect to the system bus" msgstr "Menyambung ke bus sistem" -#: gio/gdbus-tool.c:384 +#: gio/gdbus-tool.c:395 msgid "Connect to the session bus" msgstr "Menyambung ke bus sesi" -#: gio/gdbus-tool.c:385 +#: gio/gdbus-tool.c:396 msgid "Connect to given D-Bus address" msgstr "Menyambung ke alamat D-Bus yang diberikan" -#: gio/gdbus-tool.c:395 +#: gio/gdbus-tool.c:406 msgid "Connection Endpoint Options:" msgstr "Opsi Titik Ujung Sambungan:" -#: gio/gdbus-tool.c:396 +#: gio/gdbus-tool.c:407 msgid "Options specifying the connection endpoint" msgstr "Opsi yang menyatakan titik ujung sambungan" -#: gio/gdbus-tool.c:418 +#: gio/gdbus-tool.c:429 #, c-format msgid "No connection endpoint specified" msgstr "Titik ujung sambungan tak dinyatakan" -#: gio/gdbus-tool.c:428 +#: gio/gdbus-tool.c:439 #, c-format msgid "Multiple connection endpoints specified" msgstr "Telah dinyatakan titik ujung sambungan berganda" -#: gio/gdbus-tool.c:498 +#: gio/gdbus-tool.c:509 #, c-format msgid "" "Warning: According to introspection data, interface “%s” does not exist\n" msgstr "Peringatan: Menurut data introspeksi, antar muka \"%s\" tak ada\n" -#: gio/gdbus-tool.c:507 +#: gio/gdbus-tool.c:518 #, c-format msgid "" "Warning: According to introspection data, method “%s” does not exist on " "interface “%s”\n" msgstr "" -"Peringatan: Menurut data introspeksi, metoda \"%s\" tak ada pada antar muka " +"Peringatan: Menurut data introspeksi, metode \"%s\" tak ada pada antar muka " "\"%s\"\n" -#: gio/gdbus-tool.c:569 +#: gio/gdbus-tool.c:580 msgid "Optional destination for signal (unique name)" msgstr "Tujuan opsional bagi sinyal (nama unik)" -#: gio/gdbus-tool.c:570 +#: gio/gdbus-tool.c:581 msgid "Object path to emit signal on" msgstr "Path objek untuk dipancari sinyal" -#: gio/gdbus-tool.c:571 +#: gio/gdbus-tool.c:582 msgid "Signal and interface name" msgstr "Nama antar muka dan sinyal" -#: gio/gdbus-tool.c:604 +#: gio/gdbus-tool.c:615 msgid "Emit a signal." msgstr "Pancarkan sinyal." -#: gio/gdbus-tool.c:659 gio/gdbus-tool.c:966 gio/gdbus-tool.c:1716 -#: gio/gdbus-tool.c:1945 gio/gdbus-tool.c:2165 +#: gio/gdbus-tool.c:670 gio/gdbus-tool.c:977 gio/gdbus-tool.c:1771 +#: gio/gdbus-tool.c:2003 gio/gdbus-tool.c:2223 #, c-format msgid "Error connecting: %s\n" msgstr "Galat saat menyambung: %s\n" -#: gio/gdbus-tool.c:679 +#: gio/gdbus-tool.c:690 #, c-format msgid "Error: %s is not a valid unique bus name.\n" msgstr "Galat: '%s' bukan nama bus unik yang valid\n" -#: gio/gdbus-tool.c:698 gio/gdbus-tool.c:1009 gio/gdbus-tool.c:1759 +#: gio/gdbus-tool.c:709 gio/gdbus-tool.c:1020 gio/gdbus-tool.c:1814 msgid "Error: Object path is not specified\n" msgstr "Galat: Lokasi objek tak dinyatakan\n" -#: gio/gdbus-tool.c:721 gio/gdbus-tool.c:1029 gio/gdbus-tool.c:1779 -#: gio/gdbus-tool.c:2016 +#: gio/gdbus-tool.c:732 gio/gdbus-tool.c:1040 gio/gdbus-tool.c:1834 +#: gio/gdbus-tool.c:2074 #, c-format msgid "Error: %s is not a valid object path\n" msgstr "Galat: '%s' bukan suatu lokasi objek yang valid\n" -#: gio/gdbus-tool.c:741 +#: gio/gdbus-tool.c:752 msgid "Error: Signal name is not specified\n" msgstr "Galat: Nama sinyal tak dinyatakan\n" -#: gio/gdbus-tool.c:755 +#: gio/gdbus-tool.c:766 #, c-format msgid "Error: Signal name “%s” is invalid\n" msgstr "Galat: Nama sinyal \"%s\" tak valid\n" -#: gio/gdbus-tool.c:767 +#: gio/gdbus-tool.c:778 #, c-format msgid "Error: %s is not a valid interface name\n" msgstr "Galat: '%s' bukan nama antar muka yang valid\n" -#: gio/gdbus-tool.c:773 +#: gio/gdbus-tool.c:784 #, c-format msgid "Error: %s is not a valid member name\n" msgstr "Galat: '%s' bukan nama anggota yang valid\n" #. Use the original non-"parse-me-harder" error -#: gio/gdbus-tool.c:810 gio/gdbus-tool.c:1141 +#: gio/gdbus-tool.c:821 gio/gdbus-tool.c:1152 #, c-format msgid "Error parsing parameter %d: %s\n" msgstr "Galat saat mengurai parameter %d: %s\n" -#: gio/gdbus-tool.c:842 +#: gio/gdbus-tool.c:853 #, c-format msgid "Error flushing connection: %s\n" msgstr "Galat saat menggelontor sambungan: %s\n" -#: gio/gdbus-tool.c:869 +#: gio/gdbus-tool.c:880 msgid "Destination name to invoke method on" -msgstr "Nama tujuan tempat menjalankan metoda" +msgstr "Nama tujuan tempat menjalankan metode" -#: gio/gdbus-tool.c:870 +#: gio/gdbus-tool.c:881 msgid "Object path to invoke method on" -msgstr "Lokasi objek tempat menjalankan metoda" +msgstr "Lokasi objek tempat menjalankan metode" -#: gio/gdbus-tool.c:871 +#: gio/gdbus-tool.c:882 msgid "Method and interface name" -msgstr "Nama metoda dan antar muka" +msgstr "Nama metode dan antar muka" -#: gio/gdbus-tool.c:872 +#: gio/gdbus-tool.c:883 msgid "Timeout in seconds" msgstr "Tenggat waktu dalam detik" -#: gio/gdbus-tool.c:911 +#: gio/gdbus-tool.c:922 msgid "Invoke a method on a remote object." -msgstr "Jalankan suatu metoda pada suatu objek jauh." +msgstr "Jalankan suatu metode pada suatu objek jauh." -#: gio/gdbus-tool.c:983 gio/gdbus-tool.c:1733 gio/gdbus-tool.c:1970 +#: gio/gdbus-tool.c:994 gio/gdbus-tool.c:1788 gio/gdbus-tool.c:2028 msgid "Error: Destination is not specified\n" msgstr "Galat: Tujuan tak dinyatakan\n" -#: gio/gdbus-tool.c:994 gio/gdbus-tool.c:1750 gio/gdbus-tool.c:1981 +#: gio/gdbus-tool.c:1005 gio/gdbus-tool.c:1805 gio/gdbus-tool.c:2039 #, c-format msgid "Error: %s is not a valid bus name\n" msgstr "Galat: %s bukan nama bus yang valid\n" -#: gio/gdbus-tool.c:1044 +#: gio/gdbus-tool.c:1055 msgid "Error: Method name is not specified\n" -msgstr "Galat: Nama metoda tak dinyatakan\n" +msgstr "Galat: Nama metode tak dinyatakan\n" -#: gio/gdbus-tool.c:1055 +#: gio/gdbus-tool.c:1066 #, c-format msgid "Error: Method name “%s” is invalid\n" -msgstr "Galat: Nama metoda \"%s\" tak valid\n" +msgstr "Galat: Nama metode \"%s\" tak valid\n" -#: gio/gdbus-tool.c:1133 +#: gio/gdbus-tool.c:1144 #, c-format msgid "Error parsing parameter %d of type “%s”: %s\n" msgstr "Galat ketika mengurai parameter ke-%d bertipe \"%s\": %s\n" -#: gio/gdbus-tool.c:1577 +#: gio/gdbus-tool.c:1630 msgid "Destination name to introspect" msgstr "Nama tujuan untuk introspeksi" -#: gio/gdbus-tool.c:1578 +#: gio/gdbus-tool.c:1631 msgid "Object path to introspect" msgstr "Lokasi objek untuk introspeksi" -#: gio/gdbus-tool.c:1579 +#: gio/gdbus-tool.c:1632 msgid "Print XML" msgstr "Cetak XML" -#: gio/gdbus-tool.c:1580 +#: gio/gdbus-tool.c:1633 msgid "Introspect children" msgstr "Introspeksi anak" -#: gio/gdbus-tool.c:1581 +#: gio/gdbus-tool.c:1634 msgid "Only print properties" msgstr "Hanya cetak properti" -#: gio/gdbus-tool.c:1668 +#: gio/gdbus-tool.c:1723 msgid "Introspect a remote object." msgstr "Introspeksi suatu objek jauh." -#: gio/gdbus-tool.c:1871 +#: gio/gdbus-tool.c:1929 msgid "Destination name to monitor" msgstr "Nama tujuan untuk dipantau" -#: gio/gdbus-tool.c:1872 +#: gio/gdbus-tool.c:1930 msgid "Object path to monitor" msgstr "Lokasi objek untuk dipantau" -#: gio/gdbus-tool.c:1897 +#: gio/gdbus-tool.c:1955 msgid "Monitor a remote object." msgstr "Memantau suatu objek jauh." -#: gio/gdbus-tool.c:1955 +#: gio/gdbus-tool.c:2013 msgid "Error: can’t monitor a non-message-bus connection\n" msgstr "Galat: tidak dapat memonitor koneksi non bus pesan\n" -#: gio/gdbus-tool.c:2079 +#: gio/gdbus-tool.c:2137 msgid "Service to activate before waiting for the other one (well-known name)" msgstr "" "Layanan yang akan diaktifkan sebelum menunggu yang lain (nama yang dikenal " "baik)" -#: gio/gdbus-tool.c:2082 +#: gio/gdbus-tool.c:2140 msgid "" "Timeout to wait for before exiting with an error (seconds); 0 for no timeout " "(default)" @@ -1228,64 +1229,64 @@ msgstr "" "Tenggat waktu menunggu sebelum keluar dengan suatu kesalahan (detik); 0 " "untuk tanpa tenggat (baku)" -#: gio/gdbus-tool.c:2130 +#: gio/gdbus-tool.c:2188 msgid "[OPTION…] BUS-NAME" msgstr "[OPSI…] NAMA-BUS" -#: gio/gdbus-tool.c:2131 +#: gio/gdbus-tool.c:2189 msgid "Wait for a bus name to appear." msgstr "Tunggu suatu nama bus muncul." -#: gio/gdbus-tool.c:2207 +#: gio/gdbus-tool.c:2265 msgid "Error: A service to activate for must be specified.\n" msgstr "Galat: Suatu layanan yang akan diaktifkan mesti dinyatakan\n" -#: gio/gdbus-tool.c:2212 +#: gio/gdbus-tool.c:2270 msgid "Error: A service to wait for must be specified.\n" msgstr "Galat: Suatu layanan yang mesti ditunggu harus dinyatakan\n" -#: gio/gdbus-tool.c:2217 +#: gio/gdbus-tool.c:2275 msgid "Error: Too many arguments.\n" msgstr "Galat: Terlalu banyak argumen.\n" -#: gio/gdbus-tool.c:2225 gio/gdbus-tool.c:2232 +#: gio/gdbus-tool.c:2283 gio/gdbus-tool.c:2290 #, c-format msgid "Error: %s is not a valid well-known bus name.\n" msgstr "Galat: %s bukan nama bus yang dikenal baik dan valid\n" -#: gio/gdesktopappinfo.c:2041 gio/gdesktopappinfo.c:4822 +#: gio/gdesktopappinfo.c:2045 gio/gdesktopappinfo.c:4834 msgid "Unnamed" msgstr "Tanpa nama" -#: gio/gdesktopappinfo.c:2451 +#: gio/gdesktopappinfo.c:2455 msgid "Desktop file didn’t specify Exec field" msgstr "Berkas desktop tak menyatakan ruas Exec" -#: gio/gdesktopappinfo.c:2710 +#: gio/gdesktopappinfo.c:2718 msgid "Unable to find terminal required for application" msgstr "Tak bisa temukan terminal yang diperlukan bagi aplikasi" -#: gio/gdesktopappinfo.c:3362 +#: gio/gdesktopappinfo.c:3370 #, c-format msgid "Can’t create user application configuration folder %s: %s" msgstr "" "Tak bisa membuat folder %s untuk konfigurasi aplikasi bagi pengguna: %s" -#: gio/gdesktopappinfo.c:3366 +#: gio/gdesktopappinfo.c:3374 #, c-format msgid "Can’t create user MIME configuration folder %s: %s" msgstr "Tak bisa membuat folder %s untuk konfigurasi MIME bagi pengguna: %s" -#: gio/gdesktopappinfo.c:3606 gio/gdesktopappinfo.c:3630 +#: gio/gdesktopappinfo.c:3614 gio/gdesktopappinfo.c:3638 msgid "Application information lacks an identifier" msgstr "Informasi aplikasi tak punya identifier" -#: gio/gdesktopappinfo.c:3864 +#: gio/gdesktopappinfo.c:3872 #, c-format msgid "Can’t create user desktop file %s" msgstr "Tak bisa membuat berkas desktop pengguna %s" -#: gio/gdesktopappinfo.c:3998 +#: gio/gdesktopappinfo.c:4006 #, c-format msgid "Custom definition for %s" msgstr "Definisi gubahan bagi %s" @@ -1348,10 +1349,10 @@ msgstr "Berharap suatu GEmblem bagi GEmblemedIcon" #: gio/gfile.c:1076 gio/gfile.c:1314 gio/gfile.c:1452 gio/gfile.c:1690 #: gio/gfile.c:1745 gio/gfile.c:1803 gio/gfile.c:1887 gio/gfile.c:1944 -#: gio/gfile.c:2008 gio/gfile.c:2063 gio/gfile.c:3738 gio/gfile.c:3793 -#: gio/gfile.c:4029 gio/gfile.c:4071 gio/gfile.c:4539 gio/gfile.c:4950 -#: gio/gfile.c:5035 gio/gfile.c:5125 gio/gfile.c:5222 gio/gfile.c:5309 -#: gio/gfile.c:5410 gio/gfile.c:8114 gio/gfile.c:8204 gio/gfile.c:8288 +#: gio/gfile.c:2008 gio/gfile.c:2063 gio/gfile.c:3739 gio/gfile.c:3794 +#: gio/gfile.c:4030 gio/gfile.c:4072 gio/gfile.c:4540 gio/gfile.c:4951 +#: gio/gfile.c:5036 gio/gfile.c:5126 gio/gfile.c:5223 gio/gfile.c:5310 +#: gio/gfile.c:5411 gio/gfile.c:8115 gio/gfile.c:8205 gio/gfile.c:8289 #: gio/win32/gwinhttpfile.c:437 msgid "Operation not supported" msgstr "Operasi tak didukung" @@ -1405,24 +1406,24 @@ msgstr "Menyalin (reflink/clone) tak didukung atau tak bekerja" msgid "Can’t copy special file" msgstr "Tak bisa menyalin berkas spesial" -#: gio/gfile.c:4019 +#: gio/gfile.c:4020 msgid "Invalid symlink value given" msgstr "Diberikan nilai link simbolik yang tak valid" -#: gio/gfile.c:4180 +#: gio/gfile.c:4181 msgid "Trash not supported" msgstr "Tong sampah tak didukung" -#: gio/gfile.c:4292 +#: gio/gfile.c:4293 #, c-format msgid "File names cannot contain “%c”" msgstr "Nama berkas tak boleh mengandung \"%c\"" -#: gio/gfile.c:6773 gio/gvolume.c:364 +#: gio/gfile.c:6774 gio/gvolume.c:364 msgid "volume doesn’t implement mount" msgstr "volume tak mengimplementasi pengaitan" -#: gio/gfile.c:6884 gio/gfile.c:6930 +#: gio/gfile.c:6885 gio/gfile.c:6931 msgid "No application is registered as handling this file" msgstr "Tak ada aplikasi terdaftar yang menangani berkas ini" @@ -1467,8 +1468,8 @@ msgstr "Pemenggalan tak diijinkan pada stream masukan" msgid "Truncate not supported on stream" msgstr "Pemenggalan tak didukung pada stream" -#: gio/ghttpproxy.c:91 gio/gresolver.c:377 gio/gresolver.c:529 -#: glib/gconvert.c:1785 +#: gio/ghttpproxy.c:91 gio/gresolver.c:386 gio/gresolver.c:538 +#: glib/gconvert.c:1777 msgid "Invalid hostname" msgstr "Nama host salah" @@ -1482,11 +1483,11 @@ msgstr "Sambungan proksi HTTP tak diizinkan" #: gio/ghttpproxy.c:164 msgid "HTTP proxy authentication failed" -msgstr "Otentikasi proksi HTTP gagal" +msgstr "autentikasi proksi HTTP gagal" #: gio/ghttpproxy.c:167 msgid "HTTP proxy authentication required" -msgstr "Otentikasi proksi HTTP diperlukan" +msgstr "autentikasi proksi HTTP diperlukan" #: gio/ghttpproxy.c:171 #, c-format @@ -1584,7 +1585,7 @@ msgstr "Pertahankan dengan berkas ketika dipindah" msgid "“version” takes no arguments" msgstr "\"version\" tak menerima argumen" -#: gio/gio-tool.c:207 gio/gio-tool.c:223 glib/goption.c:857 +#: gio/gio-tool.c:207 gio/gio-tool.c:223 glib/goption.c:861 msgid "Usage:" msgstr "Penggunaan:" @@ -2029,7 +2030,7 @@ msgstr "" #: gio/gio-tool-mount.c:70 msgid "Use an anonymous user when authenticating" -msgstr "Gunakan suatu pengguna anonim ketika mengotentikasi" +msgstr "Gunakan suatu pengguna anonim ketika mengautentikasi" #. Translator: List here is a verb as in 'List all mounts' #: gio/gio-tool-mount.c:72 @@ -2241,32 +2242,32 @@ msgstr "Ikuti taut simbolik, kait, dan pintasan" msgid "List contents of directories in a tree-like format." msgstr "Tampilkan daftar isi direktori dalam format mirip pohon." -#: gio/glib-compile-resources.c:143 gio/glib-compile-schemas.c:1517 +#: gio/glib-compile-resources.c:140 gio/glib-compile-schemas.c:1514 #, c-format msgid "Element <%s> not allowed inside <%s>" msgstr "Elemen <%s> tidak diijinkan di dalam <%s>" -#: gio/glib-compile-resources.c:147 +#: gio/glib-compile-resources.c:144 #, c-format msgid "Element <%s> not allowed at toplevel" msgstr "Elemen <%s> tidak diijinkan pada aras puncak" -#: gio/glib-compile-resources.c:237 +#: gio/glib-compile-resources.c:234 #, c-format msgid "File %s appears multiple times in the resource" msgstr "Berkas %s muncul beberapa kali dalam sumber daya" -#: gio/glib-compile-resources.c:248 +#: gio/glib-compile-resources.c:245 #, c-format msgid "Failed to locate “%s” in any source directory" msgstr "Gagal menemukan \"%s\" dalam direktori sumber manapun" -#: gio/glib-compile-resources.c:259 +#: gio/glib-compile-resources.c:256 #, c-format msgid "Failed to locate “%s” in current directory" msgstr "Gagal menemukan \"%s\" di direktori saat ini" -#: gio/glib-compile-resources.c:293 +#: gio/glib-compile-resources.c:290 #, c-format msgid "Unknown processing option “%s”" msgstr "Opsi pemrosesan \"%s\" tidak dikenal" @@ -2275,36 +2276,36 @@ msgstr "Opsi pemrosesan \"%s\" tidak dikenal" #. * the second %s is an environment variable, and the third #. * %s is a command line tool #. -#: gio/glib-compile-resources.c:313 gio/glib-compile-resources.c:370 -#: gio/glib-compile-resources.c:427 +#: gio/glib-compile-resources.c:310 gio/glib-compile-resources.c:367 +#: gio/glib-compile-resources.c:424 #, c-format msgid "%s preprocessing requested, but %s is not set, and %s is not in PATH" msgstr "praproses %s diminta, tetapi %s tidak diatur, dan %s tidak dalam PATH" -#: gio/glib-compile-resources.c:460 +#: gio/glib-compile-resources.c:457 #, c-format msgid "Error reading file %s: %s" msgstr "Galat saat membaca berkas %s: %s" -#: gio/glib-compile-resources.c:480 +#: gio/glib-compile-resources.c:477 #, c-format msgid "Error compressing file %s" msgstr "Galat saat memampatkan berkas %s" -#: gio/glib-compile-resources.c:541 +#: gio/glib-compile-resources.c:538 #, c-format msgid "text may not appear inside <%s>" msgstr "teks tidak boleh muncul di dalam <%s>" -#: gio/glib-compile-resources.c:737 gio/glib-compile-schemas.c:2141 +#: gio/glib-compile-resources.c:734 gio/glib-compile-schemas.c:2172 msgid "Show program version and exit" msgstr "Tampilkan versi program dan keluar" -#: gio/glib-compile-resources.c:738 +#: gio/glib-compile-resources.c:735 msgid "Name of the output file" msgstr "Nama berkas keluaran" -#: gio/glib-compile-resources.c:739 +#: gio/glib-compile-resources.c:736 msgid "" "The directories to load files referenced in FILE from (default: current " "directory)" @@ -2312,48 +2313,48 @@ msgstr "" "Direktori untuk memuat berkas yang direferensikan dalam FILE darinya " "(bawaan: direktori saat ini)" -#: gio/glib-compile-resources.c:739 gio/glib-compile-schemas.c:2142 -#: gio/glib-compile-schemas.c:2171 +#: gio/glib-compile-resources.c:736 gio/glib-compile-schemas.c:2173 +#: gio/glib-compile-schemas.c:2202 msgid "DIRECTORY" msgstr "DIREKTORI" -#: gio/glib-compile-resources.c:740 +#: gio/glib-compile-resources.c:737 msgid "" "Generate output in the format selected for by the target filename extension" msgstr "" "Buat keluaran dalam format yang dipilih bagi ekstensi nama berkas target" -#: gio/glib-compile-resources.c:741 +#: gio/glib-compile-resources.c:738 msgid "Generate source header" msgstr "Buat tajuk sumber" -#: gio/glib-compile-resources.c:742 +#: gio/glib-compile-resources.c:739 msgid "Generate source code used to link in the resource file into your code" msgstr "" "Buat kode sumber yang dipakai untutk menaut berkas sumber daya ke dalam kode " "Anda" -#: gio/glib-compile-resources.c:743 +#: gio/glib-compile-resources.c:740 msgid "Generate dependency list" msgstr "Buat daftar kebergantungan" -#: gio/glib-compile-resources.c:744 +#: gio/glib-compile-resources.c:741 msgid "Name of the dependency file to generate" msgstr "Nama berkas kebergantungan yang akan dibuat" -#: gio/glib-compile-resources.c:745 +#: gio/glib-compile-resources.c:742 msgid "Include phony targets in the generated dependency file" msgstr "Sertakan target palsu pada berkas dependensi yang dihasilkan" -#: gio/glib-compile-resources.c:746 +#: gio/glib-compile-resources.c:743 msgid "Don’t automatically create and register resource" msgstr "Jangan buat dan daftarkan sumber daya secara otomatis" -#: gio/glib-compile-resources.c:747 +#: gio/glib-compile-resources.c:744 msgid "Don’t export functions; declare them G_GNUC_INTERNAL" msgstr "Jangan ekspor fungsi; deklarasikan mereka G_GNUC_INTERNAL" -#: gio/glib-compile-resources.c:748 +#: gio/glib-compile-resources.c:745 msgid "" "Don’t embed resource data in the C file; assume it's linked externally " "instead" @@ -2361,11 +2362,11 @@ msgstr "" "Jangan menyematkan data sumber daya dalam berkas C; anggap itu terhubung " "secara eksternal sebagai gantinya" -#: gio/glib-compile-resources.c:749 +#: gio/glib-compile-resources.c:746 msgid "C identifier name used for the generated source code" msgstr "Nama identifier C yang dipakai bagi kode sumber yang dibuat" -#: gio/glib-compile-resources.c:775 +#: gio/glib-compile-resources.c:772 msgid "" "Compile a resource specification into a resource file.\n" "Resource specification files have the extension .gresource.xml,\n" @@ -2375,123 +2376,123 @@ msgstr "" "Berkas spesifikasi sumber daya memiliki ekstensi .gresource.xml,\n" "dan berkas sumber daya memiliki ekstensi bernama .gresource." -#: gio/glib-compile-resources.c:797 +#: gio/glib-compile-resources.c:794 msgid "You should give exactly one file name\n" msgstr "Anda mesti memberikan hanya satu nama berkas\n" -#: gio/glib-compile-schemas.c:95 +#: gio/glib-compile-schemas.c:92 #, c-format msgid "nick must be a minimum of 2 characters" msgstr "nick minimal harus 2 karakter" -#: gio/glib-compile-schemas.c:106 +#: gio/glib-compile-schemas.c:103 #, c-format msgid "Invalid numeric value" msgstr "Nilai numerik tidak valid" -#: gio/glib-compile-schemas.c:114 +#: gio/glib-compile-schemas.c:111 #, c-format msgid "<value nick='%s'/> already specified" msgstr "<value nick='%s'/> sudah ditentukan" -#: gio/glib-compile-schemas.c:122 +#: gio/glib-compile-schemas.c:119 #, c-format msgid "value='%s' already specified" msgstr "value='%s' sudah ditentukan" -#: gio/glib-compile-schemas.c:136 +#: gio/glib-compile-schemas.c:133 #, c-format msgid "flags values must have at most 1 bit set" msgstr "nilai tanda harus paling banyak diset 1 bit" -#: gio/glib-compile-schemas.c:161 +#: gio/glib-compile-schemas.c:158 #, c-format msgid "<%s> must contain at least one <value>" msgstr "<%s> harus berisi setidaknya satu <value>" -#: gio/glib-compile-schemas.c:317 +#: gio/glib-compile-schemas.c:314 #, c-format msgid "<%s> is not contained in the specified range" msgstr "<%s> tidak terdapat dalam jangkauan yang ditentukan" -#: gio/glib-compile-schemas.c:329 +#: gio/glib-compile-schemas.c:326 #, c-format msgid "<%s> is not a valid member of the specified enumerated type" msgstr "<%s> bukan anggota yang valid dari tipe enumerasi yang ditentukan" -#: gio/glib-compile-schemas.c:335 +#: gio/glib-compile-schemas.c:332 #, c-format msgid "<%s> contains string not in the specified flags type" msgstr "<%s> berisi string tidak dalam jenis tanda yang ditentukan" -#: gio/glib-compile-schemas.c:341 +#: gio/glib-compile-schemas.c:338 #, c-format msgid "<%s> contains a string not in <choices>" msgstr "<%s> berisi string yang tidak ada dalam <choices>" -#: gio/glib-compile-schemas.c:375 +#: gio/glib-compile-schemas.c:372 msgid "<range/> already specified for this key" msgstr "<range/> sudah ditentukan untuk kunci ini" -#: gio/glib-compile-schemas.c:393 +#: gio/glib-compile-schemas.c:390 #, c-format msgid "<range> not allowed for keys of type “%s”" msgstr "<range> tidak diizinkan untuk kunci tipe \"%s\"" -#: gio/glib-compile-schemas.c:410 +#: gio/glib-compile-schemas.c:407 #, c-format msgid "<range> specified minimum is greater than maximum" msgstr "<range> minimum yang ditentukan lebih besar dari maksimum" -#: gio/glib-compile-schemas.c:435 +#: gio/glib-compile-schemas.c:432 #, c-format msgid "unsupported l10n category: %s" msgstr "kategori l10n tidak didukung: %s" -#: gio/glib-compile-schemas.c:443 +#: gio/glib-compile-schemas.c:440 msgid "l10n requested, but no gettext domain given" msgstr "l10n diminta, tapi tidak ada domain gettext yang diberikan" -#: gio/glib-compile-schemas.c:455 +#: gio/glib-compile-schemas.c:452 msgid "translation context given for value without l10n enabled" msgstr "konteks terjemahan diberikan untuk nilai tanpa l10n diaktifkan" -#: gio/glib-compile-schemas.c:477 +#: gio/glib-compile-schemas.c:474 #, c-format msgid "Failed to parse <default> value of type “%s”: " msgstr "Gagal mengurai <default> nilai jenis \"%s\": " -#: gio/glib-compile-schemas.c:494 +#: gio/glib-compile-schemas.c:491 msgid "" "<choices> cannot be specified for keys tagged as having an enumerated type" msgstr "" "<choices> tidak dapat ditentukan untuk kunci yang ditandai sebagai memiliki " "tipe enumerasi" -#: gio/glib-compile-schemas.c:503 +#: gio/glib-compile-schemas.c:500 msgid "<choices> already specified for this key" msgstr "<choices> sudah ditentukan untuk kunci ini" -#: gio/glib-compile-schemas.c:515 +#: gio/glib-compile-schemas.c:512 #, c-format msgid "<choices> not allowed for keys of type “%s”" msgstr "<choices> tidak diizinkan untuk kunci tipe \"%s\"" -#: gio/glib-compile-schemas.c:531 +#: gio/glib-compile-schemas.c:528 #, c-format msgid "<choice value='%s'/> already given" msgstr "<choice value='%s'/> sudah ditentukan" -#: gio/glib-compile-schemas.c:546 +#: gio/glib-compile-schemas.c:543 #, c-format msgid "<choices> must contain at least one <choice>" msgstr "<choices> harus mengandung setidaknya satu <choice>" -#: gio/glib-compile-schemas.c:560 +#: gio/glib-compile-schemas.c:557 msgid "<aliases> already specified for this key" msgstr "<aliases> sudah ditentukan untuk kunci ini" -#: gio/glib-compile-schemas.c:564 +#: gio/glib-compile-schemas.c:561 msgid "" "<aliases> can only be specified for keys with enumerated or flags types or " "after <choices>" @@ -2499,7 +2500,7 @@ msgstr "" "<aliases> hanya bisa ditentukan untuk kunci dengan tipe enumerasi atau tanda " "atau setelah <choices>" -#: gio/glib-compile-schemas.c:583 +#: gio/glib-compile-schemas.c:580 #, c-format msgid "" "<alias value='%s'/> given when “%s” is already a member of the enumerated " @@ -2508,42 +2509,42 @@ msgstr "" "<alias value='%s'/> diberikan saat \"%s\" sudah menjadi anggota tipe " "enumerasi" -#: gio/glib-compile-schemas.c:589 +#: gio/glib-compile-schemas.c:586 #, c-format msgid "<alias value='%s'/> given when <choice value='%s'/> was already given" msgstr "" "<alias value='%s'/> diberikan ketika <choice value='%s'/> sudah diberikan" -#: gio/glib-compile-schemas.c:597 +#: gio/glib-compile-schemas.c:594 #, c-format msgid "<alias value='%s'/> already specified" msgstr "<alias value='%s'/> sudah ditentukan" -#: gio/glib-compile-schemas.c:607 +#: gio/glib-compile-schemas.c:604 #, c-format msgid "alias target “%s” is not in enumerated type" msgstr "target alias \"%s\" bukan bilangan bertanda" -#: gio/glib-compile-schemas.c:608 +#: gio/glib-compile-schemas.c:605 #, c-format msgid "alias target “%s” is not in <choices>" msgstr "alias target \"%s\" tidak ada di <choices>" -#: gio/glib-compile-schemas.c:623 +#: gio/glib-compile-schemas.c:620 #, c-format msgid "<aliases> must contain at least one <alias>" msgstr "<aliases> harus berisi setidaknya satu <alias>" -#: gio/glib-compile-schemas.c:800 +#: gio/glib-compile-schemas.c:797 msgid "Empty names are not permitted" msgstr "Nama yang kosong tidak diperbolehkan" -#: gio/glib-compile-schemas.c:810 +#: gio/glib-compile-schemas.c:807 #, c-format msgid "Invalid name “%s”: names must begin with a lowercase letter" msgstr "Nama \"%s\" tak valid: nama mesti diawali dengan huruf kecil" -#: gio/glib-compile-schemas.c:822 +#: gio/glib-compile-schemas.c:819 #, c-format msgid "" "Invalid name “%s”: invalid character “%c”; only lowercase letters, numbers " @@ -2552,38 +2553,38 @@ msgstr "" "Nama \"%s\" tak valid: karakter \"%c\" tak valid; hanya huruf kecil, angka, " "dan tanda hubung (\"-\") yang diijinkan" -#: gio/glib-compile-schemas.c:831 +#: gio/glib-compile-schemas.c:828 #, c-format msgid "Invalid name “%s”: two successive hyphens (“--”) are not permitted" msgstr "" "Nama \"%s\" tak valid: dua tanda hubung berturutan (\"--\") tak diijinkan" -#: gio/glib-compile-schemas.c:840 +#: gio/glib-compile-schemas.c:837 #, c-format msgid "Invalid name “%s”: the last character may not be a hyphen (“-”)" msgstr "" "Nama \"%s\" tak valid: karakter terakhir tak boleh tanda hubung (\"-\")." -#: gio/glib-compile-schemas.c:848 +#: gio/glib-compile-schemas.c:845 #, c-format msgid "Invalid name “%s”: maximum length is 1024" msgstr "Nama \"%s\" tak valid: panjang maksimum 1024" -#: gio/glib-compile-schemas.c:920 +#: gio/glib-compile-schemas.c:917 #, c-format msgid "<child name='%s'> already specified" msgstr "<child name='%s'> telah dinyatakan" -#: gio/glib-compile-schemas.c:946 +#: gio/glib-compile-schemas.c:943 msgid "Cannot add keys to a “list-of” schema" msgstr "Tak bisa menambah kunci ke skema \"list-of\"" -#: gio/glib-compile-schemas.c:957 +#: gio/glib-compile-schemas.c:954 #, c-format msgid "<key name='%s'> already specified" msgstr "<key name='%s'> telah dinyatakan" -#: gio/glib-compile-schemas.c:975 +#: gio/glib-compile-schemas.c:972 #, c-format msgid "" "<key name='%s'> shadows <key name='%s'> in <schema id='%s'>; use <override> " @@ -2592,7 +2593,7 @@ msgstr "" "<key name='%s'> membayangi <key name='%s'> di <schema id='%s'>; gunakan " "<override> untuk mengubah nilai" -#: gio/glib-compile-schemas.c:986 +#: gio/glib-compile-schemas.c:983 #, c-format msgid "" "Exactly one of “type”, “enum” or “flags” must be specified as an attribute " @@ -2601,63 +2602,63 @@ msgstr "" "Persis satu dari 'type', 'enum', atau 'flags' mesti dinyatakan sebagai " "atribut dari <key>" -#: gio/glib-compile-schemas.c:1005 +#: gio/glib-compile-schemas.c:1002 #, c-format msgid "<%s id='%s'> not (yet) defined." msgstr "<%s id='%s'> belum didefinisikan." -#: gio/glib-compile-schemas.c:1020 +#: gio/glib-compile-schemas.c:1017 #, c-format msgid "Invalid GVariant type string “%s”" msgstr "String jenis GVariant \"%s\" tidak sah" -#: gio/glib-compile-schemas.c:1050 +#: gio/glib-compile-schemas.c:1047 msgid "<override> given but schema isn’t extending anything" msgstr "<override> diberikan tapi skema tak memperluas apapun" -#: gio/glib-compile-schemas.c:1063 +#: gio/glib-compile-schemas.c:1060 #, c-format msgid "No <key name='%s'> to override" msgstr "Tak ada <key name='%s'> untuk ditimpa" -#: gio/glib-compile-schemas.c:1071 +#: gio/glib-compile-schemas.c:1068 #, c-format msgid "<override name='%s'> already specified" msgstr "<override name='%s'> telah dinyatakan" -#: gio/glib-compile-schemas.c:1144 +#: gio/glib-compile-schemas.c:1141 #, c-format msgid "<schema id='%s'> already specified" msgstr "<schema id='%s'> sudah ditentukan" -#: gio/glib-compile-schemas.c:1156 +#: gio/glib-compile-schemas.c:1153 #, c-format msgid "<schema id='%s'> extends not yet existing schema “%s”" msgstr "<schema id='%s'> memperluas skema \"%s\" yang belum ada" -#: gio/glib-compile-schemas.c:1172 +#: gio/glib-compile-schemas.c:1169 #, c-format msgid "<schema id='%s'> is list of not yet existing schema “%s”" msgstr "<schema id='%s'> adalah daftar dari skema \"%s\"' yang belum ada" -#: gio/glib-compile-schemas.c:1180 +#: gio/glib-compile-schemas.c:1177 #, c-format msgid "Cannot be a list of a schema with a path" msgstr "Tak mungkin berupa suatu daftar skema dengan path" -#: gio/glib-compile-schemas.c:1190 +#: gio/glib-compile-schemas.c:1187 #, c-format msgid "Cannot extend a schema with a path" msgstr "Tak bisa memperluas suatu skema dengan path" -#: gio/glib-compile-schemas.c:1200 +#: gio/glib-compile-schemas.c:1197 #, c-format msgid "" "<schema id='%s'> is a list, extending <schema id='%s'> which is not a list" msgstr "" "<schema id='%s'> adalah daftar, memperluas <schema id='%s'> yang bukan daftar" -#: gio/glib-compile-schemas.c:1210 +#: gio/glib-compile-schemas.c:1207 #, c-format msgid "" "<schema id='%s' list-of='%s'> extends <schema id='%s' list-of='%s'> but “%s” " @@ -2666,18 +2667,18 @@ msgstr "" "<schema id='%s' list-of='%s'> memperluas <schema id='%s' list-of='%s'> tapi " "\"%s\" tak memperluas \"%s\"" -#: gio/glib-compile-schemas.c:1227 +#: gio/glib-compile-schemas.c:1224 #, c-format msgid "A path, if given, must begin and end with a slash" msgstr "" "Suatu path, bila diberikan, harus dimulai dan diakhiri dengan garis miring" -#: gio/glib-compile-schemas.c:1234 +#: gio/glib-compile-schemas.c:1231 #, c-format msgid "The path of a list must end with “:/”" msgstr "Path dari suatu daftar mesti diakhiri dengan “:/”" -#: gio/glib-compile-schemas.c:1243 +#: gio/glib-compile-schemas.c:1240 #, c-format msgid "" "Warning: Schema “%s” has path “%s”. Paths starting with “/apps/”, “/" @@ -2686,128 +2687,157 @@ msgstr "" "Peringatan: Skema \"%s\" memiliki path \"%s\". Path yang dimulai dengan \"/" "apps/\", \"/desktop/\" atau \"/system/\" tidak digunakan lagi." -#: gio/glib-compile-schemas.c:1273 +#: gio/glib-compile-schemas.c:1270 #, c-format msgid "<%s id='%s'> already specified" msgstr "<%s id='%s'> sudah ditentukan" -#: gio/glib-compile-schemas.c:1423 gio/glib-compile-schemas.c:1439 +#: gio/glib-compile-schemas.c:1420 gio/glib-compile-schemas.c:1436 #, c-format msgid "Only one <%s> element allowed inside <%s>" msgstr "Hanya satu elemen <%s> diizinkan di dalam <%s>" -#: gio/glib-compile-schemas.c:1521 +#: gio/glib-compile-schemas.c:1518 #, c-format msgid "Element <%s> not allowed at the top level" msgstr "Elemen <%s> tidak diijinkan pada aras puncak" -#: gio/glib-compile-schemas.c:1539 +#: gio/glib-compile-schemas.c:1536 msgid "Element <default> is required in <key>" msgstr "Elemen <default> diperlukan di <key>" -#: gio/glib-compile-schemas.c:1629 +#: gio/glib-compile-schemas.c:1626 #, c-format msgid "Text may not appear inside <%s>" msgstr "Teks tidak boleh muncul di dalam <%s>" -#: gio/glib-compile-schemas.c:1697 +#: gio/glib-compile-schemas.c:1694 #, c-format msgid "Warning: undefined reference to <schema id='%s'/>" msgstr "Peringatan: referensi terdefinisi ke <schema id='%s'/>" #. Translators: Do not translate "--strict". -#: gio/glib-compile-schemas.c:1836 gio/glib-compile-schemas.c:1912 -#: gio/glib-compile-schemas.c:2027 -#, c-format -msgid "--strict was specified; exiting.\n" -msgstr "--strict dinyatakan; keluar.\n" +#: gio/glib-compile-schemas.c:1833 gio/glib-compile-schemas.c:1912 +msgid "--strict was specified; exiting." +msgstr "--strict dinyatakan; keluar." -#: gio/glib-compile-schemas.c:1846 -#, c-format -msgid "This entire file has been ignored.\n" -msgstr "Seluruh berkas telah diabaikan.\n" +#: gio/glib-compile-schemas.c:1845 +msgid "This entire file has been ignored." +msgstr "Seluruh berkas telah diabaikan." #: gio/glib-compile-schemas.c:1908 +msgid "Ignoring this file." +msgstr "Mengabaikan berkas ini." + +#: gio/glib-compile-schemas.c:1963 #, c-format -msgid "Ignoring this file.\n" -msgstr "Mengabaikan berkas ini.\n" +msgid "" +"No such key “%s” in schema “%s” as specified in override file “%s”; ignoring " +"override for this key." +msgstr "" +"Tak ada kunci “%s” dalam skema “%s” sebagaimana dinyatakan di berkas penimpa " +"“%s”; mengabaikan penimpa untuk kunci ini." -#: gio/glib-compile-schemas.c:1961 +#: gio/glib-compile-schemas.c:1971 #, c-format -msgid "No such key “%s” in schema “%s” as specified in override file “%s”" +msgid "" +"No such key “%s” in schema “%s” as specified in override file “%s” and --" +"strict was specified; exiting." msgstr "" "Tak ada kunci “%s” dalam skema “%s” sebagaimana dinyatakan di berkas penimpa " -"“%s”" +"“%s” dan --strict dinyatakan; keluar." -#: gio/glib-compile-schemas.c:1967 gio/glib-compile-schemas.c:1992 -#: gio/glib-compile-schemas.c:2052 gio/glib-compile-schemas.c:2081 +#: gio/glib-compile-schemas.c:1993 #, c-format -msgid "; ignoring override for this key.\n" -msgstr "; mengabaikan penimpaan kunci ini.\n" +msgid "" +"Cannot provide per-desktop overrides for localised key “%s” in schema " +"“%s” (override file “%s”); ignoring override for this key." +msgstr "" +"Tidak dapat menyediakan penimpa per-destop untuk kunci \"%s\" yang " +"dilokalkan dalam skema \"%s\" (menimpa berkas \"%s\"); mengabaikan penimpa " +"untuk kunci ini." -#: gio/glib-compile-schemas.c:1971 gio/glib-compile-schemas.c:1996 -#: gio/glib-compile-schemas.c:2056 gio/glib-compile-schemas.c:2085 +#: gio/glib-compile-schemas.c:2002 #, c-format -msgid " and --strict was specified; exiting.\n" -msgstr " dan --strict dinyatakan; keluar.\n" +msgid "" +"Cannot provide per-desktop overrides for localised key “%s” in schema " +"“%s” (override file “%s”) and --strict was specified; exiting." +msgstr "" +"Tidak dapat menyediakan penimpa per-destop untuk kunci \"%s\" yang " +"dilokalkan dalam skema \"%s\" (menimpa berkas \"%s\") dan --strict " +"dinyatakan; keluar." -#: gio/glib-compile-schemas.c:1986 +#: gio/glib-compile-schemas.c:2026 #, c-format msgid "" -"cannot provide per-desktop overrides for localised key “%s” in schema " -"“%s” (override file “%s”)" +"Error parsing key “%s” in schema “%s” as specified in override file “%s”: " +"%s. Ignoring override for this key." msgstr "" -"tidak dapat menyediakan penimpa per-destop untuk kunci \"%s\" yang " -"dilokalkan dalam skema \"%s\" (menimpa berkas \"%s\")" +"Galat saat mengurai kunci “%s” dalam skema “%s” sebagaimana dinyatakan di " +"berkas penimpa “%s”: %s. Mengabaikan penimpa untuk kunci ini." -#: gio/glib-compile-schemas.c:2013 +#: gio/glib-compile-schemas.c:2038 #, c-format msgid "" -"error parsing key “%s” in schema “%s” as specified in override file “%s”: %s." +"Error parsing key “%s” in schema “%s” as specified in override file “%s”: " +"%s. --strict was specified; exiting." msgstr "" -"galat saat mengurai kunci “%s” dalam skema “%s” sebagaimana dinyatakan di " -"berkas penimpa “%s”: %s." +"Galat saat mengurai kunci “%s” dalam skema “%s” sebagaimana dinyatakan di " +"berkas penimpa “%s”: %s. dan --strict dinyatakan; keluar." -#: gio/glib-compile-schemas.c:2023 +#: gio/glib-compile-schemas.c:2065 #, c-format -msgid "Ignoring override for this key.\n" -msgstr "Mengabaikan penimpaan bagi kunci ini.\n" +msgid "" +"Override for key “%s” in schema “%s” in override file “%s” is outside the " +"range given in the schema; ignoring override for this key." +msgstr "" +"Penimpa bagi kunci “%s” dalam skema “%s” di berkas penimpa “%s” di luar " +"jangkauan yang diberikan di dalam skema; mengabaikan penimpa untuk kunci ini." + +#: gio/glib-compile-schemas.c:2075 +#, c-format +msgid "" +"Override for key “%s” in schema “%s” in override file “%s” is outside the " +"range given in the schema and --strict was specified; exiting." +msgstr "" +"Penimpa bagi kunci “%s” dalam skema “%s” di berkas penimpa “%s” di luar " +"jangkauan yang diberikan di dalam skema dan --strict dinyatakan; keluar." -#: gio/glib-compile-schemas.c:2042 +#: gio/glib-compile-schemas.c:2101 #, c-format msgid "" -"override for key “%s” in schema “%s” in override file “%s” is outside the " -"range given in the schema" +"Override for key “%s” in schema “%s” in override file “%s” is not in the " +"list of valid choices; ignoring override for this key." msgstr "" -"penimpa bagi kunci “%s” dalam skema “%s” di berkas penimpa “%s” di luar " -"jangkauan yang diberikan di dalam skema" +"Penimpa bagi kunci “%s” dalam skema “%s” di berkas penimpa “%s” tak ada di " +"dalam daftar pilihan yang valid; mengabaikan penimpa untuk kunci ini." -#: gio/glib-compile-schemas.c:2071 +#: gio/glib-compile-schemas.c:2111 #, c-format msgid "" -"override for key “%s” in schema “%s” in override file “%s” is not in the " -"list of valid choices" +"Override for key “%s” in schema “%s” in override file “%s” is not in the " +"list of valid choices and --strict was specified; exiting." msgstr "" -"penimpa bagi kunci “%s” dalam skema “%s” di berkas penimpa “%s” tak ada di " -"dalam daftar pilihan yang valid" +"Penimpa bagi kunci “%s” dalam skema “%s” di berkas penimpa “%s” tak ada di " +"dalam daftar pilihan yang valid dan --strict dinyatakan; keluar." -#: gio/glib-compile-schemas.c:2142 -msgid "where to store the gschemas.compiled file" -msgstr "dimana menyimpan berkas gschemas.compiled" +#: gio/glib-compile-schemas.c:2173 +msgid "Where to store the gschemas.compiled file" +msgstr "Dimana menyimpan berkas gschemas.compiled" -#: gio/glib-compile-schemas.c:2143 +#: gio/glib-compile-schemas.c:2174 msgid "Abort on any errors in schemas" msgstr "Gugurkan pada sebarang galat dalam skema" -#: gio/glib-compile-schemas.c:2144 +#: gio/glib-compile-schemas.c:2175 msgid "Do not write the gschema.compiled file" msgstr "Jangan menulis berkas gschema.compiled" -#: gio/glib-compile-schemas.c:2145 +#: gio/glib-compile-schemas.c:2176 msgid "Do not enforce key name restrictions" msgstr "Jangan paksakan pembatasan nama kunci" -#: gio/glib-compile-schemas.c:2174 +#: gio/glib-compile-schemas.c:2205 msgid "" "Compile all GSettings schema files into a schema cache.\n" "Schema files are required to have the extension .gschema.xml,\n" @@ -2817,25 +2847,19 @@ msgstr "" "Berkas skema diharuskan memiliki ekstensi .gschema.xml,\n" "dan berkas singgahan dinamai gschemas.compiled." -#: gio/glib-compile-schemas.c:2195 -#, c-format -msgid "You should give exactly one directory name\n" -msgstr "Anda mesti memberikan hanya satu nama direktori\n" +#: gio/glib-compile-schemas.c:2226 +msgid "You should give exactly one directory name" +msgstr "Anda mesti memberikan hanya satu nama direktori" -#: gio/glib-compile-schemas.c:2237 -#, c-format -msgid "No schema files found: " -msgstr "Tidak menemukan berkas skema: " +#: gio/glib-compile-schemas.c:2269 +msgid "No schema files found: doing nothing." +msgstr "Tidak ada berkas skema yang ditemukan: tidak melakukan apa pun." -#: gio/glib-compile-schemas.c:2240 -#, c-format -msgid "doing nothing.\n" -msgstr "tak melakukan apapun.\n" - -#: gio/glib-compile-schemas.c:2243 -#, c-format -msgid "removed existing output file.\n" -msgstr "menghapus berkas keluaran yang telah ada.\n" +#: gio/glib-compile-schemas.c:2271 +msgid "No schema files found: removed existing output file." +msgstr "" +"Tidak ada berkas skema yang ditemukan: menghapus berkas keluaran yang telah " +"ada." #: gio/glocalfile.c:546 gio/win32/gwinhttpfile.c:420 #, c-format @@ -2870,7 +2894,7 @@ msgid "Can’t rename file, filename already exists" msgstr "Tidak bisa mengubah nama berkas, nama telah dipakai" #: gio/glocalfile.c:1213 gio/glocalfile.c:2322 gio/glocalfile.c:2350 -#: gio/glocalfile.c:2507 gio/glocalfileoutputstream.c:646 +#: gio/glocalfile.c:2507 gio/glocalfileoutputstream.c:647 msgid "Invalid filename" msgstr "Nama berkas tak valid" @@ -2959,9 +2983,9 @@ msgstr "Galat saat memindah berkas %s: %s" msgid "Can’t move directory over directory" msgstr "Tidak bisa memindah direktori atas direktori" -#: gio/glocalfile.c:2467 gio/glocalfileoutputstream.c:1030 -#: gio/glocalfileoutputstream.c:1044 gio/glocalfileoutputstream.c:1059 -#: gio/glocalfileoutputstream.c:1076 gio/glocalfileoutputstream.c:1090 +#: gio/glocalfile.c:2467 gio/glocalfileoutputstream.c:1031 +#: gio/glocalfileoutputstream.c:1045 gio/glocalfileoutputstream.c:1060 +#: gio/glocalfileoutputstream.c:1077 gio/glocalfileoutputstream.c:1091 msgid "Backup file creation failed" msgstr "Pembuatan berkas cadangan gagal" @@ -3000,7 +3024,7 @@ msgstr "Galat saat menata atribut yang diperluas \"%s\": %s" msgid " (invalid encoding)" msgstr " (pengkodean tak valid)" -#: gio/glocalfileinfo.c:1798 gio/glocalfileoutputstream.c:908 +#: gio/glocalfileinfo.c:1798 gio/glocalfileoutputstream.c:909 #, c-format msgid "Error when getting information for file “%s”: %s" msgstr "Galat saat mengambil informasi bagi berkas \"%s\": %s" @@ -3073,20 +3097,20 @@ msgstr "SELinux tak diaktifkan di sistem ini" msgid "Setting attribute %s not supported" msgstr "Penataan atribut %s tak didukung" -#: gio/glocalfileinputstream.c:168 gio/glocalfileoutputstream.c:791 +#: gio/glocalfileinputstream.c:168 gio/glocalfileoutputstream.c:792 #, c-format msgid "Error reading from file: %s" msgstr "Galat saat membaca dari berkas: %s" #: gio/glocalfileinputstream.c:199 gio/glocalfileinputstream.c:211 #: gio/glocalfileinputstream.c:225 gio/glocalfileinputstream.c:333 -#: gio/glocalfileoutputstream.c:553 gio/glocalfileoutputstream.c:1108 +#: gio/glocalfileoutputstream.c:554 gio/glocalfileoutputstream.c:1109 #, c-format msgid "Error seeking in file: %s" msgstr "Galat saat men-seek di berkas: %s" -#: gio/glocalfileinputstream.c:255 gio/glocalfileoutputstream.c:343 -#: gio/glocalfileoutputstream.c:437 +#: gio/glocalfileinputstream.c:255 gio/glocalfileoutputstream.c:344 +#: gio/glocalfileoutputstream.c:438 #, c-format msgid "Error closing file: %s" msgstr "Galat saat menutup berkas: %s" @@ -3095,51 +3119,51 @@ msgstr "Galat saat menutup berkas: %s" msgid "Unable to find default local file monitor type" msgstr "Tak bisa temukan tipe pemantauan berkas lokal baku" -#: gio/glocalfileoutputstream.c:208 gio/glocalfileoutputstream.c:286 -#: gio/glocalfileoutputstream.c:323 gio/glocalfileoutputstream.c:812 +#: gio/glocalfileoutputstream.c:209 gio/glocalfileoutputstream.c:287 +#: gio/glocalfileoutputstream.c:324 gio/glocalfileoutputstream.c:813 #, c-format msgid "Error writing to file: %s" msgstr "Galat saat menulis ke berkas: %s" -#: gio/glocalfileoutputstream.c:370 +#: gio/glocalfileoutputstream.c:371 #, c-format msgid "Error removing old backup link: %s" msgstr "Galat saat menghapus taut cadangan lama: %s" -#: gio/glocalfileoutputstream.c:384 gio/glocalfileoutputstream.c:397 +#: gio/glocalfileoutputstream.c:385 gio/glocalfileoutputstream.c:398 #, c-format msgid "Error creating backup copy: %s" msgstr "Galat saat membuat salinan cadangan: %s" -#: gio/glocalfileoutputstream.c:415 +#: gio/glocalfileoutputstream.c:416 #, c-format msgid "Error renaming temporary file: %s" msgstr "Galat saat mengubah nama berkas sementara: %s" -#: gio/glocalfileoutputstream.c:599 gio/glocalfileoutputstream.c:1159 +#: gio/glocalfileoutputstream.c:600 gio/glocalfileoutputstream.c:1160 #, c-format msgid "Error truncating file: %s" msgstr "Galat saat memenggal berkas: %s" -#: gio/glocalfileoutputstream.c:652 gio/glocalfileoutputstream.c:890 -#: gio/glocalfileoutputstream.c:1140 gio/gsubprocess.c:380 +#: gio/glocalfileoutputstream.c:653 gio/glocalfileoutputstream.c:891 +#: gio/glocalfileoutputstream.c:1141 gio/gsubprocess.c:380 #, c-format msgid "Error opening file “%s”: %s" msgstr "Galat saat membuka berkas \"%s\": %s" -#: gio/glocalfileoutputstream.c:921 +#: gio/glocalfileoutputstream.c:922 msgid "Target file is a directory" msgstr "Berkas tujuan adalah suatu direktori" -#: gio/glocalfileoutputstream.c:926 +#: gio/glocalfileoutputstream.c:927 msgid "Target file is not a regular file" msgstr "Berkas tujuan bukan berkas biasa" -#: gio/glocalfileoutputstream.c:938 +#: gio/glocalfileoutputstream.c:939 msgid "The file was externally modified" msgstr "Berkas telah diubah secara eksternal" -#: gio/glocalfileoutputstream.c:1124 +#: gio/glocalfileoutputstream.c:1125 #, c-format msgid "Error removing old file: %s" msgstr "Galat saat menghapus berkas lama: %s" @@ -3229,7 +3253,7 @@ msgstr "mount tak mengimplementasi penebakan jenis isi" msgid "mount doesn’t implement synchronous content type guessing" msgstr "mount tak mengimplementasi penebakan sinkron jenis isi" -#: gio/gnetworkaddress.c:388 +#: gio/gnetworkaddress.c:415 #, c-format msgid "Hostname “%s” contains “[” but not “]”" msgstr "Nama host \"%s\" mengandung \"[\" tapi tanpa \"]\"" @@ -3256,12 +3280,12 @@ msgstr "Tak bisa membuat pemantau jaringan: " msgid "Could not get network status: " msgstr "Tak bisa mendapat status jaringan: " -#: gio/gnetworkmonitornm.c:314 +#: gio/gnetworkmonitornm.c:347 #, c-format msgid "NetworkManager not running" msgstr "NetworkManager tidak berjalan" -#: gio/gnetworkmonitornm.c:325 +#: gio/gnetworkmonitornm.c:358 #, c-format msgid "NetworkManager version too old" msgstr "Versi NetworkManager terlalu tua" @@ -3279,18 +3303,18 @@ msgstr "Jumlah vektor yang dilewatkan ke %s terlalu besar" msgid "Source stream is already closed" msgstr "Stream sumber telah ditutup" -#: gio/gresolver.c:344 gio/gthreadedresolver.c:150 gio/gthreadedresolver.c:160 +#: gio/gresolver.c:351 gio/gthreadedresolver.c:150 gio/gthreadedresolver.c:168 #, c-format msgid "Error resolving “%s”: %s" msgstr "Galat saat mengurai \"%s\": %s" #. Translators: The placeholder is for a function name. -#: gio/gresolver.c:389 gio/gresolver.c:547 +#: gio/gresolver.c:398 gio/gresolver.c:556 #, c-format msgid "%s not implemented" msgstr "%s tidak diterapkan" -#: gio/gresolver.c:915 gio/gresolver.c:967 +#: gio/gresolver.c:924 gio/gresolver.c:976 msgid "Invalid domain" msgstr "Domain tidak valid" @@ -3316,11 +3340,11 @@ msgstr "Sumber daya pada \"%s\" bukan suatu direktori" msgid "Input stream doesn’t implement seek" msgstr "Stream masukan tidak mengimplementasikan seek" -#: gio/gresource-tool.c:501 +#: gio/gresource-tool.c:499 msgid "List sections containing resources in an elf FILE" msgstr "Seksi daftar memuat sumber daya dalam BERKAS elf" -#: gio/gresource-tool.c:507 +#: gio/gresource-tool.c:505 msgid "" "List resources\n" "If SECTION is given, only list resources in this section\n" @@ -3330,15 +3354,15 @@ msgstr "" "Bila SEKSI diberikan, hanya mendaftar sumber daya dalam seksi ini\n" "Bila PATH diberikan, hanya mendaftar sumber daya yang cocok" -#: gio/gresource-tool.c:510 gio/gresource-tool.c:520 +#: gio/gresource-tool.c:508 gio/gresource-tool.c:518 msgid "FILE [PATH]" msgstr "BERKAS [PATH]" -#: gio/gresource-tool.c:511 gio/gresource-tool.c:521 gio/gresource-tool.c:528 +#: gio/gresource-tool.c:509 gio/gresource-tool.c:519 gio/gresource-tool.c:526 msgid "SECTION" msgstr "SEKSI" -#: gio/gresource-tool.c:516 +#: gio/gresource-tool.c:514 msgid "" "List resources with details\n" "If SECTION is given, only list resources in this section\n" @@ -3350,15 +3374,15 @@ msgstr "" "Bila PATH diberikan, hanya mendaftar sumber daya yang cocok\n" "Rincian termasuk seksi, ukuran, dan kompresi" -#: gio/gresource-tool.c:526 +#: gio/gresource-tool.c:524 msgid "Extract a resource file to stdout" msgstr "Ekstrak berkas sumber daya ke stdout" -#: gio/gresource-tool.c:527 +#: gio/gresource-tool.c:525 msgid "FILE PATH" msgstr "BERKAS PATH" -#: gio/gresource-tool.c:541 +#: gio/gresource-tool.c:539 msgid "" "Usage:\n" " gresource [--section SECTION] COMMAND [ARGS…]\n" @@ -3386,7 +3410,7 @@ msgstr "" "Gunakan 'gresource help PERINTAH' untuk memperoleh bantuan terrinci.\n" "\n" -#: gio/gresource-tool.c:555 +#: gio/gresource-tool.c:553 #, c-format msgid "" "Usage:\n" @@ -3401,19 +3425,19 @@ msgstr "" "%s\n" "\n" -#: gio/gresource-tool.c:562 +#: gio/gresource-tool.c:560 msgid " SECTION An (optional) elf section name\n" msgstr " SEKSI Nama seksi elf (opsional)\n" -#: gio/gresource-tool.c:566 gio/gsettings-tool.c:703 +#: gio/gresource-tool.c:564 gio/gsettings-tool.c:701 msgid " COMMAND The (optional) command to explain\n" msgstr " PERINTAH Perintah (opsional) untuk dijelaskan\n" -#: gio/gresource-tool.c:572 +#: gio/gresource-tool.c:570 msgid " FILE An elf file (a binary or a shared library)\n" msgstr " BERKAS Berkas elf (biner atau pustaka bersama)\n" -#: gio/gresource-tool.c:575 +#: gio/gresource-tool.c:573 msgid "" " FILE An elf file (a binary or a shared library)\n" " or a compiled resource file\n" @@ -3421,83 +3445,83 @@ msgstr "" " BERKAS Berkas elf (biner atau pustaka bersama)\n" " atau berkas sumber daya terkompail\n" -#: gio/gresource-tool.c:579 +#: gio/gresource-tool.c:577 msgid "[PATH]" msgstr "[PATH]" -#: gio/gresource-tool.c:581 +#: gio/gresource-tool.c:579 msgid " PATH An (optional) resource path (may be partial)\n" msgstr " PATH Path sumber daya (opsional, mungkin parsial)\n" -#: gio/gresource-tool.c:582 +#: gio/gresource-tool.c:580 msgid "PATH" msgstr "PATH" -#: gio/gresource-tool.c:584 +#: gio/gresource-tool.c:582 msgid " PATH A resource path\n" msgstr " PATH Path sumber daya\n" -#: gio/gsettings-tool.c:51 gio/gsettings-tool.c:72 gio/gsettings-tool.c:908 +#: gio/gsettings-tool.c:49 gio/gsettings-tool.c:70 gio/gsettings-tool.c:906 #, c-format msgid "No such schema “%s”\n" msgstr "Tidak ada skema \"%s\"\n" -#: gio/gsettings-tool.c:57 +#: gio/gsettings-tool.c:55 #, c-format msgid "Schema “%s” is not relocatable (path must not be specified)\n" msgstr "" "Skema \"%s\" bukan yang dapat dipindahkan (path tak boleh dinyatakan)\n" -#: gio/gsettings-tool.c:78 +#: gio/gsettings-tool.c:76 #, c-format msgid "Schema “%s” is relocatable (path must be specified)\n" msgstr "Skema \"%s\" bukan yang dapat dipindahkan (path mesti dinyatakan)\n" -#: gio/gsettings-tool.c:92 +#: gio/gsettings-tool.c:90 msgid "Empty path given.\n" msgstr "Path yang diberikan kosong.\n" -#: gio/gsettings-tool.c:98 +#: gio/gsettings-tool.c:96 msgid "Path must begin with a slash (/)\n" msgstr "Path harus dimulai dengan garis miring (/)\n" -#: gio/gsettings-tool.c:104 +#: gio/gsettings-tool.c:102 msgid "Path must end with a slash (/)\n" msgstr "Path harus diakhiri dengan garis miring (/)\n" -#: gio/gsettings-tool.c:110 +#: gio/gsettings-tool.c:108 msgid "Path must not contain two adjacent slashes (//)\n" msgstr "Path tak boleh memuat dua slash berturutan (//)\n" -#: gio/gsettings-tool.c:538 +#: gio/gsettings-tool.c:536 msgid "The provided value is outside of the valid range\n" msgstr "Nilai yang diberikan diluar rentang yang valid\n" -#: gio/gsettings-tool.c:545 +#: gio/gsettings-tool.c:543 msgid "The key is not writable\n" msgstr "Kunci tidak dapat ditulisi\n" -#: gio/gsettings-tool.c:581 +#: gio/gsettings-tool.c:579 msgid "List the installed (non-relocatable) schemas" msgstr "Daftar skema (yang tak bisa dipindah) yang terpasang" -#: gio/gsettings-tool.c:587 +#: gio/gsettings-tool.c:585 msgid "List the installed relocatable schemas" msgstr "Daftar skema yang dapat dipindah yang terpasang" -#: gio/gsettings-tool.c:593 +#: gio/gsettings-tool.c:591 msgid "List the keys in SCHEMA" msgstr "Daftar kunci di SKEMA" -#: gio/gsettings-tool.c:594 gio/gsettings-tool.c:600 gio/gsettings-tool.c:643 +#: gio/gsettings-tool.c:592 gio/gsettings-tool.c:598 gio/gsettings-tool.c:641 msgid "SCHEMA[:PATH]" msgstr "SKEMA[:PATH]" -#: gio/gsettings-tool.c:599 +#: gio/gsettings-tool.c:597 msgid "List the children of SCHEMA" msgstr "Daftar anak dari SKEMA" -#: gio/gsettings-tool.c:605 +#: gio/gsettings-tool.c:603 msgid "" "List keys and values, recursively\n" "If no SCHEMA is given, list all keys\n" @@ -3505,48 +3529,48 @@ msgstr "" "Daftar kunci dan nilai, secara rekursif\n" "Bila tak ada SKEMA diberikan, daftar semua kunci\n" -#: gio/gsettings-tool.c:607 +#: gio/gsettings-tool.c:605 msgid "[SCHEMA[:PATH]]" msgstr "[SKEMA[:PATH]]" -#: gio/gsettings-tool.c:612 +#: gio/gsettings-tool.c:610 msgid "Get the value of KEY" msgstr "Ambil nilai dari KUNCI" -#: gio/gsettings-tool.c:613 gio/gsettings-tool.c:619 gio/gsettings-tool.c:625 -#: gio/gsettings-tool.c:637 gio/gsettings-tool.c:649 +#: gio/gsettings-tool.c:611 gio/gsettings-tool.c:617 gio/gsettings-tool.c:623 +#: gio/gsettings-tool.c:635 gio/gsettings-tool.c:647 msgid "SCHEMA[:PATH] KEY" msgstr "SKEMA[:PATH] KUNCI" -#: gio/gsettings-tool.c:618 +#: gio/gsettings-tool.c:616 msgid "Query the range of valid values for KEY" msgstr "Kueri rentang nilai yang valid bagi KUNCI" -#: gio/gsettings-tool.c:624 +#: gio/gsettings-tool.c:622 msgid "Query the description for KEY" msgstr "Kueri deskripsi bagi KUNCI" -#: gio/gsettings-tool.c:630 +#: gio/gsettings-tool.c:628 msgid "Set the value of KEY to VALUE" msgstr "Menata nilai KUNCI ke NILAI" -#: gio/gsettings-tool.c:631 +#: gio/gsettings-tool.c:629 msgid "SCHEMA[:PATH] KEY VALUE" msgstr "SKEMA[:PATH] KUNCI NILAI" -#: gio/gsettings-tool.c:636 +#: gio/gsettings-tool.c:634 msgid "Reset KEY to its default value" msgstr "Menata KUNCI ke nilai bawaannya" -#: gio/gsettings-tool.c:642 +#: gio/gsettings-tool.c:640 msgid "Reset all keys in SCHEMA to their defaults" msgstr "Tata ulang semua kunci dalam SKEMA ke nilai baku" -#: gio/gsettings-tool.c:648 +#: gio/gsettings-tool.c:646 msgid "Check if KEY is writable" msgstr "Periksa apakah KUNCI dapat ditulisi" -#: gio/gsettings-tool.c:654 +#: gio/gsettings-tool.c:652 msgid "" "Monitor KEY for changes.\n" "If no KEY is specified, monitor all keys in SCHEMA.\n" @@ -3556,11 +3580,11 @@ msgstr "" "Bila tak ada KUNCI yang dinyatakan, memantau semua kunci dalam SKEMA.\n" "Gunakan ^C untuk berhenti memantau.\n" -#: gio/gsettings-tool.c:657 +#: gio/gsettings-tool.c:655 msgid "SCHEMA[:PATH] [KEY]" msgstr "SKEMA[:PATH] [KUNCI]" -#: gio/gsettings-tool.c:669 +#: gio/gsettings-tool.c:667 msgid "" "Usage:\n" " gsettings --version\n" @@ -3607,7 +3631,7 @@ msgstr "" "Pakai 'gsettings help PERINTAH' untuk mendapat bantuan terrinci.\n" "\n" -#: gio/gsettings-tool.c:693 +#: gio/gsettings-tool.c:691 #, c-format msgid "" "Usage:\n" @@ -3622,11 +3646,11 @@ msgstr "" "%s\n" "\n" -#: gio/gsettings-tool.c:699 +#: gio/gsettings-tool.c:697 msgid " SCHEMADIR A directory to search for additional schemas\n" msgstr " DIRSKEMA Adalah direktori tempat mencari skema tambahan\n" -#: gio/gsettings-tool.c:707 +#: gio/gsettings-tool.c:705 msgid "" " SCHEMA The name of the schema\n" " PATH The path, for relocatable schemas\n" @@ -3634,239 +3658,239 @@ msgstr "" " SKEMA Nama skema\n" " PATH Path, bagi skema yang dapat dipindah\n" -#: gio/gsettings-tool.c:712 +#: gio/gsettings-tool.c:710 msgid " KEY The (optional) key within the schema\n" msgstr " KUNCI Kunci (opsional) dalam skema\n" -#: gio/gsettings-tool.c:716 +#: gio/gsettings-tool.c:714 msgid " KEY The key within the schema\n" msgstr " KUNCI Kunci dalam skema\n" -#: gio/gsettings-tool.c:720 +#: gio/gsettings-tool.c:718 msgid " VALUE The value to set\n" msgstr " NILAI Tatanan nilai\n" -#: gio/gsettings-tool.c:775 +#: gio/gsettings-tool.c:773 #, c-format msgid "Could not load schemas from %s: %s\n" msgstr "Tidak dapat memuat skema dari %s: %s\n" -#: gio/gsettings-tool.c:787 +#: gio/gsettings-tool.c:785 msgid "No schemas installed\n" msgstr "Tidak ada skema yang terpasang\n" -#: gio/gsettings-tool.c:866 +#: gio/gsettings-tool.c:864 msgid "Empty schema name given\n" msgstr "Nama skema yang diberikan kosong\n" -#: gio/gsettings-tool.c:921 +#: gio/gsettings-tool.c:919 #, c-format msgid "No such key “%s”\n" msgstr "Tidak ada kunci seperti \"%s\"\n" -#: gio/gsocket.c:373 +#: gio/gsocket.c:374 msgid "Invalid socket, not initialized" msgstr "Soket tak valid, tak diinisialisasi" -#: gio/gsocket.c:380 +#: gio/gsocket.c:381 #, c-format msgid "Invalid socket, initialization failed due to: %s" msgstr "Soket tak valid, inisialisasi gagal karena: %s" -#: gio/gsocket.c:388 +#: gio/gsocket.c:389 msgid "Socket is already closed" msgstr "Soket telah ditutup" -#: gio/gsocket.c:403 gio/gsocket.c:3027 gio/gsocket.c:4244 gio/gsocket.c:4302 +#: gio/gsocket.c:404 gio/gsocket.c:3028 gio/gsocket.c:4245 gio/gsocket.c:4303 msgid "Socket I/O timed out" msgstr "I/O soket kehabisan waktu" -#: gio/gsocket.c:538 +#: gio/gsocket.c:539 #, c-format msgid "creating GSocket from fd: %s" msgstr "membuat GSocket dari fd: %s" -#: gio/gsocket.c:567 gio/gsocket.c:621 gio/gsocket.c:628 +#: gio/gsocket.c:568 gio/gsocket.c:622 gio/gsocket.c:629 #, c-format msgid "Unable to create socket: %s" msgstr "Tak bisa membuat soket: %s" -#: gio/gsocket.c:621 +#: gio/gsocket.c:622 msgid "Unknown family was specified" msgstr "Famili tak dikenal dinyatakan" -#: gio/gsocket.c:628 +#: gio/gsocket.c:629 msgid "Unknown protocol was specified" msgstr "Protokol tak dikenal dinyatakan" -#: gio/gsocket.c:1119 +#: gio/gsocket.c:1120 #, c-format msgid "Cannot use datagram operations on a non-datagram socket." msgstr "Tidak bisa memakai operasi datagram pada suatu soket bukan datagram." -#: gio/gsocket.c:1136 +#: gio/gsocket.c:1137 #, c-format msgid "Cannot use datagram operations on a socket with a timeout set." msgstr "" "Tidak bisa memakai operasi datagram pada suatu soket yang tenggang waktunya " "ditata." -#: gio/gsocket.c:1943 +#: gio/gsocket.c:1944 #, c-format msgid "could not get local address: %s" msgstr "tak bisa mendapat alamat lokal: %s" -#: gio/gsocket.c:1989 +#: gio/gsocket.c:1990 #, c-format msgid "could not get remote address: %s" msgstr "tak bisa mendapat alamat jauh: %s" -#: gio/gsocket.c:2055 +#: gio/gsocket.c:2056 #, c-format msgid "could not listen: %s" msgstr "tak bisa mendengarkan: %s" -#: gio/gsocket.c:2157 +#: gio/gsocket.c:2158 #, c-format msgid "Error binding to address: %s" msgstr "Galat saat mengikat ke alamat: %s" -#: gio/gsocket.c:2215 gio/gsocket.c:2252 gio/gsocket.c:2362 gio/gsocket.c:2387 -#: gio/gsocket.c:2460 gio/gsocket.c:2518 gio/gsocket.c:2536 +#: gio/gsocket.c:2216 gio/gsocket.c:2253 gio/gsocket.c:2363 gio/gsocket.c:2388 +#: gio/gsocket.c:2461 gio/gsocket.c:2519 gio/gsocket.c:2537 #, c-format msgid "Error joining multicast group: %s" msgstr "Galat saat bergabung dengan grup multicast: %s" -#: gio/gsocket.c:2216 gio/gsocket.c:2253 gio/gsocket.c:2363 gio/gsocket.c:2388 -#: gio/gsocket.c:2461 gio/gsocket.c:2519 gio/gsocket.c:2537 +#: gio/gsocket.c:2217 gio/gsocket.c:2254 gio/gsocket.c:2364 gio/gsocket.c:2389 +#: gio/gsocket.c:2462 gio/gsocket.c:2520 gio/gsocket.c:2538 #, c-format msgid "Error leaving multicast group: %s" msgstr "Galat saat meninggalkan grup multicast: %s" -#: gio/gsocket.c:2217 +#: gio/gsocket.c:2218 msgid "No support for source-specific multicast" msgstr "Tak ada dukungan bagi multicast spesifik sumber" -#: gio/gsocket.c:2364 +#: gio/gsocket.c:2365 msgid "Unsupported socket family" msgstr "Keluarga soket tak didukung" -#: gio/gsocket.c:2389 +#: gio/gsocket.c:2390 msgid "source-specific not an IPv4 address" msgstr "spesifik sumber bukan alamat IPv4" -#: gio/gsocket.c:2407 gio/gsocket.c:2436 gio/gsocket.c:2486 +#: gio/gsocket.c:2408 gio/gsocket.c:2437 gio/gsocket.c:2487 #, c-format msgid "Interface not found: %s" msgstr "Antarmuka tidak ditemukan: %s" -#: gio/gsocket.c:2423 +#: gio/gsocket.c:2424 #, c-format msgid "Interface name too long" msgstr "Nama antarmuka terlalu panjang" -#: gio/gsocket.c:2462 +#: gio/gsocket.c:2463 msgid "No support for IPv4 source-specific multicast" msgstr "Tak ada dukungan bagi multicast spesifik sumber IPV4" -#: gio/gsocket.c:2520 +#: gio/gsocket.c:2521 msgid "No support for IPv6 source-specific multicast" msgstr "Tak ada dukungan bagi multicast spesifik sumber IPV6" -#: gio/gsocket.c:2729 +#: gio/gsocket.c:2730 #, c-format msgid "Error accepting connection: %s" msgstr "Galat saat menerima sambungan: %s" -#: gio/gsocket.c:2855 +#: gio/gsocket.c:2856 msgid "Connection in progress" msgstr "Penyambungan tengah berlangsung" -#: gio/gsocket.c:2906 +#: gio/gsocket.c:2907 msgid "Unable to get pending error: " msgstr "Tak bisa mendapat kesalahan yang tertunda: " -#: gio/gsocket.c:3092 +#: gio/gsocket.c:3093 #, c-format msgid "Error receiving data: %s" msgstr "Galat saat menerima data: %s" -#: gio/gsocket.c:3289 +#: gio/gsocket.c:3290 #, c-format msgid "Error sending data: %s" msgstr "Galat saat mengirim data: %s" -#: gio/gsocket.c:3476 +#: gio/gsocket.c:3477 #, c-format msgid "Unable to shutdown socket: %s" msgstr "Tak bisa mematikan soket: %s" -#: gio/gsocket.c:3557 +#: gio/gsocket.c:3558 #, c-format msgid "Error closing socket: %s" msgstr "Galat saat menutup soket: %s" -#: gio/gsocket.c:4237 +#: gio/gsocket.c:4238 #, c-format msgid "Waiting for socket condition: %s" msgstr "Menunggu kondisi soket: %s" -#: gio/gsocket.c:4614 gio/gsocket.c:4616 gio/gsocket.c:4762 gio/gsocket.c:4847 -#: gio/gsocket.c:5027 gio/gsocket.c:5067 gio/gsocket.c:5069 +#: gio/gsocket.c:4616 gio/gsocket.c:4618 gio/gsocket.c:4765 gio/gsocket.c:4850 +#: gio/gsocket.c:5028 gio/gsocket.c:5068 gio/gsocket.c:5070 #, c-format msgid "Error sending message: %s" msgstr "Galat saat menerima pesan: %s" -#: gio/gsocket.c:4789 +#: gio/gsocket.c:4792 msgid "GSocketControlMessage not supported on Windows" msgstr "GSocketControlMessage tak didukung pada Windows" -#: gio/gsocket.c:5260 gio/gsocket.c:5333 gio/gsocket.c:5560 +#: gio/gsocket.c:5261 gio/gsocket.c:5334 gio/gsocket.c:5560 #, c-format msgid "Error receiving message: %s" msgstr "Galat saat menerima pesan: %s" -#: gio/gsocket.c:5832 +#: gio/gsocket.c:5841 #, c-format msgid "Unable to read socket credentials: %s" msgstr "Tak bisa membaca kredensial soket: %s" -#: gio/gsocket.c:5841 +#: gio/gsocket.c:5850 msgid "g_socket_get_credentials not implemented for this OS" msgstr "g_socket_get_credentials tidak diimplementasikan untuk OS ini" -#: gio/gsocketclient.c:181 +#: gio/gsocketclient.c:182 #, c-format msgid "Could not connect to proxy server %s: " msgstr "Tak bisa menyambung ke server proxi %s: " -#: gio/gsocketclient.c:195 +#: gio/gsocketclient.c:196 #, c-format msgid "Could not connect to %s: " msgstr "Tak bisa menyambung ke %s: " -#: gio/gsocketclient.c:197 +#: gio/gsocketclient.c:198 msgid "Could not connect: " msgstr "Tak bisa menyambung: " -#: gio/gsocketclient.c:1033 gio/gsocketclient.c:1750 +#: gio/gsocketclient.c:1037 gio/gsocketclient.c:1764 msgid "Unknown error on connect" msgstr "Galat tak dikenal saat hubungan" -#: gio/gsocketclient.c:1087 gio/gsocketclient.c:1658 +#: gio/gsocketclient.c:1091 gio/gsocketclient.c:1672 msgid "Proxying over a non-TCP connection is not supported." msgstr "Proksi melalui koneksi bukan TCP tidak didukung." -#: gio/gsocketclient.c:1116 gio/gsocketclient.c:1684 +#: gio/gsocketclient.c:1120 gio/gsocketclient.c:1698 #, c-format msgid "Proxy protocol “%s” is not supported." msgstr "Protokol proksi \"%s\" tidak didukung." -#: gio/gsocketlistener.c:225 +#: gio/gsocketlistener.c:230 msgid "Listener is already closed" msgstr "Pendengar telah ditutup" -#: gio/gsocketlistener.c:271 +#: gio/gsocketlistener.c:276 msgid "Added socket is closed" msgstr "Soket yang ditambahkan tertutup" @@ -3898,13 +3922,13 @@ msgstr "Server bukan server proksi SOCKSv5." #: gio/gsocks5proxy.c:167 msgid "The SOCKSv5 proxy requires authentication." -msgstr "Proksi SOCKv5 memerlukan otentikasi." +msgstr "Proksi SOCKv5 memerlukan autentikasi." #: gio/gsocks5proxy.c:177 msgid "" "The SOCKSv5 proxy requires an authentication method that is not supported by " "GLib." -msgstr "SOCKSv5 memerlukan metoda otentikasi yang tidak didukung oleh GLib." +msgstr "SOCKSv5 memerlukan metode autentikasi yang tidak didukung oleh GLib." #: gio/gsocks5proxy.c:206 msgid "Username or password is too long for SOCKSv5 protocol." @@ -3912,7 +3936,7 @@ msgstr "Nama pengguna atau kata sandi terlalu panjang bagi protokol SOCKSv5." #: gio/gsocks5proxy.c:236 msgid "SOCKSv5 authentication failed due to wrong username or password." -msgstr "Otentikasi SOCKSv5 gagal karena nama pengguna atau kata sandi salah." +msgstr "autentikasi SOCKSv5 gagal karena nama pengguna atau kata sandi salah." #: gio/gsocks5proxy.c:286 #, c-format @@ -3964,24 +3988,24 @@ msgstr "Tidak bisa menangani pengkodean versi %d dari GThemedIcon" msgid "No valid addresses were found" msgstr "Tak ada alamat valid yang ditemukan" -#: gio/gthreadedresolver.c:317 +#: gio/gthreadedresolver.c:334 #, c-format msgid "Error reverse-resolving “%s”: %s" msgstr "Galat saat mengurai balik \"%s\": %s" -#: gio/gthreadedresolver.c:653 gio/gthreadedresolver.c:732 -#: gio/gthreadedresolver.c:830 gio/gthreadedresolver.c:880 +#: gio/gthreadedresolver.c:671 gio/gthreadedresolver.c:750 +#: gio/gthreadedresolver.c:848 gio/gthreadedresolver.c:898 #, c-format msgid "No DNS record of the requested type for “%s”" msgstr "Tidak ada record DNS dengan tipe yang diminta bagi \"%s\"" -#: gio/gthreadedresolver.c:658 gio/gthreadedresolver.c:835 +#: gio/gthreadedresolver.c:676 gio/gthreadedresolver.c:853 #, c-format msgid "Temporarily unable to resolve “%s”" msgstr "Sementara tidak dapat mengurai \"%s\"" -#: gio/gthreadedresolver.c:663 gio/gthreadedresolver.c:840 -#: gio/gthreadedresolver.c:950 +#: gio/gthreadedresolver.c:681 gio/gthreadedresolver.c:858 +#: gio/gthreadedresolver.c:968 #, c-format msgid "Error resolving “%s”" msgstr "Galat saat mengurai \"%s\"" @@ -4028,14 +4052,14 @@ msgstr "" msgid "The password entered is incorrect." msgstr "Sandi yang dimasukkan salah." -#: gio/gunixconnection.c:166 gio/gunixconnection.c:563 +#: gio/gunixconnection.c:166 gio/gunixconnection.c:579 #, c-format msgid "Expecting 1 control message, got %d" msgid_plural "Expecting 1 control message, got %d" msgstr[0] "Mengharapkan 1 pesan kendali, memperoleh %d" msgstr[1] "Mengharapkan 1 pesan kendali, memperoleh %d" -#: gio/gunixconnection.c:182 gio/gunixconnection.c:575 +#: gio/gunixconnection.c:182 gio/gunixconnection.c:591 msgid "Unexpected type of ancillary data" msgstr "Tipe yang tak diharapkan dari data ancillary" @@ -4050,33 +4074,33 @@ msgstr[1] "Mengharapkan satu fd, tapi mendapat %d\n" msgid "Received invalid fd" msgstr "Menerima fd yang tak valid" -#: gio/gunixconnection.c:355 +#: gio/gunixconnection.c:363 msgid "Error sending credentials: " msgstr "Galat saat mengirim kredensial: " -#: gio/gunixconnection.c:504 +#: gio/gunixconnection.c:520 #, c-format msgid "Error checking if SO_PASSCRED is enabled for socket: %s" msgstr "Galat ketika memeriksa apakah SO_PASSCRED diaktifkan bagi soket: %s" -#: gio/gunixconnection.c:520 +#: gio/gunixconnection.c:536 #, c-format msgid "Error enabling SO_PASSCRED: %s" msgstr "Galat saat mengaktifkan SO_PASSCRED: %s" -#: gio/gunixconnection.c:549 +#: gio/gunixconnection.c:565 msgid "" "Expecting to read a single byte for receiving credentials but read zero bytes" msgstr "" "Berharap membaca bita tunggal untuk penerimaan kredensial tapi membaca nol " "bita" -#: gio/gunixconnection.c:589 +#: gio/gunixconnection.c:605 #, c-format msgid "Not expecting control message, but got %d" msgstr "Tak mengharapkan pesan kendali, tapi memperoleh %d" -#: gio/gunixconnection.c:614 +#: gio/gunixconnection.c:630 #, c-format msgid "Error while disabling SO_PASSCRED: %s" msgstr "Galat ketika mematikan SO_PASSCRED: %s" @@ -4086,19 +4110,19 @@ msgstr "Galat ketika mematikan SO_PASSCRED: %s" msgid "Error reading from file descriptor: %s" msgstr "Galat saat membaca dari descriptor berkas: %s" -#: gio/gunixinputstream.c:426 gio/gunixoutputstream.c:534 +#: gio/gunixinputstream.c:426 gio/gunixoutputstream.c:535 #: gio/gwin32inputstream.c:217 gio/gwin32outputstream.c:204 #, c-format msgid "Error closing file descriptor: %s" msgstr "Galat saat menutup descriptor berkas: %s" -#: gio/gunixmounts.c:2650 gio/gunixmounts.c:2703 +#: gio/gunixmounts.c:2661 gio/gunixmounts.c:2714 msgid "Filesystem root" msgstr "Akar sistem berkas" -#: gio/gunixoutputstream.c:371 gio/gunixoutputstream.c:391 -#: gio/gunixoutputstream.c:478 gio/gunixoutputstream.c:498 -#: gio/gunixoutputstream.c:675 +#: gio/gunixoutputstream.c:372 gio/gunixoutputstream.c:392 +#: gio/gunixoutputstream.c:479 gio/gunixoutputstream.c:499 +#: gio/gunixoutputstream.c:676 #, c-format msgid "Error writing to file descriptor: %s" msgstr "Galat saat menulis ke descriptor berkas: %s" @@ -4247,54 +4271,54 @@ msgstr "" msgid "Failed to expand exec line “%s” with URI “%s”" msgstr "Gagal mengembangkan baris eksekusi \"%s\" dengan URI \"%s\"" -#: glib/gconvert.c:474 +#: glib/gconvert.c:466 msgid "Unrepresentable character in conversion input" msgstr "Karakter yang tidak dapat diterima dalam masukan konversi" -#: glib/gconvert.c:501 glib/gutf8.c:865 glib/gutf8.c:1077 glib/gutf8.c:1214 +#: glib/gconvert.c:493 glib/gutf8.c:865 glib/gutf8.c:1077 glib/gutf8.c:1214 #: glib/gutf8.c:1318 msgid "Partial character sequence at end of input" msgstr "Rangkaian karakter sebagian pada akhir input" -#: glib/gconvert.c:770 +#: glib/gconvert.c:762 #, c-format msgid "Cannot convert fallback “%s” to codeset “%s”" msgstr "Tidak dapat mengonversi fallback \"%s\" menjadi codeset \"%s\"" -#: glib/gconvert.c:942 +#: glib/gconvert.c:934 msgid "Embedded NUL byte in conversion input" msgstr "NUL bita tertanam dalam masukan konversi" -#: glib/gconvert.c:963 +#: glib/gconvert.c:955 msgid "Embedded NUL byte in conversion output" msgstr "NUL bita tertanam dalam keluaran konversi" -#: glib/gconvert.c:1648 +#: glib/gconvert.c:1640 #, c-format msgid "The URI “%s” is not an absolute URI using the “file” scheme" msgstr "URI \"%s\" bukanlah URI absolut dengan menggunakan skema \"file\"" -#: glib/gconvert.c:1658 +#: glib/gconvert.c:1650 #, c-format msgid "The local file URI “%s” may not include a “#”" msgstr "URI berkas lokal \"%s\" tak boleh mengandung \"#\"" -#: glib/gconvert.c:1675 +#: glib/gconvert.c:1667 #, c-format msgid "The URI “%s” is invalid" msgstr "URI \"%s\" tidak valid" -#: glib/gconvert.c:1687 +#: glib/gconvert.c:1679 #, c-format msgid "The hostname of the URI “%s” is invalid" msgstr "Nama host dari URI \"%s\" tidak valid" -#: glib/gconvert.c:1703 +#: glib/gconvert.c:1695 #, c-format msgid "The URI “%s” contains invalidly escaped characters" msgstr "URI \"%s\" mengandung karakter yang di-escape secara tidak valid" -#: glib/gconvert.c:1775 +#: glib/gconvert.c:1767 #, c-format msgid "The pathname “%s” is not an absolute path" msgstr "Nama path \"%s\" bukan lokasi absolut" @@ -5152,61 +5176,61 @@ msgstr "" "Dokumen terpotong tidak sempurna di dalam keterangan atau instruksi " "pemrosesan" -#: glib/goption.c:861 +#: glib/goption.c:865 msgid "[OPTION…]" msgstr "[OPSI…]" -#: glib/goption.c:977 +#: glib/goption.c:981 msgid "Help Options:" msgstr "Opsi Bantuan:" -#: glib/goption.c:978 +#: glib/goption.c:982 msgid "Show help options" msgstr "Menampilkan opsi bantuan" -#: glib/goption.c:984 +#: glib/goption.c:988 msgid "Show all help options" msgstr "Menampilkan semua opsi bantuan" -#: glib/goption.c:1047 +#: glib/goption.c:1051 msgid "Application Options:" msgstr "Opsi Aplikasi:" -#: glib/goption.c:1049 +#: glib/goption.c:1053 msgid "Options:" msgstr "Opsi:" -#: glib/goption.c:1113 glib/goption.c:1183 +#: glib/goption.c:1117 glib/goption.c:1187 #, c-format msgid "Cannot parse integer value “%s” for %s" msgstr "Tidak bisa mengurai nilai bilangan bulat \"%s\" untuk \"%s\"" -#: glib/goption.c:1123 glib/goption.c:1191 +#: glib/goption.c:1127 glib/goption.c:1195 #, c-format msgid "Integer value “%s” for %s out of range" msgstr "Nilai bilangan bulat \"%s\" untuk %s di luar jangkauan" -#: glib/goption.c:1148 +#: glib/goption.c:1152 #, c-format msgid "Cannot parse double value “%s” for %s" msgstr "Tidak bisa mengurai nilai double \"%s\" bagi %s" -#: glib/goption.c:1156 +#: glib/goption.c:1160 #, c-format msgid "Double value “%s” for %s out of range" msgstr "Nilai double \"%s\" untuk %s di luar jangkauan" -#: glib/goption.c:1448 glib/goption.c:1527 +#: glib/goption.c:1452 glib/goption.c:1531 #, c-format msgid "Error parsing option %s" msgstr "Galat saat mengurai opsi %s" -#: glib/goption.c:1558 glib/goption.c:1671 +#: glib/goption.c:1562 glib/goption.c:1675 #, c-format msgid "Missing argument for %s" msgstr "Argumen untuk %s tidak lengkap" -#: glib/goption.c:2132 +#: glib/goption.c:2181 #, c-format msgid "Unknown option %s" msgstr "Pilihan tidak diketahui %s" @@ -5735,21 +5759,21 @@ msgstr "" "Terjadi galat pada g_io_channel_win32_poll() ketika membaca data dari anak " "proses" -#: glib/gstrfuncs.c:3286 glib/gstrfuncs.c:3388 +#: glib/gstrfuncs.c:3301 glib/gstrfuncs.c:3403 msgid "Empty string is not a number" msgstr "String kosong bukan angka" -#: glib/gstrfuncs.c:3310 +#: glib/gstrfuncs.c:3325 #, c-format msgid "“%s” is not a signed number" msgstr "\"%s\" bukan bilangan bertanda" -#: glib/gstrfuncs.c:3320 glib/gstrfuncs.c:3424 +#: glib/gstrfuncs.c:3335 glib/gstrfuncs.c:3439 #, c-format msgid "Number “%s” is out of bounds [%s, %s]" msgstr "Nomor \"%s\" berada di luar batas [%s, %s]" -#: glib/gstrfuncs.c:3414 +#: glib/gstrfuncs.c:3429 #, c-format msgid "“%s” is not an unsigned number" msgstr "\"%s\" bukan bilangan tak bertanda" @@ -5772,157 +5796,157 @@ msgid "Character out of range for UTF-16" msgstr "Karakter di luar jangkauan UTF-16" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2339 +#: glib/gutils.c:2348 #, c-format msgid "%.1f kB" msgstr "%.1f kB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2341 +#: glib/gutils.c:2350 #, c-format msgid "%.1f MB" msgstr "%.1f MB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2343 +#: glib/gutils.c:2352 #, c-format msgid "%.1f GB" msgstr "%.1f GB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2345 +#: glib/gutils.c:2354 #, c-format msgid "%.1f TB" msgstr "%.1f TB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2347 +#: glib/gutils.c:2356 #, c-format msgid "%.1f PB" msgstr "%.1f PB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2349 +#: glib/gutils.c:2358 #, c-format msgid "%.1f EB" msgstr "%.1f EB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2353 +#: glib/gutils.c:2362 #, c-format msgid "%.1f KiB" msgstr "%.1f KiB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2355 +#: glib/gutils.c:2364 #, c-format msgid "%.1f MiB" msgstr "%.1f MiB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2357 +#: glib/gutils.c:2366 #, c-format msgid "%.1f GiB" msgstr "%.1f GiB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2359 +#: glib/gutils.c:2368 #, c-format msgid "%.1f TiB" msgstr "%.1f TiB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2361 +#: glib/gutils.c:2370 #, c-format msgid "%.1f PiB" msgstr "%.1f PiB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2363 +#: glib/gutils.c:2372 #, c-format msgid "%.1f EiB" msgstr "%.1f EiB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2367 +#: glib/gutils.c:2376 #, c-format msgid "%.1f kb" msgstr "%.1f kb" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2369 +#: glib/gutils.c:2378 #, c-format msgid "%.1f Mb" msgstr "%.1f Mb" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2371 +#: glib/gutils.c:2380 #, c-format msgid "%.1f Gb" msgstr "%.1f Gb" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2373 +#: glib/gutils.c:2382 #, c-format msgid "%.1f Tb" msgstr "%.1f Tb" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2375 +#: glib/gutils.c:2384 #, c-format msgid "%.1f Pb" msgstr "%.1f Pb" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2377 +#: glib/gutils.c:2386 #, c-format msgid "%.1f Eb" msgstr "%.1f Eb" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2381 +#: glib/gutils.c:2390 #, c-format msgid "%.1f Kib" msgstr "%.1f Kib" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2383 +#: glib/gutils.c:2392 #, c-format msgid "%.1f Mib" msgstr "%.1f Mib" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2385 +#: glib/gutils.c:2394 #, c-format msgid "%.1f Gib" msgstr "%.1f Gib" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2387 +#: glib/gutils.c:2396 #, c-format msgid "%.1f Tib" msgstr "%.1f Tib" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2389 +#: glib/gutils.c:2398 #, c-format msgid "%.1f Pib" msgstr "%.1f Pib" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2391 +#: glib/gutils.c:2400 #, c-format msgid "%.1f Eib" msgstr "%.1f Eib" -#: glib/gutils.c:2425 glib/gutils.c:2551 +#: glib/gutils.c:2434 glib/gutils.c:2551 #, c-format msgid "%u byte" msgid_plural "%u bytes" msgstr[0] "%u bita" msgstr[1] "%u bita" -#: glib/gutils.c:2429 +#: glib/gutils.c:2438 #, c-format msgid "%u bit" msgid_plural "%u bits" @@ -5930,7 +5954,7 @@ msgstr[0] "%u bita" msgstr[1] "%u bita" #. Translators: the %s in "%s bytes" will always be replaced by a number. -#: glib/gutils.c:2496 +#: glib/gutils.c:2505 #, c-format msgid "%s byte" msgid_plural "%s bytes" @@ -5938,7 +5962,7 @@ msgstr[0] "%s bita" msgstr[1] "%s bita" #. Translators: the %s in "%s bits" will always be replaced by a number. -#: glib/gutils.c:2501 +#: glib/gutils.c:2510 #, c-format msgid "%s bit" msgid_plural "%s bits" @@ -5980,8 +6004,20 @@ msgstr "%.1f PB" msgid "%.1f EB" msgstr "%.1f EB" +#~ msgid "; ignoring override for this key.\n" +#~ msgstr "; mengabaikan penimpaan kunci ini.\n" + +#~ msgid " and --strict was specified; exiting.\n" +#~ msgstr " dan --strict dinyatakan; keluar.\n" + +#~ msgid "Ignoring override for this key.\n" +#~ msgstr "Mengabaikan penimpaan bagi kunci ini.\n" + +#~ msgid "doing nothing.\n" +#~ msgstr "tak melakukan apapun.\n" + #~ msgid "No such method '%s'" -#~ msgstr "Tak ada metoda '%s'" +#~ msgstr "Tak ada metode '%s'" #~ msgid "" #~ "Cannot determine bus address from DBUS_STARTER_BUS_TYPE environment " diff --git a/po/pt_BR.po b/po/pt_BR.po index 838bb03bf..0f2a43608 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -21,16 +21,16 @@ msgid "" msgstr "" "Project-Id-Version: glib\n" "Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/glib/issues\n" -"POT-Creation-Date: 2019-02-12 14:26+0000\n" -"PO-Revision-Date: 2019-02-13 11:18-0200\n" +"POT-Creation-Date: 2019-06-17 18:06+0000\n" +"PO-Revision-Date: 2019-07-22 00:19-0300\n" "Last-Translator: Rafael Fontenelle <rafaelff@gnome.org>\n" -"Language-Team: Portuguese - Brazil <gnome-pt_br-list@gnome.org>\n" +"Language-Team: Brazilian Portuguese <gnome-pt_br-list@gnome.org>\n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1)\n" -"X-Generator: Gtranslator 3.31.90\n" +"X-Generator: Gtranslator 3.32.0\n" "X-Project-Style: gnome\n" #: gio/gapplication.c:499 @@ -117,7 +117,7 @@ msgstr "Lista as ações estáticas para um aplicativo (de arquivos .desktop)" msgid "APPID" msgstr "APPID" -#: gio/gapplication-tool.c:70 gio/gapplication-tool.c:133 gio/gdbus-tool.c:90 +#: gio/gapplication-tool.c:70 gio/gapplication-tool.c:133 gio/gdbus-tool.c:102 #: gio/gio-tool.c:224 msgid "COMMAND" msgstr "COMANDO" @@ -297,7 +297,7 @@ msgstr "O fluxo já está fechado" msgid "Truncate not supported on base stream" msgstr "Não há suporte para truncar fluxo base" -#: gio/gcancellable.c:317 gio/gdbusconnection.c:1867 gio/gdbusprivate.c:1402 +#: gio/gcancellable.c:319 gio/gdbusconnection.c:1867 gio/gdbusprivate.c:1409 #: gio/gsimpleasyncresult.c:871 gio/gsimpleasyncresult.c:897 #, c-format msgid "Operation was cancelled" @@ -316,28 +316,28 @@ msgid "Not enough space in destination" msgstr "Espaço insuficiente no destino" #: gio/gcharsetconverter.c:342 gio/gdatainputstream.c:848 -#: gio/gdatainputstream.c:1261 glib/gconvert.c:455 glib/gconvert.c:885 -#: glib/giochannel.c:1557 glib/giochannel.c:1599 glib/giochannel.c:2443 +#: gio/gdatainputstream.c:1261 glib/gconvert.c:447 glib/gconvert.c:877 +#: glib/giochannel.c:1561 glib/giochannel.c:1603 glib/giochannel.c:2450 #: glib/gutf8.c:869 glib/gutf8.c:1322 msgid "Invalid byte sequence in conversion input" msgstr "Sequência de bytes inválida na entrada de conversão" -#: gio/gcharsetconverter.c:347 glib/gconvert.c:463 glib/gconvert.c:799 -#: glib/giochannel.c:1564 glib/giochannel.c:2455 +#: gio/gcharsetconverter.c:347 glib/gconvert.c:455 glib/gconvert.c:791 +#: glib/giochannel.c:1568 glib/giochannel.c:2462 #, c-format msgid "Error during conversion: %s" msgstr "Erro durante a conversão: %s" -#: gio/gcharsetconverter.c:445 gio/gsocket.c:1093 +#: gio/gcharsetconverter.c:445 gio/gsocket.c:1094 msgid "Cancellable initialization not supported" msgstr "Sem suporte a inicialização cancelável" -#: gio/gcharsetconverter.c:456 glib/gconvert.c:328 glib/giochannel.c:1385 +#: gio/gcharsetconverter.c:456 glib/gconvert.c:320 glib/giochannel.c:1389 #, c-format msgid "Conversion from character set “%s” to “%s” is not supported" msgstr "Não há suporte à conversão do conjunto de caracteres “%s” para “%s”" -#: gio/gcharsetconverter.c:460 glib/gconvert.c:332 +#: gio/gcharsetconverter.c:460 glib/gconvert.c:324 #, c-format msgid "Could not open converter from “%s” to “%s”" msgstr "Não foi possível abrir conversor de “%s” para “%s”" @@ -378,46 +378,55 @@ msgstr "" msgid "Unexpected early end-of-stream" msgstr "Fim do fluxo inesperadamente prematuro" -#: gio/gdbusaddress.c:158 gio/gdbusaddress.c:246 gio/gdbusaddress.c:327 +#: gio/gdbusaddress.c:158 gio/gdbusaddress.c:232 gio/gdbusaddress.c:313 #, c-format msgid "Unsupported key “%s” in address entry “%s”" msgstr "Não há suporte a chave “%s” na entrada de endereço “%s”" -#: gio/gdbusaddress.c:185 +#: gio/gdbusaddress.c:171 #, c-format -msgid "" -"Address “%s” is invalid (need exactly one of path, tmpdir or abstract keys)" +msgid "Meaningless key/value pair combination in address entry “%s”" msgstr "" -"O endereço “%s” é inválido (é necessário exatamente um dentre: caminho, " -"diretório temporário ou chaves abstratas)" +"Combinação de pares chave/valor sem sentido na entrada de endereço “%s”" -#: gio/gdbusaddress.c:198 +#: gio/gdbusaddress.c:180 #, c-format -msgid "Meaningless key/value pair combination in address entry “%s”" +#| msgid "" +#| "Address “%s” is invalid (need exactly one of path, tmpdir or abstract " +#| "keys)" +msgid "" +"Address “%s” is invalid (need exactly one of path, dir, tmpdir, or abstract " +"keys)" msgstr "" -"Combinação de pares chave/valor sem sentido na entrada de endereço “%s”" +"O endereço “%s” é inválido (é necessário exatamente um dentre: caminho, " +"diretório, diretório temporário ou chaves abstratas)" -#: gio/gdbusaddress.c:261 gio/gdbusaddress.c:342 +#: gio/gdbusaddress.c:247 gio/gdbusaddress.c:328 #, c-format msgid "Error in address “%s” — the port attribute is malformed" msgstr "Erro no endereço “%s” — o atributo porta está malformada" -#: gio/gdbusaddress.c:272 gio/gdbusaddress.c:353 +#: gio/gdbusaddress.c:258 gio/gdbusaddress.c:339 #, c-format msgid "Error in address “%s” — the family attribute is malformed" msgstr "Erro no endereço “%s” — o atributo família está malformada" -#: gio/gdbusaddress.c:423 gio/gdbusaddress.c:673 +#: gio/gdbusaddress.c:409 gio/gdbusaddress.c:673 #, c-format msgid "Unknown or unsupported transport “%s” for address “%s”" msgstr "Transporte desconhecido ou sem suporte “%s” para o endereço “%s”" -#: gio/gdbusaddress.c:467 +#: gio/gdbusaddress.c:453 #, c-format msgid "Address element “%s” does not contain a colon (:)" msgstr "O elemento endereço “%s” não contém um caractere de dois-pontos (:)" -#: gio/gdbusaddress.c:488 +#: gio/gdbusaddress.c:462 +#, c-format +msgid "Transport name in address element “%s” must not be empty" +msgstr "O nome do transporte no elemento de endereço “%s” não pode estar vazio" + +#: gio/gdbusaddress.c:483 #, c-format msgid "" "Key/Value pair %d, “%s”, in address element “%s” does not contain an equal " @@ -426,7 +435,18 @@ msgstr "" "O par chave/valor %d, “%s”, no elemento endereço “%s”, não contém um sinal " "de igual" -#: gio/gdbusaddress.c:502 +#: gio/gdbusaddress.c:494 +#, c-format +#| msgid "" +#| "Key/Value pair %d, “%s”, in address element “%s” does not contain an " +#| "equal sign" +msgid "" +"Key/Value pair %d, “%s”, in address element “%s” must not have an empty key" +msgstr "" +"O par chave/valor %d, “%s”, no elemento endereço “%s”, não pode ter uma " +"chave vazia" + +#: gio/gdbusaddress.c:508 #, c-format msgid "" "Error unescaping key or value in Key/Value pair %d, “%s”, in address element " @@ -512,24 +532,14 @@ msgstr "Não foi possível iniciar automaticamente o D-Bus sem X11 $DISPLAY" msgid "Error spawning command line “%s”: " msgstr "Erro ao chamar a linha de comandos “%s”: " -#: gio/gdbusaddress.c:1359 -#, c-format -msgid "(Type any character to close this window)\n" -msgstr "(Digite qualquer tecla para fechar esta janela)\n" - -#: gio/gdbusaddress.c:1513 -#, c-format -msgid "Session dbus not running, and autolaunch failed" -msgstr "A sessão dbus não está em execução, e o início automático falhou" - -#: gio/gdbusaddress.c:1524 +#: gio/gdbusaddress.c:1211 #, c-format msgid "Cannot determine session bus address (not implemented for this OS)" msgstr "" "Não foi possível determinar o endereço de barramento da sessão (sem " "implementação para este SO)" -#: gio/gdbusaddress.c:1662 gio/gdbusconnection.c:7174 +#: gio/gdbusaddress.c:1349 gio/gdbusconnection.c:7174 #, c-format msgid "" "Cannot determine bus address from DBUS_STARTER_BUS_TYPE environment variable " @@ -538,7 +548,7 @@ msgstr "" "Não foi possível determinar o endereço de barramento da variável de ambiente " "DBUS_STARTER_BUS_TYPE — valor desconhecido “%s”" -#: gio/gdbusaddress.c:1671 gio/gdbusconnection.c:7183 +#: gio/gdbusaddress.c:1358 gio/gdbusconnection.c:7183 msgid "" "Cannot determine bus address because the DBUS_STARTER_BUS_TYPE environment " "variable is not set" @@ -546,7 +556,7 @@ msgstr "" "Não foi possível determinar o endereço do barramento porque a variável de " "ambiente DBUS_STARTER_BUS_TYPE não está definida" -#: gio/gdbusaddress.c:1681 +#: gio/gdbusaddress.c:1368 #, c-format msgid "Unknown bus type %d" msgstr "Tipo de barramento %d desconhecido" @@ -872,7 +882,7 @@ msgstr "" "Versão majoritária de protocolo inválida. Era esperado 1, mas foi localizado " "%d" -#: gio/gdbusmessage.c:2132 gio/gdbusmessage.c:2724 +#: gio/gdbusmessage.c:2132 gio/gdbusmessage.c:2727 msgid "Signature header found but is not of type signature" msgstr "Cabeçalho da assinatura localizado, mas não é do tipo assinatura" @@ -904,7 +914,7 @@ msgstr[1] "" msgid "Cannot deserialize message: " msgstr "Não foi possível desserializar a mensagem: " -#: gio/gdbusmessage.c:2541 +#: gio/gdbusmessage.c:2544 #, c-format msgid "" "Error serializing GVariant with type string “%s” to the D-Bus wire format" @@ -912,7 +922,7 @@ msgstr "" "Erro ao serializar GVariant com o texto de tipo “%s” para o formato " "delimitado pelo D-Bus" -#: gio/gdbusmessage.c:2678 +#: gio/gdbusmessage.c:2681 #, c-format msgid "" "Number of file descriptors in message (%d) differs from header field (%d)" @@ -920,18 +930,18 @@ msgstr "" "O número de descritores de arquivo na mensagem (%d) difere do campo de " "cabeçalho (%d)" -#: gio/gdbusmessage.c:2686 +#: gio/gdbusmessage.c:2689 msgid "Cannot serialize message: " msgstr "Não foi possível serializar a mensagem: " -#: gio/gdbusmessage.c:2739 +#: gio/gdbusmessage.c:2742 #, c-format msgid "Message body has signature “%s” but there is no signature header" msgstr "" "O corpo da mensagem tem a assinatura “%s”, mas não há um cabeçalho de " "assinatura" -#: gio/gdbusmessage.c:2749 +#: gio/gdbusmessage.c:2752 #, c-format msgid "" "Message body has type signature “%s” but signature in the header field is " @@ -940,28 +950,38 @@ msgstr "" "O corpo da mensagem tem o tipo de assinatura “%s”, mas a assinatura no campo " "de cabeçalho é “%s”" -#: gio/gdbusmessage.c:2765 +#: gio/gdbusmessage.c:2768 #, c-format msgid "Message body is empty but signature in the header field is “(%s)”" msgstr "" "O corpo da mensagem está vazio, mas a assinatura no campo de cabeçalho é " "“(%s)”" -#: gio/gdbusmessage.c:3318 +#: gio/gdbusmessage.c:3321 #, c-format msgid "Error return with body of type “%s”" msgstr "Retorno de erro com o corpo de tipo “%s”" -#: gio/gdbusmessage.c:3326 +#: gio/gdbusmessage.c:3329 msgid "Error return with empty body" msgstr "Retorno de erro com o corpo vazio" -#: gio/gdbusprivate.c:2075 +#: gio/gdbusprivate.c:2243 +#, c-format +msgid "(Type any character to close this window)\n" +msgstr "(Digite qualquer tecla para fechar esta janela)\n" + +#: gio/gdbusprivate.c:2417 +#, c-format +msgid "Session dbus not running, and autolaunch failed" +msgstr "A sessão dbus não está em execução, e o início automático falhou" + +#: gio/gdbusprivate.c:2440 #, c-format msgid "Unable to get Hardware profile: %s" msgstr "Não foi possível obter o perfil da máquina: %s" -#: gio/gdbusprivate.c:2120 +#: gio/gdbusprivate.c:2485 msgid "Unable to load /var/lib/dbus/machine-id or /etc/machine-id: " msgstr "" "Não foi possível carregar /var/lib/dbus/machine-id ou /etc/machine-id: " @@ -978,9 +998,6 @@ msgstr "Resposta %d inesperada do método StartServiceByName(\"%s\")" #: gio/gdbusproxy.c:2740 gio/gdbusproxy.c:2875 #, c-format -#| msgid "" -#| "Cannot invoke method; proxy is for a well-known name without an owner and " -#| "proxy was constructed with the G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag" msgid "" "Cannot invoke method; proxy is for the well-known name %s without an owner, " "and proxy was constructed with the G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag" @@ -989,32 +1006,33 @@ msgstr "" "dono e o proxy foi construído com o sinalizador " "G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START" -#: gio/gdbusserver.c:708 -msgid "Abstract name space not supported" -msgstr "Não há suporte a espaço de nome abstrato" +#: gio/gdbusserver.c:742 +#| msgid "Abstract name space not supported" +msgid "Abstract namespace not supported" +msgstr "Sem suporte a espaço de nome abstrato" -#: gio/gdbusserver.c:795 +#: gio/gdbusserver.c:835 msgid "Cannot specify nonce file when creating a server" msgstr "" "Não foi possível especificar o arquivo de valor de uso único ao criar um " "servidor" -#: gio/gdbusserver.c:876 +#: gio/gdbusserver.c:917 #, c-format msgid "Error writing nonce file at “%s”: %s" msgstr "Erro ao gravar o arquivo de valor de uso único em “%s”: %s" -#: gio/gdbusserver.c:1047 +#: gio/gdbusserver.c:1090 #, c-format msgid "The string “%s” is not a valid D-Bus GUID" msgstr "O texto “%s” não é válido para GUID D-Bus" -#: gio/gdbusserver.c:1087 +#: gio/gdbusserver.c:1130 #, c-format msgid "Cannot listen on unsupported transport “%s”" msgstr "Não é possível escutar no transporte “%s” por falta de suporte" -#: gio/gdbus-tool.c:95 +#: gio/gdbus-tool.c:107 #, c-format msgid "" "Commands:\n" @@ -1037,61 +1055,61 @@ msgstr "" "\n" "Use “%s COMANDO --help” para obter ajuda de cada comando.\n" -#: gio/gdbus-tool.c:185 gio/gdbus-tool.c:252 gio/gdbus-tool.c:324 -#: gio/gdbus-tool.c:348 gio/gdbus-tool.c:834 gio/gdbus-tool.c:1171 -#: gio/gdbus-tool.c:1613 +#: gio/gdbus-tool.c:197 gio/gdbus-tool.c:264 gio/gdbus-tool.c:336 +#: gio/gdbus-tool.c:360 gio/gdbus-tool.c:846 gio/gdbus-tool.c:1183 +#: gio/gdbus-tool.c:1668 #, c-format msgid "Error: %s\n" msgstr "Erro: %s\n" -#: gio/gdbus-tool.c:196 gio/gdbus-tool.c:265 gio/gdbus-tool.c:1629 +#: gio/gdbus-tool.c:208 gio/gdbus-tool.c:277 gio/gdbus-tool.c:1684 #, c-format msgid "Error parsing introspection XML: %s\n" msgstr "Erro ao analisar XML de introspecção: %s\n" -#: gio/gdbus-tool.c:234 +#: gio/gdbus-tool.c:246 #, c-format msgid "Error: %s is not a valid name\n" msgstr "Erro: %s não é um nome válido\n" -#: gio/gdbus-tool.c:382 +#: gio/gdbus-tool.c:394 msgid "Connect to the system bus" msgstr "Conectar ao barramento de sistema" -#: gio/gdbus-tool.c:383 +#: gio/gdbus-tool.c:395 msgid "Connect to the session bus" msgstr "Conectar ao barramento de sessão" -#: gio/gdbus-tool.c:384 +#: gio/gdbus-tool.c:396 msgid "Connect to given D-Bus address" msgstr "Conectar ao endereço D-Bus escolhido" -#: gio/gdbus-tool.c:394 +#: gio/gdbus-tool.c:406 msgid "Connection Endpoint Options:" msgstr "Opções de conexão de ponto final:" -#: gio/gdbus-tool.c:395 +#: gio/gdbus-tool.c:407 msgid "Options specifying the connection endpoint" msgstr "Opções especificando a conexão de ponto final" -#: gio/gdbus-tool.c:417 +#: gio/gdbus-tool.c:429 #, c-format msgid "No connection endpoint specified" msgstr "Nenhuma conexão de ponto final especificada" -#: gio/gdbus-tool.c:427 +#: gio/gdbus-tool.c:439 #, c-format msgid "Multiple connection endpoints specified" msgstr "Múltiplas conexões de ponto final especificadas" -#: gio/gdbus-tool.c:497 +#: gio/gdbus-tool.c:509 #, c-format msgid "" "Warning: According to introspection data, interface “%s” does not exist\n" msgstr "" "Aviso: De acordo com os dados de introspecção a interface “%s” não existe\n" -#: gio/gdbus-tool.c:506 +#: gio/gdbus-tool.c:518 #, c-format msgid "" "Warning: According to introspection data, method “%s” does not exist on " @@ -1100,163 +1118,163 @@ msgstr "" "Aviso: De acordo com os dados de introspecção o método “%s” não existe na " "interface “%s”\n" -#: gio/gdbus-tool.c:568 +#: gio/gdbus-tool.c:580 msgid "Optional destination for signal (unique name)" msgstr "Destino opcional para o sinal (nome único)" -#: gio/gdbus-tool.c:569 +#: gio/gdbus-tool.c:581 msgid "Object path to emit signal on" msgstr "Caminho do objeto para emitir sinal" -#: gio/gdbus-tool.c:570 +#: gio/gdbus-tool.c:582 msgid "Signal and interface name" msgstr "Nome de sinal e de interface" -#: gio/gdbus-tool.c:603 +#: gio/gdbus-tool.c:615 msgid "Emit a signal." msgstr "Emitir um sinal." -#: gio/gdbus-tool.c:658 gio/gdbus-tool.c:965 gio/gdbus-tool.c:1715 -#: gio/gdbus-tool.c:1944 gio/gdbus-tool.c:2164 +#: gio/gdbus-tool.c:670 gio/gdbus-tool.c:977 gio/gdbus-tool.c:1771 +#: gio/gdbus-tool.c:2003 gio/gdbus-tool.c:2223 #, c-format msgid "Error connecting: %s\n" msgstr "Erro ao conectar: %s\n" -#: gio/gdbus-tool.c:678 +#: gio/gdbus-tool.c:690 #, c-format msgid "Error: %s is not a valid unique bus name.\n" msgstr "Erro: %s não é um nome válido de barramento exclusivo.\n" -#: gio/gdbus-tool.c:697 gio/gdbus-tool.c:1008 gio/gdbus-tool.c:1758 +#: gio/gdbus-tool.c:709 gio/gdbus-tool.c:1020 gio/gdbus-tool.c:1814 msgid "Error: Object path is not specified\n" msgstr "Erro: O caminho do objeto não foi especificado\n" -#: gio/gdbus-tool.c:720 gio/gdbus-tool.c:1028 gio/gdbus-tool.c:1778 -#: gio/gdbus-tool.c:2015 +#: gio/gdbus-tool.c:732 gio/gdbus-tool.c:1040 gio/gdbus-tool.c:1834 +#: gio/gdbus-tool.c:2074 #, c-format msgid "Error: %s is not a valid object path\n" msgstr "Erro: %s não é um caminho de objeto válido\n" -#: gio/gdbus-tool.c:740 +#: gio/gdbus-tool.c:752 msgid "Error: Signal name is not specified\n" msgstr "Erro: O nome do sinal não foi especificado\n" -#: gio/gdbus-tool.c:754 +#: gio/gdbus-tool.c:766 #, c-format msgid "Error: Signal name “%s” is invalid\n" msgstr "Erro: O nome do sinal “%s” é inválido\n" -#: gio/gdbus-tool.c:766 +#: gio/gdbus-tool.c:778 #, c-format msgid "Error: %s is not a valid interface name\n" msgstr "Erro: %s não é um nome de interface válido\n" -#: gio/gdbus-tool.c:772 +#: gio/gdbus-tool.c:784 #, c-format msgid "Error: %s is not a valid member name\n" msgstr "Erro: %s não é um nome de membro válido\n" #. Use the original non-"parse-me-harder" error -#: gio/gdbus-tool.c:809 gio/gdbus-tool.c:1140 +#: gio/gdbus-tool.c:821 gio/gdbus-tool.c:1152 #, c-format msgid "Error parsing parameter %d: %s\n" msgstr "Erro ao analisar o parâmetro %d: %s\n" -#: gio/gdbus-tool.c:841 +#: gio/gdbus-tool.c:853 #, c-format msgid "Error flushing connection: %s\n" msgstr "Erro limpando conexão: %s\n" -#: gio/gdbus-tool.c:868 +#: gio/gdbus-tool.c:880 msgid "Destination name to invoke method on" msgstr "Nome do destino para chamar um método" -#: gio/gdbus-tool.c:869 +#: gio/gdbus-tool.c:881 msgid "Object path to invoke method on" msgstr "Caminho do objeto para chamar um método" -#: gio/gdbus-tool.c:870 +#: gio/gdbus-tool.c:882 msgid "Method and interface name" msgstr "Nome de método e de interface" -#: gio/gdbus-tool.c:871 +#: gio/gdbus-tool.c:883 msgid "Timeout in seconds" msgstr "Tempo limite em segundos" -#: gio/gdbus-tool.c:910 +#: gio/gdbus-tool.c:922 msgid "Invoke a method on a remote object." msgstr "Chamar um método no objeto remoto." -#: gio/gdbus-tool.c:982 gio/gdbus-tool.c:1732 gio/gdbus-tool.c:1969 +#: gio/gdbus-tool.c:994 gio/gdbus-tool.c:1788 gio/gdbus-tool.c:2028 msgid "Error: Destination is not specified\n" msgstr "Erro: O destino não foi especificado\n" -#: gio/gdbus-tool.c:993 gio/gdbus-tool.c:1749 gio/gdbus-tool.c:1980 +#: gio/gdbus-tool.c:1005 gio/gdbus-tool.c:1805 gio/gdbus-tool.c:2039 #, c-format msgid "Error: %s is not a valid bus name\n" msgstr "Erro: %s não é um nome de barramento válido\n" -#: gio/gdbus-tool.c:1043 +#: gio/gdbus-tool.c:1055 msgid "Error: Method name is not specified\n" msgstr "Erro: O nome do método não foi especificado\n" -#: gio/gdbus-tool.c:1054 +#: gio/gdbus-tool.c:1066 #, c-format msgid "Error: Method name “%s” is invalid\n" msgstr "Erro: O nome do método “%s” é inválido\n" -#: gio/gdbus-tool.c:1132 +#: gio/gdbus-tool.c:1144 #, c-format msgid "Error parsing parameter %d of type “%s”: %s\n" msgstr "Erro ao analisar o parâmetro %d do tipo “%s”: %s\n" -#: gio/gdbus-tool.c:1576 +#: gio/gdbus-tool.c:1630 msgid "Destination name to introspect" msgstr "Nome do destino para introspecção" -#: gio/gdbus-tool.c:1577 +#: gio/gdbus-tool.c:1631 msgid "Object path to introspect" msgstr "Caminho do objeto para introspecção" -#: gio/gdbus-tool.c:1578 +#: gio/gdbus-tool.c:1632 msgid "Print XML" msgstr "Exibir XML" -#: gio/gdbus-tool.c:1579 +#: gio/gdbus-tool.c:1633 msgid "Introspect children" msgstr "Auto-examinar filhos" -#: gio/gdbus-tool.c:1580 +#: gio/gdbus-tool.c:1634 msgid "Only print properties" msgstr "Apenas imprimir as propriedades" -#: gio/gdbus-tool.c:1667 +#: gio/gdbus-tool.c:1723 msgid "Introspect a remote object." msgstr "Introspecção de um objeto remoto." -#: gio/gdbus-tool.c:1870 +#: gio/gdbus-tool.c:1929 msgid "Destination name to monitor" msgstr "Nome do destino para monitorar" -#: gio/gdbus-tool.c:1871 +#: gio/gdbus-tool.c:1930 msgid "Object path to monitor" msgstr "Caminho do objeto para monitorar" -#: gio/gdbus-tool.c:1896 +#: gio/gdbus-tool.c:1955 msgid "Monitor a remote object." msgstr "Monitora um objeto remoto." -#: gio/gdbus-tool.c:1954 +#: gio/gdbus-tool.c:2013 msgid "Error: can’t monitor a non-message-bus connection\n" msgstr "" "Erro: não é possível monitorar uma conexão que não seja de barramento de " "mensagem\n" -#: gio/gdbus-tool.c:2078 +#: gio/gdbus-tool.c:2137 msgid "Service to activate before waiting for the other one (well-known name)" msgstr "Serviço a ser ativado antes de esperar por uma outra (nome conhecido)" -#: gio/gdbus-tool.c:2081 +#: gio/gdbus-tool.c:2140 msgid "" "Timeout to wait for before exiting with an error (seconds); 0 for no timeout " "(default)" @@ -1264,64 +1282,64 @@ msgstr "" "Tempo limite de espera antes de sair com um erro (segundos); 0 para nenhum " "tempo limite (padrão)" -#: gio/gdbus-tool.c:2129 +#: gio/gdbus-tool.c:2188 msgid "[OPTION…] BUS-NAME" msgstr "[OPÇÃO…] NOME-BARRAMENTO" -#: gio/gdbus-tool.c:2130 +#: gio/gdbus-tool.c:2189 msgid "Wait for a bus name to appear." msgstr "Espera por um nome de barramento para aparecer." -#: gio/gdbus-tool.c:2206 +#: gio/gdbus-tool.c:2265 msgid "Error: A service to activate for must be specified.\n" msgstr "Erro: Um serviço a ser ativado deve ser especificado.\n" -#: gio/gdbus-tool.c:2211 +#: gio/gdbus-tool.c:2270 msgid "Error: A service to wait for must be specified.\n" msgstr "Erro: Um serviço a ser esperado deve ser especificado.\n" -#: gio/gdbus-tool.c:2216 +#: gio/gdbus-tool.c:2275 msgid "Error: Too many arguments.\n" msgstr "Erro: Número excessivo de argumentos.\n" -#: gio/gdbus-tool.c:2224 gio/gdbus-tool.c:2231 +#: gio/gdbus-tool.c:2283 gio/gdbus-tool.c:2290 #, c-format msgid "Error: %s is not a valid well-known bus name.\n" msgstr "Erro: %s não é um nome válido de barramento conhecido.\n" -#: gio/gdesktopappinfo.c:2041 gio/gdesktopappinfo.c:4822 +#: gio/gdesktopappinfo.c:2045 gio/gdesktopappinfo.c:4834 msgid "Unnamed" msgstr "Sem nome" -#: gio/gdesktopappinfo.c:2451 +#: gio/gdesktopappinfo.c:2455 msgid "Desktop file didn’t specify Exec field" msgstr "O arquivo da área de trabalho não especifica o campo Exec" -#: gio/gdesktopappinfo.c:2710 +#: gio/gdesktopappinfo.c:2718 msgid "Unable to find terminal required for application" msgstr "Não é possível localizar o terminal requerido para o aplicativo" -#: gio/gdesktopappinfo.c:3362 +#: gio/gdesktopappinfo.c:3370 #, c-format msgid "Can’t create user application configuration folder %s: %s" msgstr "" "Não é possível criar pasta de configuração do aplicativo do usuário %s: %s" -#: gio/gdesktopappinfo.c:3366 +#: gio/gdesktopappinfo.c:3374 #, c-format msgid "Can’t create user MIME configuration folder %s: %s" msgstr "Não é possível criar pasta de configuração MIME do usuário %s: %s" -#: gio/gdesktopappinfo.c:3606 gio/gdesktopappinfo.c:3630 +#: gio/gdesktopappinfo.c:3614 gio/gdesktopappinfo.c:3638 msgid "Application information lacks an identifier" msgstr "A informação do aplicativo carece de um identificador" -#: gio/gdesktopappinfo.c:3864 +#: gio/gdesktopappinfo.c:3872 #, c-format msgid "Can’t create user desktop file %s" msgstr "Não é possível criar arquivo %s da área de trabalho do usuário" -#: gio/gdesktopappinfo.c:3998 +#: gio/gdesktopappinfo.c:4006 #, c-format msgid "Custom definition for %s" msgstr "Definição personalizada para %s" @@ -1384,10 +1402,10 @@ msgstr "Esperado um GEmblem para o GEmblemedIcon" #: gio/gfile.c:1076 gio/gfile.c:1314 gio/gfile.c:1452 gio/gfile.c:1690 #: gio/gfile.c:1745 gio/gfile.c:1803 gio/gfile.c:1887 gio/gfile.c:1944 -#: gio/gfile.c:2008 gio/gfile.c:2063 gio/gfile.c:3738 gio/gfile.c:3793 -#: gio/gfile.c:4029 gio/gfile.c:4071 gio/gfile.c:4539 gio/gfile.c:4950 -#: gio/gfile.c:5035 gio/gfile.c:5125 gio/gfile.c:5222 gio/gfile.c:5309 -#: gio/gfile.c:5410 gio/gfile.c:8113 gio/gfile.c:8203 gio/gfile.c:8287 +#: gio/gfile.c:2008 gio/gfile.c:2063 gio/gfile.c:3739 gio/gfile.c:3794 +#: gio/gfile.c:4030 gio/gfile.c:4072 gio/gfile.c:4540 gio/gfile.c:4951 +#: gio/gfile.c:5036 gio/gfile.c:5126 gio/gfile.c:5223 gio/gfile.c:5310 +#: gio/gfile.c:5411 gio/gfile.c:8115 gio/gfile.c:8205 gio/gfile.c:8289 #: gio/win32/gwinhttpfile.c:437 msgid "Operation not supported" msgstr "Operação sem suporte" @@ -1441,24 +1459,24 @@ msgstr "Não há suporte a copiar (reflink/clone) ou não funcionou" msgid "Can’t copy special file" msgstr "Não é possível copiar o arquivo especial" -#: gio/gfile.c:4019 +#: gio/gfile.c:4020 msgid "Invalid symlink value given" msgstr "Fornecido valor inválido de link simbólico" -#: gio/gfile.c:4180 +#: gio/gfile.c:4181 msgid "Trash not supported" msgstr "Não há suporte para lixeira" -#: gio/gfile.c:4292 +#: gio/gfile.c:4293 #, c-format msgid "File names cannot contain “%c”" msgstr "Nomes de arquivo não podem conter “%c”" -#: gio/gfile.c:6773 gio/gvolume.c:364 +#: gio/gfile.c:6774 gio/gvolume.c:364 msgid "volume doesn’t implement mount" msgstr "volume não implementa montagem" -#: gio/gfile.c:6884 gio/gfile.c:6930 +#: gio/gfile.c:6885 gio/gfile.c:6931 msgid "No application is registered as handling this file" msgstr "Nenhum aplicativo está registrado como manipulador deste arquivo" @@ -1503,8 +1521,8 @@ msgstr "Não é permitido truncar fluxo de entrada" msgid "Truncate not supported on stream" msgstr "Não há suporte para truncar fluxo" -#: gio/ghttpproxy.c:91 gio/gresolver.c:377 gio/gresolver.c:529 -#: glib/gconvert.c:1785 +#: gio/ghttpproxy.c:91 gio/gresolver.c:386 gio/gresolver.c:538 +#: glib/gconvert.c:1777 msgid "Invalid hostname" msgstr "Nome de servidor inválido" @@ -1620,7 +1638,7 @@ msgstr "Manter com o arquivo quando movido" msgid "“version” takes no arguments" msgstr "“version” não leva argumentos" -#: gio/gio-tool.c:207 gio/gio-tool.c:223 glib/goption.c:857 +#: gio/gio-tool.c:207 gio/gio-tool.c:223 glib/goption.c:861 msgid "Usage:" msgstr "Uso:" @@ -2273,7 +2291,7 @@ msgstr "Segue links simbólicos, montagens e atalhos" msgid "List contents of directories in a tree-like format." msgstr "Lista conteúdos de diretórios em um formato tipo árvore." -#: gio/glib-compile-resources.c:143 gio/glib-compile-schemas.c:1515 +#: gio/glib-compile-resources.c:143 gio/glib-compile-schemas.c:1517 #, c-format msgid "Element <%s> not allowed inside <%s>" msgstr "O elemento <%s> não é permitido dentro de <%s>" @@ -2330,7 +2348,7 @@ msgstr "Ocorreu erro ao comprimir o arquivo %s" msgid "text may not appear inside <%s>" msgstr "texto não pode aparecer dentro de <%s>" -#: gio/glib-compile-resources.c:737 gio/glib-compile-schemas.c:2139 +#: gio/glib-compile-resources.c:737 gio/glib-compile-schemas.c:2175 msgid "Show program version and exit" msgstr "Mostra a versão do programa e sai" @@ -2346,8 +2364,8 @@ msgstr "" "Os diretórios do quais serão carregados arquivos referenciados em ARQUIVO " "(padrão: diretório atual)" -#: gio/glib-compile-resources.c:739 gio/glib-compile-schemas.c:2140 -#: gio/glib-compile-schemas.c:2169 +#: gio/glib-compile-resources.c:739 gio/glib-compile-schemas.c:2176 +#: gio/glib-compile-schemas.c:2205 msgid "DIRECTORY" msgstr "DIRETÓRIO" @@ -2563,16 +2581,16 @@ msgstr "o alvo alias “%s” não está em <choices>" msgid "<aliases> must contain at least one <alias>" msgstr "<aliases> deve conter pelo menos um <alias>" -#: gio/glib-compile-schemas.c:798 +#: gio/glib-compile-schemas.c:800 msgid "Empty names are not permitted" msgstr "Nomes vazios não são permitidos" -#: gio/glib-compile-schemas.c:808 +#: gio/glib-compile-schemas.c:810 #, c-format msgid "Invalid name “%s”: names must begin with a lowercase letter" msgstr "Nome inválido “%s”: nomes precisam começar com uma letra minúscula" -#: gio/glib-compile-schemas.c:820 +#: gio/glib-compile-schemas.c:822 #, c-format msgid "" "Invalid name “%s”: invalid character “%c”; only lowercase letters, numbers " @@ -2581,36 +2599,36 @@ msgstr "" "Nome inválido “%s”: caractere inválido “%c”; apenas é permitido letras " "minúsculas, números e traços (”-”)" -#: gio/glib-compile-schemas.c:829 +#: gio/glib-compile-schemas.c:831 #, c-format msgid "Invalid name “%s”: two successive hyphens (“--”) are not permitted" msgstr "Nome inválido “%s”: dois hifens (”--”) consecutivos não são permitidos" -#: gio/glib-compile-schemas.c:838 +#: gio/glib-compile-schemas.c:840 #, c-format msgid "Invalid name “%s”: the last character may not be a hyphen (“-”)" msgstr "Nome inválido “%s”: o último caractere não pode ser um hífen (”-”)" -#: gio/glib-compile-schemas.c:846 +#: gio/glib-compile-schemas.c:848 #, c-format msgid "Invalid name “%s”: maximum length is 1024" msgstr "Nome inválido “%s”: o tamanho máximo é 1024" -#: gio/glib-compile-schemas.c:918 +#: gio/glib-compile-schemas.c:920 #, c-format msgid "<child name='%s'> already specified" msgstr "<child name='%s'> já especificado" -#: gio/glib-compile-schemas.c:944 +#: gio/glib-compile-schemas.c:946 msgid "Cannot add keys to a “list-of” schema" msgstr "Não é possível adicionar chaves ao esquema “list-of”" -#: gio/glib-compile-schemas.c:955 +#: gio/glib-compile-schemas.c:957 #, c-format msgid "<key name='%s'> already specified" msgstr "<key name='%s'> já especificado" -#: gio/glib-compile-schemas.c:973 +#: gio/glib-compile-schemas.c:975 #, c-format msgid "" "<key name='%s'> shadows <key name='%s'> in <schema id='%s'>; use <override> " @@ -2619,7 +2637,7 @@ msgstr "" "<key name='%s'> oculta <key name='%s'> em <schema id='%s'>; use <override> " "para modificar o valor" -#: gio/glib-compile-schemas.c:984 +#: gio/glib-compile-schemas.c:986 #, c-format msgid "" "Exactly one of “type”, “enum” or “flags” must be specified as an attribute " @@ -2628,63 +2646,63 @@ msgstr "" "Apenas um entre “type”, “enum” ou “flags” deve ser especificado como " "atributo para <key>" -#: gio/glib-compile-schemas.c:1003 +#: gio/glib-compile-schemas.c:1005 #, c-format msgid "<%s id='%s'> not (yet) defined." msgstr "<%s id='%s'> não está (ainda) definido." -#: gio/glib-compile-schemas.c:1018 +#: gio/glib-compile-schemas.c:1020 #, c-format msgid "Invalid GVariant type string “%s”" msgstr "Tipo inválido de texto GVariant “%s”" -#: gio/glib-compile-schemas.c:1048 +#: gio/glib-compile-schemas.c:1050 msgid "<override> given but schema isn’t extending anything" msgstr "<override> determinado, mas o esquema não está estendendo nada" -#: gio/glib-compile-schemas.c:1061 +#: gio/glib-compile-schemas.c:1063 #, c-format msgid "No <key name='%s'> to override" msgstr "Nenhum <key name='%s'> para sobrescrever" -#: gio/glib-compile-schemas.c:1069 +#: gio/glib-compile-schemas.c:1071 #, c-format msgid "<override name='%s'> already specified" msgstr "<override name='%s'> já especificado" -#: gio/glib-compile-schemas.c:1142 +#: gio/glib-compile-schemas.c:1144 #, c-format msgid "<schema id='%s'> already specified" msgstr "<schema id='%s'> já especificado" -#: gio/glib-compile-schemas.c:1154 +#: gio/glib-compile-schemas.c:1156 #, c-format msgid "<schema id='%s'> extends not yet existing schema “%s”" msgstr "<schema id='%s'> estende um esquema ainda não existente “%s”" -#: gio/glib-compile-schemas.c:1170 +#: gio/glib-compile-schemas.c:1172 #, c-format msgid "<schema id='%s'> is list of not yet existing schema “%s”" msgstr "<schema id='%s'> é uma lista de esquema ainda não existente “%s”" -#: gio/glib-compile-schemas.c:1178 +#: gio/glib-compile-schemas.c:1180 #, c-format msgid "Cannot be a list of a schema with a path" msgstr "Não pode ser uma lista de um esquema com um caminho" -#: gio/glib-compile-schemas.c:1188 +#: gio/glib-compile-schemas.c:1190 #, c-format msgid "Cannot extend a schema with a path" msgstr "Não é possível estender um esquema com um caminho" -#: gio/glib-compile-schemas.c:1198 +#: gio/glib-compile-schemas.c:1200 #, c-format msgid "" "<schema id='%s'> is a list, extending <schema id='%s'> which is not a list" msgstr "" "<schema id='%s'> é uma lista, estendendo <schema id='%s'> que não é uma lista" -#: gio/glib-compile-schemas.c:1208 +#: gio/glib-compile-schemas.c:1210 #, c-format msgid "" "<schema id='%s' list-of='%s'> extends <schema id='%s' list-of='%s'> but “%s” " @@ -2693,17 +2711,17 @@ msgstr "" "<schema id='%s' list-of='%s'> estende <schema id='%s' list-of='%s'>, mas " "“%s” não estende “%s”" -#: gio/glib-compile-schemas.c:1225 +#: gio/glib-compile-schemas.c:1227 #, c-format msgid "A path, if given, must begin and end with a slash" msgstr "Um caminho, se determinado, precisa começar e terminar com uma barra" -#: gio/glib-compile-schemas.c:1232 +#: gio/glib-compile-schemas.c:1234 #, c-format msgid "The path of a list must end with “:/”" msgstr "O caminho de uma lista precisa terminar com “:/”" -#: gio/glib-compile-schemas.c:1241 +#: gio/glib-compile-schemas.c:1243 #, c-format msgid "" "Warning: Schema “%s” has path “%s”. Paths starting with “/apps/”, “/" @@ -2712,128 +2730,188 @@ msgstr "" "Aviso: Esquema “%s” possui caminho “%s”. Caminhos iniciando com “/apps/”, “/" "desktop/” ou “/system/” são obsoletos." -#: gio/glib-compile-schemas.c:1271 +#: gio/glib-compile-schemas.c:1273 #, c-format msgid "<%s id='%s'> already specified" msgstr "<%s id='%s'> já especificado" -#: gio/glib-compile-schemas.c:1421 gio/glib-compile-schemas.c:1437 +#: gio/glib-compile-schemas.c:1423 gio/glib-compile-schemas.c:1439 #, c-format msgid "Only one <%s> element allowed inside <%s>" msgstr "Apenas um elemento <%s> é permitido dentro de um <%s>" -#: gio/glib-compile-schemas.c:1519 +#: gio/glib-compile-schemas.c:1521 #, c-format msgid "Element <%s> not allowed at the top level" msgstr "O elemento <%s> não é permitido no nível mais alto" -#: gio/glib-compile-schemas.c:1537 +#: gio/glib-compile-schemas.c:1539 msgid "Element <default> is required in <key>" msgstr "O elemento <default> é exigido por <key>" -#: gio/glib-compile-schemas.c:1627 +#: gio/glib-compile-schemas.c:1629 #, c-format msgid "Text may not appear inside <%s>" msgstr "Texto não pode aparecer dentro de <%s>" -#: gio/glib-compile-schemas.c:1695 +#: gio/glib-compile-schemas.c:1697 #, c-format msgid "Warning: undefined reference to <schema id='%s'/>" msgstr "Aviso: referência indefinida a <schema id='%s'/>" #. Translators: Do not translate "--strict". -#: gio/glib-compile-schemas.c:1834 gio/glib-compile-schemas.c:1910 -#: gio/glib-compile-schemas.c:2025 -#, c-format -msgid "--strict was specified; exiting.\n" -msgstr "--strict foi especificado; saindo.\n" +#: gio/glib-compile-schemas.c:1836 gio/glib-compile-schemas.c:1915 +#| msgid "--strict was specified; exiting.\n" +msgid "--strict was specified; exiting." +msgstr "--strict foi especificado; saindo." -#: gio/glib-compile-schemas.c:1844 -#, c-format -msgid "This entire file has been ignored.\n" -msgstr "Este arquivo todo foi ignorado.\n" +#: gio/glib-compile-schemas.c:1848 +#| msgid "This entire file has been ignored.\n" +msgid "This entire file has been ignored." +msgstr "Todo o arquivo foi ignorado." + +#: gio/glib-compile-schemas.c:1911 +#| msgid "Ignoring this file.\n" +msgid "Ignoring this file." +msgstr "Ignorando este arquivo." -#: gio/glib-compile-schemas.c:1906 +#: gio/glib-compile-schemas.c:1966 #, c-format -msgid "Ignoring this file.\n" -msgstr "Ignorando este arquivo.\n" +#| msgid "No such key “%s” in schema “%s” as specified in override file “%s”" +msgid "" +"No such key “%s” in schema “%s” as specified in override file “%s”; ignoring " +"override for this key." +msgstr "" +"Nenhuma chave “%s” no esquema “%s” como especificado no arquivo de " +"sobrescrita “%s”; ignorando sobrescrita para essa chave." -#: gio/glib-compile-schemas.c:1959 +#: gio/glib-compile-schemas.c:1974 #, c-format -msgid "No such key “%s” in schema “%s” as specified in override file “%s”" +#| msgid "No such key “%s” in schema “%s” as specified in override file “%s”" +msgid "" +"No such key “%s” in schema “%s” as specified in override file “%s” and --" +"strict was specified; exiting." msgstr "" "Nenhuma chave “%s” no esquema “%s” como especificado no arquivo de " -"sobrescrita “%s”" +"sobrescrita “%s” e --strict foi especificado; saindo." + +#: gio/glib-compile-schemas.c:1996 +#, c-format +#| msgid "" +#| "cannot provide per-desktop overrides for localised key “%s” in schema " +#| "“%s” (override file “%s”)" +msgid "" +"Cannot provide per-desktop overrides for localised key “%s” in schema " +"“%s” (override file “%s”); ignoring override for this key." +msgstr "" +"Não foi possível fornecer substituições por-desktop para chave localizada " +"“%s” no esquema “%s” (arquivo de substituição “%s”); ignorando substituição " +"para esta chave." -#: gio/glib-compile-schemas.c:1965 gio/glib-compile-schemas.c:1990 -#: gio/glib-compile-schemas.c:2050 gio/glib-compile-schemas.c:2079 +#: gio/glib-compile-schemas.c:2005 #, c-format -msgid "; ignoring override for this key.\n" -msgstr "; ignorando sobrescrita para esta chave.\n" +#| msgid "" +#| "cannot provide per-desktop overrides for localised key “%s” in schema " +#| "“%s” (override file “%s”)" +msgid "" +"Cannot provide per-desktop overrides for localised key “%s” in schema " +"“%s” (override file “%s”) and --strict was specified; exiting." +msgstr "" +"Não foi possível fornecer substituições por-desktop para chave localizada " +"“%s” no esquema “%s” (arquivo de substituição “%s”) e --script foi " +"especificado; saindo." -#: gio/glib-compile-schemas.c:1969 gio/glib-compile-schemas.c:1994 -#: gio/glib-compile-schemas.c:2054 gio/glib-compile-schemas.c:2083 +#: gio/glib-compile-schemas.c:2029 #, c-format -msgid " and --strict was specified; exiting.\n" -msgstr " e --strict foi especificado; saindo.\n" +#| msgid "" +#| "error parsing key “%s” in schema “%s” as specified in override file “%s”: " +#| "%s." +msgid "" +"Error parsing key “%s” in schema “%s” as specified in override file “%s”: " +"%s. Ignoring override for this key." +msgstr "" +"Erro ao analisar chave “%s” no esquema “%s” como especificado no arquivo de " +"sobrescrita “%s”: %s. Ignorando sobrescrita para essa chave." -#: gio/glib-compile-schemas.c:1984 +#: gio/glib-compile-schemas.c:2041 #, c-format +#| msgid "" +#| "error parsing key “%s” in schema “%s” as specified in override file “%s”: " +#| "%s." msgid "" -"cannot provide per-desktop overrides for localised key “%s” in schema " -"“%s” (override file “%s”)" +"Error parsing key “%s” in schema “%s” as specified in override file “%s”: " +"%s. --strict was specified; exiting." msgstr "" -"não foi possível fornecer substituição por-desktop para chave localizada " -"“%s” no esquema “%s” (arquivo de substituição “%s”)" +"Erro ao analisar chave “%s” no esquema “%s” como especificado no arquivo de " +"sobrescrita “%s”: %s. --script foi especificado; saindo." -#: gio/glib-compile-schemas.c:2011 +#: gio/glib-compile-schemas.c:2068 #, c-format +#| msgid "" +#| "override for key “%s” in schema “%s” in override file “%s” is outside the " +#| "range given in the schema" msgid "" -"error parsing key “%s” in schema “%s” as specified in override file “%s”: %s." +"Override for key “%s” in schema “%s” in override file “%s” is outside the " +"range given in the schema; ignoring override for this key." msgstr "" -"erro ao analisar chave “%s” no esquema “%s” como especificado no arquivo de " -"sobrescrita “%s”: %s." +"Sobrescrita para chave “%s” no esquema “%s” no arquivo de sobrescrita “%s” " +"está fora dos limites dado pelo esquema; ignorando sobrescrita para essa " +"chave" -#: gio/glib-compile-schemas.c:2021 +#: gio/glib-compile-schemas.c:2078 #, c-format -msgid "Ignoring override for this key.\n" -msgstr "Ignorando sobrescrita para esta chave.\n" +#| msgid "" +#| "override for key “%s” in schema “%s” in override file “%s” is outside the " +#| "range given in the schema" +msgid "" +"Override for key “%s” in schema “%s” in override file “%s” is outside the " +"range given in the schema and --strict was specified; exiting." +msgstr "" +"Sobrescrita para chave “%s” no esquema “%s” no arquivo de sobrescrita “%s” " +"está fora dos limites dado pelo esquema e --script foi especificado; saindo." -#: gio/glib-compile-schemas.c:2040 +#: gio/glib-compile-schemas.c:2104 #, c-format +#| msgid "" +#| "override for key “%s” in schema “%s” in override file “%s” is not in the " +#| "list of valid choices" msgid "" -"override for key “%s” in schema “%s” in override file “%s” is outside the " -"range given in the schema" +"Override for key “%s” in schema “%s” in override file “%s” is not in the " +"list of valid choices; ignoring override for this key." msgstr "" -"sobrescrita para chave “%s” no esquema “%s” no arquivo de sobrescrita “%s” " -"está fora dos limites dado pelo esquema" +"Sobrescrita para a chave “%s” no esquema “%s” no arquivo de sobrescrita “%s” " +"não está na lista de escolhas válidas; ignorando sobrescrita para essa chave." -#: gio/glib-compile-schemas.c:2069 +#: gio/glib-compile-schemas.c:2114 #, c-format +#| msgid "" +#| "override for key “%s” in schema “%s” in override file “%s” is not in the " +#| "list of valid choices" msgid "" -"override for key “%s” in schema “%s” in override file “%s” is not in the " -"list of valid choices" +"Override for key “%s” in schema “%s” in override file “%s” is not in the " +"list of valid choices and --strict was specified; exiting." msgstr "" -"sobrescrita para a chave “%s” no esquema “%s” no arquivo de sobrescrita “%s” " -"não está na lista de escolhas válidas" +"Sobrescrita para a chave “%s” no esquema “%s” no arquivo de sobrescrita “%s” " +"não está na lista de escolhas válidas e --scrict foi especificado; saindo." -#: gio/glib-compile-schemas.c:2140 -msgid "where to store the gschemas.compiled file" -msgstr "onde armazenar o arquivo gschemas compilado" +#: gio/glib-compile-schemas.c:2176 +#| msgid "where to store the gschemas.compiled file" +msgid "Where to store the gschemas.compiled file" +msgstr "Onde armazenar o arquivo gschemas compilado" -#: gio/glib-compile-schemas.c:2141 +#: gio/glib-compile-schemas.c:2177 msgid "Abort on any errors in schemas" msgstr "Aborta se ocorrer erros nos esquemas" -#: gio/glib-compile-schemas.c:2142 +#: gio/glib-compile-schemas.c:2178 msgid "Do not write the gschema.compiled file" msgstr "Não escreve o arquivo gschema compilado" -#: gio/glib-compile-schemas.c:2143 +#: gio/glib-compile-schemas.c:2179 msgid "Do not enforce key name restrictions" msgstr "Não força restrições de nome de chave" -#: gio/glib-compile-schemas.c:2172 +#: gio/glib-compile-schemas.c:2208 msgid "" "Compile all GSettings schema files into a schema cache.\n" "Schema files are required to have the extension .gschema.xml,\n" @@ -2843,25 +2921,21 @@ msgstr "" "É necessário que os arquivos schema tenham a extensão\n" ".gschema.xml, e o arquivo de cache é chamado gschemas.compiled." -#: gio/glib-compile-schemas.c:2193 -#, c-format -msgid "You should give exactly one directory name\n" -msgstr "Você deveria dar exatamente um nome de diretório\n" +#: gio/glib-compile-schemas.c:2229 +#| msgid "You should give exactly one directory name\n" +msgid "You should give exactly one directory name" +msgstr "Você deveria dar exatamente um nome de diretório" -#: gio/glib-compile-schemas.c:2235 -#, c-format -msgid "No schema files found: " -msgstr "Nenhum arquivo schema localizado: " +#: gio/glib-compile-schemas.c:2272 +#| msgid "No schema files found: " +msgid "No schema files found: doing nothing." +msgstr "Nenhum arquivo schema localizado: fazendo nada." -#: gio/glib-compile-schemas.c:2238 -#, c-format -msgid "doing nothing.\n" -msgstr "fazendo nada.\n" - -#: gio/glib-compile-schemas.c:2241 -#, c-format -msgid "removed existing output file.\n" -msgstr "arquivo de saída existente removido.\n" +#: gio/glib-compile-schemas.c:2274 +#| msgid "removed existing output file.\n" +msgid "No schema files found: removed existing output file." +msgstr "" +"Nenhum arquivo de schema encontrado: arquivo de saída existente removido." #: gio/glocalfile.c:546 gio/win32/gwinhttpfile.c:420 #, c-format @@ -2896,7 +2970,7 @@ msgid "Can’t rename file, filename already exists" msgstr "Não é possível renomear o arquivo, o nome do arquivo já existe" #: gio/glocalfile.c:1213 gio/glocalfile.c:2322 gio/glocalfile.c:2350 -#: gio/glocalfile.c:2507 gio/glocalfileoutputstream.c:646 +#: gio/glocalfile.c:2507 gio/glocalfileoutputstream.c:647 msgid "Invalid filename" msgstr "Nome de arquivo inválido" @@ -2972,7 +3046,7 @@ msgstr "O sistema de arquivos não tem suporte a links simbólicos" msgid "Error making symbolic link %s: %s" msgstr "Erro ao criar link simbólico %s: %s" -#: gio/glocalfile.c:2363 glib/gfileutils.c:2138 +#: gio/glocalfile.c:2363 glib/gfileutils.c:2155 msgid "Symbolic links not supported" msgstr "Não há suporte a links simbólicos" @@ -2985,9 +3059,9 @@ msgstr "Erro ao mover arquivo %s: %s" msgid "Can’t move directory over directory" msgstr "Não é possível mover diretório sobre diretório" -#: gio/glocalfile.c:2467 gio/glocalfileoutputstream.c:1030 -#: gio/glocalfileoutputstream.c:1044 gio/glocalfileoutputstream.c:1059 -#: gio/glocalfileoutputstream.c:1076 gio/glocalfileoutputstream.c:1090 +#: gio/glocalfile.c:2467 gio/glocalfileoutputstream.c:1031 +#: gio/glocalfileoutputstream.c:1045 gio/glocalfileoutputstream.c:1060 +#: gio/glocalfileoutputstream.c:1077 gio/glocalfileoutputstream.c:1091 msgid "Backup file creation failed" msgstr "Falha ao criar arquivo de backup" @@ -3005,167 +3079,167 @@ msgstr "Não há suporte a mover entre montagens" msgid "Could not determine the disk usage of %s: %s" msgstr "Não foi possível determinar a utilização de disco de %s: %s" -#: gio/glocalfileinfo.c:745 +#: gio/glocalfileinfo.c:752 msgid "Attribute value must be non-NULL" msgstr "Valor de atributo deve ser não-NULO" -#: gio/glocalfileinfo.c:752 +#: gio/glocalfileinfo.c:759 msgid "Invalid attribute type (string expected)" msgstr "Tipo de atributo inválido (esperava-se expressão)" -#: gio/glocalfileinfo.c:759 +#: gio/glocalfileinfo.c:766 msgid "Invalid extended attribute name" msgstr "Nome de atributo estendido inválido" -#: gio/glocalfileinfo.c:799 +#: gio/glocalfileinfo.c:806 #, c-format msgid "Error setting extended attribute “%s”: %s" msgstr "Erro ao definir atributo estendido “%s”: %s" -#: gio/glocalfileinfo.c:1625 +#: gio/glocalfileinfo.c:1634 msgid " (invalid encoding)" msgstr " (codificação inválida)" -#: gio/glocalfileinfo.c:1789 gio/glocalfileoutputstream.c:908 +#: gio/glocalfileinfo.c:1798 gio/glocalfileoutputstream.c:909 #, c-format msgid "Error when getting information for file “%s”: %s" msgstr "Erro ao obter informação para o arquivo “%s”: %s" -#: gio/glocalfileinfo.c:2059 +#: gio/glocalfileinfo.c:2068 #, c-format msgid "Error when getting information for file descriptor: %s" msgstr "Erro ao obter informação para o descritor de arquivo: %s" -#: gio/glocalfileinfo.c:2104 +#: gio/glocalfileinfo.c:2113 msgid "Invalid attribute type (uint32 expected)" msgstr "Tipo de atributo inválido (esperado uint32)" -#: gio/glocalfileinfo.c:2122 +#: gio/glocalfileinfo.c:2131 msgid "Invalid attribute type (uint64 expected)" msgstr "Tipo de atributo inválido (esperado uint64)" -#: gio/glocalfileinfo.c:2141 gio/glocalfileinfo.c:2160 +#: gio/glocalfileinfo.c:2150 gio/glocalfileinfo.c:2169 msgid "Invalid attribute type (byte string expected)" msgstr "Tipo de atributo inválido (expressão de byte esperada)" -#: gio/glocalfileinfo.c:2207 +#: gio/glocalfileinfo.c:2216 msgid "Cannot set permissions on symlinks" msgstr "Não foi possível definir permissões aos links simbólicos" -#: gio/glocalfileinfo.c:2223 +#: gio/glocalfileinfo.c:2232 #, c-format msgid "Error setting permissions: %s" msgstr "Erro ao definir permissões: %s" -#: gio/glocalfileinfo.c:2274 +#: gio/glocalfileinfo.c:2283 #, c-format msgid "Error setting owner: %s" msgstr "Erro ao definir proprietário: %s" -#: gio/glocalfileinfo.c:2297 +#: gio/glocalfileinfo.c:2306 msgid "symlink must be non-NULL" msgstr "o link simbólico deve ser não-NULO" -#: gio/glocalfileinfo.c:2307 gio/glocalfileinfo.c:2326 -#: gio/glocalfileinfo.c:2337 +#: gio/glocalfileinfo.c:2316 gio/glocalfileinfo.c:2335 +#: gio/glocalfileinfo.c:2346 #, c-format msgid "Error setting symlink: %s" msgstr "Erro ao definir link simbólico: %s" -#: gio/glocalfileinfo.c:2316 +#: gio/glocalfileinfo.c:2325 msgid "Error setting symlink: file is not a symlink" msgstr "Erro ao definir link simbólico: o arquivo não é um link simbólico" -#: gio/glocalfileinfo.c:2442 +#: gio/glocalfileinfo.c:2451 #, c-format msgid "Error setting modification or access time: %s" msgstr "Erro ao definir data/hora de modificação ou acesso: %s" -#: gio/glocalfileinfo.c:2465 +#: gio/glocalfileinfo.c:2474 msgid "SELinux context must be non-NULL" msgstr "O contexto SELinux deve ser não-NULO" -#: gio/glocalfileinfo.c:2480 +#: gio/glocalfileinfo.c:2489 #, c-format msgid "Error setting SELinux context: %s" msgstr "Erro ao definir o contexto SELinux: %s" -#: gio/glocalfileinfo.c:2487 +#: gio/glocalfileinfo.c:2496 msgid "SELinux is not enabled on this system" msgstr "SELinux não está habilitado neste sistema" -#: gio/glocalfileinfo.c:2579 +#: gio/glocalfileinfo.c:2588 #, c-format msgid "Setting attribute %s not supported" msgstr "Não há suporte à definição do atributo %s" -#: gio/glocalfileinputstream.c:168 gio/glocalfileoutputstream.c:791 +#: gio/glocalfileinputstream.c:168 gio/glocalfileoutputstream.c:792 #, c-format msgid "Error reading from file: %s" msgstr "Erro ao ler do arquivo: %s" #: gio/glocalfileinputstream.c:199 gio/glocalfileinputstream.c:211 #: gio/glocalfileinputstream.c:225 gio/glocalfileinputstream.c:333 -#: gio/glocalfileoutputstream.c:553 gio/glocalfileoutputstream.c:1108 +#: gio/glocalfileoutputstream.c:554 gio/glocalfileoutputstream.c:1109 #, c-format msgid "Error seeking in file: %s" msgstr "Erro ao buscar no arquivo: %s" -#: gio/glocalfileinputstream.c:255 gio/glocalfileoutputstream.c:343 -#: gio/glocalfileoutputstream.c:437 +#: gio/glocalfileinputstream.c:255 gio/glocalfileoutputstream.c:344 +#: gio/glocalfileoutputstream.c:438 #, c-format msgid "Error closing file: %s" msgstr "Erro ao fechar arquivo: %s" -#: gio/glocalfilemonitor.c:856 +#: gio/glocalfilemonitor.c:858 msgid "Unable to find default local file monitor type" msgstr "Não é possível localizar o tipo de arquivo monitor local padrão" -#: gio/glocalfileoutputstream.c:208 gio/glocalfileoutputstream.c:286 -#: gio/glocalfileoutputstream.c:323 gio/glocalfileoutputstream.c:812 +#: gio/glocalfileoutputstream.c:209 gio/glocalfileoutputstream.c:287 +#: gio/glocalfileoutputstream.c:324 gio/glocalfileoutputstream.c:813 #, c-format msgid "Error writing to file: %s" msgstr "Erro ao gravar o arquivo: %s" -#: gio/glocalfileoutputstream.c:370 +#: gio/glocalfileoutputstream.c:371 #, c-format msgid "Error removing old backup link: %s" msgstr "Erro ao remover link antigo de backup: %s" -#: gio/glocalfileoutputstream.c:384 gio/glocalfileoutputstream.c:397 +#: gio/glocalfileoutputstream.c:385 gio/glocalfileoutputstream.c:398 #, c-format msgid "Error creating backup copy: %s" msgstr "Erro ao criar cópia de backup: %s" -#: gio/glocalfileoutputstream.c:415 +#: gio/glocalfileoutputstream.c:416 #, c-format msgid "Error renaming temporary file: %s" msgstr "Erro ao renomear arquivo temporário: %s" -#: gio/glocalfileoutputstream.c:599 gio/glocalfileoutputstream.c:1159 +#: gio/glocalfileoutputstream.c:600 gio/glocalfileoutputstream.c:1160 #, c-format msgid "Error truncating file: %s" msgstr "Erro ao truncar arquivo: %s" -#: gio/glocalfileoutputstream.c:652 gio/glocalfileoutputstream.c:890 -#: gio/glocalfileoutputstream.c:1140 gio/gsubprocess.c:380 +#: gio/glocalfileoutputstream.c:653 gio/glocalfileoutputstream.c:891 +#: gio/glocalfileoutputstream.c:1141 gio/gsubprocess.c:380 #, c-format msgid "Error opening file “%s”: %s" msgstr "Erro ao abrir arquivo “%s”: %s" -#: gio/glocalfileoutputstream.c:921 +#: gio/glocalfileoutputstream.c:922 msgid "Target file is a directory" msgstr "Arquivo alvo é um diretório" -#: gio/glocalfileoutputstream.c:926 +#: gio/glocalfileoutputstream.c:927 msgid "Target file is not a regular file" msgstr "Arquivo alvo não é um arquivo comum" -#: gio/glocalfileoutputstream.c:938 +#: gio/glocalfileoutputstream.c:939 msgid "The file was externally modified" msgstr "O arquivo foi modificado externamente" -#: gio/glocalfileoutputstream.c:1124 +#: gio/glocalfileoutputstream.c:1125 #, c-format msgid "Error removing old file: %s" msgstr "Erro ao remover arquivo antigo: %s" @@ -3257,7 +3331,7 @@ msgid "mount doesn’t implement synchronous content type guessing" msgstr "" "objeto de montagem não implementa estimativa de tipo de conteúdo síncrono" -#: gio/gnetworkaddress.c:388 +#: gio/gnetworkaddress.c:415 #, c-format msgid "Hostname “%s” contains “[” but not “]”" msgstr "Nome da máquina “%s” contém “[” mas não “]”" @@ -3284,13 +3358,12 @@ msgstr "Não foi possível criar o monitor de rede: " msgid "Could not get network status: " msgstr "Não foi possível obter o estado da rede: " -#: gio/gnetworkmonitornm.c:313 +#: gio/gnetworkmonitornm.c:347 #, c-format -#| msgid "NetworkManager version too old" msgid "NetworkManager not running" msgstr "O NetworkManager não está em execução" -#: gio/gnetworkmonitornm.c:324 +#: gio/gnetworkmonitornm.c:358 #, c-format msgid "NetworkManager version too old" msgstr "A versão do NetworkManager é muito antiga" @@ -3308,18 +3381,18 @@ msgstr "A soma dos vetores passada para %s é grande demais" msgid "Source stream is already closed" msgstr "A fonte do fluxo já está fechada" -#: gio/gresolver.c:344 gio/gthreadedresolver.c:150 gio/gthreadedresolver.c:160 +#: gio/gresolver.c:351 gio/gthreadedresolver.c:150 gio/gthreadedresolver.c:168 #, c-format msgid "Error resolving “%s”: %s" msgstr "Erro ao resolver “%s”: %s" #. Translators: The placeholder is for a function name. -#: gio/gresolver.c:389 gio/gresolver.c:547 +#: gio/gresolver.c:398 gio/gresolver.c:556 #, c-format msgid "%s not implemented" msgstr "%s não implementado" -#: gio/gresolver.c:915 gio/gresolver.c:967 +#: gio/gresolver.c:924 gio/gresolver.c:976 msgid "Invalid domain" msgstr "Domínio inválido" @@ -3694,175 +3767,175 @@ msgstr "Nome de esquema vazio\n" msgid "No such key “%s”\n" msgstr "Nenhuma chave “%s”\n" -#: gio/gsocket.c:373 +#: gio/gsocket.c:374 msgid "Invalid socket, not initialized" msgstr "Soquete inválido, não inicializado" -#: gio/gsocket.c:380 +#: gio/gsocket.c:381 #, c-format msgid "Invalid socket, initialization failed due to: %s" msgstr "Soquete inválido, inicialização falhou devido a: %s" -#: gio/gsocket.c:388 +#: gio/gsocket.c:389 msgid "Socket is already closed" msgstr "O soquete já está fechado" -#: gio/gsocket.c:403 gio/gsocket.c:3027 gio/gsocket.c:4244 gio/gsocket.c:4302 +#: gio/gsocket.c:404 gio/gsocket.c:3028 gio/gsocket.c:4245 gio/gsocket.c:4303 msgid "Socket I/O timed out" msgstr "Tempo de E/S do soquete foi esgotado" -#: gio/gsocket.c:538 +#: gio/gsocket.c:539 #, c-format msgid "creating GSocket from fd: %s" msgstr "criando GSocket a partir do fd: %s" -#: gio/gsocket.c:567 gio/gsocket.c:621 gio/gsocket.c:628 +#: gio/gsocket.c:568 gio/gsocket.c:622 gio/gsocket.c:629 #, c-format msgid "Unable to create socket: %s" msgstr "Não é possível criar soquete: %s" -#: gio/gsocket.c:621 +#: gio/gsocket.c:622 msgid "Unknown family was specified" msgstr "Foi especificada uma família desconhecida" -#: gio/gsocket.c:628 +#: gio/gsocket.c:629 msgid "Unknown protocol was specified" msgstr "Foi especificado um protocolo desconhecido" -#: gio/gsocket.c:1119 +#: gio/gsocket.c:1120 #, c-format msgid "Cannot use datagram operations on a non-datagram socket." msgstr "" "Não foi possível usar operações de datagrama em um soquete não-datagrama." -#: gio/gsocket.c:1136 +#: gio/gsocket.c:1137 #, c-format msgid "Cannot use datagram operations on a socket with a timeout set." msgstr "" "Não foi possível usar operações de datagrama em um soquete com um tempo " "limite definido." -#: gio/gsocket.c:1943 +#: gio/gsocket.c:1944 #, c-format msgid "could not get local address: %s" msgstr "não foi possível obter endereço local: %s" -#: gio/gsocket.c:1989 +#: gio/gsocket.c:1990 #, c-format msgid "could not get remote address: %s" msgstr "não foi possível obter endereço remoto: %s" -#: gio/gsocket.c:2055 +#: gio/gsocket.c:2056 #, c-format msgid "could not listen: %s" msgstr "não foi possível escutar: %s" -#: gio/gsocket.c:2157 +#: gio/gsocket.c:2158 #, c-format msgid "Error binding to address: %s" msgstr "Erro ao vincular ao endereço: %s" -#: gio/gsocket.c:2215 gio/gsocket.c:2252 gio/gsocket.c:2362 gio/gsocket.c:2387 -#: gio/gsocket.c:2460 gio/gsocket.c:2518 gio/gsocket.c:2536 +#: gio/gsocket.c:2216 gio/gsocket.c:2253 gio/gsocket.c:2363 gio/gsocket.c:2388 +#: gio/gsocket.c:2461 gio/gsocket.c:2519 gio/gsocket.c:2537 #, c-format msgid "Error joining multicast group: %s" msgstr "Erro ao entrar no grupo multicast: %s" -#: gio/gsocket.c:2216 gio/gsocket.c:2253 gio/gsocket.c:2363 gio/gsocket.c:2388 -#: gio/gsocket.c:2461 gio/gsocket.c:2519 gio/gsocket.c:2537 +#: gio/gsocket.c:2217 gio/gsocket.c:2254 gio/gsocket.c:2364 gio/gsocket.c:2389 +#: gio/gsocket.c:2462 gio/gsocket.c:2520 gio/gsocket.c:2538 #, c-format msgid "Error leaving multicast group: %s" msgstr "Erro ao sair do grupo multicast: %s" -#: gio/gsocket.c:2217 +#: gio/gsocket.c:2218 msgid "No support for source-specific multicast" msgstr "Não há suporte para multicast específico da origem" -#: gio/gsocket.c:2364 +#: gio/gsocket.c:2365 msgid "Unsupported socket family" msgstr "Família de soquete sem suporte" -#: gio/gsocket.c:2389 +#: gio/gsocket.c:2390 msgid "source-specific not an IPv4 address" msgstr "a origem específica não é um endereço IPv4" -#: gio/gsocket.c:2407 gio/gsocket.c:2436 gio/gsocket.c:2486 +#: gio/gsocket.c:2408 gio/gsocket.c:2437 gio/gsocket.c:2487 #, c-format msgid "Interface not found: %s" msgstr "Interface não localizada: %s" -#: gio/gsocket.c:2423 +#: gio/gsocket.c:2424 #, c-format msgid "Interface name too long" msgstr "Nome de interface grande demais" -#: gio/gsocket.c:2462 +#: gio/gsocket.c:2463 msgid "No support for IPv4 source-specific multicast" msgstr "Não há suporte para multicast específico da origem IPv4" -#: gio/gsocket.c:2520 +#: gio/gsocket.c:2521 msgid "No support for IPv6 source-specific multicast" msgstr "Não há suporte para multicast específico da origem IPv6" -#: gio/gsocket.c:2729 +#: gio/gsocket.c:2730 #, c-format msgid "Error accepting connection: %s" msgstr "Erro ao aceitar a conexão: %s" -#: gio/gsocket.c:2855 +#: gio/gsocket.c:2856 msgid "Connection in progress" msgstr "Conexão em progresso" -#: gio/gsocket.c:2906 +#: gio/gsocket.c:2907 msgid "Unable to get pending error: " msgstr "Não é possível obter erro pendente: " -#: gio/gsocket.c:3092 +#: gio/gsocket.c:3093 #, c-format msgid "Error receiving data: %s" msgstr "Erro ao receber dados: %s" -#: gio/gsocket.c:3289 +#: gio/gsocket.c:3290 #, c-format msgid "Error sending data: %s" msgstr "Erro ao enviar dados: %s" -#: gio/gsocket.c:3476 +#: gio/gsocket.c:3477 #, c-format msgid "Unable to shutdown socket: %s" msgstr "Não é possível encerrar soquete: %s" -#: gio/gsocket.c:3557 +#: gio/gsocket.c:3558 #, c-format msgid "Error closing socket: %s" msgstr "Erro ao fechar soquete: %s" -#: gio/gsocket.c:4237 +#: gio/gsocket.c:4238 #, c-format msgid "Waiting for socket condition: %s" msgstr "Aguardando pela condição do soquete: %s" -#: gio/gsocket.c:4614 gio/gsocket.c:4616 gio/gsocket.c:4762 gio/gsocket.c:4847 -#: gio/gsocket.c:5027 gio/gsocket.c:5067 gio/gsocket.c:5069 +#: gio/gsocket.c:4616 gio/gsocket.c:4618 gio/gsocket.c:4765 gio/gsocket.c:4850 +#: gio/gsocket.c:5028 gio/gsocket.c:5068 gio/gsocket.c:5070 #, c-format msgid "Error sending message: %s" msgstr "Erro ao enviar mensagem: %s" -#: gio/gsocket.c:4789 +#: gio/gsocket.c:4792 msgid "GSocketControlMessage not supported on Windows" msgstr "Não há suporte a GSocketControlMessage no Windows" -#: gio/gsocket.c:5260 gio/gsocket.c:5333 gio/gsocket.c:5560 +#: gio/gsocket.c:5261 gio/gsocket.c:5334 gio/gsocket.c:5560 #, c-format msgid "Error receiving message: %s" msgstr "Erro ao receber mensagem: %s" -#: gio/gsocket.c:5832 +#: gio/gsocket.c:5841 #, c-format msgid "Unable to read socket credentials: %s" msgstr "Não é possível ler as credenciais do soquete: %s" -#: gio/gsocket.c:5841 +#: gio/gsocket.c:5850 msgid "g_socket_get_credentials not implemented for this OS" msgstr "g_socket_get_credentials não está implementado para este SO" @@ -3880,15 +3953,15 @@ msgstr "Não foi possível conectar-se a %s: " msgid "Could not connect: " msgstr "Não foi possível conectar: " -#: gio/gsocketclient.c:1032 gio/gsocketclient.c:1731 +#: gio/gsocketclient.c:1033 gio/gsocketclient.c:1760 msgid "Unknown error on connect" msgstr "Erro desconhecido ao conectar" -#: gio/gsocketclient.c:1086 gio/gsocketclient.c:1640 +#: gio/gsocketclient.c:1087 gio/gsocketclient.c:1668 msgid "Proxying over a non-TCP connection is not supported." msgstr "Não há suporte ao uso de proxy sobre uma conexão não TCP." -#: gio/gsocketclient.c:1115 gio/gsocketclient.c:1666 +#: gio/gsocketclient.c:1116 gio/gsocketclient.c:1694 #, c-format msgid "Proxy protocol “%s” is not supported." msgstr "Não há suporte ao protocolo de proxy “%s”." @@ -3997,24 +4070,24 @@ msgstr "Não é possível lidar com a versão %d da codificação GThemedIcon" msgid "No valid addresses were found" msgstr "Nenhum endereço válido foi localizado" -#: gio/gthreadedresolver.c:317 +#: gio/gthreadedresolver.c:334 #, c-format msgid "Error reverse-resolving “%s”: %s" msgstr "Erro ao resolver reversamente “%s”: %s" -#: gio/gthreadedresolver.c:653 gio/gthreadedresolver.c:732 -#: gio/gthreadedresolver.c:830 gio/gthreadedresolver.c:880 +#: gio/gthreadedresolver.c:671 gio/gthreadedresolver.c:750 +#: gio/gthreadedresolver.c:848 gio/gthreadedresolver.c:898 #, c-format msgid "No DNS record of the requested type for “%s”" msgstr "Nenhum registro DNS do tipo de requisição para “%s”" -#: gio/gthreadedresolver.c:658 gio/gthreadedresolver.c:835 +#: gio/gthreadedresolver.c:676 gio/gthreadedresolver.c:853 #, c-format msgid "Temporarily unable to resolve “%s”" msgstr "Temporariamente sem condições de resolver “%s”" -#: gio/gthreadedresolver.c:663 gio/gthreadedresolver.c:840 -#: gio/gthreadedresolver.c:948 +#: gio/gthreadedresolver.c:681 gio/gthreadedresolver.c:858 +#: gio/gthreadedresolver.c:968 #, c-format msgid "Error resolving “%s”" msgstr "Erro ao resolver “%s”" @@ -4061,14 +4134,14 @@ msgstr "" msgid "The password entered is incorrect." msgstr "A senha digitada está incorreta." -#: gio/gunixconnection.c:166 gio/gunixconnection.c:563 +#: gio/gunixconnection.c:166 gio/gunixconnection.c:579 #, c-format msgid "Expecting 1 control message, got %d" msgid_plural "Expecting 1 control message, got %d" msgstr[0] "Esperando 1 mensagem de controle, obtive %d" msgstr[1] "Esperando 1 mensagem de controle, obtive %d" -#: gio/gunixconnection.c:182 gio/gunixconnection.c:575 +#: gio/gunixconnection.c:182 gio/gunixconnection.c:591 msgid "Unexpected type of ancillary data" msgstr "Tipo de dado auxiliar não esperado" @@ -4083,33 +4156,33 @@ msgstr[1] "Esperando um fd, mas obtive %d\n" msgid "Received invalid fd" msgstr "Recebido fd inválido" -#: gio/gunixconnection.c:355 +#: gio/gunixconnection.c:363 msgid "Error sending credentials: " msgstr "Erro ao enviar credenciais: " -#: gio/gunixconnection.c:504 +#: gio/gunixconnection.c:520 #, c-format msgid "Error checking if SO_PASSCRED is enabled for socket: %s" msgstr "Erro ao verificar se SO_PASSCRED está habilitado pelo soquete: %s" -#: gio/gunixconnection.c:520 +#: gio/gunixconnection.c:536 #, c-format msgid "Error enabling SO_PASSCRED: %s" msgstr "Erro ao habilitar SO_PASSCRED: %s" -#: gio/gunixconnection.c:549 +#: gio/gunixconnection.c:565 msgid "" "Expecting to read a single byte for receiving credentials but read zero bytes" msgstr "" "Era esperado ler apenas um byte para receber credenciais, mas foi lido zero " "byte" -#: gio/gunixconnection.c:589 +#: gio/gunixconnection.c:605 #, c-format msgid "Not expecting control message, but got %d" msgstr "Não esperava mensagem de controle, mas recebeu %d" -#: gio/gunixconnection.c:614 +#: gio/gunixconnection.c:630 #, c-format msgid "Error while disabling SO_PASSCRED: %s" msgstr "Erro ao desabilitar SO_PASSCRED: %s" @@ -4119,19 +4192,19 @@ msgstr "Erro ao desabilitar SO_PASSCRED: %s" msgid "Error reading from file descriptor: %s" msgstr "Erro ao ler do descritor de arquivo: %s" -#: gio/gunixinputstream.c:426 gio/gunixoutputstream.c:534 +#: gio/gunixinputstream.c:426 gio/gunixoutputstream.c:535 #: gio/gwin32inputstream.c:217 gio/gwin32outputstream.c:204 #, c-format msgid "Error closing file descriptor: %s" msgstr "Erro ao fechar o descritor de arquivo: %s" -#: gio/gunixmounts.c:2650 gio/gunixmounts.c:2703 +#: gio/gunixmounts.c:2661 gio/gunixmounts.c:2714 msgid "Filesystem root" msgstr "Sistema de arquivos root" -#: gio/gunixoutputstream.c:371 gio/gunixoutputstream.c:391 -#: gio/gunixoutputstream.c:478 gio/gunixoutputstream.c:498 -#: gio/gunixoutputstream.c:675 +#: gio/gunixoutputstream.c:372 gio/gunixoutputstream.c:392 +#: gio/gunixoutputstream.c:479 gio/gunixoutputstream.c:499 +#: gio/gunixoutputstream.c:676 #, c-format msgid "Error writing to file descriptor: %s" msgstr "Erro ao gravar o descritor de arquivo: %s" @@ -4280,55 +4353,55 @@ msgstr "Nenhum aplicativo chamado “%s” registrou um marcador para “%s”" msgid "Failed to expand exec line “%s” with URI “%s”" msgstr "Falha em expandir linha de execução “%s” com URI “%s”" -#: glib/gconvert.c:474 +#: glib/gconvert.c:466 msgid "Unrepresentable character in conversion input" msgstr "Caractere não representável na conversão da entrada" -#: glib/gconvert.c:501 glib/gutf8.c:865 glib/gutf8.c:1077 glib/gutf8.c:1214 +#: glib/gconvert.c:493 glib/gutf8.c:865 glib/gutf8.c:1077 glib/gutf8.c:1214 #: glib/gutf8.c:1318 msgid "Partial character sequence at end of input" msgstr "Sequência de caracteres parcial no final da entrada" -#: glib/gconvert.c:770 +#: glib/gconvert.c:762 #, c-format msgid "Cannot convert fallback “%s” to codeset “%s”" msgstr "" "Não é possível converter a sequência “%s” para conjunto caracteres “%s”" -#: glib/gconvert.c:942 +#: glib/gconvert.c:934 msgid "Embedded NUL byte in conversion input" msgstr "Byte NULO embutido na entrada de conversão" -#: glib/gconvert.c:963 +#: glib/gconvert.c:955 msgid "Embedded NUL byte in conversion output" msgstr "Byte NULO embutido na saída de conversão" -#: glib/gconvert.c:1648 +#: glib/gconvert.c:1640 #, c-format msgid "The URI “%s” is not an absolute URI using the “file” scheme" msgstr "O URI “%s” não é um URI absoluto que utilize o esquema “file”" -#: glib/gconvert.c:1658 +#: glib/gconvert.c:1650 #, c-format msgid "The local file URI “%s” may not include a “#”" msgstr "O URI de arquivo local “%s” não pode incluir um “#”" -#: glib/gconvert.c:1675 +#: glib/gconvert.c:1667 #, c-format msgid "The URI “%s” is invalid" msgstr "O URI “%s” é inválido" -#: glib/gconvert.c:1687 +#: glib/gconvert.c:1679 #, c-format msgid "The hostname of the URI “%s” is invalid" msgstr "O nome de servidor do URI “%s” é inválido" -#: glib/gconvert.c:1703 +#: glib/gconvert.c:1695 #, c-format msgid "The URI “%s” contains invalidly escaped characters" msgstr "O URI “%s” contém caracteres com escape inválido" -#: glib/gconvert.c:1775 +#: glib/gconvert.c:1767 #, c-format msgid "The pathname “%s” is not an absolute path" msgstr "O nome de caminho “%s” não é um caminho absoluto" @@ -4823,30 +4896,30 @@ msgstr "Modelo “%s” inválido, não deveria conter um “%s”" msgid "Template “%s” doesn’t contain XXXXXX" msgstr "Modelo “%s” não contém XXXXXX" -#: glib/gfileutils.c:2116 +#: glib/gfileutils.c:2112 glib/gfileutils.c:2140 #, c-format msgid "Failed to read the symbolic link “%s”: %s" msgstr "Falha ao ler link simbólico “%s”: %s" -#: glib/giochannel.c:1389 +#: glib/giochannel.c:1393 #, c-format msgid "Could not open converter from “%s” to “%s”: %s" msgstr "Não foi possível abrir conversor de “%s” para “%s”: %s" -#: glib/giochannel.c:1734 +#: glib/giochannel.c:1738 msgid "Can’t do a raw read in g_io_channel_read_line_string" msgstr "" "Não é possível fazer uma leitura em bruto em g_io_channel_read_line_string" -#: glib/giochannel.c:1781 glib/giochannel.c:2039 glib/giochannel.c:2126 +#: glib/giochannel.c:1785 glib/giochannel.c:2043 glib/giochannel.c:2130 msgid "Leftover unconverted data in read buffer" msgstr "Dados residuais não convertidos no buffer de leitura" -#: glib/giochannel.c:1862 glib/giochannel.c:1939 +#: glib/giochannel.c:1866 glib/giochannel.c:1943 msgid "Channel terminates in a partial character" msgstr "Canal termina em um caractere parcial" -#: glib/giochannel.c:1925 +#: glib/giochannel.c:1929 msgid "Can’t do a raw read in g_io_channel_read_to_end" msgstr "Não é possível fazer uma leitura em bruto de g_io_channel_read_to_end" @@ -5186,62 +5259,62 @@ msgstr "" "Documento terminou inesperadamente dentro de um comentário ou instrução de " "processamento" -#: glib/goption.c:861 +#: glib/goption.c:865 msgid "[OPTION…]" msgstr "[OPÇÃO…]" -#: glib/goption.c:977 +#: glib/goption.c:981 msgid "Help Options:" msgstr "Opções de ajuda:" -#: glib/goption.c:978 +#: glib/goption.c:982 msgid "Show help options" msgstr "Mostra opções de ajuda" -#: glib/goption.c:984 +#: glib/goption.c:988 msgid "Show all help options" msgstr "Mostra todas as opções de ajuda" -#: glib/goption.c:1047 +#: glib/goption.c:1051 msgid "Application Options:" msgstr "Opções de aplicativo:" -#: glib/goption.c:1049 +#: glib/goption.c:1053 msgid "Options:" msgstr "Opções:" -#: glib/goption.c:1113 glib/goption.c:1183 +#: glib/goption.c:1117 glib/goption.c:1187 #, c-format msgid "Cannot parse integer value “%s” for %s" msgstr "Não é possível converter o valor inteiro “%s” para %s" -#: glib/goption.c:1123 glib/goption.c:1191 +#: glib/goption.c:1127 glib/goption.c:1195 #, c-format msgid "Integer value “%s” for %s out of range" msgstr "Valor inteiro “%s” para %s fora dos limites" -#: glib/goption.c:1148 +#: glib/goption.c:1152 #, c-format msgid "Cannot parse double value “%s” for %s" msgstr "" "Não é possível converter o ponto flutuante com dupla precisão “%s” para %s" -#: glib/goption.c:1156 +#: glib/goption.c:1160 #, c-format msgid "Double value “%s” for %s out of range" msgstr "Ponto flutuante com dupla precisão “%s” para %s fora dos limites" -#: glib/goption.c:1448 glib/goption.c:1527 +#: glib/goption.c:1452 glib/goption.c:1531 #, c-format msgid "Error parsing option %s" msgstr "Erro ao ler a opção %s" -#: glib/goption.c:1558 glib/goption.c:1671 +#: glib/goption.c:1562 glib/goption.c:1675 #, c-format msgid "Missing argument for %s" msgstr "Falta argumento para %s" -#: glib/goption.c:2132 +#: glib/goption.c:2181 #, c-format msgid "Unknown option %s" msgstr "Opção %s desconhecida" @@ -5771,21 +5844,21 @@ msgstr "" "Erro inesperado no g_io_channel_win32_poll() ao ler dados de um processo " "filho" -#: glib/gstrfuncs.c:3286 glib/gstrfuncs.c:3388 +#: glib/gstrfuncs.c:3301 glib/gstrfuncs.c:3403 msgid "Empty string is not a number" msgstr "Texto vazio não é um número" -#: glib/gstrfuncs.c:3310 +#: glib/gstrfuncs.c:3325 #, c-format msgid "“%s” is not a signed number" msgstr "“%s” não é um número assinado" -#: glib/gstrfuncs.c:3320 glib/gstrfuncs.c:3424 +#: glib/gstrfuncs.c:3335 glib/gstrfuncs.c:3439 #, c-format msgid "Number “%s” is out of bounds [%s, %s]" msgstr "O número “%s” está fora dos limites [%s, %s]" -#: glib/gstrfuncs.c:3414 +#: glib/gstrfuncs.c:3429 #, c-format msgid "“%s” is not an unsigned number" msgstr "“%s” não é um número não assinado" @@ -5808,181 +5881,157 @@ msgid "Character out of range for UTF-16" msgstr "Caractere fora do limite para UTF-16" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2339 +#: glib/gutils.c:2319 #, c-format -#| msgid "%.1f kB" msgid "%.1f kB" msgstr "%.1f kB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2341 +#: glib/gutils.c:2321 #, c-format -#| msgid "%.1f MB" msgid "%.1f MB" msgstr "%.1f MB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2343 +#: glib/gutils.c:2323 #, c-format -#| msgid "%.1f GB" msgid "%.1f GB" msgstr "%.1f GB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2345 +#: glib/gutils.c:2325 #, c-format -#| msgid "%.1f TB" msgid "%.1f TB" msgstr "%.1f TB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2347 +#: glib/gutils.c:2327 #, c-format -#| msgid "%.1f PB" msgid "%.1f PB" msgstr "%.1f PB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2349 +#: glib/gutils.c:2329 #, c-format -#| msgid "%.1f EB" msgid "%.1f EB" msgstr "%.1f EB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2353 +#: glib/gutils.c:2333 #, c-format -#| msgid "%.1f KiB" msgid "%.1f KiB" msgstr "%.1f KiB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2355 +#: glib/gutils.c:2335 #, c-format -#| msgid "%.1f MiB" msgid "%.1f MiB" msgstr "%.1f MiB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2357 +#: glib/gutils.c:2337 #, c-format -#| msgid "%.1f GiB" msgid "%.1f GiB" msgstr "%.1f GiB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2359 +#: glib/gutils.c:2339 #, c-format -#| msgid "%.1f TiB" msgid "%.1f TiB" msgstr "%.1f TiB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2361 +#: glib/gutils.c:2341 #, c-format -#| msgid "%.1f PiB" msgid "%.1f PiB" msgstr "%.1f PiB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2363 +#: glib/gutils.c:2343 #, c-format -#| msgid "%.1f EiB" msgid "%.1f EiB" msgstr "%.1f EiB" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2367 +#: glib/gutils.c:2347 #, c-format -#| msgid "%.1f kb" msgid "%.1f kb" msgstr "%.1f kb" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2369 +#: glib/gutils.c:2349 #, c-format -#| msgid "%.1f Mb" msgid "%.1f Mb" msgstr "%.1f Mb" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2371 +#: glib/gutils.c:2351 #, c-format -#| msgid "%.1f Gb" msgid "%.1f Gb" msgstr "%.1f Gb" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2373 +#: glib/gutils.c:2353 #, c-format -#| msgid "%.1f Tb" msgid "%.1f Tb" msgstr "%.1f Tb" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2375 +#: glib/gutils.c:2355 #, c-format -#| msgid "%.1f Pb" msgid "%.1f Pb" msgstr "%.1f Pb" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2377 +#: glib/gutils.c:2357 #, c-format -#| msgid "%.1f Eb" msgid "%.1f Eb" msgstr "%.1f Eb" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2381 +#: glib/gutils.c:2361 #, c-format -#| msgid "%.1f Kib" msgid "%.1f Kib" msgstr "%.1f Kib" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2383 +#: glib/gutils.c:2363 #, c-format -#| msgid "%.1f Mib" msgid "%.1f Mib" msgstr "%.1f Mib" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2385 +#: glib/gutils.c:2365 #, c-format -#| msgid "%.1f Gib" msgid "%.1f Gib" msgstr "%.1f Gib" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2387 +#: glib/gutils.c:2367 #, c-format -#| msgid "%.1f Tib" msgid "%.1f Tib" msgstr "%.1f Tib" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2389 +#: glib/gutils.c:2369 #, c-format -#| msgid "%.1f Pib" msgid "%.1f Pib" msgstr "%.1f Pib" #. Translators: Keep the no-break space between %.1f and the unit symbol -#: glib/gutils.c:2391 +#: glib/gutils.c:2371 #, c-format -#| msgid "%.1f Eib" msgid "%.1f Eib" msgstr "%.1f Eib" -#: glib/gutils.c:2425 glib/gutils.c:2551 +#: glib/gutils.c:2405 glib/gutils.c:2522 #, c-format msgid "%u byte" msgid_plural "%u bytes" msgstr[0] "%u byte" msgstr[1] "%u bytes" -#: glib/gutils.c:2429 +#: glib/gutils.c:2409 #, c-format msgid "%u bit" msgid_plural "%u bits" @@ -5990,7 +6039,7 @@ msgstr[0] "%u bit" msgstr[1] "%u bits" #. Translators: the %s in "%s bytes" will always be replaced by a number. -#: glib/gutils.c:2496 +#: glib/gutils.c:2476 #, c-format msgid "%s byte" msgid_plural "%s bytes" @@ -5998,7 +6047,7 @@ msgstr[0] "%s byte" msgstr[1] "%s bytes" #. Translators: the %s in "%s bits" will always be replaced by a number. -#: glib/gutils.c:2501 +#: glib/gutils.c:2481 #, c-format msgid "%s bit" msgid_plural "%s bits" @@ -6010,36 +6059,48 @@ msgstr[1] "%s bits" #. * compatibility. Users will not see this string unless a program is using this deprecated function. #. * Please translate as literally as possible. #. -#: glib/gutils.c:2564 +#: glib/gutils.c:2535 #, c-format msgid "%.1f KB" msgstr "%.1f KB" -#: glib/gutils.c:2569 +#: glib/gutils.c:2540 #, c-format msgid "%.1f MB" msgstr "%.1f MB" -#: glib/gutils.c:2574 +#: glib/gutils.c:2545 #, c-format msgid "%.1f GB" msgstr "%.1f GB" -#: glib/gutils.c:2579 +#: glib/gutils.c:2550 #, c-format msgid "%.1f TB" msgstr "%.1f TB" -#: glib/gutils.c:2584 +#: glib/gutils.c:2555 #, c-format msgid "%.1f PB" msgstr "%.1f PB" -#: glib/gutils.c:2589 +#: glib/gutils.c:2560 #, c-format msgid "%.1f EB" msgstr "%.1f EB" +#~ msgid "; ignoring override for this key.\n" +#~ msgstr "; ignorando sobrescrita para esta chave.\n" + +#~ msgid " and --strict was specified; exiting.\n" +#~ msgstr " e --strict foi especificado; saindo.\n" + +#~ msgid "Ignoring override for this key.\n" +#~ msgstr "Ignorando sobrescrita para esta chave.\n" + +#~ msgid "doing nothing.\n" +#~ msgstr "fazendo nada.\n" + #~ msgid "No such method '%s'" #~ msgstr "Método “%s” inexistente" diff --git a/tests/asyncqueue-test.c b/tests/asyncqueue-test.c index 0cf67b21b..2dd8563c7 100644 --- a/tests/asyncqueue-test.c +++ b/tests/asyncqueue-test.c @@ -1,6 +1,5 @@ #undef G_DISABLE_ASSERT #undef G_LOG_DOMAIN -#undef G_DISABLE_DEPRECATED #include <time.h> #include <stdlib.h> diff --git a/tests/module-test.c b/tests/module-test.c index fbf23169f..8047b74ec 100644 --- a/tests/module-test.c +++ b/tests/module-test.c @@ -28,6 +28,12 @@ #include <gmodule.h> #include <string.h> +#ifdef _MSC_VER +# define MODULE_FILENAME_PREFIX "" +#else +# define MODULE_FILENAME_PREFIX "lib" +#endif + gchar* global_state; G_MODULE_EXPORT void g_clash_func (void); @@ -84,8 +90,8 @@ main (int argc, if (!g_module_supported ()) g_error ("dynamic modules not supported"); - plugin_a = g_test_build_filename (G_TEST_BUILT, "libmoduletestplugin_a", NULL); - plugin_b = g_test_build_filename (G_TEST_BUILT, "libmoduletestplugin_b", NULL); + plugin_a = g_test_build_filename (G_TEST_BUILT, MODULE_FILENAME_PREFIX "moduletestplugin_a", NULL); + plugin_b = g_test_build_filename (G_TEST_BUILT, MODULE_FILENAME_PREFIX "moduletestplugin_b", NULL); /* module handles */ diff --git a/tests/testglib.c b/tests/testglib.c index 687fadd5b..372ddae2c 100644 --- a/tests/testglib.c +++ b/tests/testglib.c @@ -1169,10 +1169,11 @@ hash_table_tests (void) g_hash_table_destroy (hash_table); } -#ifndef G_DISABLE_DEPRECATED static void relation_test (void) { + G_GNUC_BEGIN_IGNORE_DEPRECATIONS + GRelation *relation = g_relation_new (2); GTuples *tuples; gint data [1024]; @@ -1241,8 +1242,9 @@ relation_test (void) g_relation_destroy (relation); relation = NULL; + + G_GNUC_END_IGNORE_DEPRECATIONS } -#endif static void gstring_tests (void) @@ -1637,10 +1639,11 @@ various_string_tests (void) /* g_debug (argv[0]); */ } -#ifndef G_DISABLE_DEPRECATED static void test_mem_chunks (void) { + G_GNUC_BEGIN_IGNORE_DEPRECATIONS + GMemChunk *mem_chunk = g_mem_chunk_new ("test mem chunk", 50, 100, G_ALLOC_AND_FREE); gchar *mem[10000]; guint i; @@ -1655,8 +1658,9 @@ test_mem_chunks (void) g_mem_chunk_free (mem_chunk, mem[i]); g_mem_chunk_destroy (mem_chunk); + + G_GNUC_END_IGNORE_DEPRECATIONS } -#endif int main (int argc, @@ -1674,15 +1678,11 @@ main (int argc, g_test_add_func ("/testglib/GTree", binary_tree_test); g_test_add_func ("/testglib/Arrays", test_arrays); g_test_add_func ("/testglib/GHashTable", hash_table_tests); -#ifndef G_DISABLE_DEPRECATED g_test_add_func ("/testglib/Relation (deprecated)", relation_test); -#endif g_test_add_func ("/testglib/File Paths", test_paths); g_test_add_func ("/testglib/File Functions", test_file_functions); g_test_add_func ("/testglib/Parse Debug Strings", test_g_parse_debug_string); -#ifndef G_DISABLE_DEPRECATED g_test_add_func ("/testglib/GMemChunk (deprecated)", test_mem_chunks); -#endif g_test_add_func ("/testglib/Warnings & Errors", log_warning_error_tests); g_test_add_func ("/testglib/Timers (slow)", timer_tests); |